A method, device, equipment and medium for deploying static resources in a content distribution network

By deploying static resources to the content distribution network (CDN) during peak traffic, the problem of excessive server bandwidth occupied by static resources is solved, and efficient distribution and deployment of static resources is achieved, which significantly reduces server load.

CN115955510BActive Publication Date: 2025-05-16ZHEJIANG AISINO CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211607025.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-14
Publication Date
2025-05-16
Estimated Expiration
2042-12-14

AI Technical Summary

Technical Problem

In the prior art, the server bandwidth occupies too much under peak traffic of static resources, resulting in the server being unable to withstand the pressure of large bandwidth when high traffic is high.

Method used

Through the static resource deployment method of the Content Distribution Network (CDN), the content distribution network cloud server is determined, the configuration file is generated according to business needs, the configuration file is imported into the application source code, the script command is added to determine the resource deployment path, the target configuration file is packaged, and the static resources are sent to the CDN cloud server.

Benefits of technology

It effectively reduces the server bandwidth pressure, reduces the server's load during peak traffic, and realizes efficient distribution and deployment of static resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115955510B_ABST
    Figure CN115955510B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, equipment and medium for deploying static resources in a content distribution network, which relates to the field of software development, including: determining a content distribution network cloud server; generating a configuration file according to business needs, and importing the configuration file into a preset application source code; adding script commands to the configuration file in the application source code to obtain a target configuration file, and determining a resource deployment path based on the target configuration file; packaging the target configuration file to obtain static resources to be deployed, and sending the static resources to the content distribution network cloud server according to the resource deployment path. The above technical solution of the present application can solve the problem of excessive server bandwidth occupied by static resources during peak traffic.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of software development, and in particular to a method, device, equipment and medium for deploying static resources in a content distribution network. Background Art

[0002] In recent years, the webpack (packaging tool) packaging method based on single-page web (World Wide Web) applications has become very mature. The existing static resource deployment method is to directly deploy the packaged static resources in full on the server. When the project size is still too large after packaging and optimization, the static resource package content volume is too large. Once the user traffic peak period is encountered, the server cannot withstand the large bandwidth pressure.

[0003] As can be seen from the above, how to solve the problem that static resources occupy too much server bandwidth during peak traffic is a problem to be solved in this field. Summary of the invention

[0004] In view of this, the purpose of the present invention is to provide a method, device, equipment and medium for deploying static resources in a content distribution network, which can solve the problem that static resources occupy too much server bandwidth during peak traffic. The specific scheme is as follows:

[0005] In a first aspect, the present application discloses a method for deploying static resources in a content distribution network, comprising:

[0006] Determine a content distribution network cloud server;

[0007] Generate a configuration file according to business needs, and import the configuration file into the preset application source code;

[0008] Adding a script command to the configuration file in the application source code to obtain a target configuration file, and determining a resource deployment path based on the target configuration file;

[0009] The target configuration file is packaged to obtain static resources to be deployed, and the static resources are sent to the content distribution network cloud server according to the resource deployment path.

[0010] Optionally, generating a configuration file according to business requirements includes:

[0011] According to business requirements, a preset third-party cloud service content distribution network scaffold is configured to obtain a first configuration file, and a single-page application entry package is configured to obtain a second configuration file;

[0012] The configuration file is generated according to the first configuration file and the second configuration file.

[0013] Optionally, adding a script command to the configuration file in the application source code to obtain a target configuration file, and determining a resource deployment path based on the target configuration file includes:

[0014] Obtaining a preset script command, and adding a script command to the configuration file in the application source code to obtain a target configuration file;

[0015] The first configuration file in the target configuration file is parsed to obtain a resource deployment path.

[0016] Optionally, after determining the resource deployment path based on the target configuration file, the method further includes:

[0017] Performing a reading operation on the second configuration file in the target configuration file to obtain entry update configuration information;

[0018] The second configuration file is updated based on the entry update configuration information to obtain an updated second configuration file.

[0019] Optionally, sending the static resource to the content distribution network cloud server according to the resource deployment path includes:

[0020] Determine a directory name based on the first configuration file;

[0021] The static resources are sent and saved to the content distribution network cloud server according to the resource deployment path and the directory name.

[0022] Optionally, packaging the target configuration file to obtain static resources to be deployed includes:

[0023] Get the file packaging command;

[0024] The target configuration file is packaged by executing the file packaging command to obtain static resources to be deployed.

[0025] Optionally, sending the static resource to the content distribution network cloud server according to the resource deployment path includes:

[0026] Generate static resource sending preview information based on the static resource and the resource deployment path, and send the static resource sending preview information to the client;

[0027] If the client sends consent information indicating consent to preview the information, the static resource is sent to the content distribution network cloud server according to the resource deployment path.

[0028] In a second aspect, the present application discloses a content distribution network static resource deployment device, comprising:

[0029] A cloud server determination module, used to determine a content distribution network cloud server;

[0030] A configuration file import module is used to generate a configuration file according to business requirements and import the configuration file into a preset application source code;

[0031] A resource deployment path determination module, used to add a script command to the configuration file in the application source code to obtain a target configuration file, and determine a resource deployment path based on the target configuration file;

[0032] The static resource sending module is used to package the target configuration file to obtain the static resources to be deployed, and send the static resources to the content distribution network cloud server according to the resource deployment path.

[0033] In a third aspect, the present application discloses an electronic device, comprising:

[0034] Memory, used to store computer programs;

[0035] The processor is used to execute the computer program to implement the aforementioned content distribution network static resource deployment method.

[0036] In a fourth aspect, the present application discloses a computer storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the steps of the aforementioned content distribution network static resource deployment method are implemented.

[0037] It can be seen that the present application provides a method for deploying static resources in a content distribution network, including determining a content distribution network cloud server; generating a configuration file according to business needs, and importing the configuration file into a preset application source code; adding a script command to the configuration file in the application source code to obtain a target configuration file, and determining a resource deployment path based on the target configuration file; packaging the target configuration file to obtain static resources to be deployed, and sending the static resources to the content distribution network cloud server according to the resource deployment path. The present application retains the single-page application entry file on the server, deploys other static resources to the content distribution network cloud server, connects to the third-party cloud service content distribution network scaffolding, and provides command-based and fast operation-related functional modules for static resource content distribution network deployment. Update the single-page application webpack entry packaging configuration, insert the absolute address of the content distribution network deployment into it, and provide a packaging basis for the static resource content distribution network deployment. The two are cleverly combined based on the Nodejs environment, and one-click script commands such as packaging and deployment are generated through the configuration file to achieve one-click and incremental deployment of static resources, and integrate necessary modules such as resource ignoring and refreshing. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0039] Figure 1 A flow chart of a method for deploying static resources in a content distribution network disclosed in this application;

[0040] Figure 2 A specific flow chart of a method for deploying static resources in a content distribution network disclosed in this application;

[0041] Figure 3 A flow chart of a method for deploying static resources in a content distribution network disclosed in this application;

[0042] Figure 4 A specific flow chart of a method for deploying static resources in a content distribution network disclosed in this application;

[0043] Figure 5 This is a schematic diagram of the structure of a static resource deployment device for a content distribution network disclosed in this application;

[0044] Figure 6 A structural diagram of an electronic device provided for this application. DETAILED DESCRIPTION

[0045] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0046] In recent years, the webpack (packaging tool) packaging method based on single-page web (World Wide Web) applications has become very mature. The existing static resource deployment method is to directly deploy the packaged static resources in full on the server. When the project is still too large after packaging and optimization, the static resource package content volume is too large. Once the user traffic peak period occurs, the server cannot withstand the large bandwidth pressure. As can be seen from the above, how to solve the problem of excessive server bandwidth occupied by static resources during peak traffic is a problem to be solved in this field.

[0047] See also Figure 1 As shown, the embodiment of the present invention discloses a method for deploying static resources in a content distribution network, which may specifically include:

[0048] Step S11: Determine a content distribution network cloud server.

[0049] Step S12: Generate a configuration file according to business requirements, and import the configuration file into a preset application source code.

[0050] In this embodiment, after determining the content distribution network cloud server, the preset third-party cloud service content distribution network scaffolding is configured according to business needs to obtain a first configuration file, and the single-page application entry package is configured to obtain a second configuration file; the configuration file is generated according to the first configuration file and the second configuration file.

[0051] Step S13: adding a script command to the configuration file in the application source code to obtain a target configuration file, and determining a resource deployment path based on the target configuration file.

[0052] In this embodiment, a preset script command is obtained, and a script command is added to the configuration file in the application source code to obtain a target configuration file; and the first configuration file in the target configuration file is parsed to obtain a resource deployment path.

[0053] In this embodiment, after obtaining the resource deployment path, the second configuration file in the target configuration file is read to obtain entry update configuration information; and the second configuration file is updated based on the entry update configuration information to obtain an updated second configuration file.

[0054] Step S14: Packaging the target configuration file to obtain static resources to be deployed, and sending the static resources to the content distribution network cloud server according to the resource deployment path.

[0055] The core process of this application is as follows Figure 2 As shown, first the configuration file is specifically: scaffolding related configuration file (i.e. the first configuration file), then the webpack packaging configuration entry configuration is updated (i.e. the second configuration file), a configuration file is generated according to the first configuration file and the second configuration file, and then the configuration file is imported into the web application source code (i.e. the preset application source code), and then a script command (i.e. deploy-cdn) is added to the configuration file in the application source code to obtain the target configuration file, and the resource deployment path (i.e. @tllo-dp) is determined based on the target configuration file, and the target configuration file is packaged to obtain the static resources to be deployed, and the entry file is saved to the server, and the static resources (other static resources except the entry file) are sent to the content distribution network cloud server according to the resource deployment path. This application uploads the latest package to the cloud server, and all static resources except the entry file are uniformly uploaded to the cloud server. If necessary, a resource refresh operation can be performed to prevent the cloud server from caching.

[0056] In this embodiment, a content distribution network cloud server is determined; a configuration file is generated according to business needs, and the configuration file is imported into the preset application source code; a script command is added to the configuration file in the application source code to obtain a target configuration file, and a resource deployment path is determined based on the target configuration file; the target configuration file is packaged to obtain static resources to be deployed, and the static resources are sent to the content distribution network cloud server according to the resource deployment path. This application retains the single-page application entry file on the server, and deploys other static resources to the content distribution network cloud server, connects to the third-party cloud service content distribution network scaffolding, and provides command-based and fast operation-related functional modules for static resource content distribution network deployment. Update the single-page application webpack entry packaging configuration, insert the absolute address of the content distribution network deployment into it, and provide a packaging basis for the static resource content distribution network deployment. The two are cleverly combined based on the Nodejs environment, and one-click script commands such as packaging and deployment are generated through the configuration file to achieve one-click and incremental deployment of static resources, and integrate necessary modules such as resource ignoring and refreshing.

[0057] See also Figure 3 As shown, the embodiment of the present invention discloses a method for deploying static resources in a content distribution network, which may specifically include:

[0058] Step S21: Determine a content distribution network cloud server.

[0059] Step S22: Generate a configuration file according to business requirements, and import the configuration file into a preset application source code.

[0060] Step S23: adding a script command to the configuration file in the application source code to obtain a target configuration file, and determining a resource deployment path based on the target configuration file.

[0061] Step S24: Obtain a file packaging command, package the target configuration file by executing the file packaging command to obtain the static resources to be deployed, and then generate static resource sending preview information based on the static resources and the resource deployment path, and send the static resource sending preview information to the client. If the client sends consent information indicating consent to the preview information, the static resource is sent to the content distribution network cloud server according to the resource deployment path.

[0062] In this embodiment, the overall process of this application is as follows Figure 4As shown, first, according to business needs, the preset third-party cloud service content distribution network scaffold is configured to obtain a first configuration file (i.e., a.config.js), the single-page application entry packaging is configured to obtain a second configuration file (i.e., b.config.js), the configuration file is generated according to the first configuration file and the second configuration file, the configuration file is imported into the preset application source code, and then a preset script command (i.e., deploy-cdn) is obtained, a script command is added to the configuration file in the application source code to obtain a target configuration file, the first configuration file in the target configuration file is parsed to obtain a resource deployment path, and then a read operation is performed on the second configuration file in the target configuration file to obtain entry update configuration information, the second configuration file is updated based on the entry update configuration information to obtain an updated second configuration file, and then a file packaging command (i.e., webpack) is obtained. build), the target configuration file is packaged by executing the file packaging command to obtain the static resources to be deployed, the directory name (i.e., dis / bulid directory) is determined based on the first configuration file, the static resources are sent and saved to the content distribution network cloud server according to the resource deployment path and the directory name, static resource sending preview information is generated based on the static resources and the resource deployment path, and the static resource sending preview information is sent to the client, if the client sends consent information for indicating consent to the preview information, the static resources are sent to the content distribution network cloud server according to the resource deployment path, if the client wants to perform related operations such as refresh or open log, then the information for indicating the execution of related operations such as refresh or open log is sent to the content distribution network cloud server, the present application adds a deployment script in the package.json file, effectively combines the above steps, and finally the project achieves the effect of CDN static resource deployment through a one-key command, that is, the script commands and webpackbuild packaging commands in the present application are stored in the package.json file.

[0063] After the present invention is applied in the project, the applicable server bandwidth drops from about 500M to about 50M during the user peak period, and the peak value is reduced by nearly 90%, which significantly reduces the server bandwidth pressure. The present application makes the functional modules of the cloud server imperative, which is quick to use, and deploys static resources in a one-click imperative manner, and integrates functional modules such as resource refresh, increment, environment differentiation, and CDN cloud server room configuration. Compared with traditional deployment solutions, only some configuration files need to be added and updated to achieve the purpose of CDN static resource deployment, and at the same time it is compatible with the old static resource deployment, and only a new packaging command script needs to be added.

[0064] In this embodiment, a content distribution network cloud server is determined; a configuration file is generated according to business needs, and the configuration file is imported into the preset application source code; a script command is added to the configuration file in the application source code to obtain a target configuration file, and a resource deployment path is determined based on the target configuration file; the target configuration file is packaged to obtain static resources to be deployed, and the static resources are sent to the content distribution network cloud server according to the resource deployment path. This application retains the single-page application entry file on the server, and deploys other static resources to the content distribution network cloud server, connects to the third-party cloud service content distribution network scaffolding, and provides command-based and fast operation-related functional modules for static resource content distribution network deployment. Update the single-page application webpack entry packaging configuration, insert the absolute address of the content distribution network deployment into it, and provide a packaging basis for the static resource content distribution network deployment. The two are cleverly combined based on the Nodejs environment, and one-click script commands such as packaging and deployment are generated through the configuration file to achieve one-click and incremental deployment of static resources, and integrate necessary modules such as resource ignoring and refreshing.

[0065] See also Figure 5 As shown, the embodiment of the present invention discloses a static resource deployment device for a content distribution network, which may specifically include:

[0066] A cloud server determination module 11, used to determine a content distribution network cloud server;

[0067] The configuration file importing module 12 is used to generate a configuration file according to business requirements and import the configuration file into a preset application source code;

[0068] A resource deployment path determination module 13, configured to add a script command to the configuration file in the application source code to obtain a target configuration file, and determine a resource deployment path based on the target configuration file;

[0069] The static resource sending module 14 is used to package the target configuration file to obtain the static resources to be deployed, and send the static resources to the content distribution network cloud server according to the resource deployment path.

[0070] In this embodiment, a content distribution network cloud server is determined; a configuration file is generated according to business needs, and the configuration file is imported into the preset application source code; a script command is added to the configuration file in the application source code to obtain a target configuration file, and a resource deployment path is determined based on the target configuration file; the target configuration file is packaged to obtain static resources to be deployed, and the static resources are sent to the content distribution network cloud server according to the resource deployment path. This application retains the single-page application entry file on the server, and deploys other static resources to the content distribution network cloud server, connects to the third-party cloud service content distribution network scaffolding, and provides command-based and fast operation-related functional modules for static resource content distribution network deployment. Update the single-page application webpack entry packaging configuration, insert the absolute address of the content distribution network deployment into it, and provide a packaging basis for the static resource content distribution network deployment. The two are cleverly combined based on the Nodejs environment, and one-click script commands such as packaging and deployment are generated through the configuration file to achieve one-click and incremental deployment of static resources, and integrate necessary modules such as resource ignoring and refreshing.

[0071] In some specific embodiments, the configuration file importing module 12 may specifically include:

[0072] A first configuration file determination module is used to configure a preset third-party cloud service content distribution network scaffold according to business requirements to obtain a first configuration file, and configure a single-page application entry package to obtain a second configuration file;

[0073] A configuration file determining module is used to generate the configuration file according to the first configuration file and the second configuration file.

[0074] In some specific embodiments, the resource deployment path determination module 13 may specifically include:

[0075] A target configuration file determination module, used to obtain a preset script command and add a script command to the configuration file in the application source code to obtain a target configuration file;

[0076] The resource deployment path determination module is used to parse the first configuration file in the target configuration file to obtain a resource deployment path.

[0077] In some specific embodiments, the resource deployment path determination module 13 may specifically include:

[0078] An entry update configuration information determination module, configured to read the second configuration file in the target configuration file to obtain entry update configuration information;

[0079] The second configuration file updating module is used to update the second configuration file based on the entry update configuration information to obtain an updated second configuration file.

[0080] In some specific embodiments, the static resource sending module 14 may specifically include:

[0081] A directory name determination module, used to determine a directory name based on the first configuration file;

[0082] The static resource sending module is used to send and save the static resource to the content distribution network cloud server according to the resource deployment path and the directory name.

[0083] In some specific embodiments, the static resource sending module 14 may specifically include:

[0084] A file packaging command acquisition module, used to obtain file packaging commands;

[0085] The static resource determination module is used to package the target configuration file by executing the file packaging command to obtain the static resources to be deployed.

[0086] In some specific embodiments, the static resource sending module 14 may specifically include:

[0087] A preview information sending module, used to generate static resource sending preview information based on the static resource and the resource deployment path, and send the static resource sending preview information to the client;

[0088] The static resource sending module is used to send the static resource to the content distribution network cloud server according to the resource deployment path if the client sends consent information representing consent to preview information.

[0089] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the content distribution network static resource deployment method performed by the electronic device disclosed in any of the aforementioned embodiments.

[0090] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.

[0091] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon include an operating system 221, a computer program 222 and data 223, etc. The storage method can be temporary storage or permanent storage.

[0092] Among them, the operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, so as to realize the operation and processing of the data 223 in the memory 22 by the processor 21, which can be Windows, Unix, Linux, etc. In addition to including a computer program that can be used to complete the content distribution network static resource deployment method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks. In addition to including data transmitted from an external device received by the content distribution network static resource deployment device, the data 223 can also include data collected by its own input and output interface 25, etc.

[0093] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0094] Furthermore, an embodiment of the present application also discloses a computer-readable storage medium, in which a computer program is stored. When the computer program is loaded and executed by a processor, the steps of the content distribution network static resource deployment method disclosed in any of the aforementioned embodiments are implemented.

[0095] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0096] The above is a detailed introduction to a content distribution network static resource deployment method, device, equipment and storage medium provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A method for deploying static resources in a content distribution network, characterized in that: include: Determine a content distribution network cloud server; Generate a configuration file according to business needs, and import the configuration file into the preset application source code; Adding a script command to the configuration file in the application source code to obtain a target configuration file, and determining a resource deployment path based on the target configuration file; Packaging the target configuration file to obtain static resources to be deployed, and sending the static resources to the content distribution network cloud server according to the resource deployment path; The generating of the configuration file according to the business requirements includes: configuring a preset third-party cloud service content distribution network scaffold according to the business requirements to obtain a first configuration file, configuring the single-page application entry package to obtain a second configuration file; generating the configuration file according to the first configuration file and the second configuration file; The sending of the static resource to the content distribution network cloud server according to the resource deployment path includes: generating static resource sending preview information based on the static resource and the resource deployment path, and sending the static resource sending preview information to the client; if the client sends consent information representing consent to the preview information, sending the static resource to the content distribution network cloud server according to the resource deployment path.

2. The method for deploying static resources in a content distribution network according to claim 1, characterized in that: The adding a script command to the configuration file in the application source code to obtain a target configuration file, and determining a resource deployment path based on the target configuration file includes: Obtaining a preset script command, and adding a script command to the configuration file in the application source code to obtain a target configuration file; The first configuration file in the target configuration file is parsed to obtain a resource deployment path.

3. The method for deploying static resources in a content distribution network according to claim 1, characterized in that: After determining the resource deployment path based on the target configuration file, the method further includes: Performing a reading operation on the second configuration file in the target configuration file to obtain entry update configuration information; The second configuration file is updated based on the entry update configuration information to obtain an updated second configuration file.

4. The method for deploying static resources in a content distribution network according to claim 2, characterized in that: The sending the static resource to the content distribution network cloud server according to the resource deployment path includes: Determine a directory name based on the first configuration file; The static resources are sent and saved to the content distribution network cloud server according to the resource deployment path and the directory name.

5. The method for deploying static resources in a content distribution network according to any one of claims 1 to 4, characterized in that: The step of packaging the target configuration file to obtain static resources to be deployed includes: Get the file packaging command; The target configuration file is packaged by executing the file packaging command to obtain static resources to be deployed.

6. A static resource deployment device for a content distribution network, characterized in that: include: A cloud server determination module, used to determine a content distribution network cloud server; A configuration file import module is used to generate a configuration file according to business requirements and import the configuration file into a preset application source code; A resource deployment path determination module, used to add a script command to the configuration file in the application source code to obtain a target configuration file, and determine a resource deployment path based on the target configuration file; A static resource sending module, used for packaging the target configuration file to obtain static resources to be deployed, and sending the static resources to the content distribution network cloud server according to the resource deployment path; The generating of the configuration file according to the business requirements includes: configuring a preset third-party cloud service content distribution network scaffold according to the business requirements to obtain a first configuration file, configuring the single-page application entry package to obtain a second configuration file; generating the configuration file according to the first configuration file and the second configuration file; The sending of the static resource to the content distribution network cloud server according to the resource deployment path includes: generating static resource sending preview information based on the static resource and the resource deployment path, and sending the static resource sending preview information to the client; if the client sends consent information representing consent to the preview information, sending the static resource to the content distribution network cloud server according to the resource deployment path.

7. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the content distribution network static resource deployment method as claimed in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that: Used to store a computer program; wherein, when the computer program is executed by a processor, the content distribution network static resource deployment method as described in any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Front-end web page loading method based on webpack, storage medium

    CN109284472A

  • File uploading method and device and storage medium

    CN111782730A