Application publishing method and device, equipment and storage medium

By using object storage services in the web application development process, the upload and storage of deployment files is automatically processed, and the complex operation and maintenance problems under traditional deployment methods are solved, achieving an efficient and reliable application release process.

CN119759371AActive Publication Date: 2025-04-04创优数字科技(广东)有限公司
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411969497.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-04
Estimated Expiration
2044-12-30

AI Technical Summary

Technical Problem

In the traditional web application development process, the built files are deployed on the server, and the server needs to configure the network and backup themselves, resulting in complex operation and maintenance work, prone to errors, affecting the normal release of the application.

Method used

By determining the deployment files of the target application, creating a client instance corresponding to the object storage service, configuring it to call the object storage service, clean up the file, store the deployment files in an array, and uploading them to the object storage service according to the determined upload path to complete the application release.

Benefits of technology

This avoids complex operation and maintenance problems caused by deployment on the server, saves resources, improves the utilization rate of storage space, ensures the integrity of the deployment files, improves the upload efficiency, and ensures the smooth release of applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119759371A_ABST
    Figure CN119759371A_ABST
Patent Text Reader

Abstract

The invention discloses an application publishing method and device, equipment and a storage medium. The method comprises the steps of determining deployment files of a target application; creating a client instance corresponding to the object storage service, and configuring the client instance to call the object storage service; performing file cleaning on the object storage service by utilizing the configured client instance; storing each deployment file in a pre-established array to obtain an array file; determining an uploading path; and uploading the array file to the object storage service after file cleaning according to the uploading path so as to complete release of the target application. The problem of complex operation and maintenance work caused by deployment on the server can be avoided, resources are saved, the utilization rate of the storage space is improved, all deployment files are stored in the array firstly and then uploaded to the object storage service, the integrity of the deployment files is ensured, the uploading path is determined before uploading, and the operation and maintenance efficiency is improved. And the correctness of the uploading destination is ensured, so that the target application can be smoothly published.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of application publishing, and in particular to an application publishing method, apparatus, device and storage medium. Background Art

[0002] With the continuous development of Web applications, the front-end development process is also evolving. The traditional Web application development process includes steps such as writing code, local debugging, building, and deploying to the server. The building process is the process of converting the front-end code into a browser executable file. After the build is completed, the generated folder contains all the built files, such as JavaScript files, CSS files, and HTML files. Usually, these built files will be deployed on the server so that they can be accessed by users.

[0003] However, deploying the built files on the server requires the server to configure network, backup and other aspects. The operation and maintenance work is complicated and prone to errors, which affects the normal release of the application. Summary of the invention

[0004] In view of this, the present application provides an application publishing method, apparatus, device and storage medium, which are used to solve the problem that when the constructed files are deployed on the server, the server itself needs to configure network, backup and other contents, the operation and maintenance work is complicated and prone to errors, which affects the normal release of the application.

[0005] To achieve the above objectives, the proposed solution is as follows:

[0006] In a first aspect, a method for publishing an application includes:

[0007] Determine the various deployment files of the target application;

[0008] Create a client instance corresponding to the object storage service, and configure the client instance to call the object storage service;

[0009] Using the configured client instance to clean up files on the object storage service;

[0010] Storing each of the deployment files in a pre-established array to obtain an array file;

[0011] Determine the upload path;

[0012] The array file is uploaded to the object storage service after the file is cleaned according to the upload path to complete the release of the target application.

[0013] Preferably, the using the configured client instance to clean up files on the object storage service includes:

[0014] Determine the environment variables corresponding to the configured client instance;

[0015] Determine the directory names of all file directories in the object storage service;

[0016] Determine whether there is a file directory whose directory name contains the environment variable;

[0017] If yes, then mark the file directory whose directory name contains the environment variable;

[0018] Clean up the marked file directories.

[0019] Preferably, the cleaning of the marked file directory includes:

[0020] Delete all files in the marked file directory;

[0021] Determine whether the marked file directory contains subdirectories;

[0022] If yes, then delete all files under the subdirectory and delete the subdirectory;

[0023] Delete the marked file directory;

[0024] Return to the step of determining whether there is a file directory whose directory name includes the environment variable until there is no file directory whose directory name includes the environment variable in the object storage service.

[0025] Preferably, determining the upload path includes:

[0026] Determine the output directory of the array file, and obtain the absolute path of the output directory;

[0027] Configure the path variable according to the absolute path;

[0028] Extracting the network address of the storage bucket from the configured client instance;

[0029] Determine the file name of the array file according to the path variable;

[0030] The network address and the file name are concatenated to obtain an upload path.

[0031] Preferably, the determination of each deployment file of the target application includes:

[0032] Registering a predefined upload plug-in into the resource packaging process of the target application;

[0033] Monitor the life cycle hooks corresponding to the target application in real time;

[0034] If it is monitored that the end hook in the lifecycle hook is triggered, then the various files constructed by the static module packaging tool in the resource packaging process are obtained as various deployment files.

[0035] Preferably, configuring the client instance includes:

[0036] Determine the access key ID and access key ciphertext of the object storage service;

[0037] Determine a target region in the object storage service based on the access key ID and the access key ciphertext;

[0038] Get the bucket name of the storage bucket in the target area;

[0039] The client instance is configured using the access key ID, access key ciphertext, target region, and bucket name.

[0040] Preferably, it also includes:

[0041] Obtain output configuration information of the array file;

[0042] Determine the configuration address in the output configuration information;

[0043] Extracting the network address of the storage bucket from the configured client instance;

[0044] Replacing the configuration address in the output configuration information with the network address of the storage bucket to obtain updated output configuration information;

[0045] In response to a request instruction initiated by a user to access resources of the target application, the updated configuration information is sent to a user client, so that the user can access resources of the array file based on the updated configuration information.

[0046] In a second aspect, an application publishing device includes:

[0047] A deployment file determination module, used to determine each deployment file of the target application;

[0048] A calling module, used to create a client instance corresponding to the object storage service and configure the client instance to call the object storage service;

[0049] A file cleaning module, used to clean up files on the object storage service using the configured client instance;

[0050] An array file obtaining module, used for storing each of the deployment files in a pre-established array to obtain an array file;

[0051] An upload path determination module, used to determine the upload path;

[0052] The array file uploading module is used to upload the array file to the object storage service after the file is cleaned according to the upload path to complete the release of the target application.

[0053] In a third aspect, an application publishing device includes a memory and a processor;

[0054] The memory is used to store programs;

[0055] The processor is used to execute the program to implement each step of the application publishing method as described in any one of the first aspects.

[0056] In a fourth aspect, a storage medium stores a computer program thereon, and when the computer program is executed by a processor, the steps of the application publishing method as described in any one of the first aspects are implemented.

[0057] It can be seen from the above technical scheme that the present application determines the various deployment files of the target application; creates a client instance corresponding to the object storage service, and configures the client instance to call the object storage service; uses the configured client instance to clean up the file of the object storage service; stores each of the deployment files in a pre-established array to obtain an array file; determines the upload path; and uploads the array file to the object storage service after file cleaning according to the upload path to complete the release of the target application. The present application first determines the various deployment files of the target application, and calls the object storage service to realize file upload and deployment. It is necessary to create a client instance corresponding to the object storage service and configure it to realize the call, which can avoid the problem of complex operation and maintenance work caused by deployment on the server. Then, file cleaning can save resources and improve the utilization of storage space. Since the number of deployment files is uncertain, each deployment file is first stored in an array and then uploaded to the object storage service to ensure the integrity of the deployment file and improve the upload efficiency. Before uploading, it is also necessary to determine the upload path to ensure the correctness of the upload destination so that the target application can be released smoothly. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] 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.

[0059] Figure 1 An optional flow chart of an application publishing method provided in an embodiment of the present application;

[0060] Figure 2 A schematic diagram of the structure of an application publishing device provided in an embodiment of the present application;

[0061] Figure 3 A schematic diagram of the structure of an application publishing device provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0063] With the continuous development of Web applications, the front-end development process is also evolving. The traditional Web application development process includes steps such as writing code, local debugging, building, and deploying to the server. The building process is the process of converting the front-end code into a browser executable file. After the build is completed, the generated folder contains all the built files, such as JavaScript files, CSS files, and HTML files. Usually, these built files will be deployed on the server so that they can be accessed by users.

[0064] However, deploying the built files on the server requires the server to configure network, backup and other aspects. The operation and maintenance work is complicated and prone to errors, which affects the normal release of the application.

[0065] In addition, the performance of the server is limited. When the application to be released is large or the traffic is large, the server is likely to be unable to meet the release requirements, resulting in slow access speed after the application is released or even unavailable service. The deployment file size after the build is completed is usually large and will be stored on the server for a long time, taking up a lot of disk space.

[0066] In order to solve the above problems of the prior art, an embodiment of the present invention provides an application publishing method, which can be used in many general or special computing device environments or configurations, such as personal computers, server computers, handheld devices or portable devices, tablet devices, multi-processor devices, and distributed computing environments including any of the above devices or equipment.

[0067] The method can also be applied to various computer terminals or intelligent terminals, and its execution subject can be a processor or server of the computer terminal or intelligent terminal. The method flow chart of the method is as follows: Figure 1 As shown, specifically including:

[0068] S1: Determine the deployment files of the target application.

[0069] The target application in this application refers to the application that you want to publish, that is, the application that you want to deploy, such as a newly built Web application.

[0070] The application you want to release will be built with multiple deployment files in advance. Deployment files refer to a collection of files that are generated by converting, combining, and optimizing source code and resource files in the development phase through a series of build tools and processes. They are used for deployment in a production environment or a test environment. These files are the key parts for the target application to run normally in the corresponding environment.

[0071] Deployment files include various types, such as JavaScript files, CSS files, HTML files, gesture resource files, etc. Deploying these deployment files is a key step in application release, so this application first needs to determine each deployment file.

[0072] S2: Create a client instance corresponding to the object storage service, and configure the client instance to call the object storage service.

[0073] Object Storage Service (OSS) is a cloud storage service used to store and manage large amounts of unstructured data, such as pictures, videos, documents, and other types of files. Users can store various data in the form of objects in this warehouse and access and manage them through the network, thereby implementing application deployment and release.

[0074] This application abandons the method of using a server to deploy applications in the prior art, calls the object storage service, and uploads the deployment files to the object storage service, thereby providing a high-availability, high-reliability, and high-functionality storage service, which can improve the access speed after the application is released, reduce operation and maintenance configuration, and improve the clarity of the development process.

[0075] To call the object storage service, you first need to create a client instance corresponding to the object storage service, which is equivalent to establishing a channel or bridge with the object storage service so that you can upload deployment files, and then configure the created client instance to clarify the location and purpose of the channel.

[0076] S3: Use the configured client instance to clean up files on the object storage service.

[0077] In order to avoid resource waste and improve storage space utilization, before actually using the object storage service, clean up files / resources to release its internal space. Specifically, delete the deployment files previously uploaded to the object storage service. This process can be achieved through pre-defined plug-ins. Specifically:

[0078] Customize a WebpackCleanOssPlugin class and define a Webpack plug-in accordingly. It can accept an options object as a constructor parameter, which can provide possibilities for future expansion.

[0079] Since the configured client instance has a clear channel destination and purpose, it is also clear which part of the object storage service is cleaned up. Therefore, in this step, the configured client instance is used to locate the location that needs to be cleaned up, and then the file is cleaned up through the Webpack plug-in.

[0080] S4: storing each of the deployment files in a pre-established array to obtain an array file.

[0081] Since each deployment file has different types and contents, if the deployment file is directly uploaded and deployed, there will be problems of low efficiency and low upload success rate. Therefore, this application pre-establishes an array, such as a files array, stores each deployment file in the array, and then uploads the array file.

[0082] This allows for better control of the deployment order of each deployment file, fixes the deployment order in the array, allows the upload process to proceed in an orderly manner, and avoids application failures caused by incorrect upload order of deployment files.

[0083] In addition, storing deployment files in an array can facilitate centralized management and version tracking, and can also ensure the consistency of the status of each deployment file, thereby ensuring the successful release of the target application.

[0084] S5: Determine the upload path.

[0085] Determining a clear upload path can better ensure the security of files. Different security policies can be set for different upload paths, such as firewall rules, encryption levels, etc.; it can also make it easier for object storage services to locate and use files.

[0086] S6: uploading the array file to the object storage service after file cleaning according to the upload path to complete the release of the target application.

[0087] During this process, you can perform a verification operation, such as whether the array file is complete, whether there are any abnormalities, and whether the object storage service has been cleaned up. Setting such a verification operation in advance can ensure the smooth upload of the array file.

[0088] After the upload is complete, you can also check whether all array files have been uploaded and whether they have been uploaded to the set location / folder.

[0089] It can be seen from the above technical scheme that the present application determines the various deployment files of the target application; creates a client instance corresponding to the object storage service, and configures the client instance to call the object storage service; uses the configured client instance to clean up the file of the object storage service; stores each of the deployment files in a pre-established array to obtain an array file; determines the upload path; and uploads the array file to the object storage service after file cleaning according to the upload path to complete the release of the target application. The present application first determines the various deployment files of the target application, and calls the object storage service to realize file upload and deployment. It is necessary to create a client instance corresponding to the object storage service and configure it to realize the call, which can avoid the problem of complex operation and maintenance work caused by deployment on the server. Then, file cleaning can save resources and improve the utilization of storage space. Since the number of deployment files is uncertain, each deployment file is first stored in an array and then uploaded to the object storage service to ensure the integrity of the deployment file and improve the upload efficiency. Before uploading, it is also necessary to determine the upload path to ensure the correctness of the upload destination so that the target application can be released smoothly.

[0090] The process of determining each deployment file of the target application in this application includes the following steps:

[0091] Registering a predefined upload plug-in into the resource packaging process of the target application;

[0092] Monitor the life cycle hooks corresponding to the target application in real time;

[0093] If it is monitored that the end hook in the lifecycle hook is triggered, then the various files constructed by the static module packaging tool in the resource packaging process are obtained as various deployment files.

[0094] Specifically, the predefined upload plug-in can be registered to the resource packaging process of the target application, that is, the compilation process of Webpack, through the apply method. It can listen to the beforeRun hook, which means that the logic of the upload plug-in will be executed before each Webpack compilation. In addition, it is also necessary to monitor the life cycle hooks corresponding to the target application in real time. The most important one is the end hook: done. When the end hook is triggered, it means that the deployment file has been built, that is, the various files built by the static module packaging tool in the resource packaging process are obtained. These files are deployment files, and Webpack is a static module packaging tool.

[0095] In addition, this application also defines a class called WebpackUploadOssPlugin, which is also a Webpack plug-in for uploading deployment files after they are fully built. This plug-in can be triggered by a lifecycle hook.

[0096] In the method provided in the embodiment of the present invention, the process of configuring the client instance is specifically described as follows:

[0097] Determine the access key ID and access key ciphertext of the object storage service;

[0098] Determine a target region in the object storage service based on the access key ID and the access key ciphertext;

[0099] Get the bucket name of the storage bucket in the target area;

[0100] The client instance is configured using the access key ID, access key ciphertext, target region, and bucket name.

[0101] Specifically, if you want to call the object storage service, you need to specify its access key ID (accessKeyId) and access key ciphertext (accessKeySecret). The access key ID and access key ciphertext can be used to log in to the object storage service. At the same time, the two also implicitly specify the area that can be accessed in the object storage service, that is, the target area. In an example, the object storage service contains folders A and B. The access key ID and access key ciphertext correspond to folder B, so folder B is the target area, and folder B can also be regarded as bucket B. Then the bucket name (bucket) of bucket B can also be determined. After the client instance is created, it can be configured using the access key ID, access key ciphertext, target area and bucket name to establish a bridge to the object storage service, and you can add, delete, modify and query files in the object storage service.

[0102] Further, in the present application, after the client instance is configured, the process of using the configured client instance to clean up files on the object storage service is specifically described as follows:

[0103] Determine the environment variables corresponding to the configured client instance;

[0104] Determine the directory names of all file directories in the object storage service;

[0105] Determine whether there is a file directory whose directory name contains the environment variable;

[0106] If yes, then mark the file directory whose directory name contains the environment variable;

[0107] Clean up the marked file directories.

[0108] Specifically, the environment variable is defined as ENVIRONMENT, which can be used to set the build environment. The environment variable corresponds to the location where files need to be cleaned up. Therefore, when cleaning up files, first use the environment variable to locate, that is, determine the directory names of all file directories in the object storage service. Then the file directories whose directory names contain the environment variable are the directories that need to be located. Specifically, these directory names have a prefix such as "build / ${ENVIRONMENT} / ", that is, the file directory containing the environment variable is the directory that needs to be cleaned up. Since there may be a large number of files in the object storage service, as well as a large number of file directories, the located file directories can be marked first to facilitate cleaning.

[0109] The process of cleaning the marked file directory may include the following steps:

[0110] Delete all files in the marked file directory;

[0111] Determine whether the marked file directory contains subdirectories;

[0112] If yes, then delete all files under the subdirectory and delete the subdirectory;

[0113] Delete the marked file directory;

[0114] Return to the step of determining whether there is a file directory whose directory name includes the environment variable until there is no file directory whose directory name includes the environment variable in the object storage service.

[0115] It can be understood that the above process is a recursive deletion method. The recursive deletion method can make the deletion more thorough. The marked file directory can be considered as a main directory, which itself will correspond to some files. At the same time, it also contains some sub-directories, and there will be some corresponding files under the sub-directories. Therefore, in a recursive manner, all files under the marked main directory are first deleted, and then it is determined whether it contains sub-directories. If so, all files under the sub-directories are deleted. Finally, all file directories (including main directories and sub-directories) are deleted to ensure the thoroughness of the cleaning.

[0116] In addition, to further ensure that the cleanup is complete, you can also return to the step of determining whether there is a file directory whose directory name contains the environment variable until there is no file directory whose directory name contains the environment variable in the object storage service.

[0117] Optionally, you can also use the deleteFile method, which also deletes all files under the specified prefix. It builds an array of objects containing file keys by traversing result.objects and uses the client.deleteMulti method to batch delete these files.

[0118] Next, the process of determining the upload path in this application is described in detail.

[0119] Determine the output directory of the array file, and obtain the absolute path of the output directory;

[0120] Configure the path variable according to the absolute path;

[0121] Extracting the network address of the storage bucket from the configured client instance;

[0122] Determine the file name of the array file according to the path variable;

[0123] The network address and the file name are concatenated to obtain an upload path.

[0124] Specifically, you can use the path.resolve method to obtain the absolute path of the output directory of the array file and store it in the outputPath variable. The outputPath variable is the path variable configured according to the absolute path. Then, the file name of the array file is determined according to the path variable. The upload path consists of two parts, namely the address and the file name. Therefore, you also need to extract the network address (url) of the bucket from the configured client instance, and concatenate the network address of the bucket and the file name as the upload path.

[0125] Furthermore, the present application may also include the following steps:

[0126] Obtain output configuration information of the array file;

[0127] Determine the configuration address in the output configuration information;

[0128] Extracting the network address of the storage bucket from the configured client instance;

[0129] Replacing the configuration address in the output configuration information with the network address of the storage bucket to obtain updated output configuration information;

[0130] In response to a request instruction initiated by a user to access resources of the target application, the updated configuration information is sent to a user client, so that the user can access resources of the array file based on the updated configuration information.

[0131] Specifically, the above process is the process of users accessing and calling resources after the application is released. The output configuration information is the output configuration, which contains a specific configuration address. Replacing the network address of the storage bucket with the configuration address allows users to access resources, such as referencing the deployment file in the array file through an HTML file.

[0132] and Figure 1 Corresponding to the method described above, the embodiment of the present invention also provides an application publishing device for Figure 1 In the specific implementation of the method, the application publishing device provided in the embodiment of the present invention can be used in a computer terminal or various mobile devices, combined with Figure 2 , introduce the application publishing device, such as Figure 2 As shown, the device may include:

[0133] A deployment file determination module 10, used to determine each deployment file of the target application;

[0134] A calling module 20 is used to create a client instance corresponding to the object storage service and configure the client instance to call the object storage service;

[0135] A file cleaning module 30, used to clean up files on the object storage service using the configured client instance;

[0136] An array file obtaining module 40 is used to store each of the deployment files in a pre-established array to obtain an array file;

[0137] An upload path determination module 50, used to determine an upload path;

[0138] The array file uploading module 60 is used to upload the array file to the object storage service after the file is cleaned according to the upload path to complete the release of the target application.

[0139] It can be seen from the above technical scheme that the present application determines the various deployment files of the target application; creates a client instance corresponding to the object storage service, and configures the client instance to call the object storage service; uses the configured client instance to clean up the file of the object storage service; stores each of the deployment files in a pre-established array to obtain an array file; determines the upload path; and uploads the array file to the object storage service after file cleaning according to the upload path to complete the release of the target application. The present application first determines the various deployment files of the target application, and calls the object storage service to realize file upload and deployment. It is necessary to create a client instance corresponding to the object storage service and configure it to realize the call, which can avoid the problem of complex operation and maintenance work caused by deployment on the server. Then, file cleaning can save resources and improve the utilization of storage space. Since the number of deployment files is uncertain, each deployment file is first stored in an array and then uploaded to the object storage service to ensure the integrity of the deployment file and improve the upload efficiency. Before uploading, it is also necessary to determine the upload path to ensure the correctness of the upload destination so that the target application can be released smoothly.

[0140] Furthermore, the embodiment of the present application provides an application publishing device. Optionally, Figure 3 The hardware structure diagram of the application publishing device is shown in FIG. Figure 3 The hardware structure of the application publishing device may include: at least one processor 01 , at least one communication interface 02 , at least one memory 03 and at least one communication bus 04 .

[0141] In the embodiment of the present application, the number of the processor 01 , the communication interface 02 , the memory 03 , and the communication bus 04 is at least one, and the processor 01 , the communication interface 02 , and the memory 03 communicate with each other through the communication bus 04 .

[0142] The processor 01 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention.

[0143] The memory 03 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), etc., such as at least one disk memory.

[0144] The memory stores a program, and the processor can call the program stored in the memory, and the program is used to execute the following application publishing method, including:

[0145] Determine the various deployment files of the target application;

[0146] Create a client instance corresponding to the object storage service, and configure the client instance to call the object storage service;

[0147] Using the configured client instance to clean up files on the object storage service;

[0148] Storing each of the deployment files in a pre-established array to obtain an array file;

[0149] Determine the upload path;

[0150] The array file is uploaded to the object storage service after the file is cleaned according to the upload path to complete the release of the target application.

[0151] Optionally, the detailed functions and extended functions of the program may refer to the description of the application publishing method in the method embodiment.

[0152] The embodiment of the present application further provides a storage medium, which can store a program suitable for execution by a processor, and when the program is running, controls the device where the storage medium is located to execute the following application publishing method, including:

[0153] Determine the various deployment files of the target application;

[0154] Create a client instance corresponding to the object storage service, and configure the client instance to call the object storage service;

[0155] Using the configured client instance to clean up files on the object storage service;

[0156] Storing each of the deployment files in a pre-established array to obtain an array file;

[0157] Determine the upload path;

[0158] The array file is uploaded to the object storage service after the file is cleaned according to the upload path to complete the release of the target application.

[0159] Specifically, the storage medium may be a computer-readable storage medium, and the computer-readable storage medium may be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read-Only Memory), an EPROM, a hard disk or a ROM.

[0160] Optionally, the detailed functions and extended functions of the program may refer to the description of the application publishing method in the method embodiment.

[0161] In addition, the functional modules in the various embodiments of the present disclosure can be integrated together to form an independent part, or each module can exist separately, or two or more modules can be integrated to form an independent part. If the function is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for a computer device (which can be a personal computer, a live broadcast device, or a network device, etc.) to perform all or part of the steps of the methods of the various embodiments of the present disclosure.

[0162] 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.

[0163] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0164] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. An application publishing method, characterized in that: include: Determine the various deployment files of the target application; Create a client instance corresponding to the object storage service, and configure the client instance to call the object storage service; Using the configured client instance to clean up files on the object storage service; Storing each of the deployment files in a pre-established array to obtain an array file; Determine the upload path; The array file is uploaded to the object storage service after the file is cleaned according to the upload path to complete the release of the target application.

2. The method according to claim 1, characterized in that The using the configured client instance to clean up files on the object storage service includes: Determine the environment variables corresponding to the configured client instance; Determine the directory names of all file directories in the object storage service; Determine whether there is a file directory whose directory name contains the environment variable; If yes, then mark the file directory whose directory name contains the environment variable; Clean up the marked file directories.

3. The method according to claim 2, characterized in that The cleaning of the marked file directory includes: Delete all files in the marked file directory; Determine whether the marked file directory contains subdirectories; If yes, then delete all files under the subdirectory and delete the subdirectory; Delete the marked file directory; Return to the step of determining whether there is a file directory whose directory name includes the environment variable until there is no file directory whose directory name includes the environment variable in the object storage service.

4. The method according to claim 1, characterized in that: The determining of the upload path includes: Determine the output directory of the array file, and obtain the absolute path of the output directory; Configure the path variable according to the absolute path; Extracting the network address of the storage bucket from the configured client instance; Determine the file name of the array file according to the path variable; The network address and the file name are concatenated to obtain an upload path.

5. The method according to claim 1, characterized in that The determination of each deployment file of the target application includes: Registering a predefined upload plug-in into the resource packaging process of the target application; Monitor the life cycle hooks corresponding to the target application in real time; If it is monitored that the end hook in the lifecycle hook is triggered, then the various files constructed by the static module packaging tool in the resource packaging process are obtained as various deployment files.

6. The method according to claim 1, characterized in that The configuring the client instance includes: Determine the access key ID and access key ciphertext of the object storage service; Determine a target region in the object storage service based on the access key ID and the access key ciphertext; Get the bucket name of the storage bucket in the target area; The client instance is configured using the access key ID, access key ciphertext, target region, and bucket name.

7. The method according to any one of claims 1 to 6, characterized in that: Also includes: Obtain output configuration information of the array file; Determine the configuration address in the output configuration information; Extracting the network address of the storage bucket from the configured client instance; Replacing the configuration address in the output configuration information with the network address of the storage bucket to obtain updated output configuration information; In response to a request instruction initiated by a user to access resources of the target application, the updated configuration information is sent to a user client, so that the user can access resources of the array file based on the updated configuration information.

8. An application publishing device, characterized in that: include: A deployment file determination module, used to determine each deployment file of the target application; A calling module, used to create a client instance corresponding to the object storage service and configure the client instance to call the object storage service; A file cleaning module, used to clean up files on the object storage service using the configured client instance; An array file obtaining module, used for storing each of the deployment files in a pre-established array to obtain an array file; An upload path determination module, used to determine the upload path; The array file uploading module is used to upload the array file to the object storage service after the file is cleaned according to the upload path to complete the release of the target application.

9. An application publishing device, characterized in that: including memory and processor; The memory is used to store programs; The processor is used to execute the program to implement each step of the application publishing method as described in any one of claims 1-7.

10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, each step of the application publishing method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Method and device for applying static website in embedded system

    CN105592108A

  • File uploading method and device, storage medium and equipment

    CN115914213A

  • File transfer method and device

    CN117082049A

  • File transmission method and device

    CN117667861A

  • Construction method of enterprise knowledge management system and storage medium

    CN118503515A