[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN113709530B - Resource downloading method, system, electronic equipment and storage medium - Google Patents

Resource downloading method, system, electronic equipment and storage medium Download PDF

Info

Publication number
CN113709530B
CN113709530B CN202111020859.5A CN202111020859A CN113709530B CN 113709530 B CN113709530 B CN 113709530B CN 202111020859 A CN202111020859 A CN 202111020859A CN 113709530 B CN113709530 B CN 113709530B
Authority
CN
China
Prior art keywords
check value
client
target network
network resource
download request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111020859.5A
Other languages
Chinese (zh)
Other versions
CN113709530A (en
Inventor
侯凤杰
李欣
王海利
王开帅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202111020859.5A priority Critical patent/CN113709530B/en
Publication of CN113709530A publication Critical patent/CN113709530A/en
Application granted granted Critical
Publication of CN113709530B publication Critical patent/CN113709530B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/239Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
    • H04N21/2393Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests involving handling client requests
    • H04N21/2396Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests involving handling client requests characterized by admission policies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/262Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Databases & Information Systems (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention provides a resource downloading method, a resource downloading system, electronic equipment and a storage medium, and relates to the technical field of networks. The method comprises the following steps: the method comprises the steps that a scheduling server receives a first downloading request aiming at target network resources sent by a client; generating a first check value according to a specified check value generation algorithm and the first download request; sending a first check value to a client, receiving the first check value by the client, and sending a second download request carrying the first check value to a cache server; and the cache server generates a second check value based on a specified check value generation algorithm and the second download request, sends the target network resource to the client under the condition that the second check value is consistent with the first check value, and refuses to send the target network resource to the client under the condition that the second check value is inconsistent with the first check value. By comparing whether the first check value is consistent with the second check value, the real flow consumed by the real user when downloading the video can be effectively determined.

Description

Resource downloading method, system, electronic equipment and storage medium
Technical Field
The present invention relates to the field of network technologies, and in particular, to a resource downloading method, system, electronic device, and storage medium.
Background
With the development of network technology, network resource providers can provide resource downloading services, such as video downloading, picture downloading, audio downloading and the like, to users based on a P2P (Peer-to-Peer) protocol.
In the related art, a video resource provider may cooperate with some network service providers, and provide a download service of video resources for users based on a cache server provided by the network service providers. Accordingly, the video resource provider needs to pay the network provider for the traffic consumed by the download service of the video resource.
However, some malicious users may send a large amount of malicious video downloading requests to the cache server through a malicious terminal to generate a large amount of false traffic, which may result in that the real traffic consumed when a real user downloads the video cannot be determined.
Disclosure of Invention
The embodiment of the invention aims to provide a resource downloading method, a resource downloading system, electronic equipment and a storage medium, which are used for determining real flow consumed when a real user downloads a video. The specific technical scheme is as follows:
in a first aspect, to achieve the above object, an embodiment of the present invention discloses a resource downloading system, where the resource downloading system includes a scheduling server, a cache server, and a client, where:
the client is used for sending a first downloading request aiming at target network resources to the scheduling server;
the scheduling server is used for receiving the first downloading request sent by the client; generating a first check value according to a specified check value generation algorithm and the first download request; sending the first check value to the client;
the client is further configured to receive the first check value sent by the scheduling server; sending a second downloading request carrying the first check value and aiming at the target network resource to the cache server;
the cache server is used for receiving the second downloading request sent by the client; generating a second check value based on the specified check value generation algorithm and the second download request; judging whether the second check value is consistent with the first check value; if the second check value is consistent with the first check value, sending the target network resource to the client; if the second check value is inconsistent with the first check value, refusing to send the target network resource to the client;
the client is further configured to receive the target network resource sent by the cache server under the condition that the second check value is consistent with the first check value.
In a second aspect, to achieve the above object, an embodiment of the present invention discloses a resource downloading method, where the method is applied to a scheduling server, and the method includes:
receiving a first downloading request aiming at target network resources, which is sent by a client;
generating a first check value according to a specified check value generation algorithm and the first download request;
sending the first check value to the client, so that the client sends a second download request carrying the first check value and aiming at the target network resource to a cache server, so that the cache server generates a second check value based on the specified check value generation algorithm and the second download request, sends the target network resource to the client when the second check value is consistent with the first check value, and refuses to send the target network resource to the client when the second check value is inconsistent with the first check value.
Optionally, the generating a first check value according to the specified check value generating algorithm and the first download request includes:
and processing the resource identifier of the target network resource carried in the first download request and/or the timestamp of the received first download request based on the specified check value generation algorithm to obtain the first check value.
Optionally, before the generating a first check value according to the specified check value generating algorithm and the first download request, the method further includes:
when the preset time is reached, selecting one check value generation algorithm from a plurality of preset check value generation algorithms as the specified check value generation algorithm;
and sending the algorithm identification of the selected check value generation algorithm to the cache server, so that the cache server determines that the check value generation algorithm corresponding to the algorithm identification is the specified check value generation algorithm.
In a third aspect, to achieve the above object, an embodiment of the present invention discloses a resource downloading method, where the method is applied to a cache server, and the method includes:
receiving a second downloading request which is sent by the client and carries the first check value and aims at the target network resource; wherein the first check value is: when receiving a first downloading request aiming at the target network resource sent by a client, a scheduling server generates a first downloading request based on a specified check value generation algorithm and the first downloading request and sends the first downloading request to the client;
generating a second check value based on the specified check value generation algorithm and the second download request;
judging whether the second check value is consistent with the first check value;
if the second check value is consistent with the first check value, sending the target network resource to the client;
and if the second check value is inconsistent with the first check value, refusing to send the target network resource to the client.
Optionally, the generating a second check value based on the specified check value generating algorithm and the second download request includes:
and processing the resource identifier of the target network resource carried in the second download request and/or the timestamp of the received second download request based on the specified check value generation algorithm to obtain a second check value.
Optionally, before the generating a second check value based on the specified check value generating algorithm and the second download request, the method further includes:
receiving an algorithm identifier sent by the scheduling server; when the algorithm identification shows that the preset moment is reached, the scheduling server selects one check value generation algorithm from a plurality of preset check value generation algorithms;
and determining the check value generation algorithm corresponding to the algorithm identification as the specified check value generation algorithm.
Optionally, the sending the target network resource to the client includes:
generating a random number currently corresponding to the client;
sending a random number currently corresponding to the client and a data block to be sent currently in the target network resource to the client, so that the client sends a data block downloading request carrying the currently corresponding random number and aiming at the data block in the target network resource to the cache server after receiving the currently corresponding random number;
and if the random number carried in the data block downloading request is the same as the random number currently corresponding to the client, updating the random number currently corresponding to the client, and returning to execute the step of sending the random number currently corresponding to the client and the data block to be sent currently in the target network resource until all the data blocks in the target network resource are sent to the client.
In a fourth aspect, to achieve the above object, an embodiment of the present invention discloses a resource downloading method, where the method is applied to a client, and the method includes:
sending a first download request aiming at the target network resource to a scheduling server;
receiving a first check value sent by the scheduling server; the first check value is generated by the scheduling server according to a specified check value generation algorithm and the first download request;
sending a second download request carrying the first check value and aiming at the target network resource to a cache server, so that the cache server generates a second check value based on the specified check value generation algorithm and the second download request, and sends the target network resource to the client terminal under the condition that the second check value is consistent with the first check value, and refuses to send the target network resource to the client terminal under the condition that the second check value is not consistent with the first check value;
and receiving the target network resource sent by the cache server under the condition that the second check value is consistent with the first check value.
Optionally, the receiving the target network resource sent by the cache server under the condition that the second check value is consistent with the first check value includes:
receiving a random number currently corresponding to the client and a data block to be sent currently in the target network resource, which are sent by the cache server;
sending a data block downloading request carrying the random number currently corresponding to the client and aiming at the data block in the target network resource to the cache server, so that the cache server updates the random number currently corresponding to the client under the condition that the random number carried in the data block downloading request is the same as the random number currently corresponding to the client, and sends the random number currently corresponding to the client and the data block to be sent currently in the target network resource to the client until all the data blocks in the target network resource are received.
In a fifth aspect, to achieve the above object, an embodiment of the present invention discloses a resource downloading device, where the device is applied to a scheduling server, and the device includes:
the first downloading request receiving module is used for receiving a first downloading request aiming at the target network resource sent by the client;
the first check value generating module is used for generating a first check value according to a specified check value generating algorithm and the first downloading request;
and the check value sending module is used for sending the first check value to the client so as to enable the client to send a second downloading request carrying the first check value and aiming at the target network resource to a cache server, so that the cache server generates a second check value based on the specified check value generating algorithm and the second downloading request, sends the target network resource to the client under the condition that the second check value is consistent with the first check value, and refuses to send the target network resource to the client under the condition that the second check value is inconsistent with the first check value.
Optionally, the check value generating module is specifically configured to:
and processing the resource identifier of the target network resource carried in the first download request and/or the timestamp of the received first download request based on the specified check value generation algorithm to obtain a first check value.
Optionally, the apparatus further comprises:
the algorithm selection module is used for selecting one check value generation algorithm from a plurality of preset check value generation algorithms as the specified check value generation algorithm when the preset time is reached;
and the algorithm identifier sending module is used for sending the algorithm identifier of the selected check value generation algorithm to the cache server so that the cache server determines the check value generation algorithm corresponding to the algorithm identifier as the specified check value generation algorithm.
In a sixth aspect, to achieve the above object, an embodiment of the present invention discloses a resource downloading device, where the device is applied to a cache server, and the device includes:
the second downloading request receiving module is used for receiving a second downloading request which carries the first check value and aims at the target network resource and is sent by the client; wherein the first check value is: when receiving a first downloading request aiming at the target network resource, which is sent by a client, a scheduling server generates an algorithm based on a specified check value and the first downloading request and sends the algorithm to the client;
a second check value generation module for generating a second check value based on the specified check value generation algorithm and the second download request;
the check value judging module is used for judging whether the second check value is consistent with the first check value or not;
a network resource sending module, configured to send the target network resource to the client if the second check value is consistent with the first check value;
and if the second check value is inconsistent with the first check value, refusing to send the target network resource to the client.
Optionally, the second check value generating module is specifically configured to process, based on the specified check value generating algorithm, the resource identifier of the target network resource carried in the second download request and/or the timestamp of the received second download request, so as to obtain a second check value.
Optionally, the apparatus further comprises:
the algorithm identification receiving module is used for receiving the algorithm identification sent by the scheduling server; when the algorithm identification indicates that a preset moment is reached, the scheduling server selects one check value generation algorithm from a plurality of preset check value generation algorithms;
and the algorithm determining module is used for determining that the check value generating algorithm corresponding to the algorithm identifier is the specified check value generating algorithm.
Optionally, the network resource sending module is specifically configured to:
generating a random number currently corresponding to the client;
sending a random number currently corresponding to the client and a data block to be sent currently in the target network resource to the client, so that the client sends a data block downloading request carrying the currently corresponding random number and aiming at the data block in the target network resource to the cache server after receiving the currently corresponding random number;
and if the random number carried in the data block downloading request is the same as the random number currently corresponding to the client, updating the random number currently corresponding to the client, and returning to execute the step of sending the random number currently corresponding to the client and the data block to be sent currently in the target network resource to the client until all the data blocks in the target network resource are sent to the client.
In a seventh aspect, to achieve the above object, the present invention discloses a resource downloading device, where the device is applied to a client, and includes:
a first download request sending module, configured to send a first download request for a target network resource to a scheduling server;
the first check value receiving module is used for receiving the first check value sent by the scheduling server; the first check value is generated by the scheduling server according to a specified check value generation algorithm and the first download request;
a second download request sending module, configured to send a second download request carrying the first check value and targeting the target network resource to a cache server, so that the cache server generates a second check value based on the specified check value generation algorithm and the second download request, sends the target network resource to a client when the second check value is consistent with the first check value, and refuses to send the target network resource to the client when the second check value is inconsistent with the first check value;
and the network resource receiving module is used for receiving the target network resource sent by the cache server under the condition that the second check value is consistent with the first check value.
Optionally, the network resource receiving module is specifically configured to:
receiving a random number currently corresponding to the client and a data block to be sent currently in the target network resource, which are sent by the cache server;
sending a data block downloading request carrying a current corresponding random number and aiming at the data block in the target network resource to the cache server, so that the cache server updates the current corresponding random number of the client under the condition that the random number carried in the data block downloading request is the same as the current corresponding random number of the client, and sends the current corresponding random number of the client and the current data block to be sent in the target network resource to the client until all the data blocks in the target network resource are received.
In an eighth aspect, to achieve the above object, an embodiment of the present invention further discloses an electronic device, where the electronic device includes a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
the memory is used for storing a computer program;
the processor is configured to implement the resource downloading method according to any one of the above aspects when executing the program stored in the memory.
In a ninth aspect, to achieve the above object, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the resource downloading method according to any one of the above aspects is implemented.
In a tenth aspect, to achieve the above object, an embodiment of the present invention further provides a computer program product containing instructions, which when run on a computer, causes the computer to execute the resource downloading method of any one of the above aspects.
The embodiment of the invention provides a resource downloading method, which comprises the following steps: the method comprises the steps that a scheduling server receives a first downloading request aiming at target network resources sent by a client; the scheduling server generates a first check value according to a specified check value generation algorithm and the first download request; the scheduling server sends a first check value to the client, the client sends a second downloading request carrying the first check value to the cache server, the cache server generates a second check value based on the specified check value generating algorithm and the second downloading request, the target network resource is sent to the client under the condition that the second check value is consistent with the first check value, and the target network resource is refused to be sent to the client under the condition that the second check value is inconsistent with the first check value.
According to the resource downloading method provided by the embodiment of the invention, if the first check value is consistent with the second check value, the client sends the request to the scheduling server before requesting the cache server. In the related art, when the malicious terminal steals the traffic, the malicious terminal directly requests the cache server and does not request the scheduling server, so that if the first check value is consistent with the second check value, the client is a real client of the user, and the requested network resource can be sent to the client; if the first check value is inconsistent with the second check value, the client is indicated to be a malicious client, the requested network resource is refused to be sent to the client, namely, the cache server only sends the requested network resource to the real client of the user, and the real flow consumed by the real user when the real user downloads the video can be effectively determined.
Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other embodiments can be obtained by those skilled in the art according to the drawings.
FIG. 1 is a resource downloading system architecture diagram according to an embodiment of the present invention;
fig. 2 is a flowchart of a resource downloading method according to an embodiment of the present invention;
fig. 3 is a flowchart of another resource downloading method according to an embodiment of the present invention;
fig. 4 is a flowchart of another resource downloading method according to an embodiment of the present invention;
fig. 5 is a flowchart of another resource downloading method according to an embodiment of the present invention;
fig. 6 is a flowchart of another resource downloading method according to an embodiment of the present invention;
fig. 7 is a flowchart of another resource downloading method according to an embodiment of the present invention;
fig. 8 is a flowchart of another resource downloading method according to an embodiment of the present invention;
fig. 9 is a flowchart of another resource downloading method according to an embodiment of the present invention;
FIG. 10 is a flowchart of another resource downloading method according to an embodiment of the present invention;
fig. 11 is an interaction diagram illustrating an example of a resource downloading method according to an embodiment of the present invention;
fig. 12 is a structural diagram of a resource downloading device according to an embodiment of the present invention;
fig. 13 is a block diagram of another resource downloading device according to an embodiment of the present invention;
fig. 14 is a block diagram of another resource downloading device according to an embodiment of the present invention;
fig. 15 is a structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention are within the scope of the present invention.
In the related art, a video resource provider may cooperate with some network service providers, and provide a download service of video resources for users based on a cache server provided by the network service providers. Accordingly, the video resource provider needs to pay the network provider for the traffic consumed by the download service of the video resource. However, some malicious users may send a large amount of malicious video downloading requests to the cache server through a malicious terminal to generate a large amount of false traffic, which may result in that the real traffic consumed by a real user when downloading the video cannot be determined.
In order to solve the above problem, an embodiment of the present invention provides a resource downloading system, and referring to fig. 1, fig. 1 is an architecture diagram of a resource downloading system according to an embodiment of the present invention, where the downloading request system includes a scheduling server 101, a cache server 102, and a client 103.
A client terminal 103, configured to send a first download request for a target network resource to the scheduling server 101;
the scheduling server 101 is configured to receive a first download request sent by the client 103; generating a first check value according to a specified check value generation algorithm and the first download request; sending the first check value to the client 103;
the client 103 is further configured to receive a first check value sent by the scheduling server 101; sending a second downloading request carrying the first check value and aiming at the target network resource to the cache server 102;
the cache server 102 is configured to receive a second download request sent by the client 103; generating a second check value based on the designated check value generation algorithm and the second download request; judging whether the second check value is consistent with the first check value; if the second check value is consistent with the first check value, sending the target network resource to the client 103; if the second check value is not consistent with the first check value, refusing to send the target network resource to the client 103;
the client 103 is further configured to receive the target network resource sent by the cache server 102 when the second check value is consistent with the first check value.
The resource downloading system provided by the embodiment of the invention judges whether the client is a real user client by comparing whether the first check value calculated by the scheduling server is consistent with the second check value calculated by the cache server; the downloading request replied by the cache server can be ensured to be sent by a real user downloading end, and the real flow consumed by the real user downloading the video can be effectively determined.
For other embodiments of the resource download system described above, reference may be made to subsequent embodiments regarding the scheduling server, the cache server, and the client.
The embodiment of the invention also provides a resource downloading method, which is applied to the scheduling server, wherein the scheduling server can be a server of a network resource provider, and the scheduling server can be the scheduling server 101 in the system. Referring to fig. 2, the method comprises the steps of:
s201, receiving a first downloading request aiming at the target network resource sent by the client.
S202, generating a first check value according to the specified check value generation algorithm and the first download request.
S203, the first check value is sent to the client side, so that the client side sends a second downloading request carrying the first check value and aiming at the target network resource to the cache server, the cache server generates a second check value based on a specified check value generation algorithm and the second downloading request, the target network resource is sent to the client side under the condition that the second check value is consistent with the first check value, and the target network resource is refused to be sent to the client side under the condition that the second check value is inconsistent with the first check value.
According to the resource downloading method provided by the embodiment of the invention, if the first check value is consistent with the second check value, the client sends the request to the scheduling server before requesting the cache server. In the related art, when the malicious terminal steals the traffic, the malicious terminal directly requests the cache server and does not request the scheduling server, so that if the first check value is consistent with the second check value, the client is a real client of the user, and the requested network resource can be sent to the client; if the first check value is inconsistent with the second check value, the client is indicated to be a malicious client, the client is refused to send the requested network resource to the client, namely, the cache server only sends the requested network resource to the real client of the user, so that the real flow consumed when the real user downloads the video can be effectively determined.
In the step S201, the target network resource is a network resource requested to be downloaded by the client, and the target network resource may be a video resource, an audio resource, a picture resource, and the like.
The first download request may carry a resource identifier of the target network resource, and the scheduling server determines the network resource that the client needs to download according to the resource identifier. For example, the resource identification may be the name of the target network resource. Furthermore, the scheduling server may obtain a real storage address of the target network resource and send the storage address to the client. Accordingly, the client may send the storage address to the cache server, and the cache server may obtain the target network resource from the storage address and then send the target network resource to the client.
For step S202, the scheduling server may generate the first check value based on different manners.
In one embodiment, the scheduling server may locally store a pre-generated random number (which may be referred to as a check random number). And when a downloading request is received, processing the verification random number based on a specified verification value generation algorithm to obtain a first verification value. Correspondingly, the cache server also stores the check random number which is consistent with the check random number in the scheduling server.
In one embodiment, referring to fig. 3, on the basis of fig. 2, step S202 may include the following steps:
s2021, based on the designated check value generating algorithm, processing the resource identifier of the target network resource carried in the first download request and/or the timestamp of the received first download request to obtain a first check value.
In the embodiment of the present invention, when the scheduling server receives the first download request, the scheduling server may obtain the resource identifier of the target network resource carried in the first download request, and then the scheduling server calculates the first check value according to the resource identifier of the target network resource and/or the timestamp of the received first download request.
When the scheduling server receives the first download request, the scheduling server may process the resource identifier of the network resource based on a specified check value generation algorithm to obtain a first check value. At this time, the specified check value generation algorithm may be an encryption algorithm (e.g., a hash algorithm), that is, the resource identifier of the network resource is encrypted based on the encryption algorithm, and the encryption result is the first check value.
Or when the first download request is received, processing the timestamp row based on the specified check value generation algorithm to obtain a first check value. At this time, the designated check value generation algorithm may be an encryption algorithm (e.g., a hash algorithm).
Or when the first download request is received, processing the resource identifier and the timestamp row of the network resource based on the specified check value generation algorithm. For example, the resource identifier and the timestamp of the network resource are processed according to an exclusive-or encryption algorithm to obtain a first check value.
In one implementation, the resource identification of the target network resource may be an MD5 (Message-Digest Algorithm 5) value of the target network resource.
In one embodiment, referring to fig. 4, on the basis of fig. 2, before step S202, the method may further include the steps of:
and S204, when the preset time is reached, selecting one check value generation algorithm from a plurality of preset check value generation algorithms as a specified check value generation algorithm.
S205, sending the algorithm identifier of the selected check value generation algorithm to the cache server, so that the cache server determines that the check value generation algorithm corresponding to the algorithm identifier is the designated check value generation algorithm.
For step S204, the preset time may be a periodic time. Alternatively, the preset time may be a time at which the first check value needs to be generated, and for example, when the first download request is received, the designated check value generation algorithm may be selected from the plurality of check value generation algorithms. Specifically, the setting can be performed by a technician according to actual needs.
In the embodiment of the invention, each preset check value generation algorithm has a corresponding algorithm identifier. When the preset time is reached, the scheduling server may select one of the preset check value generation algorithms as a designated check value generation algorithm, and send an algorithm identifier of the designated check value algorithm to the cache server. The cache server may determine, according to the algorithm identifier, that the check value generation algorithm corresponding to the algorithm identifier is the designated check value generation algorithm.
Based on the processing, the scheduling server and the cache server can process the first download request and the second download request of the client based on the same check value generation algorithm in real time to obtain a first check value and a second check value respectively, and further can judge whether the client is a malicious client based on whether the first check value and the second check value are consistent.
Secondly, when the preset time is reached, the scheduling server selects a specified check value generation algorithm from the plurality of check value generation algorithms, so that the downloading request can be verified by using different check value generation algorithms at different times instead of using the same check value generation algorithm all the time. Furthermore, the malicious client can be effectively prevented from passing the verification after acquiring the verification value generation algorithm, and the reliability of verifying the downloading request is further improved.
In one implementation, the scheduling server and the cache server may synchronize the assigned check value generation algorithm based on the keep-alive message. For example, when a preset time is reached, the cache server sends a keep-alive message to the scheduling server, the scheduling server receives the keep-alive message, the scheduling server selects one from a plurality of preset check value generation algorithms as a specified check value generation algorithm, sends an algorithm identifier of the check value generation algorithm to the cache server, and the cache server determines the specified check value generation algorithm according to the algorithm identifier.
The embodiment of the invention also provides a resource downloading method, which is applied to the cache server, wherein the cache server can be a server of a partner manufacturer of a network resource provider, and the cache server can be the cache server 102 in the system. Referring to fig. 5, the method includes the steps of:
s501, receiving a second downloading request which is sent by the client and carries the first check value and aims at the target network resource.
Wherein, the first check value is: when receiving a first downloading request aiming at the target network resource sent by the client, the scheduling server generates the first downloading request based on the specified check value generation algorithm and sends the first downloading request to the client.
S502, generating a second check value based on the specified check value generating algorithm and the second downloading request.
S503, judging whether the second check value is consistent with the first check value.
S504, if the second check value is consistent with the first check value, the target network resource is sent to the client.
And S505, if the second check value is inconsistent with the first check value, refusing to send the target network resource to the client.
According to the resource downloading method provided by the embodiment of the invention, if the first check value is consistent with the second check value, the client sends the request to the scheduling server before requesting the cache server. In the related art, when the malicious terminal steals the traffic, the malicious terminal directly requests the cache server and does not request the scheduling server, so that if the first check value is consistent with the second check value, the client is a real client of the user, and the requested network resource can be sent to the client; if the first check value is inconsistent with the second check value, the client is indicated to be a malicious client, the client is refused to send the requested network resource to the client, namely, the cache server only sends the requested network resource to the real client of the user, so that the real flow consumed when the real user downloads the video can be effectively determined.
In one embodiment, referring to fig. 6, on the basis of fig. 5, step S502 may include the following steps:
5021, based on the appointed check value generating algorithm, the resource identifier of the target network resource carried in the second downloading request and/or the time stamp of the received second downloading request are processed to obtain a second check value.
In the embodiment of the present invention, a method for generating the second check value by the cache server is similar to the method for generating the first check value by the scheduling server, and reference may be made to related descriptions.
In one embodiment, referring to fig. 7, on the basis of fig. 5, the following steps are further included before step S502:
s506, receiving the algorithm identification sent by the scheduling server.
When the algorithm identification indicates that the preset moment is reached, the scheduling server selects one check value generation algorithm from a plurality of preset check value generation algorithms.
And S507, determining the check value generation algorithm corresponding to the algorithm identification as the specified check value generation algorithm.
Based on the processing, the scheduling server and the cache server can process the first download request and the second download request of the client based on the same check value generation algorithm in real time to obtain a first check value and a second check value respectively, and further can judge whether the client is a malicious client based on whether the first check value and the second check value are consistent.
In one embodiment, referring to fig. 8, on the basis of fig. 5, step S504 may include the following steps:
s5041, if the second check value is consistent with the first check value, a random number corresponding to the client currently is generated.
And S5042, sending the random number currently corresponding to the client and the data block to be sent currently in the target network resource to the client, so that the client sends a data block downloading request carrying the currently corresponding random number and aiming at the data block in the target network resource to the cache server after receiving the currently corresponding random number.
And S5043, if the random number carried in the data block downloading request is the same as the random number currently corresponding to the client, updating the random number currently corresponding to the client, and returning to execute the steps of sending the random number currently corresponding to the client and the data block to be sent currently in the target network resource to the client until all the data blocks in the target network resource are sent to the client.
In the embodiment of the invention, the cache server can divide the target network resource into a plurality of data blocks and send the data blocks to the client.
When the second check value is determined to be consistent with the first check value, it indicates that the client has sent a request to the scheduling server before requesting from the cache server, that is, the client is a real client of the user. The cache server may send a data block (which may be referred to as a first data block) to the client, and send a random number currently corresponding to the client.
Accordingly, the client may obtain the first data block and the current corresponding random number, and continue to request a next data block (which may be referred to as a second data block) from the cache server, that is, send a data block download request carrying the current corresponding random number to the cache server.
Furthermore, the cache server may determine whether the random number carried by the data block download request is consistent with the locally recorded random number currently corresponding to the client. If the random number carried by the data block downloading request is consistent with the random number currently corresponding to the locally recorded client, which indicates that the client passes the authentication, namely the client has requested resources from the scheduling server before, the cache server updates the random number corresponding to the client and sends a second data block and the random number currently corresponding to the client (namely the updated random number) to the client; and if the random number carried by the block downloading request is inconsistent with the locally recorded random number currently corresponding to the client, the client is not authenticated, namely, the client does not request resources from the scheduling server before and the client is possibly a malicious client, the cache server refuses to send the data block to the client. And repeating the steps until the cache server sends the target network resource to the client side, wherein the target network resource comprises all the data blocks.
In the above process, when the cache server determines that the second check value is inconsistent with the first check value, the cache server refuses to send the data block of the target network resource to the client.
Based on the processing, the verification between the cache server and the client can be further enhanced, and the cache server is ensured to only send the requested network resources to the real client of the user, so as to determine the real flow consumed when the real user downloads the video.
The embodiment of the invention also provides a resource downloading method which is applied to the client, wherein the client can be user electronic equipment such as a mobile phone, a computer and the like. The client may be the client 103 in the system described above.
Referring to fig. 9, the method includes the steps of:
s901, a first downloading request aiming at the target network resource is sent to a scheduling server.
S902, receiving a first check value sent by the scheduling server.
The first check value is generated by the scheduling server according to the specified check value generation algorithm and the first download request.
S903, a second downloading request which carries the first check value and aims at the target network resource is sent to the cache server, so that the cache server generates a second check value based on a specified check value generation algorithm and the second downloading request, the target network resource is sent to the client side under the condition that the second check value is consistent with the first check value, and the target network resource is refused to be sent to the client side under the condition that the second check value is inconsistent with the first check value.
And S904, receiving the target network resource sent by the cache server under the condition that the second check value is consistent with the first check value.
In the resource downloading method provided by the embodiment of the present invention, if the first check value is consistent with the second check value, it indicates that the client has sent a request to the scheduling server before requesting the cache server. In the related art, when the malicious terminal steals the traffic, the malicious terminal directly requests the cache server and does not request the scheduling server, so that if the first check value is consistent with the second check value, the client is a real client of the user, and the requested network resource can be sent to the client; if the first check value is inconsistent with the second check value, the client is indicated to be a malicious client, the requested network resource is refused to be sent to the client, namely, the cache server only sends the requested network resource to the real client of the user, and the real flow consumed by the real user when the real user downloads the video can be effectively determined.
In the embodiment of the present invention, reference may be made to the above description for specific methods of the scheduling server and the cache server.
In one embodiment, referring to fig. 10, on the basis of fig. 9, step S904 may include the steps of:
and S9041, receiving the random number currently corresponding to the client and the data block to be sent currently in the target network resource, which are sent by the cache server.
S9042, sending a data block download request for a data block in a target network resource, which carries a current corresponding random number, to the cache server, so that the cache server updates the random number currently corresponding to the client when the random number carried in the data block download request is the same as the random number currently corresponding to the client, and sends the random number currently corresponding to the client and the data block to be sent currently in the target network resource to the client until all data blocks in the target network resource are received.
In the embodiment of the present invention, regarding the sending method of the random number and the data block, the interaction method between the client and the cache server is similar to the above description, and reference may be made to the description.
Based on the processing, the verification between the cache server and the client can be further enhanced, and the cache server is ensured to only send the requested network resources to the real client of the user, so as to determine the real flow consumed when the real user downloads the video.
Referring to fig. 11, fig. 11 is an interaction diagram of an example of a resource downloading method according to an embodiment of the present invention, and the following description is made with reference to fig. 11.
In fig. 11, when a preset time is reached, the cache server sends a keep-alive request to the scheduling server, the scheduling server replies to keep-alive, and specifies the current encryption algorithm, that is, the scheduling server sends a keep-alive response to the cache server, where the keep-alive response carries a specified check value generation algorithm identifier. Correspondingly, when the cache server receives the keep-alive response, the cache server can determine the specified check value generation algorithm based on the specified check value generation algorithm identifier carried in the keep-alive response.
The client sends a download request to the scheduling server. The download request is for requesting a download of the target network resource.
The scheduling server replies to the client with a check value (which may be referred to as a first check value), where the first check value is calculated based on the current encryption algorithm, the MD5 value of the target network resource, and a timestamp of the scheduling server receiving the download request.
And after receiving the first check value replied by the scheduling server, the client sends an authentication request carrying the first check value to the cache server.
The cache server calculates a check value (which may be referred to as a second check value) using an encryption algorithm specified in the dispatch server keep-alive response, the MD5 value of the target network resource carried in the client request, and the timestamp of receiving the authentication request. If the second check value is consistent with the first check value carried in the client request, the client authentication is passed, that is, the client requests resources from the scheduling server, that is, the client is a real client of the user; and if the second check value is not consistent with the first check value carried in the client request, the client authentication is not passed, that is, the client does not request resources from the scheduling server, that is, the client is a malicious client and refuses to send target network resources to the client.
After the authentication is passed, the cache server generates a token1 (token) corresponding to the client at present, where the token1 may be a random number, and sends the data block in the target network resource and the token1 to the client.
When the client requests the cache server for the data block in the target network resource again, the client sends a data block downloading request carrying the token1 to request the cache server for data.
The cache server judges whether the token1 in the download request is consistent with the token1 currently corresponding to the client of the local record, if so, the cache server updates the token (namely, token 2) currently corresponding to the client, and sends the network resource and the token2 to the client.
And when the client requests the cache server to download the data block in the target network resource again, carrying the token2 currently corresponding to the client in the data block downloading request. After judging that the token2 in the download request is consistent with the token2 currently corresponding to the client of the local record, the cache server updates the token (namely, token 3) currently corresponding to the client of the local record, and sends the network resource and the token3 currently corresponding to the client. And repeating the steps until the cache server sends all the data blocks of the target network resource to the client.
And when the cache server judges that the token in the downloading request is inconsistent with the token currently corresponding to the client, the cache server refuses to send the target network resource to the client.
Based on the same inventive concept, an embodiment of the present invention further provides a resource downloading device, referring to fig. 12, where fig. 12 is a structural diagram of a resource downloading device provided in an embodiment of the present invention, where the device is applied to a scheduling server, and includes:
a first download request receiving module 1201, configured to receive a first download request for a target network resource sent by a client;
a first check value generating module 1202, configured to generate a first check value according to a specified check value generating algorithm and the first download request;
the check value sending module 1203 sends the first check value to the client, so that the client sends a second download request carrying the first check value and aiming at the target network resource to the cache server, so that the cache server generates a second check value based on a specified check value generating algorithm and the second download request, sends the target network resource to the client when the second check value is consistent with the first check value, and refuses to send the target network resource to the client when the second check value is inconsistent with the first check value.
Optionally, the check value generating module 1203 is specifically configured to:
and processing the resource identifier of the target network resource carried in the first download request and/or the timestamp of the received first download request based on the specified check value generation algorithm to obtain a first check value.
Optionally, the apparatus further comprises:
the algorithm selection module is used for selecting one check value generation algorithm from a plurality of preset check value generation algorithms as a specified check value generation algorithm when the preset time is reached;
and the algorithm identifier sending module is used for sending the algorithm identifier of the selected check value generation algorithm to the cache server so that the cache server determines the check value generation algorithm corresponding to the algorithm identifier as the specified check value generation algorithm.
In the resource downloading device provided in the embodiment of the present invention, if the first check value is consistent with the second check value, it indicates that the client has sent a request to the scheduling server before requesting the cache server. In the related art, when the malicious terminal steals the traffic, the malicious terminal directly requests the cache server and does not request the scheduling server, so that if the first check value is consistent with the second check value, the client is a real client of the user, and the requested network resource can be sent to the client; if the first check value is inconsistent with the second check value, the client is indicated to be a malicious client, the requested network resource is refused to be sent to the client, namely, the cache server only sends the requested network resource to the real client of the user, and the real flow consumed by the real user when the real user downloads the video can be effectively determined.
Based on the same inventive concept, an embodiment of the present invention further provides a resource downloading device, referring to fig. 13, where fig. 13 is a structural diagram of a resource downloading device provided in an embodiment of the present invention, where the device is applied to a cache server, and includes:
a second download request receiving module 1301, configured to receive a second download request, which is sent by the client and carries the first check value and is addressed to the target network resource; wherein, the first check value is: when receiving a first downloading request aiming at target network resources, which is sent by a client, a scheduling server generates a first downloading request based on a specified check value generation algorithm and the first downloading request and sends the first downloading request to the client;
a second check value generating module 1302, configured to generate a second check value based on a specified check value generating algorithm and the second download request;
a check value determining module 1303, configured to determine whether the second check value is consistent with the first check value;
a network resource sending module 1304, configured to send the target network resource to the client if the second check value is consistent with the first check value;
the processing module 1305, if the second check value is not consistent with the first check value, refusing to send the target network resource to the client.
Optionally, the second check value generating module 1302 is specifically configured to process, based on a specified check value generating algorithm, the resource identifier of the target network resource carried in the second download request and/or the timestamp of the received second download request, so as to obtain a second check value.
Optionally, the apparatus further comprises:
the algorithm identification receiving module is used for receiving the algorithm identification sent by the scheduling server; when the algorithm identification indicates that the preset moment is reached, the scheduling server selects one check value generation algorithm from a plurality of preset check value generation algorithms;
and the algorithm determining module is used for determining the check value generating algorithm corresponding to the algorithm identifier as the specified check value generating algorithm.
Optionally, the network resource sending module 1304 is specifically configured to:
generating a random number corresponding to the client at present;
sending the random number currently corresponding to the client and the data block to be sent currently in the target network resource to the client, so that the client sends a data block downloading request carrying the random number currently corresponding to the client and aiming at the data block in the target network resource to a cache server after receiving the random number currently corresponding to the client;
and if the random number carried in the data block downloading request is the same as the random number currently corresponding to the client, updating the random number currently corresponding to the client, and returning to execute the steps of sending the random number currently corresponding to the client and the data block to be sent currently in the target network resource to the client until all the data blocks in the target network resource are sent to the client.
In the resource downloading device provided in the embodiment of the present invention, if the first check value is consistent with the second check value, it indicates that the client has sent a request to the scheduling server before requesting the cache server. In the related art, when the malicious terminal steals the traffic, the malicious terminal directly requests the cache server and does not request the scheduling server, so that if the first check value is consistent with the second check value, the client is a real client of the user, and the requested network resource can be sent to the client; if the first check value is inconsistent with the second check value, the client is indicated to be a malicious client, the requested network resource is refused to be sent to the client, namely, the cache server only sends the requested network resource to the real client of the user, and the real flow consumed by the real user when the real user downloads the video can be effectively determined.
Based on the same inventive concept, an embodiment of the present invention further provides a resource downloading device, referring to fig. 14, fig. 14 is a structural diagram of a resource downloading device provided in an embodiment of the present invention, where the device is applied to a client, and includes:
a first download request sending module 1401, configured to send a first download request for a target network resource to a scheduling server;
a first check value receiving module 1402, configured to receive a first check value sent by a scheduling server; the first check value is generated by the scheduling server according to a specified check value generation algorithm and the first download request;
a second download request sending module 1403, configured to send a second download request, which carries the first check value and is addressed to the target network resource, to the cache server, so that the cache server generates a second check value based on a specified check value generation algorithm and the second download request, and sends the target network resource to the client when the second check value is consistent with the first check value, and refuses to send the target network resource to the client when the second check value is inconsistent with the first check value;
a network resource receiving module 1404, configured to receive the target network resource sent by the cache server when the second check value is consistent with the first check value.
Optionally, the network resource receiving module 1404 is specifically configured to:
receiving a random number which is sent by a cache server and currently corresponds to a client and a data block which is currently to be sent in a target network resource;
and sending a data block downloading request carrying the current corresponding random number and aiming at the data block in the target network resource to the cache server, so that the cache server updates the current corresponding random number of the client under the condition that the random number carried in the data block downloading request is the same as the current corresponding random number of the client, and sends the current corresponding random number of the client and the current data block to be sent in the target network resource to the client until all the data blocks in the target network resource are received.
In the resource downloading device provided in the embodiment of the present invention, if the first check value is consistent with the second check value, it indicates that the client has sent a request to the scheduling server before requesting the cache server. In the related art, when the malicious terminal steals the traffic, the malicious terminal directly requests the cache server and does not request the scheduling server, so that if the first check value is consistent with the second check value, the client is a real client of the user, and the requested network resource can be sent to the client; if the first check value is inconsistent with the second check value, the client is indicated to be a malicious client, the requested network resource is refused to be sent to the client, namely, the cache server only sends the requested network resource to the real client of the user, and the real flow consumed by the real user when the real user downloads the video can be effectively determined.
An embodiment of the present invention further provides an electronic device, as shown in fig. 15, including a processor 1501, a communication interface 1502, a memory 1503, and a communication bus 1504, where the processor 1501, the communication interface 1502, and the memory 1503 complete mutual communication through the communication bus 1504,
a memory 1503 for storing a computer program;
the processor 1501 is configured to implement any resource downloading method in the foregoing embodiments when executing the program stored in the memory 1503.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this is not intended to represent only one bus or type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In the electronic device provided in the embodiment of the present invention, if the first check value is consistent with the second check value, it indicates that the client has sent a request to the scheduling server before requesting the cache server. In the related art, when the malicious terminal steals the traffic, the malicious terminal directly requests the cache server and does not request the scheduling server, so that if the first check value is consistent with the second check value, the client is a real client of the user, and the requested network resource can be sent to the client; if the first check value is inconsistent with the second check value, the client is indicated to be a malicious client, the requested network resource is refused to be sent to the client, namely, the cache server only sends the requested network resource to the real client of the user, and the real flow consumed by the real user when the real user downloads the video can be effectively determined.
In another embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of any of the above resource downloading methods.
In yet another embodiment, the present invention further provides a computer program product containing instructions, which when run on a computer, causes the computer to execute any of the resource downloading methods of the above embodiments.
By operating the computer program product provided by the embodiment of the invention, if the first check value is consistent with the second check value, the client side sends a request to the scheduling server before requesting to the cache server. In the related art, when the malicious terminal steals the traffic, the malicious terminal directly requests the cache server and does not request the scheduling server, so that if the first check value is consistent with the second check value, the client is a real client of the user, and the requested network resource can be sent to the client; if the first check value is inconsistent with the second check value, the client is indicated to be a malicious client, the client is refused to send the requested network resource to the client, namely, the cache server only sends the requested network resource to the real client of the user, so that the real flow consumed when the real user downloads the video can be effectively determined.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising one of 8230; \8230;" 8230; "does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on differences from other embodiments. In particular, for the apparatus, system, electronic device, computer-readable storage medium, and computer program product embodiments, the description is relatively simple as it is substantially similar to the method embodiments, and reference may be made to some descriptions of the method embodiments for relevant points.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. A resource download system, comprising a scheduling server, a cache server, and a client, wherein:
the client is used for sending a first downloading request aiming at the target network resource to the scheduling server;
the scheduling server is used for receiving the first downloading request sent by the client; generating a first check value according to a specified check value generation algorithm and the first download request; sending the first check value to the client; wherein the first check value is: based on the specified check value generation algorithm, the resource identifier of the target network resource carried in the first download request and/or the timestamp of the received first download request are processed;
the client is further configured to receive the first check value sent by the scheduling server; sending a second downloading request carrying the first check value and aiming at the target network resource to the cache server;
the cache server is used for receiving the second downloading request sent by the client; generating a second check value based on the specified check value generation algorithm and the second download request; judging whether the second check value is consistent with the first check value; if the second check value is consistent with the first check value, sending the target network resource to the client; if the second check value is inconsistent with the first check value, refusing to send the target network resource to the client; wherein the second check value is: based on the designated check value generation algorithm, the resource identifier of the target network resource carried in the second download request and/or the timestamp of the received second download request are processed;
the client is further configured to receive the target network resource sent by the cache server under the condition that the second check value is consistent with the first check value.
2. A resource downloading method is applied to a scheduling server, and comprises the following steps:
receiving a first downloading request aiming at target network resources, which is sent by a client;
generating a first check value according to a specified check value generation algorithm and the first download request;
sending the first check value to the client, so that the client sends a second download request carrying the first check value and aiming at the target network resource to a cache server, so that the cache server generates a second check value based on the specified check value generation algorithm and the second download request, and sends the target network resource to the client if the second check value is consistent with the first check value, and refuses to send the target network resource to the client if the second check value is inconsistent with the first check value; wherein the second check value is: based on the specified check value generation algorithm, the resource identifier of the target network resource carried in the second download request and/or the timestamp of the received second download request are processed;
the generating a first check value according to a specified check value generating algorithm and the first download request includes:
and processing the resource identifier of the target network resource carried in the first download request and/or the timestamp of the received first download request based on the specified check value generation algorithm to obtain a first check value.
3. The method of claim 2, wherein prior to the generating a first check value according to a specified check value generation algorithm and the first download request, the method further comprises:
when the preset time is reached, selecting one check value generation algorithm from a plurality of preset check value generation algorithms as the specified check value generation algorithm;
and sending the algorithm identification of the selected check value generation algorithm to the cache server, so that the cache server determines that the check value generation algorithm corresponding to the algorithm identification is the specified check value generation algorithm.
4. A resource downloading method is applied to a cache server, and comprises the following steps:
receiving a second downloading request which is sent by the client and carries the first check value and aims at the target network resource; wherein the first check value is: when receiving a first downloading request aiming at the target network resource sent by the client, the scheduling server generates the first downloading request based on a specified check value generation algorithm and the first downloading request and sends the first downloading request to the client; the first check value is: based on the specified check value generation algorithm, processing the resource identifier of the target network resource carried in the first download request and/or the timestamp of the received first download request;
generating a second check value based on the specified check value generation algorithm and the second download request;
judging whether the second check value is consistent with the first check value or not;
if the second check value is consistent with the first check value, sending the target network resource to the client;
if the second check value is inconsistent with the first check value, refusing to send the target network resource to the client;
generating a second check value based on the specified check value generation algorithm and the second download request, comprising:
and processing the resource identifier of the target network resource carried in the second download request and/or the timestamp of the received second download request based on the specified check value generation algorithm to obtain a second check value.
5. The method of claim 4, wherein prior to the generating a second parity value based on the specified parity value generation algorithm and the second download request, the method further comprises:
receiving an algorithm identifier sent by the scheduling server; when the algorithm identification shows that the preset moment is reached, the scheduling server selects one check value generation algorithm from a plurality of preset check value generation algorithms;
and determining the check value generation algorithm corresponding to the algorithm identification as the specified check value generation algorithm.
6. The method of claim 4, wherein sending the target network resource to the client comprises:
generating a random number currently corresponding to the client;
sending a random number currently corresponding to the client and a data block to be sent currently in the target network resource to the client, so that the client sends a data block downloading request carrying the currently corresponding random number and aiming at the data block in the target network resource to the cache server after receiving the currently corresponding random number;
and if the random number carried in the data block downloading request is the same as the random number currently corresponding to the client, updating the random number currently corresponding to the client, and returning to execute the step of sending the random number currently corresponding to the client and the data block to be sent currently in the target network resource until all the data blocks in the target network resource are sent to the client.
7. A resource downloading method is applied to a client side, and is characterized by comprising the following steps:
sending a first download request aiming at the target network resource to a scheduling server;
receiving a first check value sent by the scheduling server; the first check value is generated by the scheduling server according to a specified check value generation algorithm and the first download request; the first check value is: based on the specified check value generation algorithm, processing the resource identifier of the target network resource carried in the first download request and/or the timestamp of the received first download request;
sending a second downloading request carrying the first check value and aiming at the target network resource to a cache server, so that the cache server generates a second check value based on the specified check value generation algorithm and the second downloading request, and sending the target network resource to the client under the condition that the second check value is consistent with the first check value, and refusing to send the target network resource to the client under the condition that the second check value is inconsistent with the first check value; wherein the second check value is: based on the designated check value generation algorithm, the resource identifier of the target network resource carried in the second download request and/or the timestamp of the received second download request are processed;
and receiving the target network resource sent by the cache server under the condition that the second check value is consistent with the first check value.
8. The method of claim 7, the receiving the target network resource that the cache server sent if the second parity value is consistent with the first parity value, comprising:
receiving a random number currently corresponding to the client and a data block to be sent currently in the target network resource, which are sent by the cache server;
sending a data block downloading request carrying the random number currently corresponding to the client and aiming at the data block in the target network resource to the cache server, so that the cache server updates the random number currently corresponding to the client under the condition that the random number carried in the data block downloading request is the same as the random number currently corresponding to the client, and sends the random number currently corresponding to the client and the data block to be sent currently in the target network resource to the client until all the data blocks in the target network resource are received.
9. An electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
the memory is used for storing a computer program;
the processor, when executing the program stored in the memory, is configured to perform the method steps of any of claims 2-3, or 4-6, or 7-8.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method steps of any one of claims 2 to 3, or 4 to 6, or 7 to 8.
CN202111020859.5A 2021-09-01 2021-09-01 Resource downloading method, system, electronic equipment and storage medium Active CN113709530B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111020859.5A CN113709530B (en) 2021-09-01 2021-09-01 Resource downloading method, system, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111020859.5A CN113709530B (en) 2021-09-01 2021-09-01 Resource downloading method, system, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113709530A CN113709530A (en) 2021-11-26
CN113709530B true CN113709530B (en) 2023-03-07

Family

ID=78658751

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111020859.5A Active CN113709530B (en) 2021-09-01 2021-09-01 Resource downloading method, system, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113709530B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115001765B (en) * 2022-05-24 2024-08-06 北京得间科技有限公司 Page resource loading and verifying method and computing device
CN114979169B (en) * 2022-05-27 2024-03-29 山东派盟网络科技有限公司 Network resource pushing method and device, storage medium and electronic equipment
CN115514991B (en) * 2022-09-22 2024-05-14 中国电信股份有限公司 IPTV video tamper-proof method, server and client

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104283903A (en) * 2013-07-01 2015-01-14 深圳市腾讯计算机系统有限公司 Downloading method for files and device thereof
CN106131165A (en) * 2016-07-01 2016-11-16 北京百度网讯科技有限公司 Anti-stealing link method and device for content distributing network
CN107579977A (en) * 2017-09-04 2018-01-12 珠海迈科智能科技股份有限公司 A kind of key theft preventing method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10834096B2 (en) * 2018-06-05 2020-11-10 The Toronto-Dominion Bank Methods and systems for controlling access to a protected resource

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104283903A (en) * 2013-07-01 2015-01-14 深圳市腾讯计算机系统有限公司 Downloading method for files and device thereof
CN106131165A (en) * 2016-07-01 2016-11-16 北京百度网讯科技有限公司 Anti-stealing link method and device for content distributing network
CN107579977A (en) * 2017-09-04 2018-01-12 珠海迈科智能科技股份有限公司 A kind of key theft preventing method and device

Also Published As

Publication number Publication date
CN113709530A (en) 2021-11-26

Similar Documents

Publication Publication Date Title
CN113709530B (en) Resource downloading method, system, electronic equipment and storage medium
CN107483509B (en) A kind of auth method, server and readable storage medium storing program for executing
CN111355726B (en) Identity authorization login method and device, electronic equipment and storage medium
CN108540433B (en) User identity verification method and device
CN109391673B (en) Method, system and terminal equipment for managing update file
CN109347637B (en) Authentication method, Content Delivery Network (CDN) and content server
CN107911222B (en) Digital signature generating method, digital signature verifying method, digital signature generating apparatus, digital signature verifying apparatus, and storage medium storing digital signature verifying program
JP2019519174A (en) Method and entity for terminating a subscription
CN108769743B (en) Video playing control method, system, node and computer storage medium
CN111148088A (en) Method, device, equipment and storage medium for managing mobile terminal and system
CN114244624A (en) Flow control method and device, equipment and storage medium
CN112311769A (en) Method, system, electronic device and medium for security authentication
CN112565406B (en) Gray release method, gray release system and electronic equipment
CN110913011B (en) Session holding method, session holding device, readable storage medium and electronic device
CN116527632A (en) Method, device, equipment and medium for processing content distribution network back source request
CN110083786B (en) Link verification method and device
CN108055356A (en) A kind of information processing method, server, client and readable storage medium storing program for executing
CN113438336B (en) Network request method, device, equipment and storage medium
CN109672756B (en) Data transmission method and related device, server and storage medium
CN105141586B (en) A kind of method and system verified to user
CN112732659A (en) Application program sharing method and device
CN111404897A (en) Message distribution method and device, storage medium and electronic equipment
CN117251837A (en) System access method and device, electronic equipment and storage medium
CN110995756A (en) Method and device for calling service
US8881241B2 (en) Method of and system for implementing privacy control

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant