Application downloading method and device, computer device and storage medium
By monitoring local ports and intercepting domain name data streams on the terminal side, and utilizing the application download service process to obtain large-capacity applications, the problem of excessive burden on proxy servers is solved, and a more efficient download process is achieved.
Patent Information
- Application Number
- CN202210123009.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-09
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2042-02-09
AI Technical Summary
In traditional technologies, proxy servers are overburdened when handling large-scale application downloads, resulting in excessive CPU utilization and load, leading to performance bottlenecks.
On the terminal side, the application download service process monitors local ports, intercepts domain name data streams and redirects them to local ports, and uses the application download configuration file to obtain the application to be downloaded, reducing reliance on proxy servers.
By using edge computing, the burden on proxy servers is reduced, processing latency is lowered, and resource utilization is optimized.
Smart Images

Figure CN116614488B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, in particular to an application program downloading method and device, computer equipment and storage medium. BACKGROUND
[0002] With the development of computer technology, sometimes it is necessary to download large capacity application programs from remote deployment servers, such as downloading large capacity games from remote deployment servers. For such large capacity application programs, a proxy mode is usually used for downloading acceleration.
[0003] In the prior art, the way of downloading acceleration by using the proxy mode is that the user initiates an HTTP (Hyper Text Transfer Protocol) request through a downloading acceleration application program in the client, the downloading acceleration application program intercepts the traffic of the HTTP request directed to the proxy server corresponding to the remote deployment server, the proxy server redirects the HTTP request to the content distribution network server in the region, the content distribution network server queries whether it has the corresponding application program resources, if not, it will pull the application program resources from the remote deployment server, if it has the corresponding application program resources, it will return the HTTP response directly to the client.
[0004] However, in the prior art, all HTTP request parsing and redirection forwarding are concentrated on the proxy server, and are processed in parallel with other traffic, which greatly increases the CPU (central processing unit) usage rate and load of the proxy server, and there is a problem of excessive burden on the proxy server. SUMMARY
[0005] Therefore, it is necessary to provide an application program downloading method and device, computer equipment, storage medium and program product capable of reducing the burden on the proxy server in view of the above technical problems.
[0006] An application program downloading method, the method comprising:
[0007] In response to a downloading acceleration selection operation, determining an application program identifier of a to-be-downloaded application program;
[0008] According to the application program identifier, updating a local port in an application program downloading configuration file;
[0009] According to the application program downloading configuration file after updating the local port, starting an application program downloading service process, the application program downloading service process being used for monitoring the local port;
[0010] The processing module is configured to: when the domain name data stream corresponding to the application program to be downloaded is intercepted, redirect the domain name data stream to the local port, execute the application program downloading service process, so that the application program downloading service process acquires the domain name data stream by monitoring the local port, and acquires the application program to be downloaded according to the domain name data stream and the application program downloading configuration file.
[0011] An application program downloading device, the device comprises:
[0012] The response module is configured to determine the application program identification of the application program to be downloaded in response to the downloading acceleration selection operation.
[0013] The updating module is configured to update the local port in the application program downloading configuration file according to the application program identification.
[0014] The configuration module is configured to start the application program downloading service process according to the application program downloading configuration file after the local port is updated, and the application program downloading service process is configured to monitor the local port.
[0015] The processing module is configured to: when the domain name data stream corresponding to the application program to be downloaded is intercepted, redirect the domain name data stream to the local port, execute the application program downloading service process, so that the application program downloading service process acquires the domain name data stream by monitoring the local port, and acquires the application program to be downloaded according to the domain name data stream and the application program downloading configuration file.
[0016] A computer device, comprising a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0017] The response module is configured to determine the application program identification of the application program to be downloaded in response to the downloading acceleration selection operation.
[0018] The updating module is configured to update the local port in the application program downloading configuration file according to the application program identification.
[0019] The configuration module is configured to start the application program downloading service process according to the application program downloading configuration file after the local port is updated, and the application program downloading service process is configured to monitor the local port.
[0020] The processing module is configured to: when the domain name data stream corresponding to the application program to be downloaded is intercepted, redirect the domain name data stream to the local port, execute the application program downloading service process, so that the application program downloading service process acquires the domain name data stream by monitoring the local port, and acquires the application program to be downloaded according to the domain name data stream and the application program downloading configuration file.
[0021] A computer readable storage medium, which stores a computer program, and the computer program implements the following steps when executed by a processor:
[0022] In response to the download acceleration selection operation, an application identifier of the application to be downloaded is determined;
[0023] According to the application identifier, a local port in an application download configuration file is updated;
[0024] According to the application download configuration file after the local port is updated, an application download service process is started, and the application download service process is used to monitor the local port;
[0025] When the domain name data stream corresponding to the application to be downloaded is intercepted, the domain name data stream is redirected to the local port, and the application download service process is executed, so that the application download service process acquires the domain name data stream by monitoring the local port, and acquires the application to be downloaded according to the domain name data stream and the application download configuration file.
[0026] A computer program product comprising a computer program, the computer program being executed by a processor to implement the following steps:
[0027] In response to the download acceleration selection operation, an application identifier of the application to be downloaded is determined;
[0028] According to the application identifier, a local port in an application download configuration file is updated;
[0029] According to the application download configuration file after the local port is updated, an application download service process is started, and the application download service process is used to monitor the local port;
[0030] When the domain name data stream corresponding to the application to be downloaded is intercepted, the domain name data stream is redirected to the local port, and the application download service process is executed, so that the application download service process acquires the domain name data stream by monitoring the local port, and acquires the application to be downloaded according to the domain name data stream and the application download configuration file.
[0031] The application program downloading method, device, computer device, storage medium and program product can determine the application program identifier of the application program to be downloaded by responding to the downloading acceleration selection operation, update the local port in the application program downloading configuration file according to the application program identifier, start the application program downloading service process according to the application program downloading configuration file after the local port is updated, and can realize the correct start of the application program downloading service process, so that the application program downloading service process can be used to monitor the local port, and then the domain name data stream can be redirected to the local port when the domain name data stream corresponding to the application program to be downloaded is intercepted, and the application program downloading service process is executed, so that the application program downloading service process obtains the domain name data stream by monitoring the local port, and obtains the application program to be downloaded according to the domain name data stream and the application program downloading configuration file. In the whole process, the application program to be downloaded can be obtained by intercepting the domain name data stream and redirecting the domain name data stream at the edge level by using the application program downloading service process, which is equivalent to edge computing, and the burden on the proxy server is reduced. BRIEF DESCRIPTION OF DRAWINGS
[0032] Figure 1 An application environment diagram of the application program downloading method in one embodiment;
[0033] Figure 2 A flowchart of the application program downloading method in one embodiment;
[0034] Figure 3 A diagram of accelerating the display interface of an application program in one embodiment;
[0035] Figure 4 A diagram of an application program obtaining rule in one embodiment;
[0036] Figure 5 A diagram of configuration strategies corresponding to different application programs in one embodiment;
[0037] Figure 6 A diagram of a service process main configuration file in one embodiment;
[0038] Figure 7 An application scenario diagram of the application program downloading method in one embodiment;
[0039] Figure 8 A flowchart of the application program downloading method in another embodiment;
[0040] Figure 9 A diagram of the man-in-the-middle forwarding principle in one embodiment;
[0041] Figure 10 A structural block diagram of the application program downloading device in one embodiment;
[0042] Figure 11 Figure 1 is a schematic diagram of the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0043] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and should not be used to limit the present application.
[0044] The application program downloading method provided by the embodiments of the present application can be applied to an application environment as shown in Figure 1 . In the application environment, the terminal 102 communicates with the server 104 through a network. The terminal 102 determines the application program identifier of the application program to be downloaded in response to a download acceleration selection operation, updates the local port in the application program downloading configuration file according to the application program identifier, starts the application program downloading service process according to the application program downloading configuration file after updating the local port, and the application program downloading service process is used to monitor the local port. When the domain name data stream corresponding to the application program to be downloaded is intercepted, the domain name data stream is redirected to the local port, and the application program downloading service process is executed to enable the application program downloading service process to obtain the domain name data stream by monitoring the local port and obtain the application program to be downloaded from the server 104 according to the application program downloading configuration file. When the application program to be downloaded is obtained from the server 104 according to the application program downloading configuration file, the terminal needs to determine whether the server 104 is the content distribution network server 106 in the region that owns the application program resource to be downloaded or the remote deployment server 108 that deploys the application program to be downloaded. The terminal 102 can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, Internet of Things devices, portable wearable devices, aircraft, etc. The Internet of Things device can be a smart speaker, a smart television, a smart air conditioner, a smart vehicle-mounted device, etc. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc. The server 104 can be implemented by an independent server or a server cluster composed of multiple servers, or can be a node on a block chain. The embodiments of the present application can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, intelligent transportation, assisted driving, etc.
[0045] In one embodiment, as shown in Figure 2 , an application program downloading method is provided, which will be described below by taking the terminal 102 in Figure 1 as an example, including the following steps:
[0046] Step 202, in response to a download acceleration selection operation, determining the application program identifier of the application program to be downloaded.
[0047] The download acceleration selection operation refers to an operation of selecting a to-be-downloaded application requiring download acceleration in the acceleration application after the user starts the acceleration application. The to-be-downloaded application refers to a large-capacity application requiring download by the user. For example, the to-be-downloaded application specifically refers to a large-capacity game requiring download by the user. The application identifier refers to a mark for distinguishing applications. For example, the application identifier specifically refers to an application ID (Identity document).
[0048] Specifically, when a large-capacity application needs to be downloaded, the user will operate the terminal to start the acceleration application, and select a to-be-downloaded application requiring download acceleration in the display interface of the acceleration application. For example, as shown in Figure 3 For example, when a large-capacity application needs to be downloaded, the user will operate the terminal to start the game acceleration application, select a to-be-downloaded game requiring download acceleration in the display interface of the game acceleration application, and click download acceleration. The terminal will respond to the download acceleration selection operation and determine the game identifier of the to-be-downloaded game.
[0049] In step 204, the local port in the application download configuration file is updated according to the application identifier.
[0050] The application download configuration file refers to a file for configuring application download, which includes an application acquisition rule. The terminal can request resources of the to-be-downloaded application according to the application acquisition rule. For example, the application download configuration file specifically refers to an Nginx (high-performance HTTP and reverse proxy web (World Wide Web) server) configuration file. The application acquisition rule refers to a rule for acquiring the to-be-downloaded application in advance. For example, the application acquisition rule specifically refers to that when XX conditions are met, a content distribution network server in a region having resources of the to-be-downloaded application is requested for resources. For another example, the application acquisition rule specifically refers to that when YY conditions are met, a remote deployment server deploying the to-be-downloaded application is requested for resources. The XX conditions and YY conditions are specific conditions, which can be set as needed. For example, the application acquisition rule specifically can be as shown in Figure 4 Many conditional statements are included therein, and a corresponding conditional matching result can be determined by performing conditional matching, and then the resources can be requested according to the conditional matching result. In Figure 4 The value of the $proxy variable is different in different conditional statements, and the value of the $proxy variable can be determined according to the conditional matching result, and then the way of requesting resources can be determined according to the value of the $proxy variable. When the value of the $proxy variable is 1, the corresponding matched resource acquisition path (in Figure 4through http: / / xxxxxxx, i.e. the address of the content distribution network server within the configured area to request the resource, or otherwise, when the value of the $proxy variable is 0, the remote deployment server needs to be deployed to request the resource (in Figure 4 through http: / / yyyyyyy.
[0051] The local port is used to monitor the connection of the domain name data stream corresponding to the application to be downloaded. When a specific domain name data stream connection needs to be monitored, a corresponding local port needs to be monitored. Generally, the local port and the monitored domain name data stream are one-to-one.
[0052] Specifically, the terminal obtains the application download configuration file from the cloud according to the application identifier, starts port binding, and attempts port binding from the preset port. When the port binding is successful, the bound successful port is taken as the local port in the application download configuration file. The cloud stores application download configuration files corresponding to different applications. Further, the terminal generates an information digest corresponding to the application download configuration file when pulling the application download configuration file. The information digest and the application identifier are used to pull the application download configuration file from the cloud. The information digest can be generated according to the MD5 (Message-Digest, information digest) algorithm, and corresponds to the download link address. For example, the configuration strategies corresponding to different applications can be as shown in Figure 5 , where KEY is the application identifier Figure 5 , and different numbers are used to represent different applications), Value Type is used to indicate the type of Value Figure 5 , both of which are string, i.e. string), Value includes the download link address and the information digest corresponding to the download link address Figure 5 , where x, y, z, m, n, and l are used to replace the specific information digest.
[0053] Step 206, starting the application download service process according to the application download configuration file after updating the local port. The application download service process is used to monitor the local port.
[0054] The application download service process refers to a service process for processing application download. Specifically, the application download service process monitors the local port in real time. When the domain name data stream is obtained by monitoring the local port, the application to be downloaded is obtained according to the domain name data stream and the application download configuration file.
[0055] Specifically, the server will download the application program update local port configuration file to the cached service process main configuration file, obtain the file directory of the service process main configuration file loaded with the application program update local port configuration file, set the current directory of the application program download service process according to the file directory, that is, the working directory of the application program download service process, and start the application program download service process. The service process main configuration file includes the necessary information for the application program download service process to run, and is composed of simple instructions and block instructions. Its main function is to set the required parameters of the application program download service process, to ensure that the application program download service process runs correctly and works. For example, the application program download service process can be an Nginx service process, and the service process main configuration file is a nginx.conf (config, configuration file) file.
[0056] Step 208, when the domain name data stream corresponding to the application program to be downloaded is intercepted, the domain name data stream is redirected to the local port, and the application program download service process is executed, so that the application program download service process obtains the domain name data stream by monitoring the local port, and obtains the application program to be downloaded according to the domain name data stream and the application program download configuration file.
[0057] The domain name data stream refers to the Request request of the domain name, which is used to request to download the application program to be downloaded. For example, the domain name data stream can be HTTPS traffic.
[0058] Specifically, after starting the application program download service process, the application program download service process will monitor the local port in real time. If the user operates the terminal to perform the download acceleration start operation, the terminal will respond to the download acceleration start operation, generate the domain name data stream corresponding to the application program to be downloaded, intercept the domain name data stream corresponding to the application program to be downloaded through the pre-configured interception method, redirect the domain name data stream to the local port, execute the application program download service process, and make the application program download service process obtain the domain name data stream by monitoring the local port. After obtaining the domain name data stream, the application program download service will authenticate the domain name data stream, and extract the application program acquisition rule from the application program download configuration file after the authentication is passed, determine the target server according to the application program acquisition rule and the domain name data stream, and obtain the application program to be downloaded from the target server.
[0059] The pre-configured interception mode is set by the user on demand. In the acceleration application, multiple interception modes are configured for the user to select. For example, the interception mode can be an injection type interception LSP (Winsock layered Service Providers). For another example, the interception mode can be a non-injection type interception WFP (Windows Filtering Platform).
[0060] LSP is a feature of Winsock 2 Service Provider Interface (SPI) in Microsoft Windows, which is also called layered service provider or layered service provider. The layered service provider is a DLL (Dynamic Link Library) that inserts itself into the TCP / IP (Transmission Control Protocol / Internet Protocol) protocol stack using Winsock API. After entering the protocol stack, the layered service provider can intercept and modify the inbound and outbound Internet traffic. It can process all Internet access applications (such as web browsers, email clients, etc.) that connect to the Internet TCP / IP traffic.
[0061] After VISTA, Microsoft uses WFP platform to replace the previous XP and 03 based on packet filtering technology, such as Transport Driver Interface (TDI) filtering, Network Driver Interface Specification (NDIS) filtering, Winsock layered Service Providers (LSP), etc. WFP is a set of API (Application Programming Interface) and system services, which provides a platform for network filtering applications. The WFP API can process packets at different levels of the operating system network stack, and filter or modify data before it reaches its destination.
[0062] The application program downloading method can determine the application program identifier of the application program to be downloaded in response to the downloading acceleration selection operation, update the local port in the application program downloading configuration file according to the application program identifier, start the application program downloading service process according to the application program downloading configuration file after the local port is updated, and correctly start the application program downloading service process, so that the application program downloading service process can be used to monitor the local port, and the domain name data stream can be redirected to the local port when the domain name data stream corresponding to the application program to be downloaded is intercepted, and the application program downloading service process is executed, so that the application program downloading service process can obtain the domain name data stream by monitoring the local port, and obtain the application program to be downloaded according to the domain name data stream and the application program downloading configuration file. In the whole process, the application program to be downloaded can be obtained by intercepting the domain name data stream and redirecting the domain name data stream at the edge level by using the application program downloading service process, which is equivalent to edge computing, and the burden on the proxy server is reduced.
[0063] In one embodiment, updating the local port in the application program downloading configuration file comprises:
[0064] starting port binding;
[0065] When the port binding is successful, the bound successful port is taken as the local port in the application program downloading configuration file.
[0066] Specifically, the terminal starts port binding, attempts port binding from a preset port, and if the preset port is bound successfully, it is indicated that the preset port is available, and the terminal takes the preset port as the local port in the application program downloading configuration file. If the preset port is not bound successfully, the terminal attempts to bind the next port corresponding to the preset port until the port binding is successful, and the bound successful port is taken as the local port in the application program downloading configuration file. For example, when the port number of the preset port is 16000, the terminal attempts to bind from port 16000, and when the binding is successful, that is, the port binding is successful, it is considered that the bound successful port is available, and the bound successful port is taken as the local port. The preset port refers to a port that is preset to start binding. For example, the port number of the preset port can be 16000.
[0067] In this embodiment, by starting port binding, the bound successful port is taken as the local port in the application program downloading configuration file when the port binding is successful, and the determination of the local port can be realized.
[0068] In one embodiment, starting the application program downloading service process according to the application program downloading configuration file after the local port is updated comprises:
[0069] The application program download configuration file after updating the local port is loaded into the cached service process main configuration file, and a file directory of the service process main configuration file after loading the application program download configuration file after updating the local port is obtained;
[0070] The file directory is set as the current directory of the application program download service process, the application program download service process is started, and the current directory is the working directory of the application program download service process.
[0071] The file directory is the directory where the service process main configuration file is downloaded, that is, the directory where the service process main configuration file is cached in the terminal. For example, for a windows user, the file directory can be set in the %programdata% directory, and is set by API SetCurrentDirectory. The current directory is the working directory of the application program download service process, and the application program download service process accesses each file relative to the "current directory".
[0072] Specifically, the terminal will obtain the service process main configuration file from the cloud in advance, load the application program download configuration file after updating the local port into the service process main configuration file, obtain the file directory of the service process main configuration file after loading the application program download configuration file after updating the local port, set the file directory as the current directory of the application program download service process, and start the application program download service process, so that the application program download service process works according to the current directory and monitors the local port in the application program download configuration file. It should be noted that multiple application program download configuration files corresponding to different application programs can be loaded in the service process main configuration file simultaneously. For example, as shown in Figure 6 When the service process main configuration file is an Nginx.conf file, it can load multiple.conf files corresponding to different application programs according to the application program identifier. For example, in Figure 6 When the application program identifier is 10000, the 10000\10000.conf file in the relative directory is updated and loaded. In addition, the service process main configuration file can also load the 379\379.conf file corresponding to the application program identifier 379 and the 10084\10084.conf file corresponding to the application program identifier 10084. It should be noted that Figure 6 Other information in the service process main configuration file in
[0073] In the embodiment, the application download configuration file after updating the local port is loaded into the cached service process main configuration file, the file directory of the service process main configuration file after loading the application download configuration file after updating the local port is obtained, and the file directory is set as the current directory of the application download service process, so that the application download service process can be started correctly and work correctly.
[0074] In one embodiment, when the domain name data stream corresponding to the application to be downloaded is intercepted, the method further comprises:
[0075] In response to the download acceleration start operation, the interception function of the domain name data stream corresponding to the application to be downloaded is started.
[0076] The download acceleration start operation refers to an operation of selecting to start downloading the application to be downloaded in the acceleration application after the application download service process is started correctly.
[0077] Specifically, after starting the acceleration application, the acceleration application provides multiple interception modes for the user to set in the display interface of the acceleration application. When the user selects the injection interception LSP, the acceleration application responds to the user selection to install the LSP protocol and register the LSP module, and completes the setting of the interception mode. When the user selects the non-injection interception WFP, the acceleration application responds to the user selection to install the WFP filter driver, and completes the setting of the interception mode. After the application download service process is started correctly, the user operates the terminal to perform the download acceleration start operation in the display interface of the acceleration application. The terminal responds to the download acceleration start operation to start the interception function of the domain name data stream corresponding to the application to be downloaded, and intercepts the domain name data stream corresponding to the application to be downloaded through the pre-set interception mode.
[0078] In the embodiment, the interception function of the domain name data stream corresponding to the application to be downloaded is started in response to the download acceleration start operation, so that the domain name data stream can be intercepted, and the application to be downloaded can be obtained according to the intercepted domain name data stream.
[0079] In one embodiment, the application download method further comprises:
[0080] The domain name data stream is authenticated according to the application download configuration file.
[0081] When the authentication is passed, the application to be downloaded is obtained according to the domain name data stream and the application download configuration file.
[0082] The issuing certificate refers to a digital certificate existing in the application download configuration file and issued by the self-trusted root certificate, and is used for authenticating the domain name data stream.
[0083] Specifically, after starting the acceleration application, the terminal detects whether the self-trusted root certificate is installed to the trusted root certificate authority. If not, the self-trusted root certificate is installed to the trusted root certificate authority. After the domain name data stream is generated, the acceleration application signs the domain name data stream by using the self-trusted root certificate installed to the trusted root certificate authority. The signature can be used to authenticate the domain name data stream. Therefore, after obtaining the domain name data stream, the application download service process performs certificate chain authentication on the domain name data stream according to the issuing certificate in the application download configuration file. When the authentication is passed, the application download service process jumps to obtaining the application to be downloaded according to the domain name data stream and the application download configuration file. Since the terminal has installed the self-trusted root certificate to the trusted root certificate authority, and the issuing certificate is a digital certificate issued by the self-trusted root certificate, the domain name data stream can be authenticated by comparing the certificate used for signing the domain name data stream and the issuing certificate.
[0084] Further, since the name of the root certificate has specific characteristics, the terminal can detect whether the self-trusted root certificate is installed to the trusted root certificate authority through a system-provided interface. For example, the name of the root certificate can be obtained through the system-provided interfaces CertEnumCertificatesInStore and CertGetNameString, and then it is determined whether the self-trusted root certificate is installed to the trusted root certificate authority by comparing the name with the expected specific characteristics.
[0085] In this embodiment, the authentication of the domain name data stream is implemented by authenticating the domain name data stream according to the issuing certificate in the application download configuration file, and the source of the domain name data stream is ensured to be reliable.
[0086] In one embodiment, obtaining the application to be downloaded according to the domain name data stream and the application download configuration file includes:
[0087] extracting an application obtaining rule from the application download configuration file;
[0088] determining a target server according to the application obtaining rule and the domain name data stream, and obtaining the application to be downloaded from the target server.
[0089] The application obtaining rule refers to a preconfigured rule for obtaining the application to be downloaded.
[0090] Specifically, the terminal extracts the application program acquisition rule from the application program download configuration file, matches the domain name data stream and the application program acquisition rule, determines a condition matching result corresponding to the domain name data stream, determines a target server according to the condition matching result, and acquires the to-be-downloaded application program from the target server. The condition matching result refers to an acquisition manner of the to-be-downloaded application program matched according to a specific traffic request in the domain name data stream. The application program acquisition rule includes many conditional statements, and the acquisition manners corresponding to different conditional statements are not completely same.
[0091] For example, as shown in FIG. 3, the application program download configuration file includes a plurality of conditional statements composed of if fields. By performing condition matching according to a specific traffic request in the domain name data stream, a corresponding condition matching result can be determined, and then the resource can be requested according to the condition matching result. Figure 4 Figure 4 In the application program download configuration file, the values of the $proxy variables in different conditional statements are different. According to the condition matching result, the value of the $proxy variable can be determined, and then the manner of requesting the resource can be determined according to the value of the $proxy variable. When the value of the $proxy variable is 1, the corresponding matched resource acquisition path, that is, the address of the content distribution network server in the configured region, is requested to request the resource. Otherwise, when the value of the $proxy variable is 0, the remote deployment server where the to-be-downloaded application program is deployed is requested to request the resource. That is, when the resource acquisition path is matched, the to-be-downloaded application program can be directly acquired from the resource acquisition path, otherwise, the to-be-downloaded application program needs to be acquired from the remote deployment server where the to-be-downloaded application program is deployed.
[0092] In this embodiment, by extracting the application program acquisition rule from the application program download configuration file, the target server can be determined according to the application program acquisition rule and the domain name data stream, so that the to-be-downloaded application program can be acquired from the target server.
[0093] In one embodiment, determining the target server according to the application program acquisition rule and the domain name data stream, and acquiring the to-be-downloaded application program from the target server includes:
[0094] matching the domain name data stream and the application program acquisition rule to obtain a condition matching result;
[0095] when the condition matching result matches the resource acquisition path, determining the target server according to the resource acquisition path, and acquiring the to-be-downloaded application program from the target server;
[0096] when the condition matching result does not match the resource acquisition path, determining the target server as a remote deployment server where the to-be-downloaded application program is deployed, and acquiring the to-be-downloaded application program from the remote deployment server.
[0097] The resource acquisition path refers to an address of a content distribution network server for acquiring the application to be downloaded.
[0098] Specifically, the terminal matches the specific traffic request in the domain name data stream with the application acquisition rule to obtain a conditional matching result, and uses the conditional matching result to match the resource acquisition path. When the conditional matching result matches the resource acquisition path, it indicates that the content distribution network server in the configured region has the application to be downloaded. The terminal can locate the content distribution network server according to the resource acquisition path, and directly acquire the application to be downloaded from the content distribution network server. When the conditional matching result does not match the resource acquisition path, it indicates that the content distribution network server in the configured region does not have the application to be downloaded, and the application to be downloaded needs to be acquired from the remote deployment server where the application to be downloaded is deployed.
[0099] The terminal can determine whether the conditional matching result matches the resource acquisition path by the value of the variable in the conditional matching result. Different values of the variable correspond to different matching results. For example, as shown in FIG. 6, when the value of the variable in the conditional matching result is 1, there is a corresponding resource acquisition path. Therefore, when the value of the variable in the conditional matching result is 1, it indicates that the conditional matching result matches the resource acquisition path. When the value of the variable in the conditional matching result is 0, it indicates that the conditional matching result does not match the resource acquisition path. Figure 4
[0100] The specific traffic request in the domain name data stream refers to a specific traffic request field. According to different suffixes in the specific traffic request field, different conditional statements in different application acquisition rules are matched, that is, different conditional matching results are obtained. For example, as shown in FIG. 5, it can be seen that for some suffixes, the corresponding conditional matching result sets the value of the variable, and the value of the variable can determine the acquisition method of the corresponding application to be downloaded. Figure 4
[0101] It should be noted that when the application to be downloaded is acquired from the remote deployment server where the application to be downloaded is deployed, the application to be downloaded is usually downloaded by using the deployed proxy server, that is, the terminal first sends a resource acquisition request corresponding to the application to be downloaded to the deployed proxy server, so that the proxy server pulls the application to be downloaded from the remote deployment server where the application to be downloaded is deployed and feeds back.
[0102] In this embodiment, by matching the domain name data stream and the application acquisition rule, the conditional matching result is obtained, and the acquisition of the application to be downloaded can be realized from the corresponding target server according to whether the conditional matching result matches the resource acquisition path.
[0103] In one embodiment, the application program download method is described by taking a large-capacity game download deployed at a remote game server as an example.
[0104] As shown in Figure 7 , a user realizes downloading a large-capacity game by operating at a game client. The game client includes a game acceleration application program, and the game acceleration application program is configured with corresponding acceleration modes. Different acceleration modes correspond to different interception modes. The user can select an acceleration mode corresponding to LSP interception or an acceleration mode corresponding to WFP interception. After completing the acceleration mode selection, the user operates the game client, selects a to-be-downloaded game requiring acceleration on a display interface of the game acceleration application program, and clicks to download and accelerate. The game acceleration application program in the game client responds to the download and acceleration selection operation, determines a game identifier of the to-be-downloaded game, acquires a corresponding application program download configuration file according to the game identifier, starts port binding, and when the port binding is successful, binds a successful port as a local port in the application program download configuration file, updates the application program download configuration file after the local port, loads the updated application program download configuration file to a cached service process main configuration file, acquires a file directory of the service process main configuration file after loading the updated application program download configuration file, sets the file directory as a current directory of an application program download service process, and starts the application program download service process (i.e., Nginx SERVER in Figure 7 ). The application program download service process is used to monitor the local port. After the application program download service process starts to work, the user operates the game client, performs a download and acceleration start operation on the display interface of the game acceleration application program. The game acceleration application program in the game client responds to the download and acceleration start operation, starts an interception function of a domain name data stream corresponding to the to-be-downloaded game, intercepts the domain name data stream corresponding to the to-be-downloaded game through a pre-set interception mode, redirects the domain name data stream to the local port, and executes the application program download service process. The application program download service process acquires the domain name data stream through monitoring the local port and extracts an application program acquisition rule from the application program download configuration file, matches the domain name data stream and the application program acquisition rule, obtains a condition matching result, and when the condition matching result matches a resource acquisition path, indicates that a content distribution network server in a region corresponding to the resource acquisition path has resources of the to-be-downloaded game. The to-be-downloaded game can be acquired from the content distribution network server in the region according to the resource acquisition path. When the condition matching result does not match the resource acquisition path, it indicates that the content distribution network server in the region does not have the resources of the to-be-downloaded game, and the to-be-downloaded game needs to be acquired from a game server deploying the to-be-downloaded game. At this time, a proxy server is needed as an intermediary to acquire the to-be-downloaded game from the game server.
[0105] Correspondingly, as shown in Figure 8As shown, a flowchart of a large-capacity game download deployed at a remote game server is provided to illustrate the application program download method of the application, which specifically includes the following steps:
[0106] The game client starts the game acceleration application, the user selects the download acceleration support game acceleration in the game acceleration application, according to the game identifier selected by the user, the corresponding application program download configuration file (i.e. game Nginx process configuration) is updated, the application program download service process (i.e. Nginx process) is correctly started, the download acceleration start operation is responded, the domain name data stream (i.e. HTTP / HTTPS traffic in the figure) corresponding to the game to be downloaded is started, the domain name data stream is redirected to the local port, the application program download service process is executed, so that the application program download service process obtains the domain name data stream by monitoring the local port, and determines the content distribution network server in the region or the proxy server as an intermediary to obtain the game to be downloaded from the game server according to the domain name data stream and the application program download configuration file. It should be noted that when the corresponding game Nginx process configuration fails to update or the Nginx process fails to start, the application program download will be directly ended.
[0107] Among them, updating the corresponding application program download configuration file includes: according to the game identifier, obtaining the corresponding application program download configuration file, starting port binding, when the port binding is successful, the binding successful port is taken as the local port in the application program download configuration file, the application program download configuration file after updating the local port is loaded into the cache service process main configuration file. Correctly starting the application program download service process includes: obtaining the file directory of the service process main configuration file loaded with the application program download configuration file after updating the local port, setting the file directory as the current directory of the application program download service process.
[0108] Among them, after obtaining the domain name data stream, the terminal will authenticate the domain name data stream according to the application program download configuration file, when the authentication is passed, the application program acquisition rule is extracted from the application program download configuration file, the domain name data stream and the application program acquisition rule are matched, the condition matching result is obtained, when the condition matching result matches the resource acquisition path, the content distribution network server in the region is determined according to the resource acquisition path, the game to be downloaded is obtained from the content distribution network server in the region, when the condition matching result does not match the resource acquisition path, the target server is determined as the remote deployment server deploying the game to be downloaded, and the game to be downloaded is obtained from the remote deployment server through the proxy server as an intermediary.
[0109] This application download method creatively intercepts traffic on the terminal side and utilizes an open-source application download service process to deploy a proxy service on the terminal side, achieving the ability to filter traffic at the terminal level. This is equivalent to edge computing, minimizing the impact on the proxy server corresponding to the remote deployment server. It only needs to handle data forwarding, reducing the burden on the proxy server. Furthermore, compared to traditional technologies, this application download method reduces latency because it does not require multiple forwardings of domain name data streams between multiple servers. It should be noted that this application download method is based on the man-in-the-middle principle, which is explained below. Figure 9 The diagram illustrates the man-in-the-middle forwarding principle. In traditional technologies, when a user operates a terminal, HTTPS traffic within the terminal is directly forwarded to the proxy server through a pre-established SSL (Secure Sockets Layer) channel. However, the application download method in this application intercepts HTTPS traffic (i.e., domain name data stream) on the terminal, causing the terminal to first establish a channel with the man-in-the-middle (i.e., the application download service process). After receiving the domain name data stream, the man-in-the-middle establishes a channel with the actual server (i.e., a content delivery network server within the region or a proxy server corresponding to a remote deployment server) to forward the request.
[0110] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0111] Based on the same inventive concept, this application also provides an application downloading apparatus for implementing the application downloading method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more application downloading apparatus embodiments provided below can be found in the limitations of the application downloading method described above, and will not be repeated here.
[0112] In one embodiment, such as Figure 10As shown, an application program downloading device is provided, comprising a response module 1002, an updating module 1004, a configuration module 1006 and a processing module 1008, wherein:
[0113] The response module 1002 is configured to determine an application program identification of a to-be-downloaded application program in response to a downloading acceleration selection operation.
[0114] The updating module 1004 is configured to update a local port in an application program downloading configuration file according to the application program identification.
[0115] The configuration module 1006 is configured to start an application program downloading service process according to the application program downloading configuration file after the local port is updated, and the application program downloading service process is configured to monitor the local port.
[0116] The processing module 1008 is configured to redirect a domain name data stream corresponding to the to-be-downloaded application program to the local port when the domain name data stream is intercepted, and execute the application program downloading service process, so that the application program downloading service process acquires the domain name data stream by monitoring the local port, and acquires the to-be-downloaded application program according to the domain name data stream and the application program downloading configuration file.
[0117] The application program downloading device can correctly start the application program downloading service process, so as to monitor the local port by using the application program downloading service process, and then redirect the domain name data stream to the local port when the domain name data stream corresponding to the to-be-downloaded application program is intercepted, execute the application program downloading service process, so that the application program downloading service process acquires the domain name data stream by monitoring the local port, and acquires the to-be-downloaded application program according to the domain name data stream and the application program downloading configuration file. The whole process can acquire the to-be-downloaded application program by intercepting the domain name data stream and directly redirecting the domain name data stream at the end level by using the application program downloading service process, which is equivalent to edge computing, and reduces the burden on the proxy server.
[0118] In one embodiment, the updating module is further configured to start a port binding, and when the port binding is successful, bind a successful port as the local port in the application program downloading configuration file.
[0119] In one embodiment, the configuration module is further configured to download the application download configuration file after updating the local port to the cached service process master configuration file, obtain a file directory of the service process master configuration file after loading the application download configuration file after updating the local port, set the file directory as a current directory of the application download service process, start the application download service process, and the current directory is a working directory of the application download service process.
[0120] In one embodiment, the application download apparatus further comprises an interception module configured to start an interception function of a domain name data stream corresponding to the application to be downloaded in response to the download acceleration start operation.
[0121] In one embodiment, the application download apparatus further comprises an authentication module configured to authenticate the domain name data stream according to an issued certificate in the application download configuration file, and jump to obtaining the application to be downloaded according to the domain name data stream and the application download configuration file when the authentication is passed.
[0122] In one embodiment, the processing module is further configured to extract an application obtaining rule from the application download configuration file, determine a target server according to the application obtaining rule and the domain name data stream, and obtain the application to be downloaded from the target server.
[0123] In one embodiment, the processing module is further configured to match the domain name data stream and the application obtaining rule to obtain a conditional matching result, determine a target server according to a resource obtaining path when the conditional matching result matches the resource obtaining path, and obtain the application to be downloaded from the target server, and determine the target server as a remote deployment server deploying the application to be downloaded when the conditional matching result does not match the resource obtaining path, and obtain the application to be downloaded from the remote deployment server.
[0124] The above various modules of the application download apparatus can be all or partially implemented by software, hardware, and combinations thereof. The above various modules can be embedded in or independent of a processor in a computer device in a hardware form, or stored in a memory in a computer device in a software form, so as to be called and executed by a processor to perform operations corresponding to the above various modules.
[0125] In one embodiment, a computer device is provided, which can be a terminal, and an internal structure diagram of the computer device can be as shown in Figure 11The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for running the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is configured to exchange information between the processor and external devices. The communication interface of the computer device is configured to perform wired or wireless communication with external terminals. The wireless communication can be achieved through WIFI, mobile cellular network, NFC (Near Field Communication) or other technologies. The computer program is executed by the processor to implement an application program downloading method. The display unit of the computer device is configured to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer overlaid on the display screen, or a key, trackball or touchpad arranged on the shell of the computer device, or an external keyboard, touchpad or mouse, etc.
[0126] Those skilled in the art can understand that, Figure 11 The skilled in the art can understand that,
[0127] In one embodiment, a computer device is provided, including a memory and a processor, the memory stores a computer program, and the processor executes the computer program to implement the following steps:
[0128] In response to the downloading acceleration selection operation, the application program identifier of the application program to be downloaded is determined;
[0129] According to the application program identifier, the local port in the application program downloading configuration file is updated;
[0130] According to the application program downloading configuration file after updating the local port, the application program downloading service process is started, and the application program downloading service process is configured to monitor the local port;
[0131] When the domain name data stream corresponding to the application to be downloaded is intercepted, the domain name data stream is redirected to a local port, and an application download service process is executed to enable the application download service process to obtain the domain name data stream by monitoring the local port and obtain the application to be downloaded according to the domain name data stream and the application download configuration file.
[0132] In one embodiment, when the processor executes the computer program, the following steps are also implemented: starting a port binding, and when the port binding is successful, taking the bound successful port as the local port in the application download configuration file.
[0133] In one embodiment, when the processor executes the computer program, the following steps are also implemented: loading the application download configuration file updated with the local port into a cached service process main configuration file, obtaining a file directory of the service process main configuration file loaded with the application download configuration file updated with the local port, setting the file directory as a current directory of the application download service process, starting the application download service process, and the current directory being a working directory of the application download service process.
[0134] In one embodiment, when the processor executes the computer program, the following steps are also implemented: in response to a download acceleration starting operation, starting an interception function of the domain name data stream corresponding to the application to be downloaded.
[0135] In one embodiment, when the processor executes the computer program, the following steps are also implemented: authenticating the domain name data stream according to the issued certificate in the application download configuration file, and when the authentication is passed, jumping to obtaining the application to be downloaded according to the domain name data stream and the application download configuration file.
[0136] In one embodiment, when the processor executes the computer program, the following steps are also implemented: extracting an application obtaining rule from the application download configuration file, determining a target server according to the application obtaining rule and the domain name data stream, and obtaining the application to be downloaded from the target server.
[0137] In one embodiment, when the processor executes the computer program, the following steps are also implemented: matching the domain name data stream and the application obtaining rule to obtain a conditional matching result, when the conditional matching result matches a resource obtaining path, determining the target server according to the resource obtaining path, and obtaining the application to be downloaded from the target server, and when the conditional matching result does not match the resource obtaining path, determining the target server as a remote deployment server that deploys the application to be downloaded, and obtaining the application to be downloaded from the remote deployment server.
[0138] In one embodiment, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program. When the computer program is executed by a processor, the following steps are implemented:
[0139] determining an application identifier of the application to be downloaded in response to the download acceleration selection operation;
[0140] updating the local port in the application download configuration file according to the application identifier;
[0141] starting an application download service process according to the application download configuration file after the local port is updated, the application download service process being configured to monitor the local port;
[0142] redirecting the domain name data stream to the local port when the domain name data stream corresponding to the application to be downloaded is intercepted, and executing the application download service process, so that the application download service process acquires the domain name data stream by monitoring the local port and acquires the application to be downloaded according to the domain name data stream and the application download configuration file.
[0143] In one embodiment, the computer program, when executed by the processor, further implements the following steps: starting a port binding, and when the port binding is successful, taking the bound successful port as the local port in the application download configuration file.
[0144] In one embodiment, the computer program, when executed by the processor, further implements the following steps: loading the application download configuration file after the local port is updated to a cached service process main configuration file, obtaining a file directory of the service process main configuration file to which the application download configuration file after the local port is updated is loaded, setting the file directory as a current directory of the application download service process, starting the application download service process, and the current directory being a working directory of the application download service process.
[0145] In one embodiment, the computer program, when executed by the processor, further implements the following steps: in response to a download acceleration start operation, starting an interception function of the domain name data stream corresponding to the application to be downloaded.
[0146] In one embodiment, the computer program, when executed by the processor, further implements the following steps: authenticating the domain name data stream according to the issuing certificate in the application download configuration file, and when the authentication is passed, jumping to acquiring the application to be downloaded according to the domain name data stream and the application download configuration file.
[0147] In one embodiment, the computer program, when executed by the processor, further implements the following steps: extracting an application acquisition rule from the application download configuration file, determining a target server according to the application acquisition rule and the domain name data stream, and acquiring the application to be downloaded from the target server.
[0148] In one embodiment, the computer program, when executed by the processor, further implements the following steps: matching the domain name data stream and the application program acquisition rule to obtain a conditional matching result, determining the target server according to the resource acquisition path when the conditional matching result matches the resource acquisition path, and obtaining the application program to be downloaded from the target server; and determining the target server as a remote deployment server that deploys the application program to be downloaded when the conditional matching result does not match the resource acquisition path, and obtaining the application program to be downloaded from the remote deployment server.
[0149] In one embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the following steps:
[0150] In response to a download acceleration selection operation, determining an application program identifier of the application program to be downloaded;
[0151] According to the application program identifier, updating a local port in an application program download configuration file;
[0152] According to the application program download configuration file after the local port is updated, starting an application program download service process, and the application program download service process is used to monitor the local port;
[0153] When the domain name data stream corresponding to the application program to be downloaded is intercepted, the domain name data stream is redirected to the local port, and the application program download service process is executed, so that the application program download service process acquires the domain name data stream by monitoring the local port, and acquires the application program to be downloaded according to the domain name data stream and the application program download configuration file.
[0154] In one embodiment, the computer program, when executed by the processor, further implements the following steps: starting port binding, and taking the binding success port as the local port in the application program download configuration file when the port binding is successful.
[0155] In one embodiment, the computer program, when executed by the processor, further implements the following steps: loading the application program download configuration file after the local port is updated to a cached service process main configuration file, obtaining a file directory of the service process main configuration file to which the application program download configuration file after the local port is updated is loaded, setting the file directory as a current directory of the application program download service process, starting the application program download service process, and the current directory being a working directory of the application program download service process.
[0156] In one embodiment, the computer program, when executed by the processor, further implements the following steps: in response to a download acceleration start operation, starting an interception function of the domain name data stream corresponding to the application program to be downloaded.
[0157] In one embodiment, the computer program, when executed by the processor, further implements the following steps: authenticating the domain name data stream according to the application download configuration file, and when the authentication is passed, jumping to obtaining the application to be downloaded according to the domain name data stream and the application download configuration file.
[0158] In one embodiment, the computer program, when executed by the processor, further implements the following steps: extracting the application obtaining rule from the application download configuration file, and determining the target server according to the application obtaining rule and the domain name data stream, and obtaining the application to be downloaded from the target server.
[0159] In one embodiment, the computer program, when executed by the processor, further implements the following steps: matching the domain name data stream and the application obtaining rule to obtain a conditional matching result, when the conditional matching result matches the resource obtaining path, determining the target server according to the resource obtaining path, and obtaining the application to be downloaded from the target server, and when the conditional matching result does not match the resource obtaining path, determining the target server as a remote deployment server that deploys the application to be downloaded, and obtaining the application to be downloaded from the remote deployment server.
[0160] It should be noted that the data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all data authorized by the user or sufficiently authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0161] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of the methods can be included. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric memory (Ferroelectric Random Access Memory, FRAM), phase change memory (Phase Change Memory, PCM), graphene memory, etc. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.
[0162] Any combination of the technical features of the above embodiments can be made. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combination of the technical features does not exist contradictory, it should be considered as the scope of the present application.
[0163] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent of the present application. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are within the scope of protection of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A method for downloading an application, characterized in that, The method includes: In response to the download acceleration selection operation, determine the application identifier of the application to be downloaded; Start port binding based on the application identifier; When port binding is successful, the successfully bound port will be used as the local port in the application download configuration file; The application download configuration file after updating the local port is loaded into the cached service process main configuration file, and the file directory of the service process main configuration file after loading the application download configuration file after updating the local port is obtained. Set the file directory as the current directory of the application download service process, start the application download service process, the current directory is the working directory of the application download service process, and the application download service process is used to monitor the local port; When the domain name data stream corresponding to the application to be downloaded is intercepted, the domain name data stream is redirected to the local port, and the application download service process is executed, so that the application download service process obtains the domain name data stream by monitoring the local port, and obtains the application to be downloaded according to the domain name data stream and the application download configuration file.
2. The method according to claim 1, characterized in that, Before redirecting the domain name data stream to the local port when the domain name data stream corresponding to the application to be downloaded is intercepted, the method further includes: In response to the download acceleration startup operation, the function of intercepting the domain name data stream corresponding to the application to be downloaded is initiated.
3. The method according to claim 1, characterized in that, The method further includes: The domain name data stream is authenticated according to the certificate issued in the application download configuration file; When authentication is successful, the system redirects to the step of obtaining the application to be downloaded based on the domain name data stream and the application download configuration file.
4. The method according to claim 1, characterized in that, The step of obtaining the application to be downloaded based on the domain name data stream and the application download configuration file includes: Extract the application acquisition rules from the application download configuration file; Based on the application acquisition rules and the domain name data stream, the target server is determined, and the application to be downloaded is obtained from the target server.
5. The method according to claim 4, characterized in that, The step of determining the target server based on the application acquisition rules and the domain name data stream, and obtaining the application to be downloaded from the target server, includes: The domain name data stream and the application acquisition rules are matched to obtain the conditional matching result; When the condition matching result matches a resource acquisition path, the target server is determined according to the resource acquisition path, and the application to be downloaded is obtained from the target server. When the condition matching result does not match the resource acquisition path, the target server is determined to be the remote deployment server that deploys the application to be downloaded, and the application to be downloaded is obtained from the remote deployment server.
6. An application downloading device, characterized in that, The device includes: The response module is used to respond to the download acceleration selection operation and determine the application identifier of the application to be downloaded; The update module is used to initiate port binding based on the application identifier. When the port binding is successful, the successfully bound port is used as the local port in the application download configuration file. The configuration module is used to load the application download configuration file after updating the local port into the cached main configuration file of the service process, obtain the file directory of the main configuration file of the service process after loading the application download configuration file after updating the local port, set the file directory as the current directory of the application download service process, and start the application download service process. The current directory is the working directory of the application download service process. The application download service process is used to monitor the local port. The processing module is used to redirect the domain name data stream corresponding to the application to be downloaded to the local port when the domain name data stream corresponding to the application to be downloaded is intercepted, and execute the application download service process, so that the application download service process can obtain the domain name data stream by monitoring the local port, and obtain the application to be downloaded according to the domain name data stream and the application download configuration file.
7. The apparatus according to claim 6, characterized in that, The device also includes an interception module, which is used to respond to the download acceleration startup operation and start the interception function of the domain name data stream corresponding to the application to be downloaded.
8. The apparatus according to claim 6, characterized in that, The device further includes an authentication module, which is used to authenticate the domain name data stream according to the certificate issued in the application download configuration file. When the authentication is successful, the device jumps to the step of obtaining the application to be downloaded based on the domain name data stream and the application download configuration file.
9. The apparatus according to claim 6, characterized in that, The processing module is further configured to extract application acquisition rules from the application download configuration file, determine the target server based on the application acquisition rules and the domain name data stream, and obtain the application to be downloaded from the target server.
10. The apparatus according to claim 9, characterized in that, The processing module is also used to match the domain name data stream and the application acquisition rules to obtain a conditional matching result. When the conditional matching result matches a resource acquisition path, the target server is determined according to the resource acquisition path, and the application to be downloaded is obtained from the target server. When the conditional matching result does not match a resource acquisition path, the target server is determined to be a remote deployment server that deploys the application to be downloaded, and the application to be downloaded is obtained from the remote deployment server.
11. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.
12. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.
13. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Method and device for updating programs
CN103034512A
Data downloading method and apparatus
CN107135249A