CDN (Content Delivery Network) access method, electronic equipment and computer storage medium
By employing a CDN access method that combines client-side key rotation and multi-layered verification, the problem of easy leakage of CDN parameters is solved, thereby improving the security of application downloads and enhancing the user experience.
Patent Information
- Application Number
- CN202511757161.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-26
- Publication Date
- 2026-02-27
AI Technical Summary
Existing CDN parameters are easily leaked, leading to increased operating costs for the company and a decline in user experience.
The client requests a preset key from the application center server through key rotation, receives and decrypts the encrypted download address, and initiates a download request to the CDN server based on the decrypted address. The application center server and CDN server perform multi-layer verification to generate an authentication signature to ensure the security of the download address.
It effectively avoids CDN parameter leakage, improves key security and user experience, prevents fraudulent activities, and ensures the security of application downloads.
Smart Images

Figure CN121585351A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet technology, and in particular to a CDN access method, electronic device, and computer storage medium. Background Technology
[0002] A Content Delivery Network (CDN) is a network of interconnected computers connected via the internet. It utilizes servers located closest to each user to deliver music, images, videos, applications, and other files to users faster and more reliably, providing high-performance, scalable, and low-cost online content delivery. Applying the CDN system model to downloading resources from multi-origin websites can effectively improve download speeds.
[0003] Currently, most application centers on client devices utilize CDN services. CDN services are typically charged based on traffic volume. Some users may attempt to steal download links for visible resources. Some application center servers also return CDN parameter information to clients, allowing the clients to generate download links with the application center server's authentication signature and then initiate download requests to the CDN server based on this information. This method can lead to CDN parameter leaks, increasing company operating costs and impacting the experience for legitimate users. Summary of the Invention
[0004] In view of this, embodiments of this application provide a CDN access method, electronic device, and computer storage medium to solve the problem of easy leakage of existing CDN parameters.
[0005] To address the aforementioned technical problems, the first aspect of this application provides the following technical solution: a CDN access method, applied to a client, comprising: Send the download request for the first application to the application center server; The application center server receives an encrypted download address, which is an encrypted download address information with the authentication signature of the application center server. The download address information is used to indicate the download address of the first application on the CDN server. The authentication signature is generated by the application center server based on pre-configured CDN parameters after the download request is verified. The encrypted download address information is decrypted based on a preset key to determine the download address information. The preset key is a key that the client obtains from the application center server through a key rotation method. Based on the download address information, a request to download the first application is initiated to the CDN server.
[0006] In one possible design, the client stores a first key, and the method further includes: In response to the key update notification sent by the application center server, a request to apply for the preset key is sent to the application center server; Receive the key encryption information returned by the application center server; The key encryption information is decrypted based on the first key to determine the preset key; The step of initiating a request to download the first application from the CDN server based on the download address information includes: Based on the preset key and the download address information, a request to download the first application is initiated to the CDN server; Wherein, the first key is the key used by the client last time, and the key encryption information includes the validity period of the preset key.
[0007] In one possible design, the download address information includes the download addresses of multiple application shards of the first application on the CDN server and the size of each application shard, and the download address of each application shard carries the authentication signature of the application center server. The step of initiating a request to download the first application from the CDN server based on the download address information includes: Based on the download address of each application segment, a request to download the corresponding application segment is sent to the CDN server.
[0008] To address the aforementioned technical problems, the second aspect of this application provides the following technical solution: a CDN access method, applied to an application center server, comprising: Receive a download request for the first application sent by the client, and verify the download request; After the download request is verified, an encrypted download address is sent to the client. The encrypted download address is an encrypted download address information with the authentication signature of the application center server. The download address information is used to indicate the download address of the first application on the CDN server. The authentication signature is generated by the application center server based on pre-configured CDN parameters after the download request is verified.
[0009] In one possible design, the CDN parameters include a CDN key, authentication method, and validity period; the method further includes: After the download request is verified, the authentication signature is generated using a preset algorithm provided by the CDN server based on the CDN key, authentication method, and validity period.
[0010] In one possible design, the verification of the download request includes: Obtain user information provided by the client and verify the user information; The user information includes user agent information, device ID, first application ID, and application download frequency from the same IP address or the same device.
[0011] In one possible design, sending an encrypted download address to the client after the download request has been verified includes: After the user information is verified, the encrypted download address is generated based on the preset key, and the encrypted download address is sent to the client. The preset key is the key that the client requests from the application center server through a key rotation method.
[0012] To address the aforementioned technical problems, the third aspect of this application provides the following technical solution: a CDN access method, applied to a CDN server, comprising: The system receives a request from a client to download the first application based on the download address information, and performs a verification on the request, which includes an authentication signature generated by the application center server based on pre-configured CDN parameters. After the first verification passes, the application center server calls the interface provided by the application center server to obtain the user information of the client, and performs a second verification on the request based on the obtained user information. After the secondary verification is passed, the download resources of the first application are sent to the client.
[0013] Accordingly, the fourth aspect of this application provides the following technical solution: an electronic device, comprising: a memory, a processor, and a computer program stored on the memory and running on the processor, wherein the computer program, when executed by the processor, implements the steps of the CDN access method provided in the first aspect of this application.
[0014] Accordingly, the fifth aspect of this application provides the following technical solution: a computer storage medium storing a program for a CDN access method, wherein when the program for the CDN access method is executed by a processor, it implements the steps of the CDN access method provided in the first aspect of this application.
[0015] Compared with related technologies, this application proposes a CDN access method, electronic device, and computer storage medium. The client sends a download request for a first application to the application center server. The application center server verifies the download request and, upon successful verification, sends an encrypted download address to the client. The encrypted download address is encrypted download address information containing the authentication signature of the application center server. This download address information indicates the download address of the first application on the CDN server. The authentication signature is generated by the application center server based on pre-configured CDN parameters after successful verification of the download request. The client decrypts the encrypted download address information using a preset key, which is a key obtained by the client from the application center server through a key rotation mechanism. The client initiates a request to download the first application from the CDN server based on the download address information. The CDN server then sends the download resources of the first application to the client. This effectively prevents CDN fraud, ensures application download security, and improves user experience. Generating keys through key rotation also enhances key security. Furthermore, based on the download address of each application segment, a request to download the corresponding application segment is sent to the CDN server, avoiding the problem of potentially invalid links during segment download. Attached Figure Description
[0016] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.
[0017] Figure 1 A flowchart illustrating a CDN access method provided in this application; Figure 2 A flowchart illustrating another CDN access method provided in this application; Figure 3 A flowchart illustrating another CDN access method provided in this application; Figure 4 A flowchart illustrating another CDN access method provided in this application; Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0018] To make the technical problems, technical solutions, and beneficial effects to be solved by this application clearer and more understandable, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and are not intended to limit the scope of this application.
[0019] In the following description, the use of suffixes such as "module," "part," or "unit" to denote elements is solely for the purpose of illustration and has no specific meaning in itself. Therefore, "module," "part," or "unit" may be used interchangeably.
[0020] It should be noted that the terms "first," "second," etc., in the specification, claims, and drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0021] In one embodiment, such as Figure 1 As shown, this application provides a CDN access method, which is applied to a CDN access system including a client, an application center server, and a CDN server, and includes: S1. The client sends a download request for the first application to the application center server; S2. The application center server verifies the download request and sends an encrypted download address to the client after the verification is successful. The encrypted download address is an encrypted download address information with the authentication signature of the application center server. The download address information is used to indicate the download address of the first application on the CDN server. The authentication signature is generated by the application center server based on pre-configured CDN parameters after the download request is verified. S3. The client decrypts the encrypted download address information based on a preset key to determine the download address information. The preset key is a key that the client obtains from the application center server through a key rotation method. S4. The client initiates a request to the CDN server to download the first application based on the download address information; S5. The CDN server sends the download resources of the first application to the client.
[0022] This embodiment provides a CDN access method applied to a CDN access system including a client, an application center server, and a CDN server. The client sends a download request for a first application to the application center server. The application center server verifies the download request and, upon successful verification, sends an encrypted download address to the client. The client decrypts the encrypted download address information based on a preset key to determine the download address information. Based on the download address information, the client initiates a request to the CDN server to download the first application. The CDN server sends the download resources of the first application to the client, enabling the client to download the first application. This effectively prevents CDN fraud, ensures application download security, and improves the user experience. Generating keys through key rotation also enhances key security.
[0023] In this embodiment, the CDN parameters may include parameters such as CDN key, authentication method, and validity period, and are not limited thereto. The CDN parameters can be pre-configured by operations and maintenance personnel, and to further improve the security of the CDN parameters, the personnel can periodically change them.
[0024] In this embodiment of the application, in step S2, the application center server verifies the download request. Specifically, this may include: After the application center server verifies the download request, it generates the authentication signature based on the CDN key, authentication method, and validity period using a preset algorithm provided by the CDN server.
[0025] In this embodiment, the authentication method may include at least one of the following: anti-hotlinking authentication, origin authentication, request header authentication, internal redirection authentication, etc. The specific authentication method used can be determined based on the actual situation of the client and the CDN network. This embodiment does not specifically limit the authentication method.
[0026] In one embodiment, the CDN parameters may include a CDN key, an authentication method, and a validity period. The authentication method includes the anti-leeching authentication. After the application center server verifies the download request, it generates the authentication signature based on the CDN key, the anti-leeching authentication, and the validity period using the preset algorithm.
[0027] In another embodiment, the CDN parameters may include a CDN key, authentication method, and validity period. The authentication method includes request header authentication. After the application center server verifies the download request, it generates the authentication signature based on the CDN key, the request header authentication, and the validity period using the preset algorithm.
[0028] In another embodiment, the CDN parameters may include a CDN key, authentication method, and validity period. The authentication method includes anti-leeching authentication and origin authentication. After the application center server verifies the download request, it generates the authentication signature using the preset algorithm based on the CDN key, anti-leeching authentication, origin authentication, and validity period.
[0029] In other embodiments, the CDN parameters may include other parameters, and the authentication method may have other combinations. The application center server may use the preset algorithm to generate the authentication signature according to the actual situation, which will not be specifically described here.
[0030] In this embodiment of the application, in step S2, the application center server verifies the download request and, after successful verification, sends an encrypted download address to the client. Specifically, it may also include: The application center server obtains user information provided by the client and verifies the user information; After the user information is verified, the application center server generates the encrypted download address based on the preset key and sends the encrypted download address to the client. The user information may include user agent information, device ID, first application ID, and application download frequency from the same IP address or the same device.
[0031] In this embodiment of the application, the user information is pre-encapsulated in the client's SDK (Software Development Kit). It is understood that the user information may also include other information, such as browser information, SDK version information, etc., which are not limited here.
[0032] Specifically, upon receiving the download request, the application center server obtains user information provided by the client, such as user agent information, device ID, first application ID, and application download frequency from the same IP or device. It verifies the user agent information, device ID, first application ID, and application download frequency from the same IP or device, and generates a verification result. If the verification result is successful, the application center server saves the user information and generates the authentication signature using a preset algorithm provided by the CDN server based on the CDN key, authentication method, and validity period. Then, it generates encrypted download address information containing the application center server's authentication signature based on the preset key. Finally, it sends the encrypted download address to the client so that the client can subsequently decrypt the encrypted download address information based on the preset key, determine the download address information, and then initiate a request to download the first application from the CDN server based on the download address information. It is understood that if the application center server fails to verify the user agent information, device ID, first application ID, and application download frequency of the same IP or the same device, the application center server can intercept the client's download request, and the client will be unable to complete the subsequent download operation.
[0033] In other embodiments, upon receiving the download request, the application center server can obtain user information provided by the client, such as browser information and SDK version information, verify the browser information and SDK version information, and generate a verification result. If the verification result is successful, the application center server saves the user information and generates the authentication signature using a preset algorithm provided by the CDN server. Then, based on a preset key, it generates encrypted download address information containing the authentication signature of the application center server, and finally sends the encrypted download address to the client. This allows the client to decrypt the encrypted download address information based on the preset key, determine the download address information, and then initiate a request to download the first application from the CDN server based on the download address information. If the verification result fails, it indicates that the download request may be abnormal. The application center server can intercept the client's download request, preventing the client from completing the subsequent download operation.
[0034] In this embodiment, the client stores a first key. In step S3, the client decrypts the encrypted download address information based on the preset key to determine the download address information. Specifically, this may include: In response to the key update notification sent by the application center server, the client sends a request to the application center server to apply for the preset key; The key encryption information returned by the application center server is received; The client decrypts the key encryption information based on the first key to determine the preset key.
[0035] In this embodiment, the first key may be the key previously used by the client, and the key encryption information may include the validity period of the preset key. When a download request is received from the client, the application center server sends a key update prompt to the client. In response to the key update prompt from the application center server, the client sends a request to the application center server to apply for the preset key and receives the key encryption information returned by the application center server. Finally, the client decrypts the key encryption information based on the first key to determine the preset key. This improves key security and avoids the risk of leakage caused by all clients using the same preset key.
[0036] In another embodiment, the key encryption information may further include the validity period of the first key. The application center server may also analyze the download request. If it is determined that the download request is the client's first request to download the first application, the application center server sends a key update notification to the client. If it is determined that the download request is not the client's first request to download the first application, the application center server may not send a key update notification to the client, but directly send the key encryption information. The client decrypts the key encryption information to determine the first key, so that the client can subsequently decrypt the encrypted download address information based on the first key, thereby determining the download address information.
[0037] In this embodiment, after determining the first key, the client can also initiate a request to download the first application from the CDN server based on the preset key and the download address information. The preset key is used to verify identity, ensure security, and prevent unauthorized downloads.
[0038] In this embodiment, the download address information may include the download addresses of multiple application fragments of the first application on the CDN server and the size of each application fragment. Each application fragment's download address carries the authentication signature of the application center server. In step S4, the client initiates a request to download the first application from the CDN server based on the download address information. Specifically, this includes: The client initiates a request to the CDN server to download the corresponding application segment based on the segment download address of each application segment.
[0039] Specifically, the client can initiate a request to the CDN server to download the corresponding application segment based on the preset key and the segment download address of each application segment. Since multiple application segments correspond to multiple download addresses, the problem of the same download address failing to be verified by the CDN server during subsequent segment downloads can be avoided.
[0040] In this embodiment of the application, before step S5, the following may also be included: The CDN server receives a request to download the first application and performs a verification on the request; After the first verification passes, the CDN server calls the interface provided by the application center server to obtain the user information and performs a second verification on the request.
[0041] In this embodiment, the client initiates a request to download the first application to the CDN server based on the preset key and the download address information. The CDN server receives the request and performs an initial verification, such as verifying the download path, download identity, and authentication signature based on the information contained in the request. If the initial verification fails, the CDN server may reject the client's request to download the first application, and the client may obtain an encrypted download address from the application center server again. After the initial verification passes, the CDN server may also call the interface provided by the application center server to obtain the user agent information, device ID, first application ID, and application download frequency of the same IP or device, and perform a second verification on the request. Only after the second verification passes will the CDN server return the download resources of the first application to the client, thereby improving the security of application downloads and enhancing the user experience.
[0042] In this embodiment of the application, the application center server can also periodically obtain download request data within a preset time interval and download request data within a preset time interval recorded by the CDN server, compare the two sets of download request data, and if the comparison results are inconsistent, the application center server can issue an early warning event.
[0043] In this embodiment, after receiving a warning event, the operation and maintenance personnel analyze the warning event and obtain the analysis results. If the analysis results indicate that the download request involves fraudulent activity, the user information provided by the client can be obtained from the CDN server, and the device ID corresponding to the user information can be blocked. In this way, by analyzing the warning event, the accuracy of the fraudulent activity judgment is improved, CDN fraud can be effectively avoided, and the company's operating costs are protected.
[0044] In some embodiments, the warning events can be automatically analyzed based on preset rules to obtain analysis results. For example, if the difference between two download request data is greater than a preset value, it can be determined that the download requests involve fraudulent activities.
[0045] In the above implementation, the client sends a download request for the first application to the application center server; the application center server verifies the download request and, upon successful verification, sends an encrypted download address to the client. The encrypted download address is encrypted download address information containing the authentication signature of the application center server. This download address information indicates the download address of the first application on the CDN server. The authentication signature is generated by the application center server based on pre-configured CDN parameters after successful verification of the download request. The client decrypts the encrypted download address information using a preset key to determine the download address information. The preset key is a key obtained by the client from the application center server through a key rotation mechanism. The client initiates a request to download the first application from the CDN server based on the download address information. The CDN server sends the download resources of the first application to the client. This effectively prevents CDN fraud, ensures application download security, and improves user experience. Generating keys through key rotation also enhances key security. Furthermore, based on the download address of each application segment, a request to download the corresponding application segment is sent to the CDN server, avoiding the problem of potentially invalid links during segment download.
[0046] In one embodiment, such as Figure 2 As shown, this application provides another CDN access method applied to a client, the CDN access method comprising: S6. Send the download request for the first application to the application center server; S7. Receive the encrypted download address returned by the application center server. The encrypted download address is encrypted download address information with the authentication signature of the application center server. The download address information is used to indicate the download address of the first application on the CDN server. The authentication signature is generated by the application center server based on the pre-configured CDN parameters after the download request is verified. S8. Decrypt the encrypted download address information based on a preset key to determine the download address information. The preset key is a key that the client requests from the application center server through a key rotation method. S9. Based on the download address information, initiate a request to the CDN server to download the first application.
[0047] In this embodiment, a CDN access method is provided, applied to the client. The preset key is a key obtained by the client from the application center server through a key rotation method. The encrypted download address is encrypted download address information carrying the authentication signature of the application center server. The download address information is used to indicate the download address of the first application on the CDN server. The authentication signature is generated by the application center server based on pre-configured CDN parameters after the download request is verified. The download address information includes the fragment download addresses of multiple application fragments of the first application on the CDN server and the size of each application fragment, and the fragment download address of each application fragment carries the authentication signature of the application center server.
[0048] In this embodiment, the client first sends a download request for the first application to the application center server, then receives an encrypted download address returned by the application center server, then decrypts the encrypted download address information based on a preset key to determine the download address information, and finally initiates a request to download the first application to the CDN server based on the download address information. This facilitates the client's subsequent receipt of the download resources for the first application sent by the CDN server and the download of the first application. This effectively prevents CDN fraud, ensures the security of application downloads, and improves the user experience. The key security is also improved by generating keys through key rotation.
[0049] In this embodiment, the client stores a first key. The first key is the key last used by the client, and the key encryption information includes the validity period of the preset key. The CDN access method may further include: In response to the key update notification sent by the application center server, a request to apply for the preset key is sent to the application center service side; Receive the key encryption information returned by the application center server; The key encryption information is decrypted based on the first key to determine the preset key.
[0050] In this embodiment, in response to the key update prompt information sent by the application center server, a request to apply for the preset key is sent to the application center service side, and the key encryption information returned by the application center server is received. Finally, the key encryption information is decrypted based on the first key to determine the preset key. This improves the security of the key and avoids the risk of leakage caused by all clients using the same preset key.
[0051] In this embodiment of the application, in step S9, a request to download the first application is initiated to the CDN server based on the download address information. Specifically, this may include: Based on the preset key and the download address information, a request to download the first application is initiated to the CDN server.
[0052] In this embodiment, the download address information includes the download addresses of multiple application fragments of the first application on the CDN server and the size of each application fragment, and the download address of each application fragment carries the authentication signature of the application center server. In step S9, a request to download the first application is initiated to the CDN server based on the download address information. Specifically, this also includes: Based on the download address of each application segment, a request to download the corresponding application segment is sent to the CDN server.
[0053] Specifically, the client can initiate a request to download the corresponding application segment from the CDN server based on the preset key and the segment download address of each application segment. Since multiple application segments correspond to multiple download addresses, the problem of the same download address failing verification by the CDN server during subsequent segment downloads can be avoided. At the same time, the preset key is used to verify identity, ensure security, and prevent unauthorized download operations.
[0054] In the above implementation, the client first sends a download request for the first application to the application center server, then receives an encrypted download address returned by the application center server, and then decrypts the encrypted download address information based on a preset key to determine the download address information. Finally, based on the preset key and the download address information, the client initiates a request to the CDN server to download the first application, so that the client can subsequently receive the download resources of the first application sent by the CDN server and download the first application. This effectively prevents CDN fraud, ensures the security of application downloads, and improves the user experience. In response to the key update prompt message sent by the application center server, the client sends a request to the application center server to apply for the preset key, receives the key encryption information returned by the application center server, and decrypts the key encryption information based on the first key to determine the preset key. This key generation through key rotation improves key security.
[0055] It should be noted that the above Figure 2 Method Implementation Examples and Figure 1 The method implementations belong to the same concept; for other specific implementation processes, please refer to [link / reference]. Figure 1 Method implementation examples, and Figure 2The technical features in the method embodiments are as follows: Figure 1 The methods described in the examples are all applicable and will not be repeated here.
[0056] In one embodiment, such as Figure 3 As shown, this application provides another CDN access method applied to an application center server. The CDN access method may include: S100: Receive a download request for the first application sent by the client, and verify the download request; S101. After the download request is verified, an encrypted download address is sent to the client. The encrypted download address is an encrypted download address information with the authentication signature of the application center server. The download address information is used to indicate the download address of the first application on the CDN server. The authentication signature is generated by the application center server based on pre-configured CDN parameters after the download request is verified.
[0057] In this embodiment, the CDN parameters may include a CDN key, authentication method, and validity period, which are not limited in this application. The CDN parameters can be pre-configured by operations and maintenance personnel. To further improve the security of the CDN parameters, operations and maintenance personnel can periodically change the CDN parameters. The method may also include: After the download request is verified, the authentication signature is generated using a preset algorithm provided by the CDN server based on the CDN key, authentication method, and validity period.
[0058] In this embodiment, the authentication method may include at least one of the following: anti-hotlinking authentication, origin authentication, request header authentication, internal redirection authentication, etc. The specific authentication method used can be determined based on the actual situation of the client and the CDN network. This embodiment does not specifically limit the authentication method.
[0059] In one embodiment, the CDN parameters may include a CDN key, an authentication method, and a validity period. The authentication method includes the anti-leeching authentication. After the application center server verifies the download request, it generates the authentication signature based on the CDN key, the anti-leeching authentication, and the validity period using the preset algorithm.
[0060] In another embodiment, the CDN parameters may include a CDN key, authentication method, and validity period. The authentication method includes request header authentication. After the application center server verifies the download request, it generates the authentication signature based on the CDN key, the request header authentication, and the validity period using the preset algorithm.
[0061] In another embodiment, the CDN parameters may include a CDN key, authentication method, and validity period. The authentication method includes anti-leeching authentication and origin authentication. After the application center server verifies the download request, it generates the authentication signature using the preset algorithm based on the CDN key, anti-leeching authentication, origin authentication, and validity period.
[0062] In other embodiments, the CDN parameters may include other parameters, and the authentication method may have other combinations. The application center server may use the preset algorithm to generate the authentication signature according to the actual situation, which will not be specifically described here.
[0063] In this embodiment, step S100 involves verifying the download request. Specifically, this may include: Obtain user information provided by the client and verify the user information; The user information may include user agent information, device ID, first application ID, and application download frequency from the same IP address or the same device.
[0064] In this embodiment of the application, the user information is pre-encapsulated in the client's SDK (Software Development Kit). It is understood that the user information may also include other information, such as browser information, SDK version information, etc., which are not limited here.
[0065] In this embodiment, the application center server obtains user information provided by the client, such as user agent information, device ID, first application ID, and application download frequency of the same IP or the same device, verifies the user agent information, device ID, first application ID, and application download frequency of the same IP or the same device, and generates a verification result.
[0066] In this embodiment, in step S101, after the download request is verified, an encrypted download address is sent to the client. Specifically, this may include: After the user information is verified, the encrypted download address is generated based on the preset key, and the encrypted download address is sent to the client. The preset key is the key that the client requests from the application center server through a key rotation method.
[0067] In this embodiment, if the verification result passes, the application center server saves the user information and generates the authentication signature using a preset algorithm provided by the CDN server based on the CDN key, authentication method, and validity period. Then, it generates encrypted download address information containing the application center server's authentication signature based on the preset key. Finally, it sends the encrypted download address to the client so that the client can subsequently decrypt the encrypted download address information based on the preset key, determine the download address information, and then initiate a request to download the first application from the CDN server based on the download address information. It is understood that if the application center server fails to verify the user agent information, device ID, first application ID, and application download frequency from the same IP or device, the application center server can intercept the client's download request, preventing the client from completing the subsequent download operation.
[0068] In other embodiments, upon receiving the download request, the application center server can obtain user information provided by the client, such as browser information and SDK version information, verify the browser information and SDK version information, and generate a verification result. If the verification result is successful, the application center server saves the user information and generates the authentication signature using a preset algorithm provided by the CDN server. Then, based on a preset key, it generates encrypted download address information containing the authentication signature of the application center server, and finally sends the encrypted download address to the client. This allows the client to decrypt the encrypted download address information based on the preset key, determine the download address information, and then initiate a request to download the first application from the CDN server based on the download address information. If the verification result fails, it indicates that the download request may be abnormal. The application center server can intercept the client's download request, preventing the client from completing the subsequent download operation.
[0069] In this embodiment of the application, the application center server can also periodically obtain download request data within a preset time interval and download request data within a preset time interval recorded by the CDN server, compare the two sets of download request data, and if the comparison results are inconsistent, the application center server can issue an early warning event.
[0070] In this embodiment, after receiving a warning event, the operation and maintenance personnel analyze the warning event and obtain the analysis results. If the analysis results indicate that the download request involves fraudulent activity, the user information provided by the client can be obtained from the CDN server, and the device ID corresponding to the user information can be blocked. In this way, by analyzing the warning event, the accuracy of the fraudulent activity judgment is improved, CDN fraud can be effectively avoided, and the company's operating costs are protected.
[0071] In some embodiments, the warning events can be automatically analyzed based on preset rules to obtain analysis results. For example, if the difference between two download request data is greater than a preset value, it can be determined that the download requests involve fraudulent activities.
[0072] Through the above implementation method, the application center server first receives the download request of the first application sent by the client and verifies the download request. After the download request passes the verification, it sends an encrypted download address to the client so that the client can decrypt the encrypted download address information based on the preset key, determine the download address information, and then initiate a request to download the first application from the CDN server based on the download address information. This can ensure the security of application download and improve the user experience.
[0073] It should be noted that the above Figure 3 Method Implementation Examples and Figure 1 The method implementations belong to the same concept; for other specific implementation processes, please refer to [link / reference]. Figure 1 Method implementation examples, and Figure 3 The technical features in the method embodiments are as follows: Figure 1 The methods described in the examples are all applicable and will not be repeated here.
[0074] In one embodiment, such as Figure 4 As shown, this application provides another CDN access method, applied to a CDN server, which may include: S200: Receive a request from a client to download a first application based on download address information, and perform a verification on the request, wherein the request includes an authentication signature generated by the application center server based on pre-configured CDN parameters. S201. After the first verification passes, call the interface provided by the application center server to obtain the user information of the client, and perform a second verification on the request based on the obtained user information. S202. After the second verification is passed, the download resources of the first application are sent to the client.
[0075] In this embodiment, the request may include an authentication signature generated by the application center server based on pre-configured CDN parameters. The download address information is used to indicate the download address of the first application on the CDN server.
[0076] In this embodiment, the CDN parameters may include parameters such as CDN key, authentication method, and validity period, which are not limited in this application. The CDN parameters can be pre-configured by operations and maintenance personnel. To further improve the security of the CDN parameters, operations and maintenance personnel can periodically change the CDN parameters. The authentication method may include at least one of the following: anti-hotlinking authentication, origin authentication, request header authentication, internal redirection authentication, etc. The specific authentication method to be used can be determined according to the actual situation of the client and the CDN network. This embodiment does not specifically limit the authentication method.
[0077] In this embodiment, the CDN server receives a request from a client to download a first application based on download address information, and performs an initial verification on the request, such as verifying the download path, download identity, and authentication signature based on the information contained in the request. If the initial verification fails, the CDN server may reject the client's request to download the first application, and the client may subsequently resend the request to download the first application based on the redefined download address information. After the initial verification passes, the CDN server may also call the interface provided by the application center server to obtain the user agent information, device ID, first application ID, and application download frequency of the same IP or device, and perform a secondary verification on the request. Only after the secondary verification passes will the CDN server return the download resources of the first application to the client.
[0078] Through the above implementation method, the CDN server first receives a request from the client to download the first application based on the download address information, and performs a verification on the request. Then, after the first verification passes, it calls the interface provided by the application center server to obtain the client's user information, performs a second verification on the request based on the obtained user information, and only after the second verification passes does it send the download resources of the first application to the client so that the client can download the first application. This can ensure the security of application download and improve the user experience.
[0079] It should be noted that the above Figure 4 Method Implementation Examples and Figure 1 The method implementations belong to the same concept; for other specific implementation processes, please refer to [link / reference]. Figure 1 Method implementation examples, and Figure 4 The technical features in the method embodiments are as follows: Figure 1 The methods described in the examples are all applicable and will not be repeated here.
[0080] Furthermore, this application embodiment also provides an electronic device, which may be the aforementioned client, the aforementioned application center server, or the aforementioned CDN server. Figure 5 As shown, the electronic device 100 includes: a memory 109, a processor 110, and one or more computer programs stored in the memory 109 and executable on the processor 110. The memory 109 and the processor 110 are coupled together via a bus system 130. When the one or more computer programs are executed by the processor 110, they implement the embodiments of this application. Figure 2 A CDN access method is provided, the method comprising: S6. Send the download request for the first application to the application center server; S7. Receive the encrypted download address returned by the application center server. The encrypted download address is encrypted download address information with the authentication signature of the application center server. The download address information is used to indicate the download address of the first application on the CDN server. The authentication signature is generated by the application center server based on the pre-configured CDN parameters after the download request is verified. S8. Decrypt the encrypted download address information based on a preset key to determine the download address information. The preset key is a key that the client requests from the application center server through a key rotation method. S9. Based on the download address information, initiate a request to the CDN server to download the first application.
[0081] When the one or more computer programs are executed by the processor 110, they implement the embodiments of this application. Figure 3 A CDN access method is provided, the method comprising: S100: Receive a download request for the first application sent by the client, and verify the download request; S101. After the download request is verified, an encrypted download address is sent to the client. The encrypted download address is an encrypted download address information with the authentication signature of the application center server. The download address information is used to indicate the download address of the first application on the CDN server. The authentication signature is generated by the application center server based on pre-configured CDN parameters after the download request is verified.
[0082] When the one or more computer programs are executed by the processor 110, they implement the embodiments of this application. Figure 4 A CDN access method is provided, the method comprising: S200: Receive a request from a client to download a first application based on download address information, and perform a verification on the request, wherein the request includes an authentication signature generated by the application center server based on pre-configured CDN parameters. S201. After the first verification passes, call the interface provided by the application center server to obtain the user information of the client, and perform a second verification on the request based on the obtained user information. S202. After the second verification is passed, the download resources of the first application are sent to the client.
[0083] In this embodiment, the request may include an authentication signature generated by the application center server based on pre-configured CDN parameters. The download address information is used to indicate the download address of the first application on the CDN server. The method disclosed in the above embodiments of this application can be applied to the processor 110, or implemented by the processor 110. The processor 110 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware or the instructions in the form of software in the processor 110. The processor 110 may be a general-purpose processor, DSP, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 110 can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the embodiments of this application can be directly reflected as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium, which is located in memory 109. The processor 110 reads the information in memory 109 and, in conjunction with its hardware, completes the steps of the aforementioned method.
[0084] It is understood that the memory 109 in the embodiments of this application may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic random access memory (FRAM), flash memory or other memory technologies, compact disk read-only memory (CD-ROM), digital video disk (DVD) or other optical disc storage, magnetic cartridges, magnetic tapes, disk storage or other magnetic storage devices; the volatile memory can be random access memory (RAM). By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM). Memory, Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), SyncLink Dynamic Random Access Memory (SLDRAM), and Direct Rambus Random Access Memory (DRRAM).The memories described in the embodiments of this application are intended to include, but are not limited to, these and any other suitable types of memories.
[0085] It should be noted that the above-described electronic device embodiments and method embodiments belong to the same concept. For details of their implementation process, please refer to the method embodiments. Furthermore, the technical features in the method embodiments are all applicable to the electronic device embodiments, and will not be repeated here.
[0086] In addition, in an exemplary embodiment, this application also provides a computer storage medium, specifically a computer-readable storage medium, such as a memory 109 including a computer program. The computer storage medium stores one or more programs of a CDN access method. When the one or more programs of the CDN access method are executed by the processor 110, they implement the embodiments of this application. Figure 2 A CDN access method is provided, the method comprising: S6. Send the download request for the first application to the application center server; S7. Receive the encrypted download address returned by the application center server. The encrypted download address is encrypted download address information with the authentication signature of the application center server. The download address information is used to indicate the download address of the first application on the CDN server. The authentication signature is generated by the application center server based on the pre-configured CDN parameters after the download request is verified. S8. Decrypt the encrypted download address information based on a preset key to determine the download address information. The preset key is a key that the client requests from the application center server through a key rotation method. S9. Based on the download address information, initiate a request to the CDN server to download the first application.
[0087] When one or more programs of the CDN access method are executed by processor 110, they implement the embodiments of this application. Figure 3 A CDN access method is provided, the method comprising: S100: Receive a download request for the first application sent by the client, and verify the download request; S101. After the download request is verified, an encrypted download address is sent to the client. The encrypted download address is an encrypted download address information with the authentication signature of the application center server. The download address information is used to indicate the download address of the first application on the CDN server. The authentication signature is generated by the application center server based on pre-configured CDN parameters after the download request is verified.
[0088] When one or more programs of the CDN access method are executed by processor 110, they implement the embodiments of this application. Figure 4 A CDN access method is provided, the method comprising: S200: Receive a request from a client to download a first application based on download address information, and perform a verification on the request, wherein the request includes an authentication signature generated by the application center server based on pre-configured CDN parameters. S201. After the first verification passes, call the interface provided by the application center server to obtain the user information of the client, and perform a second verification on the request based on the obtained user information. S202. After the second verification is passed, the download resources of the first application are sent to the client.
[0089] It should be noted that the above-described CDN access method program embodiments and method embodiments on computer-readable storage media belong to the same concept. For details of its specific implementation process, please refer to the method embodiments. Furthermore, the technical features in the method embodiments are all applicable to the above-described computer-readable storage media embodiments, and will not be repeated here.
[0090] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0091] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0092] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0093] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims. All of these forms are within the protection scope of this application.
Claims
1. A CDN access method, applied to a client, characterized in that, The method includes: Send the download request for the first application to the application center server; The application center server receives an encrypted download address, which is an encrypted download address information with the authentication signature of the application center server. The download address information is used to indicate the download address of the first application on the CDN server. The authentication signature is generated by the application center server based on pre-configured CDN parameters after the download request is verified. The encrypted download address information is decrypted based on a preset key to determine the download address information. The preset key is a key that the client obtains from the application center server through a key rotation method. Based on the download address information, a request to download the first application is initiated to the CDN server.
2. The CDN access method as described in claim 1, characterized in that, The client stores a first key, and the method further includes: In response to the key update notification sent by the application center server, a request to apply for the preset key is sent to the application center server; Receive the key encryption information returned by the application center server; The key encryption information is decrypted based on the first key to determine the preset key; The step of initiating a request to download the first application from the CDN server based on the download address information includes: Based on the preset key and the download address information, a request to download the first application is initiated to the CDN server; Wherein, the first key is the key used by the client last time, and the key encryption information includes the validity period of the preset key.
3. The CDN access method as described in claim 1, characterized in that, The download address information includes the download addresses of multiple application fragments of the first application on the CDN server and the size of each application fragment, and the download address of each application fragment carries the authentication signature of the application center server. The step of initiating a request to download the first application from the CDN server based on the download address information includes: Based on the download address of each application segment, a request to download the corresponding application segment is sent to the CDN server.
4. A CDN access method, applied to an application center server, characterized in that, The method includes: Receive a download request for the first application sent by the client, and verify the download request; After the download request is verified, an encrypted download address is sent to the client. The encrypted download address is an encrypted download address information with the authentication signature of the application center server. The download address information is used to indicate the download address of the first application on the CDN server. The authentication signature is generated by the application center server based on pre-configured CDN parameters after the download request is verified.
5. The CDN access method as described in claim 4, characterized in that, The CDN parameters include the CDN key, authentication method, and validity period. The method further includes: After the download request is verified, the authentication signature is generated using a preset algorithm provided by the CDN server based on the CDN key, authentication method, and validity period.
6. The CDN access method as described in claim 4, characterized in that, The verification of the download request includes: Obtain user information provided by the client and verify the user information; The user information includes user agent information, device ID, first application ID, and application download frequency from the same IP address or the same device.
7. The CDN access method as described in claim 6, characterized in that, The step of sending an encrypted download address to the client after the download request has been verified includes: After the user information is verified, the encrypted download address is generated based on the preset key, and the encrypted download address is sent to the client. The preset key is the key that the client requests from the application center server through a key rotation method.
8. A CDN access method, applied to a CDN server, characterized in that, The method includes: The system receives a request from a client to download the first application based on the download address information, and performs a verification on the request, which includes an authentication signature generated by the application center server based on pre-configured CDN parameters. After the first verification passes, the application center server calls the interface provided by the application center server to obtain the user information of the client, and performs a second verification on the request based on the obtained user information. After the secondary verification is passed, the download resources of the first application are sent to the client.
9. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored on the memory and running on the processor, wherein the computer program, when executed by the processor, implements the steps of a CDN access method according to any one of claims 1 to 8.
10. A computer storage medium, characterized in that, The computer storage medium stores a program for a CDN access method, which, when executed by a processor, implements the steps of the CDN access method according to any one of claims 1 to 8.