Download link anti-theft method, device, application store server and storage medium
By calculating the ratio of installation reports and downloads by the application store server, identifying theft links and encrypting and renaming the download files, solving the problems of complex and high cost of anti-theft link operations in the existing technology, and achieving low-cost and efficient anti-theft link monitoring.
Patent Information
- Application Number
- CN202211441356.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-17
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2042-11-17
AI Technical Summary
When downloading links to anti-theft links in the application store, there are problems such as CDN manufacturers' encryption and identity authentication operations, high costs and inability to ensure user-side updates, making it difficult to achieve self-monitoring of anti-theft links efficiently, scalable and low-cost.
The application store server obtains the number of installation reports and downloads of the target application, calculates the ratio and compares it with the preset threshold. If the ratio is less than the threshold, it is determined that the download link is stolen, and encrypts and renames are performed to generate a new download file and link.
It realizes efficient, scalable, and low-cost anti-theft chain self-monitoring, adapts to all CDN manufacturers, is timely and low-cost, and reduces illegal download losses.
Smart Images

Figure CN116232630B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of Internet technology, and in particular relates to a download link anti-theft method, device, server and computer-readable storage medium. Background Art
[0002] With the rapid development of Internet technology and the continuous enrichment of the application market, application stores need to undertake the distribution of a large number of application packages.
[0003] At present, in order to enable set-top box users across the country to use the app store to download applications normally and quickly, we use CDN (Content Delivery Network) content distribution network, relying on edge servers deployed in various places to enable users to obtain the required content nearby, reduce network congestion, and improve user access response speed and hit rate. However, if the download link of the app store is hotlinked at this time, then informal channels can also download content through our link, which will bring huge invalid costs to the company. Therefore, many anti-hotlink solutions launched by CDN manufacturers have appeared on the market. Most of the implementation methods are to perform encrypted identity authentication when the user requests a download link, and determine whether to send specific content by identifying whether the requesting user is a regular user of this business system. However, this implementation method has the problems that the encryption and identity authentication operations of the CDN manufacturer are cumbersome and complicated, and the user side needs to download the application logic, the client update incurs huge costs when the CDN manufacturer changes, and after the client is updated, it cannot guarantee that all users are updated to the latest version.
[0004] In summary, how to efficiently, scalably, and cost-effectively implement self-monitoring of hotlink protection for links issued by app stores has become a technical problem that needs to be urgently solved in the field of Internet technology. Summary of the Invention
[0005] The main purpose of the present invention is to provide a download link anti-theft method, device, application store server and computer-readable storage medium, aiming to achieve anti-hotlink self-monitoring of links issued by application stores in an efficient, scalable and low-cost manner.
[0006] In order to achieve the above object, the present invention provides a download link anti-theft method, which is applied to a first server;
[0007] The anti-theft method of the download link includes:
[0008] Get the number of installation reports and downloads of the target application;
[0009] Determining a ratio of the number of installation reports to the number of downloads, and comparing the ratio with a preset threshold;
[0010] When the ratio is less than the preset threshold, determining that the download link for downloading the target application is stolen;
[0011] The download file corresponding to the download link is encrypted and renamed to obtain a new download file, and a new download link corresponding to the new download file is generated.
[0012] Optionally, the first server is in communication with the client, and before the step of obtaining the number of installation reports and downloads of the target application, the method further includes:
[0013] Receiving an installation record of the target application reported by the client after the target application is installed;
[0014] The number of installation reports of the target application is determined according to the installation record.
[0015] Optionally, the first server is also communicatively connected to a second server, and the second server is communicatively connected to the client. The installation record is generated by the client when installing the target application based on the download file of the target application, wherein the download file is determined by the second server based on the download link used to download the target application and sent to the client.
[0016] Optionally, the step of obtaining the number of downloads of the target application includes:
[0017] The number of downloads of the target application is obtained according to the download link of the target application, wherein the number of downloads is determined by the second server.
[0018] Optionally, the number of downloads is determined by the second server according to the number of link requests of the target application, and the number of link requests is determined by the second server.
[0019] Optionally, after the step of generating a new download link corresponding to the new download file, the method further includes:
[0020] Initialize the record field corresponding to the number of installation reports.
[0021] Optionally, the anti-theft method for download links is also applied to a second server, the second server is connected to the first server and the client respectively, and the first server is in communication connection with the client;
[0022] The anti-theft method of the download link includes:
[0023] If a new download link and a new download file of the target application sent by the first server are received, deleting the current download link and the current download file of the target application;
[0024] Upon receiving the new download link sent by the client, sending the new download file to the client according to the new download link;
[0025] The new download link and the new download file are obtained by the first server updating the download link and the download file of the target application according to the ratio between the number of installation reports and the number of downloads.
[0026] In addition, to achieve the above-mentioned purpose, the present invention further provides an anti-theft device for download links, wherein the anti-theft method for download links is applied to a first server;
[0027] The anti-theft device of the download link includes:
[0028] The timing acquisition module obtains the number of installation reports and downloads of the target application;
[0029] A module value comparison module determines a ratio of the number of installation reports to the number of downloads, and compares the ratio with a preset threshold;
[0030] a link theft module, which determines that the download link for downloading the target application is stolen when the ratio is less than the preset threshold;
[0031] The encryption processing module performs encryption and renaming processing on the download file corresponding to the download link to obtain a new download file, and generates a new download link corresponding to the new download file.
[0032] In addition, to achieve the above-mentioned purpose, the present invention also provides a server;
[0033] Get the number of installation reports and downloads of the target application;
[0034] Determining a ratio of the number of installation reports to the number of downloads, and comparing the ratio with a preset threshold;
[0035] When the ratio is less than the preset threshold, determining that the download link for downloading the target application is stolen;
[0036] The download file corresponding to the download link is encrypted and renamed to obtain a new download file, and a new download link corresponding to the new download file is generated.
[0037] Optionally, the first server is in communication with the client, and before the step of obtaining the number of installation reports and downloads of the target application, the method further includes:
[0038] Receiving an installation record of the target application reported by the client after the target application is installed;
[0039] The number of installation reports of the target application is determined according to the installation record.
[0040] Optionally, the first server is also communicatively connected to a second server, and the second server is communicatively connected to the client. The installation record is generated by the client when installing the target application based on the download file of the target application, wherein the download file is determined by the second server based on the download link used to download the target application and sent to the client.
[0041] Optionally, the step of obtaining the number of downloads of the target application includes:
[0042] The number of downloads of the target application is obtained according to the download link of the target application, wherein the number of downloads is determined by the second server.
[0043] Optionally, the number of downloads is determined by the second server according to the number of link requests of the target application, and the number of link requests is determined by the second server.
[0044] Optionally, after the step of generating a new download link corresponding to the new download file, the method further includes:
[0045] Initialize the record field corresponding to the number of installation reports.
[0046] Optionally, the present invention further provides a second server, the second server being connected to the first server and the client respectively, and the first server being communicatively connected to the client;
[0047] The anti-theft method of the download link includes:
[0048] If a new download link and a new download file of the target application sent by the first server are received, deleting the current download link and the current download file of the target application;
[0049] Upon receiving the new download link sent by the client, sending the new download file to the client according to the new download link;
[0050] The new download link and the new download file are obtained by the first server updating the download link and the download file of the target application according to the ratio between the number of installation reports and the number of downloads.
[0051] In addition, to achieve the above objectives, the present invention also provides a computer-readable storage medium, which stores an anti-theft program for download links. When the anti-theft program for download links is executed by a processor, the steps of the anti-theft method for download links described above are implemented.
[0052] An embodiment of the present invention proposes a download link anti-theft method, apparatus, terminal device, and computer-readable storage medium, the method being applied to a first server; the download link anti-theft method comprising: obtaining the number of installation reports and downloads of a target application; determining a ratio of the number of installation reports to the number of downloads, and comparing the ratio with a preset threshold; determining that a download link for downloading the target application has been stolen when the ratio is less than the preset threshold; encrypting and renaming a download file corresponding to the download link to obtain a new download file, and generating a new download link corresponding to the new download file.
[0053] The embodiment of the present invention obtains the number of installation reports and CDN download times of the target application through the application store server, calculates the ratio of the two, and compares the ratio with a preset threshold. If the ratio is smaller than the preset threshold, it is determined that the download link used to download the target application has been stolen. The download file corresponding to the stolen link is then encrypted and renamed by the application store server to obtain a new download file, and a new download link corresponding to the new download file is generated. Compared with the prior art method of performing encrypted identity authentication when the user requests a download link, the present invention only requires the operation of the server and relatively modifies the client. It can be adapted to all CDN manufacturers, is not only low-cost, but also can achieve the expected effect efficiently. In addition, it is timely to detect hotlink losses through timed task triggering, thereby achieving efficient, scalable and low-cost anti-hotlink self-monitoring of links issued by the application store. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 This is a schematic flow chart of the steps of the first embodiment of the anti-theft method for downloading links of the present invention;
[0055] Figure 2 A schematic diagram of a file download process involved in an embodiment of a method for preventing download links from being stolen according to the present invention;
[0056] Figure 3 This is a schematic diagram of a flow chart for implementing monitoring and processing of hotlink protection according to an embodiment of a method for preventing download links from being stolen;
[0057] Figure 4 This is a functional module diagram of an anti-theft device for downloading links according to an embodiment of the present invention.
[0058] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION
[0059] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0060] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0061] It should be noted that all directional indications in the embodiments of the present invention (such as up, down, left, right, front, back, etc.) are only used to explain the relative position relationship, movement status, etc. between the various components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0062] In the present invention, unless otherwise specified or limited, the terms "connection" and "fixation" should be understood in a broad sense. For example, "fixation" can mean fixed connection, detachable connection, or integration; mechanical connection or electrical connection; direct connection or indirect connection through an intermediate medium; internal communication between two elements or interaction between two elements, unless otherwise specified. Those skilled in the art will be able to understand the specific meanings of the above terms in the present invention based on specific circumstances.
[0063] In addition, in the present invention, descriptions such as "first" and "second" are for descriptive purposes only and should not be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of such features. In addition, the technical solutions between the various embodiments can be combined with each other, but this must be based on the fact that they can be implemented by ordinary technicians in this field. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0064] The invention provides a download link anti-theft method.
[0065] At present, in order to enable set-top box users across the country to use the application store to download applications normally and quickly, we use the CDN content distribution network, relying on edge servers deployed in various places, so that users can obtain the required content nearby, reduce network congestion, and improve user access response speed and hit rate. However, if the download link of the application store is stolen at this time, then informal channels can also download content through our link, which will bring huge invalid costs to the company. Therefore, many anti-hotlink solutions launched by CDN manufacturers have appeared on the market. Most of the implementation methods are to perform encrypted identity authentication when the user requests a download link, and determine whether to send specific content by identifying whether the requesting user is a regular user of this business system. However, this implementation method has the problems that the encryption and identity authentication operations of the CDN manufacturer are cumbersome and complicated, and the user side needs to download the application logic, the client update generates huge costs when the CDN manufacturer changes, and the client cannot guarantee that all users are updated to the latest version after the update. In response to the above phenomenon, the present invention proposes an anti-theft method for download links. The anti-theft method for download links of the present invention is applied to the first server.
[0066] The anti-theft method for download links of the present invention obtains the number of installation reports and download times of the target application through a first server, calculates the ratio of the two, and compares the ratio with a preset threshold. If the ratio is smaller than the preset threshold, it is determined that the download link used to download the target application has been stolen. The download file corresponding to the stolen link is then encrypted and renamed through the application store to obtain a new download file, and a new download link corresponding to the new download file is generated. Compared with the prior art method of performing encrypted identity authentication when the user requests a download link, the present invention only requires the operation of the server and relatively modifies the client. It can be adapted to all CDN manufacturers, is not only low-cost, but also can achieve the expected effect efficiently. In addition, it is timely to detect the loss of hotlinks through timed task triggering, thereby achieving efficient, scalable and low-cost anti-hotlink self-monitoring of links issued by application stores.
[0067] Please refer to Figure 1 , Figure 1 It should be noted that although the flowchart shows a logical order, in some cases, the method for preventing theft of download links of the present invention can also perform the steps shown or described in a different order than here.
[0068] In a first embodiment of the method for preventing download links from being stolen according to the present invention, the method for preventing download links from being stolen according to the present invention is applied to a first server and includes:
[0069] Step S10: Obtain the number of installation reports and downloads of the target application;
[0070] It should be noted that the first server is an application store server.
[0071] In this embodiment, the number of installation reports and the number of CDN downloads of the target application included in the application store are obtained through the application store server.
[0072] It should be noted that the target application can be all applications in the application store (wherein the application store refers to the software program applied in the application store server), that is, the anti-theft method for download links provided by the present invention can traverse the download links corresponding to each application in the application store to perform anti-hotlink self-monitoring. In addition, the number of installation reports of the target application refers to the number of times the client belonging to the company downloads the application package of the target application through the download link, which does not include the number of times the user downloads the application package of the target application by stealing the download link through informal channels. The number of CDN downloads of the target application refers to the number of times the user requests the CDN server to download the application package of the target application through the download link, which includes the number of times the user downloads the application package of the target application by stealing the download link through informal channels. It can be understood that the application package of the above-mentioned target application is the download file corresponding to the target application.
[0073] As an optional embodiment of the present invention, the application store is provided with a timer, and the timer of the application store is configured to be executed during the off-peak period of user usage. The timer can be set to 4 a.m. every day. When the application store server receives the work instruction issued by the timer, it obtains the number of installation reports and CDN downloads of the target application in the application store.
[0074] It should be noted that the timer of the present invention is set to one day and is configured to be executed during the off-peak period of user usage. It should be understood that based on the different design needs of actual applications, in different feasible implementation methods, the configuration of the timer can be any feasible time point and or time interval. The anti-theft method for downloading links of the present invention is not limited to the configuration range of the timer.
[0075] Furthermore, in a feasible embodiment, in the above step S10, the step of "obtaining the number of downloads of the target application" may include:
[0076] Step S101: Obtain the number of downloads of the target application according to the download link of the target application, wherein the number of downloads is determined by the second server.
[0077] It should be noted that the second server is a CDN server.
[0078] In this embodiment, the CDN server determines the CDN download count of the target application, and then the application store obtains the CDN download count from the CDN server according to the download link of the target application at preset intervals.
[0079] For example, the app store server obtains the target application's CDN download count at 4:00 AM every day. Specifically, the app store server obtains the target application's CDN download count from the CDN server based on the target application's download link. The CDN download count is pre-recorded on the CDN server. It should be noted that the CDN server stores a CDN vendor-specific record that includes each application's download link and its corresponding download count.
[0080] Furthermore, in a feasible embodiment, in the above step S101, the number of downloads is determined by the second server according to the number of link requests of the target application, and the number of link requests is determined by the second server.
[0081] In this embodiment, the CDN server determines the number of connection requests for the download link corresponding to the target application, and determines the CDN download number of the target application according to the number of link requests.
[0082] For example, the client clicks on the target application in the application store to enter the download interface of the target application. The user clicks on the download link of the target application. Then, the CDN server determines the corresponding download file, i.e., the application package, based on the download link, and sends the download file to the client. At the same time, the number of requests for the download link is recorded, and the number of requests is used as the CDN download number of the target application.
[0083] Step S20: determining a ratio of the number of installation reports to the number of downloads, and comparing the ratio with a preset threshold;
[0084] In this embodiment, the application store server calculates the ratio between the number of installation reports and the number of CDN downloads of the target application, and compares the obtained ratio with a preset threshold.
[0085] It is worth noting that the preset threshold is a modulus value, where the modulus value refers to the ratio of the number of successful installations to the number of downloads, and is preferably set to 0.9.
[0086] Step S30, when the ratio is less than the preset threshold, determining that the download link for downloading the target application is stolen;
[0087] In this embodiment, the application store server compares the ratio of the number of installation reports of the target application to the number of CDN downloads with a preset threshold. When the ratio is less than the preset threshold, it is determined that the download link used to download the target application has been stolen.
[0088] For example, when the ratio of the number of installation reports of the target application to the number of CDN downloads is less than the preset threshold value of 0.9, it is determined that the download link of the target application has been stolen. When the ratio of the number of installation reports of the target application to the number of CDN downloads is greater than the preset threshold value of 0.9, it is determined that the download link of the target application has not been stolen.
[0089] Step S40: encrypt and rename the download file corresponding to the download link to obtain a new download file, and generate a new download link corresponding to the new download file.
[0090] In this embodiment, the app store server encrypts and renames the download file corresponding to the target application's download link to obtain a new download file, and generates a new download link corresponding to the new download file. It is worth noting that this embodiment not only updates the download link but also encrypts and renames the download file to obtain a new download file, further preventing the download file from being illegally downloaded.
[0091] For example, the download file corresponding to the stolen link is encrypted and renamed by the application store server. By taking the form of a 16-bit UUID plus the current timestamp, it is ensured that the new name will not conflict with other file names. The renamed download file is used as a new download file, and the new download file cannot be obtained through the original download link. The application store then generates a new download link corresponding to the new download file.
[0092] In this embodiment, the anti-theft method for download links of the present invention obtains the number of installation reports and CDN download times of a target application contained in an application store through an application store server; determines the number of connection requests for the download link corresponding to the target application through the CDN server, and determines the CDN download time of the target application based on the number of link requests; determines the CDN download time of the target application through the CDN server, and then the application store obtains the CDN download time from the CDN server based on the download link of the target application at a preset interval; calculates the ratio between the number of installation reports and the number of CDN downloads of the target application through the application store server, and compares the obtained ratio with a preset threshold; compares the ratio between the number of installation reports and the number of CDN downloads of the target application through the application store server with a preset threshold, and when the ratio is less than the preset threshold, determines that the download link used to download the target application has been stolen; and encrypts and renames the download file corresponding to the download link of the target application through the application store server to obtain a new download file, and generates a new download link corresponding to the new download file.
[0093] In this way, the embodiment of the present invention obtains the number of installation reports and CDN download times of the target application through the application store server, calculates the ratio of the two, and compares the ratio with a preset threshold. If the ratio is smaller than the preset threshold, it is determined that the download link of the target application has been stolen, and then the download file corresponding to the stolen link is encrypted and renamed by the application store server to obtain a new download file, and a new download link corresponding to the new download file is generated. Compared with the prior art method of performing encrypted identity authentication when the user requests a download link, the present invention only requires the operation of the server and relatively modifies the client. It can be adapted to all CDN manufacturers, which is not only low-cost, but also can achieve the expected effect efficiently. In addition, it is timely to detect the loss of hotlinking through timed task triggering, thereby achieving efficient, scalable and low-cost anti-hotlink self-monitoring of links issued by the application store.
[0094] Furthermore, based on the first embodiment of the method for preventing download links from being stolen according to the present invention, a second embodiment of the method for preventing download links from being stolen according to the present invention is proposed.
[0095] In this embodiment, the first server is in communication with the client. Before step S10, the anti-theft method for downloading links of the present invention may further include:
[0096] Step A: receiving the installation record of the target application reported by the client after the target application is installed;
[0097] In this embodiment, the target application is installed through the client, and after the target application is installed, the application store receives the installation record of the target application reported by the client.
[0098] For example, when a client belonging to the company installs an application, an installation record will be generated. The installation record can be a successful installation or a failed installation. Each time the client installs the target application, a corresponding installation record will be generated. After each installation of the target application is completed, the client will report the installation record generated by the installation to the application store.
[0099] Step B: Determine the number of installation reports of the target application based on the installation record.
[0100] In this embodiment, the application store server determines the number of installation reports of the target application based on all received installation records of the target application.
[0101] For example, the application store server receives installation records reported by the user terminal. The number of installation records indicates the number of times the client downloads the application package through the download link of the target application. Therefore, the number of installation records is the number of installation reports of the target application.
[0102] Furthermore, in a feasible embodiment, the first server is also communicatively connected to the second server, and the second server is communicatively connected to the client. In the above step A, the installation record is generated by the client for installing the target application based on the download file of the target application, wherein the download file is determined by the second server based on the download link for downloading the target application and sent to the client.
[0103] In this embodiment, the CDN server determines the corresponding download file according to the download link of the target application in the database containing all application download links and download files. Then, the client installs the target application according to the download file of the target application sent by the CDN server to generate an installation record of this installation. After the installation of the target application is completed, the installation record is reported to the application store.
[0104] It should be noted that the CDN content distribution network relies on edge servers deployed in various places, allowing users to obtain the required content nearby, reducing network congestion, and improving user access response speed and hit rate.
[0105] For example, when a user clicks a download link on the download interface of a target application, the CDN server receives the download link and obtains the user's regional information. The CDN server then selects the optimal server from edge servers in various locations based on the user's regional information. The optimal CDN server then searches a database containing all application download links and download files based on the target application's download link to obtain the download file corresponding to the download link. The CDN server then sends the download file to the client for the user to install the target application. The client then installs the target application based on the download file and generates an installation record. If the target application is successfully installed, the installation record can be used to determine that the target application has been successfully installed. If the target application fails to be installed, the installation record can be used to determine that the target application has failed to be installed. The client then reports the installation record generated for each installation of the target application to the application store.
[0106] For example, Figure 2As shown, the application store's management and maintenance personnel first upload the application packages of each application software to the application store server. The application store then preheats each application package to edge CDN servers in various locations. Then, when a user opens the application store on a client and sends a request to the application store to obtain specific application software content, the application store receives the client request, splices and sends the content link, and displays the application software's details page on the client. The details page includes a download link entry. The user clicks the download link on the details page, sending a command to the CDN server to request the file download. After receiving the command, the CDN server selects the optimal CDN server based on the client user's specific regional information. The optimal server finds the download file corresponding to the download link in the preheated application packages based on the download link. When sending the download file to the client, the number of link requests for the application software is recorded. After receiving the download file, the client installs the application software and generates an installation record. After the installation is completed, the installation record is reported to the application store. Finally, the application store can obtain the number of installation reports for the application software based on all installation records of the application software.
[0107] It should be noted that all applications in the app store can be installed using the above download and upload methods.
[0108] In this embodiment, the anti-theft method for download links of the present invention determines the corresponding download file according to the download link of the target application in the database containing all application download links and download files through the CDN server, and then installs the target application according to the download file of the target application sent by the CDN server to generate an installation record of this installation. After the installation of the target application is completed, the installation record is reported to the application store; the application store server determines the number of installation reports of the target application based on all the installation records of the target application received.
[0109] In this way, by requesting the download link of a specific application from the application store, obtaining the specific file content from the CDN through the link, and reporting it back to the application store after installation, a CDN content distribution network-based application download method is provided. The number of installation reports of each application software recorded by the application store and the number of link requests for each application software recorded by the CDN server are obtained, providing a data basis for monitoring and processing anti-hotlinking of application stores.
[0110] Furthermore, based on the first embodiment and / or the second embodiment of the method for preventing download links from being stolen according to the present invention, a third embodiment of the method for preventing download links from being stolen according to the present invention is proposed.
[0111] In this embodiment, the anti-theft method for downloading links of the present invention may further include, after step S40, the following steps:
[0112] Step C: Initialize the record field corresponding to the number of installation reports.
[0113] In this embodiment, the application store server initializes the record field corresponding to the number of installation reports of the target application.
[0114] It should be noted that the application store has three reporting record fields, namely the record field here, the actual download quantity, i.e. the cumulative record field, and the virtual download quantity, i.e., the comparison data, real data, and virtual data used for comparison with the module value. Among them, the record field here is the installation report count record corresponding to the latest version of the target application, the actual download quantity is the cumulative installation report count record of all versions of the target application, and the virtual download quantity is a randomly generated number based on the real download quantity, which is larger than the actual download quantity and is mainly used for display to users.
[0115] For example, the record field of the number of installation reports of the target application is the first record field recorded by the application store, that is, the record field here. If it is determined that the download link of the target application has been stolen, the record field is initialized. Specifically, the record field is cleared and recalculated; if it is determined that the download link of the target application has not been stolen, the operation of initializing the record field is not triggered, that is, the record field is the same as the real data recorded by the application store.
[0116] For example, Figure 3 As shown, first, the timer in the application store sends an anti-hotlink detection instruction. After receiving the instruction, the application store obtains the CDN delivery data of the listed application according to the download link of the application software. After receiving the download link, the CDN server returns the download record data of the preheated file, that is, the number of CDN downloads, and calculates the ratio of the number of installation reports of the specific application software to the number of CDN downloads. If the ratio is less than the preset modulus, it means that the download link has been stolen. The application store encrypts and renames the stolen file name in the form of 16-bit UUID + timestamp to obtain a new address file and generate a new download link. At the same time, the new download file and the new download link are preheated to the CDN server, and the CDN server deletes the stolen download link and download file. Finally, the record field of the number of installation reports of the specific application is initialized; if the ratio is greater than the preset modulus, it is determined that the download link of the application has not been stolen and no action is taken.
[0117] In this embodiment, the anti-theft method for download links of the present invention initializes the record field corresponding to the number of installation reports of the target application through the application store server.
[0118] In this way, after generating a new download link and a new download file for the target application, the record field corresponding to the number of installation reports of the target application recorded by the application store is initialized to ensure that the logic of the next scheduled task execution is correct, thereby improving the accuracy of the anti-hotlink self-monitoring of the link issued by the application store.
[0119] Furthermore, based on the first embodiment and / or the second embodiment and / or the third embodiment of the method for preventing theft of a download link of the present invention, a fourth embodiment of the method for preventing theft of a download link of the present invention is proposed.
[0120] In this embodiment, the anti-theft method for downloading links of the present invention is applied to a second server, the second server is connected to the first server and the client, and the first server is in communication with the client. The anti-theft method for downloading links of the present invention includes:
[0121] Step D: if a new download link and a new download file of the target application sent by the first server are received, deleting the current download link and the current download file of the target application;
[0122] Step E: upon receiving the new download link sent by the client, sending the new download file to the client according to the new download link;
[0123] The new download link and the new download file are obtained by the first server updating the download link and the download file of the target application according to the ratio between the number of installation reports and the number of downloads.
[0124] In this embodiment, after determining that the download link of the target application has been stolen and the application store server generates a new download file and a new download link, when the CDN server receives the new download file and the new download link sent by the application store server, the CDN server deletes the stolen download link and the original download file, and preheats the new download file and the new download link to the edge CDN servers in various places, so that when the new download link sent by the client is received, the new download file can be queried according to the new download link, and the new download file can be sent to the client.
[0125] For example, after determining that the download link of the target application has been stolen, the download file corresponding to the stolen link is encrypted and renamed through the application store to obtain a new download file and generate a new download link. The application store preheats the new download file and the new download link to the CDN server, and the CDN server distributes and preheats them to edge servers in various places. At the same time, the original stolen download link and download file are deleted, making the stolen download link invalid. Afterwards, when the client needs to download the target application, it first sends a request to the application store to obtain the download link of the target application, that is, the new download link, and then sends the new download link to the CDN server and requests to obtain the new download file corresponding to the new download link. The CDN server receives the request sent by the client and queries the new download file based on the new download link. Finally, the new download file is sent to the client for the client to install the target application.
[0126] In this embodiment, the anti-theft method for download links of the present invention is that after determining that the download link of the target application has been stolen and the application store server generates a new download file and a new download link, when the CDN server receives the new download file and the new download link sent by the application store server, the CDN server deletes the stolen download link and the original download file, and preheats the new download file and the new download link to the edge CDN servers in various places, so that when the new download link sent by the client is received, the new download file can be queried according to the new download link, and the new download file can be sent to the client.
[0127] In this way, by encrypting and renaming the download file corresponding to the stolen download link to generate a new download file and a corresponding new download link, and deleting the stolen download link and the corresponding download file, the purpose of preventing hotlinks and stopping losses in time is achieved.
[0128] In addition, an embodiment of the present invention further provides an anti-theft device for download links, and an anti-theft method for download links of the present invention is applied to an application store.
[0129] Please refer to Figure 4 , Figure 4 This is a functional module diagram of an embodiment of the anti-theft device for downloading links of the present invention, as shown in FIG. Figure 4 As shown, the anti-theft device for downloading links of the present invention includes:
[0130] A timing acquisition module 10 is used to obtain the number of installation reports and downloads of the target application;
[0131] The module comparison module 20 is used to determine the ratio of the number of installation reports to the number of downloads, and compare the ratio with a preset threshold;
[0132] a link theft module 30, configured to determine that the download link for downloading the target application is stolen when the ratio is less than the preset threshold;
[0133] The encryption processing module 40 is used to perform encryption and renaming processing on the download file corresponding to the download link to obtain a new download file, and generate a new download link corresponding to the new download file.
[0134] Optionally, the first server is in communication with the client, and the anti-theft device for downloading links of the present invention further includes:
[0135] A record reporting module, configured to receive the installation record of the target application reported by the client after the target application is installed;
[0136] The reporting number module is used to determine the number of installation reports of the target application according to the installation record.
[0137] Optionally, the first server is also communicatively connected to the second server, and the second server is communicatively connected to the client. The installation record is generated by the client for installing the target application based on the download file of the target application, wherein the download file is determined by the second server based on the download link for downloading the target application and sent to the client.
[0138] Optionally, the timing acquisition module 10 includes:
[0139] The number obtaining unit is configured to obtain the number of downloads of the target application according to the download link of the target application, wherein the number of downloads is determined by the second server.
[0140] Optionally, the number of downloads is determined by the second server according to the number of link requests of the target application, and the number of link requests is determined by the second server.
[0141] Optionally, the anti-theft device for downloading links of the present invention further includes:
[0142] The initialization processing module is used to initialize the record field corresponding to the number of installation reports.
[0143] Optionally, the anti-theft method for the download link is applied to a second server, the second server is connected to the first server and the client respectively, and the first server is in communication connection with the client;
[0144] The anti-theft device for downloading links of the present invention further includes:
[0145] A file deletion module, configured to delete the current download link and the current download file of the target application upon receiving a new download link and a new download file of the target application sent by the first server;
[0146] A file sending module, configured to send the new download file to the client according to the new download link when receiving the new download link sent by the client;
[0147] The new download link and the new download file are obtained by the first server updating the download link and the download file of the target application according to the ratio between the number of installation reports and the number of downloads.
[0148] The present invention also provides a computer storage medium storing a download link anti-theft program. When the download link anti-theft program is executed by a processor, the steps of the download link anti-theft program method described in any of the above embodiments are implemented.
[0149] The specific embodiments of the computer storage medium of the present invention are basically the same as the embodiments of the anti-theft program method for downloading links of the present invention described above, and will not be described in detail here.
[0150] The present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of the anti-theft method for downloading links of the present invention as described in any of the above embodiments are implemented, which will not be described in detail here.
[0151] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or system comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or system. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or system comprising the element.
[0152] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.
[0153] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions for enabling a terminal device (which can be a TWS headset, etc.) to execute the methods described in each embodiment of the present invention.
[0154] The above are only preferred embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention description and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A download link anti-theft method, characterized in that: The anti-theft method for the download link is applied to the first server; The anti-theft method of the download link includes: Get the number of installation reports and downloads of the target application; Determining a ratio of the number of installation reports to the number of downloads, and comparing the ratio with a preset threshold; When the ratio is less than the preset threshold, determining that the download link for downloading the target application is stolen; Encrypting and renaming the download file corresponding to the download link to obtain a new download file, and generating a new download link corresponding to the new download file; The first server is in communication with a client belonging to the company. Before the step of obtaining the number of installation reports and downloads of the target application, the method further includes: Receiving an installation record of the target application reported by the client after the target application is installed; The number of the installation records is determined as the number of installation reports of the target application.
2. The anti-theft method for download links according to claim 1, characterized in that: The first server is also communicatively connected to the second server, and the second server is communicatively connected to the client. The installation record is generated by the client when installing the target application based on the download file of the target application, wherein the download file is determined by the second server based on the download link for downloading the target application and sent to the client.
3. The anti-theft method for download links according to claim 1, characterized in that: The step of obtaining the number of downloads of the target application includes: The number of downloads of the target application is obtained according to the download link of the target application, wherein the number of downloads is determined by the second server.
4. The anti-theft method for download links according to claim 3, characterized in that: The number of downloads is determined by the second server according to the number of link requests of the target application, and the number of link requests is determined by the second server.
5. The anti-theft method for download links according to claim 1, characterized in that: After the step of generating a new download link corresponding to the new download file, the method further includes: Initialize the record field corresponding to the number of installation reports.
6. A download link anti-theft method, characterized in that: The anti-theft method for download links is applied to a second server, the second server is connected to the first server and the client respectively, and the first server is in communication connection with the client; The anti-theft method of the download link includes: If a new download link and a new download file of the target application sent by the first server are received, deleting the current download link and the current download file of the target application; Upon receiving the new download link sent by the client, sending the new download file to the client according to the new download link; The new download link and the new download file are obtained by the first server updating the download link and the download file of the target application according to the ratio between the number of installation reports and the number of downloads.
7. A download link anti-theft device, characterized in that: The anti-theft method for the download link is applied to the first server; The anti-theft device of the download link includes: The timing acquisition module is used to obtain the number of installation reports and downloads of the target application; A module comparison module, configured to determine a ratio of the number of installation reports to the number of downloads, and compare the ratio with a preset threshold; a link theft module, configured to determine that the download link for downloading the target application is stolen when the ratio is less than the preset threshold; An encryption processing module, configured to perform encryption and renaming processing on the download file corresponding to the download link to obtain a new download file, and generate a new download link corresponding to the new download file; The first server is in communication with a client belonging to the company, and the anti-theft device for the download link includes: A record reporting module, configured to receive the installation record of the target application reported by the client after the target application is installed; The reporting number module is used to determine the number of the installation records as the number of installation reports of the target application.
8. A server, characterized in that: The server includes: a memory, a processor, and an anti-theft program for download links stored in the memory and executable on the processor. When the anti-theft program for download links is executed by the processor, the steps of the anti-theft method for download links according to any one of claims 1 to 5 or 6 are implemented.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a download link anti-theft program, which, when executed by a processor, implements the steps of the download link anti-theft method according to any one of claims 1 to 5 or 6.
Citation Information
Patent Citations
Method, client, server and system for processing data in file downloading
CN102752326A
Sharing control system and method for network resource downloading information
CN103078881A