Network resource downloading method, apparatus, device, and storage medium

By identifying the resource address between the terminal and the first server and redirecting the download to a third server in a closer area, the latency and bandwidth issues in remote downloads are resolved, resulting in faster and more stable resource acquisition.

CN116455885BActive Publication Date: 2026-03-27TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-07
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

When a terminal downloads network resources from a remote server, there are problems such as high network latency, slow download speed, high failure rate and high bandwidth cost, which are particularly evident in cross-border communication links with long distances and limited bandwidth.

Method used

By identifying the category characteristics of resource addresses between the terminal and the first server, the backup resource address associated with the target resource address is obtained, and the download request is redirected to a third server located in a closer area, thereby achieving backup download of the resource.

Benefits of technology

It effectively reduces network latency, improves resource download speed and stability, and reduces bandwidth usage and costs at designated internet exit points.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116455885B_ABST
    Figure CN116455885B_ABST
Patent Text Reader

Abstract

The application provides a network resource downloading method and device, equipment and storage medium, relates to the field of Internet technology, can be applied to cloud technology, artificial intelligence, intelligent transportation, auxiliary driving and various scenes, including: a terminal analyzes a resource downloading request sent by a target application program for a target network resource, obtains a target resource address, and sends an address query request carrying the target resource address to a first server; the first server performs category feature identification on the target resource address, and in the case that the identification meets a preset feature condition, acquires a backup resource address stored in association with the target resource address; and sends an address query response information carrying the backup resource address to the terminal; the terminal updates the target resource address in the resource downloading request to the backup resource address, and sends an updated resource downloading request obtained to a third server, and obtains a backup network resource sent by the third server. The application can effectively improve the downloading speed and success rate.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of Internet, and particularly relates to a network resource downloading method and device, equipment and a storage medium. BACKGROUND

[0002] When a terminal downloads a resource from a server, if the distance between the terminal and the server is too far, a long network delay will be generated, which affects the download speed. In addition, in the case of insufficient bandwidth allocation or the server setting a transmission speed limit, the download will be slow or even fail. For example, when a network resource is pulled from a server in a foreign country, due to the long distance, long communication link and limited international bandwidth, the network transmission delay is high, the download speed is slow and the failure rate is high, and the bandwidth cost is also very high. Therefore, an improved network resource downloading scheme is needed to optimize the download speed in the above resource downloading scenario and reduce the network delay and the download failure rate. SUMMARY

[0003] The present application provides a network resource downloading method, device, equipment and storage medium, which can effectively improve the download speed and stability.

[0004] In one aspect, the present application provides a network resource downloading method applied to a terminal, the method comprising:

[0005] In response to a resource downloading request for a target network resource sent by a target application program, the resource downloading request is analyzed to obtain a target resource address; the target resource address is a network address of the target network resource in a second server;

[0006] An address query request carrying the target resource address is sent to a first server;

[0007] An address query response information corresponding to the address query request sent by the first server is received, and the address query response information carries a backup resource address associated with the target resource address; the backup resource address is obtained by the first server performing category feature identification on the target resource address, and is obtained in the case that the category feature of the target resource address meets a preset feature condition; the backup resource address is a network address of a backup network resource corresponding to the target network resource in a third server;

[0008] The target resource address in the resource downloading request is updated to the backup resource address to obtain an updated resource downloading request;

[0009] The updated resource downloading request is sent to the third server to obtain a backup network resource sent by the third server;

[0010] The second server and the third server are located in different regions, and a physical distance between the second server and the first server is greater than a physical distance between the third server and the first server.

[0011] Another aspect provides a network resource downloading method, applied to a first server, the method comprising:

[0012] receiving an address query request carrying a target resource address sent by a terminal; the target resource address is obtained by the terminal from a resource downloading request for a target network resource sent by a target application program, and is a network address of the target network resource in a second server;

[0013] performing category feature identification on the target resource address;

[0014] in a case where the category feature of the target resource address meets a preset feature condition, obtaining a backup resource address stored in association with the target resource address; the backup resource address is a network address of a backup network resource corresponding to the target network resource in a third server;

[0015] sending, to the terminal, address query response information corresponding to the address query request, the address query response information carrying the backup resource address stored in association with the target resource address;

[0016] The second server and the third server are located in different regions, and a physical distance between the second server and the first server is greater than a physical distance between the third server and the first server.

[0017] Another aspect provides a network resource downloading device, applied to a terminal, the device comprising:

[0018] a resource downloading request analysis module, configured to analyze a resource downloading request for a target network resource sent by a target application program, to obtain a target resource address; the target resource address is a network address of the target network resource in a second server;

[0019] an address query request sending module, configured to send an address query request carrying the target resource address to a first server;

[0020] An address query response receiving module is configured to receive address query response information corresponding to the address query request sent by the first server, the address query response information carrying a backup resource address associated with the target resource address; the backup resource address is obtained by the first server performing category feature identification on the target resource address, and is obtained in a case where the category feature of the target resource address meets a preset feature condition; the backup resource address is a network address of a backup network resource corresponding to the target network resource in a third server;

[0021] A download request updating module is configured to update the target resource address in the resource download request to the backup resource address, to obtain an updated resource download request;

[0022] A backup network resource obtaining module is configured to send the updated resource download request to the third server, to obtain a backup network resource sent by the third server;

[0023] The second server and the third server are located in different regions, and a physical distance between the second server and the first server is greater than a physical distance between the third server and the first server.

[0024] In another aspect, a network resource downloading apparatus is provided, and is applied to a first server, the apparatus comprising:

[0025] An address query request receiving module is configured to receive an address query request carrying a target resource address sent by a terminal; the target resource address is obtained by the terminal performing analysis on a resource download request for a target network resource sent by a target application program, and is a network address of the target network resource in a second server;

[0026] A category feature identification module is configured to perform category feature identification on the target resource address;

[0027] A backup resource address obtaining module is configured to obtain a backup resource address associated with the target resource address in a case where the category feature of the target resource address meets a preset feature condition; the backup resource address is a network address of a backup network resource corresponding to the target network resource in a third server;

[0028] A backup resource address sending module is configured to send address query response information corresponding to the address query request to the terminal, the address query response information carrying the backup resource address associated with the target resource address;

[0029] The second server and the third server are located in different regions, and the physical distance between the second server and the first server is greater than the physical distance between the third server and the first server.

[0030] Another aspect provides a computer device, the device comprising a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor to implement the network resource downloading method as described above.

[0031] Another aspect provides a computer-readable storage medium, the storage medium storing at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by a processor to implement the network resource downloading method as described above.

[0032] Another aspect provides a server, the server comprising a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor to implement the network resource downloading method as described above.

[0033] Another aspect provides a terminal, the terminal comprising a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor to implement the network resource downloading method as described above.

[0034] Another aspect provides a computer program product or a computer program, the computer program product or the computer program comprising computer instructions, the computer instructions being executed by a processor to implement the network resource downloading method as described above.

[0035] The network resource downloading method, device, equipment, storage medium, server, terminal, computer program and computer program product provided by the present application have the following technical effects:

[0036] The technical solution of the present application is that the terminal responds to the resource download request for the target network resource sent by the target application program, analyzes the resource download request to obtain the target resource address; the target resource address is the network address of the target network resource in the second server; an address query request carrying the target resource address is sent to the first server; the first server performs category feature identification on the target resource address, and in the case that the category feature of the target resource address meets the preset feature condition, a backup resource address associated with the target resource address is obtained; the backup resource address is the network address of the backup network resource corresponding to the target network resource in the third server, and an address query response information carrying the backup resource address associated with the target resource address corresponding to the address query request is sent to the terminal; the terminal updates the target resource address in the resource download request to the backup resource address, obtains an updated resource download request, and sends the updated resource download request to the third server to obtain the backup network resource sent by the third server. The physical locations of the second server and the third server are located in different regions, and the physical distance between the second server and the first server is greater than the physical distance between the third server and the first server. By converting the resource download request sent to the second server into a request sent to the third server, the backup resource is downloaded from the third server with shorter communication distance and link, which can effectively reduce network delay, improve resource download speed, stability and success rate, and save bandwidth occupation and cost of the specified Internet exit. BRIEF DESCRIPTION OF DRAWINGS

[0037] In order to more clearly illustrate the technical solutions and advantages of the embodiments of the present application or the prior art, the drawings needed in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and those skilled in the art can obtain other drawings according to these drawings without creative labor.

[0038] Figure 1 is a schematic diagram of an application environment provided by an embodiment of the present application;

[0039] Figure 2 is a flowchart of a network resource download method provided by an embodiment of the present application;

[0040] Figure 3 is a flowchart of a URL address acquisition method provided by an embodiment of the present application;

[0041] Figure 4 is a flowchart of another network resource download method provided by an embodiment of the present application;

[0042] Figure 5is a flowchart of a network resource downloading method provided by an embodiment of the present application;

[0043] Figure 6 is a flowchart of a network resource downloading method provided by an embodiment of the present application;

[0044] Figure 7 is a framework diagram of a network resource downloading device provided by an embodiment of the present application;

[0045] Figure 8 is a framework diagram of a network resource downloading device provided by an embodiment of the present application;

[0046] Figure 9 is a hardware structure block diagram of an electronic device of a network resource downloading method provided by an embodiment of the present application;

[0047] Figure 10 is a structure diagram of a blockchain system provided by an embodiment of the present application. DETAILED DESCRIPTION

[0048] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of the present application.

[0049] It should be noted that the terms "first", "second", and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or server including a series of steps or sub-modules does not necessarily have to be limited to those steps or sub-modules clearly listed, but can include other steps or sub-modules not clearly listed or inherent to these processes, methods, products or devices.

[0050] Before the embodiments of the present application are further described in detail, the terms and terms involved in the embodiments of the present application are explained, and the terms and terms involved in the embodiments of the present application are applicable to the following explanations.

[0051] HTTP(Hyper Text Transfer Protocol, Hyper Text Transfer Protocol): a request-response protocol that usually runs on TCP. It specifies what messages the client can send to the server and what response it gets.

[0052] CDN(Content Delivery Network, Content Delivery Network): CDN is an intelligent virtual network built on the existing network foundation. By deploying edge servers in various locations, through the load balancing, content distribution, scheduling and other function modules of the center platform, users can access the required content nearby, reduce network congestion, and improve user access response speed and hit rate.

[0053] URL(uniform resource locator, uniform resource locator): a method for specifying information location on the World Wide Web service program of the Internet.

[0054] VPN(Virtual Private Network, Virtual Private Network): a private network established on a public network for encrypted communication. It is widely used in enterprise networks. VPN gateway realizes remote access by encrypting data packets and converting data packet target addresses. VPN can be realized by servers, hardware, software and other ways.

[0055] Virtual network card: also known as virtual network adapter, which is a software simulation of a network environment and a network adapter.

[0056] Please refer to Figure 1 , Figure 1 is a schematic diagram of an application environment provided by the embodiment of the present application, as Figure 1 shown, the application environment can include at least terminal 01, first server 02, second server 03 and third server 04. In actual application, terminal 01, first server 02, second server 03 and third server 04 can be directly or indirectly connected through wired or wireless communication mode, which is not limited in the present application.

[0057] The server in the embodiment of the present application can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud service, cloud database, cloud computing, cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, CDN(Content Delivery Network, Content Delivery Network), and basic cloud computing services such as big data and artificial intelligence platform.

[0058] Specifically, cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and network in a wide area network or a local area network to realize data calculation, storage, processing, and sharing. It distributes computing tasks on a resource pool composed of a large number of computers, so that various application systems can obtain computing power, storage space, and information services as needed. The network that provides resources is called "cloud". Among them, artificial intelligence cloud service is also commonly referred to as AIaaS (AI as a Service). This is a mainstream service mode of an artificial intelligence platform. Specifically, the AIaaS platform will split several common AI services and provide independent or packaged services in the cloud. This service mode is similar to opening an AI theme mall: all developers can access one or more artificial intelligence services provided by the platform through API interfaces, and some experienced developers can also use the AI framework and AI infrastructure provided by the platform to deploy and maintain their own cloud artificial intelligence services.

[0059] Specifically, the server involved above can include an entity device, can specifically include a network communication submodule, a processor, a memory, and the like, and can also include software running in the entity device, and can specifically include an application and the like.

[0060] In the embodiments of the present application, the terminal 01 can include an entity device of the type of a smart phone, a desktop computer, a tablet computer, a notebook computer, a digital assistant, an augmented reality (AR) / virtual reality (VR) device, a smart voice interaction device, a smart home appliance, a smart wearable device, a vehicle-mounted terminal device, and the like, and can also include software running in the entity device, such as an application and the like.

[0061] In the embodiments of the present application, the terminal 01 can run a target application, the target application generates a resource download request for a target network resource, the terminal 01 analyzes the resource download request of the target application, and sends the obtained target resource address to the first server 02 through an address query request. In the case of receiving the address query response information carrying the backup resource address fed back by the first server 02, an updated resource download request carrying the backup resource address is generated and sent to the third server 04 to obtain the backup network resource; in the case of receiving the response information representing the absence of the backup resource address fed back by the first server 02, the resource download request is sent to the second server 03 to obtain the target network resource.

[0062] The first server 02 can be a background server in which the target resource address and the corresponding backup resource address are associated and stored, and is configured to, in response to the address query request carrying the target resource address sent by the terminal 01, perform feature recognition on the target resource address, acquire the corresponding backup resource address in a case where the category feature of the target resource address meets a preset feature condition, and send the backup resource address to the terminal 01, so that the terminal 01 sends an updated resource download request to the third server 04. The first server 02 also stores backup update time information associated with the resource address, can determine whether the backup network resource corresponding to the backup resource address is expired according to the backup update time information, and in a case where the category feature of the target resource address does not meet the preset feature condition, the associated backup resource address is not acquired, or the backup network resource is an expired resource, sends response information indicating that there is no backup resource address to the terminal 01, so that the terminal 02 sends a resource download request to the second server 03.

[0063] Specifically, the second server 03 and the third server 04 are located in different regions, and the physical distance between the second server 03 and the first server 02 is greater than the physical distance between the third server 04 and the first server 02. In addition, the physical distance between the second server 03 and the terminal 01 is greater than the physical distance between the third server 04 and the terminal 01. For example, the second server 03 can be an overseas server, and stores the target network resource. The third server 04 can be a locally deployed domestic server, such as a CDN server, and stores the backup network resource. Correspondingly, the terminal 01 sends a resource download request in the domestic area.

[0064] Specifically, the first server 02 is further configured to acquire the target network resource from the second server 03 and send the target network resource to the third server 04 for backup storage. The third server 04 stores the target network resource as a backup network resource, and sends the backup resource address of the backup network resource on the third server 04 to the first server 02. The first server 02 stores the backup resource address in association with the target resource address. In some cases, the first server 02 also acquires the update time information of the target network resource from the second server 03, and stores the update time information in association with the target resource address.

[0065] In addition, it can be understood that, Figure 1 The network resource download method shown is only an application environment, which can include more or fewer nodes, and the present application does not limit this.

[0066] The application environment or the terminal 01, the first server 02, the second server 03 and the third server 04 in the application environment involved in the embodiments of the present application can be a distributed system formed by a client, a plurality of nodes (any form of computing device in an access network, such as a server, a user terminal) connected through network communication. The distributed system can be a blockchain system, which can provide the network resource download service and the data storage service mentioned above.

[0067] Referring to Figure 10 , Figure 10 is an optional structural schematic diagram of a distributed system 100 provided by the embodiments of the present application applied to a blockchain system, formed by a plurality of nodes (any form of computing device in an access network, such as a server, a user terminal) and a client. In the distributed system, any machine such as a server, a terminal can join to become a node, and the node includes a hardware layer, an intermediate layer, an operating system layer and an application layer.

[0068] The blockchain is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithm, and is essentially a decentralized database, a series of data blocks associated using cryptography, each data block containing information of a batch of network transactions, for verifying the validity (anti-fake) of the information and generating the next block. The blockchain can include a blockchain underlying platform, a platform product service layer, and an application service layer. The blockchain underlying platform can include user management, basic services, smart contracts, and operation detection processing modules. The user management module is responsible for identity information management of all blockchain participants, including maintaining public and private key generation (account management), key management, and maintenance of the correspondence between real identities and blockchain addresses (permission management), and in the case of authorization, detecting and auditing the transaction of certain real identities, providing rule configuration for risk control (risk audit); the basic service module is deployed on all blockchain node devices to verify the validity of business requests and record them to the storage after consensus, for a new business request, the basic service first performs interface adaptation analysis and authentication processing (interface adaptation), then encrypts the business information through a consensus algorithm (consensus management), and after encryption, the complete and consistent information is transmitted to the shared ledger (network communication) and recorded and stored; the smart contract module is responsible for contract registration and issuance, contract triggering and contract execution, and developers can define contract logic through a certain programming language, publish it to the blockchain (contract registration), and trigger execution according to the logic of the contract terms, complete the contract logic, and also provide contract upgrade and cancellation functions; the operation detection module is mainly responsible for deployment, configuration modification, contract setting, cloud adaptation during product release, and real-time state visualization output during product operation, such as alarm, network detection, and node device health state detection. The platform product service layer provides basic capabilities and implementation frameworks for typical applications, and developers can stack business characteristics based on these basic capabilities to complete the blockchain implementation of business logic. The application service layer provides application services based on the blockchain scheme for business participants to use.

[0069] The network resource downloading method provided in the embodiments of the present application is introduced below based on the above application environment. The embodiments of the present application can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, intelligent transportation, and assisted driving. In the scenario where the communication distance of the server storing the network resource is too far, the bandwidth allocation is insufficient, or the transmission speed limit is set, the downloading speed will be affected or the downloading will fail. For example, in the scenario of downloading game resources abroad, after the game abroad is started, the corresponding game resources or game update package needs to be pulled from the server abroad, at this time, the resources need to be pulled from the specified Internet exit through a dedicated line, thereby increasing the delay, being limited by the bandwidth of the Internet exit, and being limited by the transmission settings of the server abroad, resulting in slow downloading speed, high failure rate of downloading, high bandwidth cost and other problems. Please refer to Figure 2 , Figure 2 is a flowchart of a network resource downloading method provided in the embodiments of the present application. The present specification provides method operation steps as in the embodiments or flowcharts, but more or fewer operation steps can be included based on conventional or non-creative labor. The order of the steps listed in the embodiments is only one of the many execution orders of the steps, and does not represent the only execution order. In actual system or server product execution, the method order shown in the embodiments or the drawings can be executed in sequence or in parallel (for example, in a parallel processor or multi-threaded processing environment). Specifically, as shown in Figure 2 , the method can include the following steps.

[0070] S201: The terminal parses the resource downloading request to obtain the target resource address in response to the resource downloading request for the target network resource sent by the target application program.

[0071] In the embodiments of the present application, the target resource address is a network address of the target network resource in the second server, representing a storage location of the target network resource in the second server, and the second server can be a source station storing the target network resource. The third server provides backup storage service of the target network resource, that is, stores the backup network resource corresponding to the resource download request. The physical locations of the second server and the third server are located in different regions, for example, the second server is an overseas server and the third server is a domestic server, and the physical distance between the second server and the first server is greater than the physical distance between the third server and the first server. Correspondingly, the physical distance between the second server and the terminal is greater than the physical distance between the third server and the terminal. For example, the first server is a background server, the second server is an overseas server, the communication physical link between the first server and the terminal is long, or needs to communicate through a specified Internet exit, the network delay is long, the download speed is slow, and the bandwidth is limited, resulting in unstable data transmission and easy download failure; the third server can be a domestic server, which is deployed near the terminal, for example, a CND server, etc., the communication physical distance between the first server and the terminal is short, the bandwidth limitation is less and the bandwidth cost is low, the communication is stable, and the transmission speed is fast.

[0072] In the embodiments of the present application, the target application program is an application program with a specified package name, which can be a game application program, for example, a specified overseas game application program. When the target application program needs to download an update resource package or an update installation package or other target network resource, a resource download request carrying the target resource address of the target network resource will be generated. When the terminal detects that the target application program sends the resource download request, it will be intercepted and parsed to obtain the target resource address. Specifically, the target resource address can be a URL address.

[0073] In actual application, before S201, the method can further include the following steps.

[0074] S101: Start a virtual private network service.

[0075] S103: Intercept the resource download request sent by the target application program through the virtual private network service.

[0076] Specifically, the virtual private network service can be started by using a download processing program (such as an accelerator). The virtual private network service can be a VPN service pre-set in the terminal, which can intercept traffic with a specified package name. By using the virtual private network service, all network requests sent by the target application program with a specified package name are intercepted through a virtual network card to realize subsequent parsing processing.

[0077] In some cases, the virtual private network service can also be replaced by using a hook method to intercept the resource download request of the target application program and obtain the target resource address.

[0078] In actual application, S201 can specifically include the following steps.

[0079] S2011: structurally analyzing the network layer packet of the resource download request to obtain protocol information and a transport layer packet of the resource download request.

[0080] S2013: analyzing the transport layer packet according to the protocol information to obtain request data of the resource download request.

[0081] S2015: obtaining the target resource address from a request header of the request data.

[0082] Specifically, when the resource download request sent by the target application program is intercepted, the network layer packet of the resource download request can be obtained through the control information corresponding to the resource download request in the virtual network service. By analyzing the structure of the network layer packet, the protocol used by the upper layer can be determined according to the protocol field in the network layer data structure field, that is, the protocol information is obtained, and the transport layer packet is obtained. Based on the protocol information, the structure of the transport layer packet is further analyzed, the request data is obtained, and the target resource address is obtained from the address field of the request header of the request data.

[0083] Specifically, the control information can be a file handle (fd) of the virtual private network service, the network layer packet can be an IP packet, correspondingly, the transport layer packet can be a TCP packet, the request data can be HTTP data, and the URL address of the resource download request is included in the request header of the HTTP data. In an embodiment, please refer to Figure 3 , the URL address obtaining process can specifically be: the resource download request of the target application program is intercepted by the virtual gateway; the IP packet is obtained from the fd in the virtual network card by the download processing program (such as the accelerator), the TCP packet is obtained by analyzing the IP packet, and the URL in the HTTP data is obtained by analyzing the TCP packet.

[0084] S203: the terminal sends an address query request carrying the target resource address to the first server.

[0085] In the embodiment of the application, after obtaining the target resource address, the terminal delays sending the resource download request to the second server, generates an address query request carrying the target resource address, and sends the address query request to the first server.

[0086] S205: after receiving the address query request carrying the target resource address sent by the terminal, the first server performs category feature recognition on the target resource address.

[0087] In the embodiments of the present application, the first server is a background server of the terminal and is provided with an address cache database for storing resource addresses satisfying preset characteristic conditions and corresponding backup resource addresses. The first server responds to an address query request to perform category characteristic identification on a target resource address to obtain corresponding category characteristics, and then judges whether the category characteristics satisfy preset characteristic conditions. The category characteristics can include, but are not limited to, domain name category characteristics and data file format characteristics of the target resource address. In some embodiments, after receiving the target resource address, the domain name field and the file format field in the target resource address are identified, the identified domain name field is matched with a preset domain name, and the identified file format field is matched with a preset file format. If the corresponding preset domain name and preset file format are matched, it is determined that the category characteristics of the target resource address satisfy the preset characteristic conditions. If any of them is not matched, the category characteristics of the target resource address do not satisfy the preset characteristic conditions. For example, the target resource address is a URL address, and the target application program is a game application program. The first server responds to the address query request to identify the game domain name field and the resource format suffix field in the URL address. The resource format suffix field represents the file format of the target network resource. If the game domain name field is matched with an overseas game domain name and the resource format suffix field is matched with file formats such as exe and dat, it is determined that the category characteristics of the URL address satisfy the preset characteristic conditions.

[0088] S207: The first server acquires the backup resource address stored in association with the target resource address in a case where it is identified that the category characteristics of the target resource address satisfy the preset characteristic conditions.

[0089] In the embodiments of the present application, the backup resource address is a network address of a backup network resource corresponding to the target network resource in the third server, representing the storage location of the backup network resource in the third server. The backup resource address is stored in association with the target resource address. In a case where the preset characteristic conditions are satisfied, the backup resource address is searched. Specifically, the backup resource address stored in association with the target resource address is searched from the address cache database, which can be searched by taking the target resource address as a key. In a case where it is found that the corresponding backup resource address exists, it is indicated that the backup network resource of the target network resource in the second server has been stored in the third server.

[0090] S209: The first server sends address query response information corresponding to the address query request to the terminal, and the address query response information carries the backup resource address stored in association with the target resource address.

[0091] In the embodiments of the present application, the first server responds to the address query request to send corresponding address response information to the terminal, and the address response information carries the found backup resource address.

[0092] S211: After the terminal receives the address query response information corresponding to the address query request sent by the first server, the terminal updates the target resource address in the resource download request to the backup resource address, and obtains an updated resource download request.

[0093] S213: The terminal sends the updated resource download request to the third server, and obtains the backup network resource sent by the third server.

[0094] In the embodiment of the application, after the terminal receives the backup resource address, the terminal replaces the target resource address in the request data of the resource download request with the backup resource address, and obtains updated request data. Then, the terminal encapsulates the updated request data based on the aforementioned protocol information, obtains an updated transport layer data packet, encapsulates the updated transport layer data packet into an updated network layer data packet, and finally obtains an updated resource download request and a corresponding request data packet, and sends the updated resource download request and the corresponding request data packet to the third server, so that the third server finds and feeds back the backup network resource corresponding to the backup resource address in response to the updated resource download request. For example, the resource download request is a game resource download request sent by a game application program to an overseas game network resource. After the download processing program receives the backup resource address cached in the domestic from the first server, the download processing program updates the game resource download request sent by the game application program, replaces the game url and host in the http data of the game resource download request with the backup resource address, and then generates an updated TCP data packet, encapsulates the updated TCP data packet into an updated IP data packet, and finally obtains an updated game resource download request, and sends the updated game resource download request to the third server (a domestic server) through a real network card. After the third server receives the request, the third server feeds back the stored backup network resource to the game application program in response to the request.

[0095] Based on the above technical solution, the resource download request sent to the second server is converted into a request sent to the third server, so that the backup resource is downloaded from the third server with shorter communication distance and link, which can effectively reduce network delay, improve resource download speed, stability and success rate, and save bandwidth occupation and cost of the specified Internet exit.

[0096] In the embodiment of the application, the method further includes the following steps.

[0097] S215: The first server sends response information indicating that there is no backup resource address to the terminal in a case where the first server identifies that the category feature of the target resource address does not satisfy the preset feature condition or the first server fails to obtain the associated backup resource address.

[0098] In actual application, the response information can carry an identification code indicating that there is no backup resource address.

[0099] S217: In a case where the terminal receives the response information sent by the first server and representing that there is no backup resource address, the terminal sends a resource download request to the second server to obtain the target network resource from the second server.

[0100] In actual applications, for a target resource address that cannot find a cached backup resource address or a non-designated category feature, after receiving the response information returned by the first server, the download processing program restores the original resource download request to a network layer data packet, and then sends it to the second server through a real network card, so that the second server feeds back the target network resource to the terminal.

[0101] S219: In a case where the first server identifies that the category feature of the target resource address meets the preset feature condition and has not obtained the associated backup resource address, the first server sends a corresponding resource download request to the second server based on the target resource address to obtain the target network resource from the second server.

[0102] In actual applications, if the category feature of the target resource address meets the preset feature condition, but the first server cache does not store the backup resource address corresponding to the target resource address, it indicates that the resource download request is a primary request for the target network resource. The first server sends a resource download request carrying the target resource address to the second server, so that the second server sends the target network resource to the first server.

[0103] S221: The first server sends the target network resource to the third server, so that the third server stores the target network resource as a corresponding backup network resource, and sends the backup resource address of the backup network resource to the first server.

[0104] S223: The first server receives the backup resource address sent by the third server and stores the target resource address and the backup resource address in association.

[0105] In actual applications, after receiving the target network resource, the first server sends it to the third server for backup storage to generate a corresponding backup network resource, which can reduce the storage pressure of the first server and avoid affecting the processing speed. After the third server stores the backup network resource, it sends the backup resource address to the first server, and the first server builds an association between the target resource address and the backup resource address for associated storage. In this way, when the address query request carrying the target resource address is received again, the backup resource address is fed back to the terminal, so that the terminal downloads the resource from the third server, improves the download speed and stability, and saves the designated Internet export bandwidth.

[0106] Based on the above part or all of the embodiments, please refer to Figure 4The embodiment of the present application provides another network resource downloading method, comprising the following steps.

[0107] S301: The terminal analyzes the resource downloading request to obtain the target resource address in response to the resource downloading request for the target network resource sent by the target application program.

[0108] S303: The terminal sends an address query request carrying the target resource address to the first server.

[0109] S305: The first server performs category feature identification on the target resource address after receiving the address query request carrying the target resource address sent by the terminal.

[0110] S307: The first server acquires the backup resource address stored in association with the target resource address in the case that the category feature of the target resource address meets the preset feature condition.

[0111] It can be understood that the steps S301-S307 are similar to the specific implementation of the foregoing steps S201-S207, and thus will not be described here again.

[0112] S309: The first server acquires the backup update time information of the backup network resource stored in association with the target resource address.

[0113] In the embodiment of the present application, the address cache database of the first server also stores the backup update time information corresponding to the target resource address, and the backup update time information represents the last modification time of the network resource stored in the second server and corresponding to the backup network resource. The backup update time information is the modification time information carried by the second server when the second server feeds back the network resource when the first server requests the corresponding network resource from the second server for the first time. Specifically, the backup update time information can be a Last-Modified field.

[0114] S311: The first server sends a time information query request carrying the target resource address to the second server.

[0115] S313: The first server receives the time query response information corresponding to the time information query request sent by the second server, and the time query response information carries the update time information of the target network resource.

[0116] In the embodiment of the present application, the target network resource of the second server can have an updated version, and the backup resource address in the first server and the backup network resource stored in the third server can not be the current updated version. The first server sends a time information query request to the second server, so that the second server obtains the update time information of the corresponding target network resource based on the target resource address, generates network response information carrying the update time information of the target network resource, and then sends it to the first server. The update time information of the target network resource sent by the second server represents the last modification time of the latest version of the target network resource.

[0117] S315: In the case that the backup update time information is consistent with the update time information of the target network resource, the first server sends the address query response information corresponding to the address query request to the terminal, and the address query response information carries the backup resource address associated with the target resource address.

[0118] In the embodiment of the present application, the first server compares the backup update time information with the update time information of the target network resource. If they are consistent, it is determined that the backup network resource stored in the third server is not expired, and the sending step of the address query response information is triggered.

[0119] S317: After receiving the backup resource address corresponding to the target resource address sent by the first server, the terminal updates the target resource address in the resource download request to the backup resource address, and obtains an updated resource download request.

[0120] S319: The terminal sends the updated resource download request to the third server, and obtains the backup network resource sent by the third server.

[0121] It can be understood that S315-S319 are similar to the specific embodiments of the foregoing S209-S213, and will not be described here.

[0122] S321: In the case that the backup update time information is inconsistent with the update time information of the target network resource, it is determined that the backup network resource corresponding to the backup resource address is an expired resource.

[0123] In the embodiment of the present application, if they are inconsistent, it indicates that the version of the target network resource in the second server is inconsistent with the version of the backup network resource. If the update time of the target network resource is later than the backup update time, that is, the target network resource has an updated version, it is determined that the backup network resource stored in the third server is an expired resource, and then steps S323 and S327 are triggered.

[0124] S323: The first server sends response information indicating that there is no backup resource address to the terminal in a case where it is identified that the category feature of the target resource address does not satisfy the preset feature condition, the associated backup resource address is not acquired, or the backup network resource corresponding to the backup resource address is an expired resource.

[0125] S325: The terminal sends a resource download request to the second server to acquire the target network resource from the second server in a case where it receives the response information indicating that there is no backup resource address sent by the first server.

[0126] S327: The first server sends a corresponding resource download request to the second server based on the target resource address to acquire the target network resource and the corresponding update time information from the second server in a case where it is identified that the category feature of the target resource address satisfies the preset feature condition and the associated backup resource address is not acquired or the backup network resource corresponding to the backup resource address is an expired resource.

[0127] S329: The first server sends the target network resource to the third server to enable the third server to store the target network resource as a corresponding backup network resource and send the backup resource address of the backup network resource to the first server.

[0128] S331: The first server stores the target resource address, the backup resource address, and the corresponding update time information in association after receiving the backup resource address sent by the third server.

[0129] It can be understood that S323-S325 are similar to the specific implementation manners of the foregoing S215-S217, and S329-S333 are similar to the specific implementation manners of the foregoing S221-S225, which will not be described herein again.

[0130] In the embodiments of the present application, if the category feature of the target resource address meets the preset feature condition, it is determined that the target network resource needs to be backup stored. At this time, if the backup resource address corresponding to the target resource address and the backup update time information are not stored in the first server cache, i.e., the backup resource address cannot be found, it indicates that the resource download request is a first request for the target network resource; or if the backup network resource corresponding to the backup resource address is an expired resource, it indicates that the backup resource address and the backup update time stored in the first server cache and the backup network resource stored in the third server need to be updated. Correspondingly, the first server sends a resource download request carrying the target resource address to the second server, so that the second server sends the target network resource and the corresponding update time information to the first server. After receiving the target network resource, the first server sends it to the third server for storage. After the third server stores the target network resource to generate the backup network resource, it sends the corresponding backup resource address to the first server. The first server constructs the association relationship among the target resource address, the backup resource address, and the update time information for associated storage. It can be understood that the update time information associated and stored here is the backup update time information mentioned above.

[0131] It should be noted that the first server can periodically send a corresponding time information query request to the second server based on the cached target resource addresses, to obtain the latest update time information. In the case of inconsistent time information, the backup resource address, the backup update time information, and the backup network resource are periodically updated based on the above S327-S335.

[0132] Based on the above scheme, not only can the network delay be effectively reduced, the resource download speed, stability and success rate be improved, but also the bandwidth occupation and cost of the specified Internet exit can be saved, and the terminal from downloading expired resources and preventing download accidents can be avoided.

[0133] In some embodiments, due to the communication limitations and instability between the terminal and the second server, during the process of the terminal pulling the target network resource from the second server, the download time may be too long or the download may fail. Correspondingly, after S327, the method can further include step S337: the terminal sends a backup resource download request carrying the backup resource address to the third server to obtain the backup network resource corresponding to the backup resource address from the third server in the case that the transmission time length of the target network resource exceeds the preset time length and / or the download fails. In this way, in the case that the latest target network resource cannot be obtained, the old version of the backup network resource is used for resource substitution, the resource service is provided in the case that the user is unaware, and the user experience is significantly improved.

[0134] The network resource downloading method provided in the application can solve the problems of high network resource failure rate and slow downloading speed, especially in the scenario of large file downloading, and can improve the downloading speed and success rate, save international bandwidth, and reduce resource downloading cost.

[0135] The network resource downloading method provided in the application is introduced below based on the above application environment, and is applied to a terminal. Please refer to Figure 5 , Figure 5 is a flowchart of the network resource downloading method provided in the embodiment of the application. The present specification provides method operation steps as in the embodiment or flowchart, but more or fewer operation steps can be included based on conventional or non-creative labor. The order of steps listed in the embodiment is only one of the many execution orders of the steps, and does not represent the only execution order. In actual system or server product execution, the method order shown in the embodiment or the drawing can be executed in sequence or in parallel (for example, in a parallel processor or multi-threaded processing environment). Specifically, as shown in Figure 5 , the method can include the following steps.

[0136] S401: In response to the resource downloading request for the target network resource sent by the target application program, the resource downloading request is parsed to obtain the target resource address; the target resource address is the network address of the target network resource in the second server.

[0137] S403: The address query request carrying the target resource address is sent to the first server.

[0138] S405: The address query response information corresponding to the address query request sent by the first server is received, and the address query response information carries the backup resource address associated with the target resource address; the backup resource address is obtained by the first server performing category feature identification on the target resource address, and is obtained in the case that the category feature of the target resource address meets the preset feature condition; the backup resource address is the network address of the backup network resource corresponding to the target network resource in the third server.

[0139] S407: updating the target resource address in the resource download request to the backup resource address to obtain an updated resource download request.

[0140] S409: sending the updated resource download request to the third server to obtain a backup network resource sent by the third server.

[0141] The physical locations of the second server and the third server are in different regions, and the physical distance between the second server and the first server is greater than the physical distance between the third server and the first server.

[0142] In some embodiments, the method further comprises the step S411: in the case that the response information indicating the absence of the backup resource address is received from the first server, sending a resource download request to the second server to obtain the target network resource from the second server; the response information indicating the absence of the backup resource address is generated by the first server in the case that the first server identifies that the category feature of the target resource address does not meet the preset feature condition, the associated backup resource address is not obtained, or the backup network resource corresponding to the backup resource address is an expired resource.

[0143] In some embodiments, before S401, the method can further comprise the following steps.

[0144] S501: starting a virtual private network service.

[0145] S503: intercepting a resource download request sent by a target application program through the virtual private network service.

[0146] In some embodiments, S401 can comprise the following steps.

[0147] S4011: performing structural analysis on a network layer packet of the resource download request to obtain protocol information and a transport layer packet of the resource download request.

[0148] S4012: performing analysis on the transport layer packet according to the protocol information to obtain request data of the resource download request.

[0149] S4013: obtaining the target resource address from a request header of the request data.

[0150] The following introduces a network resource download method of the application based on the above application environment, which is applied to a first server, please refer to Figure 6 , Figure 6is a flowchart of a network resource downloading method provided by an embodiment of the present application. The present specification provides method operation steps as in the embodiments or flowcharts, but more or fewer operation steps can be included based on conventional or non-creative labor. The order of steps listed in the embodiments is only one of the many execution orders of the steps, and does not represent the only execution order. In actual system or server product execution, the method order shown in the embodiments or the drawings can be executed in sequence or in parallel (for example, in a parallel processor or multi-threaded processing environment). Specifically, as shown in Figure 6 The method can include the following steps.

[0151] S601: receiving an address query request sent by a terminal and carrying a target resource address; the target resource address is obtained by the terminal from a resource downloading request for a target network resource sent by a target application program, and is a network address of the target network resource in a second server.

[0152] S603: performing category feature recognition on the target resource address.

[0153] S605: in a case where the category feature of the target resource address meets a preset feature condition, obtaining a backup resource address associated with the target resource address and stored; the backup resource address is a network address of a backup network resource corresponding to the target network resource in a third server.

[0154] S607: sending, to the terminal, address query response information corresponding to the address query request, the address query response information carrying the backup resource address associated with the target resource address.

[0155] The second server and the third server are located in different regions, and the physical distance between the second server and the first server is greater than the physical distance between the third server and the first server.

[0156] In some embodiments, before S607, the method can further include the following steps.

[0157] S701: obtaining backup update time information of the backup network resource associated with the target resource address; the backup update time information represents the last modification time of the network resource corresponding to the backup network resource and stored in the second server.

[0158] S703: sending, to the second server, a time information query request carrying the target resource address.

[0159] S705: receiving time query response information corresponding to the time information query request sent by the second server; the time query response information carries update time information of the target network resource.

[0160] S707: If the backup update time information is consistent with the update time information of the target network resource, trigger the step of sending the address query response information corresponding to the address query request to the terminal.

[0161] S709: If the backup update time information is inconsistent with the update time information of the target network resource, determine that the backup network resource corresponding to the backup resource address is an expired resource.

[0162] In some embodiments, the method may further include step S609: if the category characteristics of the target resource address do not meet the preset characteristic conditions, the associated backup resource address is not obtained, or the backup network resource corresponding to the backup resource address is an expired resource, send a response message indicating that there is no backup resource address to the terminal; the response message indicating that there is no backup resource address is used to trigger the terminal to send a resource download request to the second server.

[0163] In some embodiments, the method may further include the following steps.

[0164] S611: If the category characteristics of the target resource address meet the preset characteristic conditions, and no associated backup resource address is obtained or the backup network resource corresponding to the backup resource address is an expired resource, a corresponding resource download request is sent to the second server based on the target resource address to obtain the target network resource and the corresponding update time information from the second server.

[0165] S613: Send the target network resource to the third server so that the third server stores the target network resource as the corresponding backup network resource and sends the backup resource address of the backup network resource to the first server.

[0166] S615: Receives the backup resource address sent by the third server.

[0167] S617: Associate and store the target resource address, backup resource address, and corresponding update time information.

[0168] This application embodiment also provides a network resource download device 700, applied to a terminal, such as... Figure 7 As shown, Figure 7 The diagram shows a schematic of a network resource download device according to an embodiment of this application. The device may include the following modules.

[0169] Resource download request parsing module 11: In response to a resource download request sent by the target application for a target network resource, the module parses the resource download request to obtain the target resource address; the target resource address is the network address of the target network resource in the second server.

[0170] The address query request sending module 12 is configured to send an address query request carrying the target resource address to the first server.

[0171] The address query response receiving module 13 is configured to receive an address query response information corresponding to the address query request sent by the first server, the address query response information carrying a backup resource address associated with the target resource address; the backup resource address is obtained by the first server performing category feature identification on the target resource address, and is obtained in a case where the category feature of the target resource address meets a preset feature condition; the backup resource address is a network address of a backup network resource corresponding to the target network resource in the third server.

[0172] The download request updating module 14 is configured to update the target resource address in the resource download request to the backup resource address, to obtain an updated resource download request.

[0173] The backup network resource obtaining module 15 is configured to send the updated resource download request to the third server, to obtain a backup network resource sent by the third server.

[0174] In some embodiments, the second server and the third server are located in different regions, and the physical distance between the second server and the first server is greater than the physical distance between the third server and the first server.

[0175] In some embodiments, the apparatus can further include a target network resource obtaining module configured to, in a case where response information indicating that there is no backup resource address is received from the first server, send a resource download request to the second server to obtain the target network resource from the second server; the response information indicating that there is no backup resource address is generated by the first server in a case where the category feature of the target resource address does not meet the preset feature condition, no associated backup resource address is obtained, or the backup network resource corresponding to the backup resource address is an expired resource.

[0176] In some embodiments, the apparatus can further include the following modules.

[0177] The virtual private network service starting module is configured to start a virtual private network service before the resource download request is parsed to obtain the target resource address.

[0178] The resource download request intercepting module is configured to intercept the resource download request sent by the target application program through the virtual private network service.

[0179] In some embodiments, the resource download request parsing module 11 can include the following units.

[0180] Network layer packet parsing unit: used to parse the structure of network layer packets for resource download requests, and obtain the protocol information and transport layer packets of the resource download request.

[0181] Transport layer packet parsing unit: used to parse transport layer packets according to protocol information to obtain the request data for resource download requests.

[0182] Target resource address acquisition unit: used to obtain the target resource address from the request header of the request data.

[0183] This application embodiment also provides a network resource download device 800, applied to a first server, such as... Figure 8 As shown, Figure 8 The diagram shows a schematic of a network resource download device according to an embodiment of this application. The device may include the following modules.

[0184] Address query request receiving module 21: used to receive an address query request sent by the terminal carrying the target resource address; the target resource address is obtained by parsing the resource download request for the target network resource sent by the target application by the terminal, and is the network address of the target network resource in the second server.

[0185] Category feature recognition module 22: Used to perform category feature recognition on the target resource address.

[0186] Backup resource address acquisition module 23: When the category characteristics of the target resource address are identified and meet the preset characteristic conditions, the backup resource address associated with the target resource address is acquired; the backup resource address is the network address of the backup network resource corresponding to the target network resource in the third server.

[0187] Backup resource address sending module 24: Used to send the address query response information corresponding to the address query request to the terminal. The address query response information carries the backup resource address stored in association with the target resource address.

[0188] The second and third servers are located in different regions, and the physical distance between the second and first servers is greater than the physical distance between the third and first servers.

[0189] In some embodiments, the apparatus may further include the following modules.

[0190] Backup update time information acquisition module: used to acquire the backup update time information of the backup network resource associated with the target resource address before sending the address query response information corresponding to the address query request to the terminal; the backup update time information represents the last modification time of the network resource stored on the second server corresponding to the backup network resource.

[0191] The time information query request sending module is configured to send a time information query request carrying the target resource address to the second server.

[0192] The time query response information receiving module is configured to receive time query response information corresponding to the time information query request sent by the second server, the time query response information carrying update time information of the target network resource.

[0193] The triggering module is configured to trigger the step of sending the address query response information corresponding to the address query request to the terminal in the case that the backup update time information is consistent with the update time information of the target network resource.

[0194] The expired resource determining module is configured to determine that the backup network resource corresponding to the backup resource address is an expired resource in the case that the backup update time information is inconsistent with the update time information of the target network resource.

[0195] In some embodiments, the apparatus can further include a response information sending module configured to send, to the terminal, response information indicating that the backup resource address does not exist in the case that the category feature of the target resource address does not meet the preset feature condition, the associated backup resource address is not acquired, or the backup network resource corresponding to the backup resource address is an expired resource; the response information indicating that the backup resource address does not exist is used to trigger the step of sending, by the terminal, a resource download request to the second server.

[0196] In some embodiments, the apparatus can further include the following modules.

[0197] The update time information obtaining module is configured to send, to the second server, a corresponding resource download request based on the target resource address in the case that the category feature of the target resource address meets the preset feature condition, and the associated backup resource address is not acquired or the backup network resource corresponding to the backup resource address is an expired resource, so as to obtain, from the second server, the target network resource and the corresponding update time information.

[0198] The target network resource sending module is configured to send the target network resource to the third server, so that the third server stores the target network resource as a corresponding backup network resource, and sends a backup resource address of the backup network resource to the first server.

[0199] The backup resource address sending module is configured to receive the backup resource address sent by the third server.

[0200] The association storage module is configured to associate and store the target resource address, the backup resource address, and the corresponding update time information.

[0201] It should be noted that the apparatus embodiments and the method embodiments described above are based on the same implementation.

[0202] This application provides a network resource download device. The identification device can be a terminal or a server. The network resource download device includes a processor and a memory. The memory stores at least one instruction or at least one program. The at least one instruction or at least one program is loaded and executed by the processor to implement the network resource download method provided in the above method embodiments.

[0203] Memory is used to store software programs and modules. The processor executes these stored software programs and modules to perform various functional applications and data processing. Memory can primarily consist of a program storage area and a data storage area. The program storage area stores the operating system, application programs required for functionality, etc.; the data storage area stores data created based on device usage, etc. Furthermore, memory can include high-speed random access memory (RAM) and non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, memory can also include a memory controller to provide the processor with access to the memory.

[0204] The methods and embodiments provided in this application can be executed in electronic devices such as mobile terminals, computer terminals, servers, or similar computing devices. Figure 9 This is a hardware structure block diagram of an electronic device for a network resource download method provided in an embodiment of this application. For example... Figure 9 As shown, the electronic device 900 can vary significantly due to different configurations or performance. It may include one or more Central Processing Units (CPUs) 910 (CPUs 910 may include, but are not limited to, microprocessors such as MCUs or programmable logic devices such as FPGAs), a memory 930 for storing data, and one or more storage media 920 (e.g., one or more mass storage devices) for storing application programs 923 or data 922. The memory 930 and storage media 920 may be temporary or persistent storage. The program stored in the storage media 920 may include one or more modules, each module including a series of instruction operations on the electronic device. Furthermore, the CPU 910 may be configured to communicate with the storage media 920 and execute a series of instruction operations in the storage media 920 on the electronic device 900. The electronic device 900 may also include one or more power supplies 960, one or more wired or wireless network interfaces 950, one or more input / output interfaces 940, and / or one or more operating systems 921, such as Windows Server. TM Mac OS X TM UnixTM Linux™, FreeBSD™, and the like.

[0205] The input / output interface 940 can be configured to receive or transmit data via a network. The network can include a wireless network provided by a communication provider of the electronic device 900. In an example, the input / output interface 940 includes a network interface controller (NIC) that can be connected to other network devices through a base station to communicate with the Internet. In an example, the input / output interface 940 can be a radio frequency (RF) module that is configured to communicate with the Internet through a wireless manner.

[0206] Those skilled in the art can understand that the above-mentioned components of the electronic device 900 are merely illustrative, and the structure of the electronic device 900 is not limited to the above-mentioned components. Figure 9 For example, the electronic device 900 can further include more or less components than those shown, or have different configurations of the components than those shown. Figure 9 For example, the electronic device 900 can further include more or less components than those shown, or have different configurations of the components than those shown. Figure 9 For example, the electronic device 900 can further include more or less components than those shown, or have different configurations of the components than those shown.

[0207] The embodiment of the present application further provides a computer readable storage medium, which can be arranged in the electronic device to store at least one instruction or at least one program for implementing a network resource downloading method in the method embodiment. The at least one instruction or the at least one program is loaded and executed by the processor to implement the network resource downloading method provided by the above-mentioned method embodiment.

[0208] Optionally, in the embodiment, the storage medium can be located in at least one network server of a plurality of network servers of a computer network. Optionally, in the embodiment, the storage medium can include but is not limited to a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store program codes.

[0209] According to an aspect of the present application, a computer program product or a computer program is provided, which includes computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to enable the computer device to perform the method provided in the various optional implementation manners.

[0210] It can be seen from the embodiments of the network resource downloading method, apparatus, device, server, terminal, storage medium and program product provided in the application that the technical solution of the application comprises the following steps: a terminal analyzes a resource downloading request sent by a target application program for a target network resource, and obtains a target resource address; the target resource address is a network address of the target network resource in a second server; the terminal sends an address query request carrying the target resource address to a first server; the first server performs category feature identification on the target resource address, and in a case where a category feature of the target resource address meets a preset feature condition, obtains a backup resource address stored in association with the target resource address; the backup resource address is a network address of a backup network resource corresponding to the target network resource in a third server, and the first server sends an address query response information corresponding to the address query request and carrying the backup resource address stored in association with the target resource address to the terminal; the terminal updates the target resource address in the resource downloading request to the backup resource address, obtains an updated resource downloading request, and sends the updated resource downloading request to the third server, and obtains the backup network resource sent by the third server. The physical locations of the second server and the third server are located in different regions, and the physical distance between the second server and the first server is greater than the physical distance between the third server and the first server. By converting the resource downloading request sent to the second server into a request sent to the third server, the backup resource is downloaded from the third server with shorter communication distance and link, which can effectively reduce network delay, improve resource downloading speed, stability and success rate, and save bandwidth occupation and cost of a specified Internet exit.

[0211] It should be noted that the above-mentioned embodiments of the application are only for description, and do not represent the advantages and disadvantages of the embodiments. The above-mentioned embodiments of the application are described. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multi-task processing and parallel processing are possible or advantageous.

[0212] The embodiments in the application are described in a progressive manner, and the same or similar parts of each embodiment can be referred to each other. Each embodiment focuses on the difference from other embodiments. In particular, the device, equipment and storage medium embodiments are described simply because they are basically similar to the method embodiments, and the relevant parts are described in the method embodiment.

[0213] Those skilled in the art can understand that all or part of the steps of the above-mentioned embodiments can be completed by hardware, or a program instructing relevant hardware to complete, and the program can be stored in a computer readable storage medium. The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.

[0214] The above is only the preferred embodiment of the present application, and is not used to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for downloading network resources, applied to a terminal, characterized in that, The method includes: In response to a resource download request for a target network resource sent by the target application, the resource download request is parsed to obtain the target resource address; the target resource address is the network address of the target network resource in the second server; Send an address query request carrying the target resource address to the first server; The system receives an address query response information corresponding to the address query request sent by the first server. The address query response information carries a backup resource address stored in association with the target resource address. The backup resource address is obtained by the first server through category feature identification of the target resource address, and when the identified category feature of the target resource address meets preset feature conditions. The backup resource address is the network address of the backup network resource corresponding to the target network resource in the third server. The target resource address in the resource download request is updated to the backup resource address to obtain an updated resource download request; Send the updated resource download request to the third server, and obtain the backup network resources sent by the third server; The second server and the third server are located in different regions, and the physical distance between the second server and the first server is greater than the physical distance between the third server and the first server.

2. The method according to claim 1, characterized in that, The method further includes: Upon receiving a response from the first server indicating that no backup resource address exists, the resource download request is sent to the second server to obtain the target network resource from the second server. The response indicating that no backup resource address exists is generated by the first server when it identifies that the category characteristics of the target resource address do not meet the preset characteristic conditions, fails to obtain the backup resource address of the associated storage, or the backup network resource corresponding to the backup resource address is an expired resource.

3. The method according to claim 1, characterized in that, Before parsing the resource download request to obtain the target resource address, the method further includes: Start the Virtual Private Network service; The virtual private network service intercepts resource download requests sent by the target application.

4. The method according to claim 1, characterized in that, The process of parsing the resource download request to obtain the target resource address includes: The network layer data packets of the resource download request are parsed to obtain the protocol information and transport layer data packets of the resource download request; The transport layer data packet is parsed according to the protocol information to obtain the request data for the resource download request; Obtain the target resource address from the request header of the request data.

5. A method for downloading network resources, applied to a first server, characterized in that, The method includes: The receiving terminal sends an address query request carrying the target resource address; the target resource address is obtained by parsing the resource download request for the target network resource sent by the target application, and is the network address of the target network resource in the second server; The target resource address is subjected to category feature identification; If the category characteristics of the target resource address meet the preset characteristic conditions, the backup resource address associated with the target resource address is obtained; the backup resource address is the network address of the backup network resource corresponding to the target network resource in the third server. Send the address query response information corresponding to the address query request to the terminal. The address query response information carries the backup resource address stored in association with the target resource address. The second server and the third server are located in different regions, and the physical distance between the second server and the first server is greater than the physical distance between the third server and the first server.

6. The method according to claim 5, characterized in that, Before sending the address query response information corresponding to the address query request to the terminal, the method further includes: Obtain the backup update time information of the backup network resource associated with the target resource address; the backup update time information represents the last modification time of the network resource stored on the second server corresponding to the backup network resource; Send a time information query request carrying the target resource address to the second server; Receive time query response information corresponding to the time information query request sent by the second server; the time query response information carries the update time information of the target network resource; If the backup update time information is consistent with the update time information of the target network resource, the step of sending the address query response information corresponding to the address query request to the terminal is triggered. If the backup update time information is inconsistent with the update time information of the target network resource, the backup network resource corresponding to the backup resource address is determined to be an expired resource.

7. The method according to claim 6, characterized in that, The method further includes: If the category characteristics of the target resource address do not meet the preset characteristic conditions, the backup resource address of the associated storage is not obtained, or the backup network resource corresponding to the backup resource address is an expired resource, a response message indicating that there is no backup resource address is sent to the terminal; the response message indicating that there is no backup resource address is used to trigger the terminal to send the resource download request to the second server.

8. The method according to claim 6, characterized in that, The method further includes: If the category characteristics of the target resource address meet the preset characteristic conditions, and the backup resource address of the associated storage is not obtained or the backup network resource corresponding to the backup resource address is an expired resource, a corresponding resource download request is sent to the second server based on the target resource address to obtain the target network resource and the corresponding update time information from the second server. The target network resource is sent to the third server so that the third server stores the target network resource as a corresponding backup network resource and sends the backup resource address of the backup network resource to the first server. Receive the backup resource address sent by the third server; The target resource address, the backup resource address, and the corresponding update time information are associated and stored.

9. A network resource download device, applied to a terminal, characterized in that, The device includes: Resource download request parsing module: In response to a resource download request sent by the target application for a target network resource, the module parses the resource download request to obtain the target resource address; the target resource address is the network address of the target network resource in the second server; Address query request sending module: used to send an address query request carrying the target resource address to the first server; Address query response receiving module: used to receive address query response information corresponding to the address query request sent by the first server, the address query response information carrying a backup resource address stored in association with the target resource address; the backup resource address is obtained by the first server through category feature identification of the target resource address, and when the identified category feature of the target resource address meets preset feature conditions; the backup resource address is the network address of the backup network resource corresponding to the target network resource in the third server. Download request update module: used to update the target resource address in the resource download request to the backup resource address, so as to obtain an updated resource download request; Backup network resource acquisition module: used to send the updated resource download request to the third server and obtain the backup network resources sent by the third server; The second server and the third server are located in different regions, and the physical distance between the second server and the first server is greater than the physical distance between the third server and the first server.

10. The apparatus according to claim 9, characterized in that, The device further includes a target network resource acquisition module, used for: Upon receiving a response from the first server indicating that no backup resource address exists, the resource download request is sent to the second server to obtain the target network resource from the second server. The response information indicating that no backup resource address exists is generated by the first server when it identifies that the category characteristics of the target resource address do not meet the preset characteristic conditions, fails to obtain the backup resource address of the associated storage, or the backup network resource corresponding to the backup resource address is an expired resource.

11. The apparatus according to claim 9, characterized in that, The device further includes: Virtual Private Network Service Startup Module: Used to start the Virtual Private Network Service before parsing the resource download request and obtaining the target resource address; Resource download request interception module: used to intercept resource download requests sent by the target application through the virtual private network service.

12. The apparatus according to claim 9, characterized in that, The resource download request parsing module includes: Network layer packet parsing unit: used to parse the structure of the network layer packets of the resource download request to obtain the protocol information and transport layer packets of the resource download request; Transport layer packet parsing unit: used to parse the transport layer packet according to the protocol information to obtain the request data of the resource download request; Target resource address acquisition unit: used to obtain the target resource address from the request header of the request data.

13. A network resource download device, applied to a first server, characterized in that, The device includes: Address query request receiving module: used to receive an address query request sent by the terminal carrying the target resource address; the target resource address is obtained by parsing the resource download request for the target network resource sent by the terminal to the target application, and is the network address of the target network resource in the second server; Category feature recognition module: used to perform category feature recognition on the target resource address; Backup resource address acquisition module: used to acquire the backup resource address associated with the target resource address when the category characteristics of the target resource address meet the preset characteristic conditions; the backup resource address is the network address of the backup network resource corresponding to the target network resource in the third server; Backup resource address sending module: used to send the address query response information corresponding to the address query request to the terminal, wherein the address query response information carries the backup resource address stored in association with the target resource address; The second server and the third server are located in different regions, and the physical distance between the second server and the first server is greater than the physical distance between the third server and the first server.

14. The apparatus according to claim 13, characterized in that, The device further includes: Backup update time information acquisition module: used to acquire backup update time information of backup network resources associated with the target resource address before sending the address query response information corresponding to the address query request to the terminal; the backup update time information represents the last modification time of the network resource corresponding to the backup network resource stored on the second server; Time information query request sending module: used to send a time information query request carrying the target resource address to the second server; Time query response information receiving module: used to receive time query response information corresponding to the time information query request sent by the second server; the time query response information carries the update time information of the target network resource; Triggering module: used to trigger the step of sending the address query response information corresponding to the address query request to the terminal when the backup update time information is consistent with the update time information of the target network resource; Expired resource determination module: used to determine that the backup network resource corresponding to the backup resource address is an expired resource when the backup update time information is inconsistent with the update time information of the target network resource.

15. The apparatus according to claim 14, characterized in that, The device further includes a response information sending module, used for: If the category characteristics of the target resource address do not meet the preset characteristic conditions, the backup resource address of the associated storage is not obtained, or the backup network resource corresponding to the backup resource address is an expired resource, a response message indicating that there is no backup resource address is sent to the terminal. The response information indicating that no backup resource address exists is used to trigger the terminal to send the resource download request to the second server.

16. The apparatus according to claim 15, characterized in that, The device further includes: Update time information acquisition module: When the category characteristics of the target resource address meet the preset characteristic conditions, and the backup resource address of the associated storage is not acquired or the backup network resource corresponding to the backup resource address is an expired resource, the module sends a corresponding resource download request to the second server based on the target resource address to obtain the target network resource and the corresponding update time information from the second server. Target network resource sending module: used to send the target network resource to the third server, so that the third server stores the target network resource as a corresponding backup network resource, and sends the backup resource address of the backup network resource to the first server; Backup resource address sending module: used to receive the backup resource address sent by the third server; Associated storage module: used to associate and store the target resource address, the backup resource address and the corresponding update time information.

17. A computer-readable storage medium, characterized in that, The storage medium stores at least one instruction or at least one program segment, which is loaded and executed by a processor to implement the network resource download method as described in any one of claims 1-8.

18. A computer device, characterized in that, The device includes a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor to implement the network resource download method as described in any one of claims 1-8.

19. A computer program product, characterized in that, The computer program product includes computer instructions that, when executed by a processor, implement the network resource download method as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Cloud computing operation system and method for providing services to users

    CN103297507A

  • Communication system and method

    JP2019041266A