Resource publishing method and apparatus, resource publishing device, and storage medium

By automating the generation of resource publishing paths, the problem of low efficiency and errors in resource publishing caused by manual intervention is solved, and efficient and accurate resource publishing is achieved.

CN115220775BActive Publication Date: 2026-07-21TENCENT TECHNOLOGY (SHENZHEN) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2021-04-20
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

The current resource publishing process relies on manual operation, resulting in low efficiency and a high probability of errors.

Method used

By receiving resource publishing requests, obtaining information about the resources to be published, and generating automated publishing paths, resource publishing can be achieved without human intervention.

Benefits of technology

It improves the efficiency of resource publishing, reduces the probability of human error, and ensures the accuracy of publishing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115220775B_ABST
    Figure CN115220775B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a resource publishing method and device, a resource publishing equipment and a storage medium, and relate to the technical field of computers. The method comprises the following steps: receiving a resource publishing request, wherein the resource publishing request is generated when a resource management equipment submits a to-be-published resource and there is a publishing operation on the to-be-published resource, and the resource publishing request comprises resource information of the to-be-published resource; obtaining the to-be-published resource based on the resource publishing request; generating a resource publishing path according to the resource information of the to-be-published resource; and publishing the to-be-published resource to a target position of a resource storage equipment according to the resource publishing path. The method can automatically publish resources and improve the efficiency of publishing resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a resource publishing method, apparatus, resource publishing device, and storage medium. Background Technology

[0002] Currently, with the continuous development of computer technology, people can access a wide variety of resources. To meet users' needs for these resources, developers need to constantly release various resources to add new ones or update existing ones. However, the resource release process mainly relies on manual intervention by developers. Specifically, the process involves developers logging into a publishing system, manually selecting the resources to be uploaded and choosing the publishing path before the release can be completed. Because this entire process requires manual intervention, resource release is inefficient. Therefore, how to efficiently and conveniently release resources has become a hot research topic. Summary of the Invention

[0003] This application provides a resource publishing method, apparatus, device, and storage medium that can automatically publish resources and improve the efficiency of resource publishing.

[0004] On one hand, embodiments of this application provide a resource publishing method, the method including:

[0005] Receive a resource publishing request, which is generated when a resource to be published is submitted in the resource management device and a publishing operation for the resource to be published exists. The resource publishing request includes the resource information of the resource to be published.

[0006] The resource to be published is obtained based on the resource publishing request;

[0007] Generate a resource publishing path based on the resource information of the resource to be published;

[0008] The resource to be published is published to the target location of the resource storage device according to the resource publishing path.

[0009] On one hand, embodiments of this application provide a resource publishing apparatus, the apparatus comprising:

[0010] A communication unit is used to receive a resource publishing request, which is generated when a resource to be published is submitted in the resource management device and a publishing operation for the resource to be published exists. The resource publishing request includes the resource information of the resource to be published.

[0011] Processing unit, configured to obtain the resource to be published based on the resource publishing request;

[0012] The processing unit is further configured to generate a resource publishing path based on the resource information of the resource to be published;

[0013] The processing unit is further configured to publish the resource to be published to the target location of the resource storage device according to the resource publishing path.

[0014] On one hand, embodiments of this application provide a resource publishing device, which includes an input device, an output device, a processor, and a computer storage medium. The processor and the computer storage medium are interconnected. The computer storage medium is used to store a computer program, and the processor is configured to call the computer program to execute the above-described resource publishing method.

[0015] On one hand, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, is used to implement the above-described resource publishing method.

[0016] On one hand, embodiments of this application provide a computer program product, which includes a computer program; the computer program is stored in a computer-readable storage medium, and when the computer program is executed by the processor of a resource publishing device, it executes the above-described resource publishing method.

[0017] In this embodiment, the resource publishing device can obtain resources to be published based on a resource publishing request; generate a resource publishing path based on the resource information of the resources to be published; and then publish the resources to be published based on the resource publishing path. The entire resource publishing process requires no manual intervention, realizing automatic resource publishing and improving the efficiency of resource publishing. Furthermore, the elimination of manual selection of the publishing path reduces the probability of publishing errors and improves the accuracy of resource publishing. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1a This is a schematic diagram of the architecture of a resource publishing system provided in an embodiment of this application;

[0020] Figure 1b This is a schematic diagram of the architecture of a content delivery network provided in an embodiment of this application;

[0021] Figure 2This is a flowchart illustrating a resource publishing method provided in an embodiment of this application;

[0022] Figure 3 This is a flowchart illustrating a resource publishing method provided in an embodiment of this application;

[0023] Figure 4 This is a flowchart illustrating a resource publishing method provided in an embodiment of this application;

[0024] Figure 5 This is a schematic diagram of the structure of a resource publishing device provided in an embodiment of this application;

[0025] Figure 6 This is a schematic diagram of the structure of a resource publishing device provided in an embodiment of this application. Detailed Implementation

[0026] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0027] This application provides a resource publishing scheme. Specifically, when a user needs to publish a resource (e.g., code or static resources such as images or files), they can submit the resource to be published and trigger the publishing operation. The resource publishing device then obtains the resource to be published and generates a resource publishing path for it. Based on this path, the resource is published automatically, eliminating the need for manual publishing and improving efficiency. Furthermore, automatic publishing reduces the probability of errors during manual publishing, improving accuracy. The resource publishing device can be a terminal or a server. The terminal can be a smartphone, tablet, laptop, desktop computer, smart vehicle, smart wearable device, etc. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0028] Based on the aforementioned resource publishing scheme, this application provides a resource publishing system. Please refer to [link to relevant documentation]. Figure 1aThe resource publishing system may include a resource management device 101, a resource publishing device 102, and a resource storage device 103. The resource management device 101 and the resource publishing device 102 can be connected by wired or wireless means, and the resource publishing device 102 and the resource storage device 103 can be connected by wired or wireless means.

[0029] In one embodiment, the resource management device 101 is mainly used for managing resources. Users can submit resources to be published through the resource management device 101 and trigger the publication operation of the resources to be published. Then, the resource management device 101 generates a resource publication request based on the publication operation and sends it to the resource publication device 102.

[0030] After receiving the resource publishing request sent by the resource management device 101, the resource publishing device 102 publishes the resource to be published to the target location of the resource storage device 103 by executing the above-mentioned resource publishing scheme.

[0031] In one embodiment, resource storage device 103 can be used to store multiple published resources. Resource storage device 103 can be a device in a general network or a source server in a content delivery network. A schematic diagram of the content delivery network structure can be found here. Figure 1b As shown, a content delivery network (CDN) may include a source server and at least one node server. When a user needs to access resources within the CDN, the user can send a data access request to the nearest node server in the CDN. For example, Figure 1b As shown, the user's terminal sends a data access request to the nearest node server. After receiving the data access request, if the nearest node server has cached the data content corresponding to the data access request, the nearest node server will return the corresponding data content to the user based on the data access request. If the nearest node server has not cached the data content corresponding to the data access request, the nearest node server will request the data content from the source server and then return the data content obtained from the source server to the user.

[0032] The resources stored in the aforementioned resource storage device 103 and / or resource management device 102 can be stored in a blockchain. Blockchain is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Essentially, it is a decentralized database, a chain of data blocks linked using cryptographic methods. The distributed ledger connected by the blockchain allows multiple parties to effectively record transactions, and these transactions can be permanently verified (immutable). Data in the blockchain is immutable; storing the resources in resource storage device 103 and / or resource management device 102 in the blockchain ensures the immutability of the resources and improves storage security.

[0033] The resource publishing scheme provided in this application embodiment can be applied to the following scenarios:

[0034] (1) When developers frequently update code, and each time they need to package the code and publish the generated new files to CDN or other resource servers, the resource publishing scheme provided in this application can be used to automatically publish the newly generated files, saving manpower and reducing the probability of errors.

[0035] (2) When product marketing personnel need to display static resources such as demos and temporary experience images online, they can also quickly and automatically publish static resources such as demos or temporary experience images through the resource publishing scheme provided in the embodiments of this application.

[0036] (3) When the operation and maintenance personnel publish the resources to the CDN, the resource publishing scheme provided in this application embodiment can quickly and conveniently manage the CDN resources without having to manage and maintain each second-level domain name resource separately.

[0037] Based on the resource publishing scheme and system described above, this application also provides a resource publishing method. Please refer to... Figure 2 , Figure 2 This is a flowchart illustrating a resource publishing method provided in an embodiment of this application. The resource publishing method can be executed by a resource publishing device, and the resource publishing method described in this embodiment may include the following steps S201-S204:

[0038] S201. Receive a resource publishing request. The resource publishing request is generated when a resource to be published is submitted in the resource management device and there is a publishing operation for the resource to be published. The resource publishing request includes the resource information of the resource to be published.

[0039] The resources to be published can be code implementing various functions, various static resources, etc. Static resources can include various images, various types of file resources, etc. There can be one or more resources to be published. The resource management device can be used to manage resources in multiple projects under multiple different project groups. Assuming the project to be published belongs to the target project, the resource information of the resource to be published includes any one or more of the following: the name of the target project, the name of the project group to which the target project belongs, and the version number of the resource to be published. The publishing operation can be a test operation for the resource to be published or an application operation for the resource to be published. If the publishing operation is a test operation, it indicates that the resource to be published is still in the testing phase and cannot be provided to users for access; therefore, the resource to be published needs to be published to the test environment for application testing. If the publishing operation is an application operation, it indicates that the resource to be published has been tested and can be opened to users for access; therefore, the resource to be published can be published to the application environment.

[0040] In the specific implementation, when a user wants to publish a resource, they can submit the resource to be published to the resource management device and trigger the publishing operation of the resource to be published. Then, when the resource management device detects that a resource to be published has been submitted and there is a publishing operation for the resource to be published, the resource management device can generate a resource publishing request and send the resource publishing request to the resource publishing device; then the resource publishing device receives the resource publishing request.

[0041] S202. Obtain the resources to be published based on the resource publication request.

[0042] In one embodiment, the resource publishing request carries the resource to be published, and the resource publishing device directly obtains the resource to be published from the resource publishing request.

[0043] In another embodiment, since the resource management device can generate a resource storage path for the resource to be published after the user submits the resource to be published, the resource publishing request carries the resource storage path of the resource to be published in the resource management device, and the resource publishing device obtains the resource to be published from the resource management device according to the resource storage path of the resource to be published.

[0044] In another embodiment, when a user submits any resource in the resource management device, the resource management device can generate a resource identifier and a resource storage path for any resource, and associate the identifier of any resource with the resource storage path. That is, in the resource management device, the resource storage path of each resource corresponds to the resource's identifier information. In this case, the resource publishing device obtains the resource storage path based on the resource publishing request by: obtaining the identifier information of the resource to be published carried in the resource publishing request; the resource publishing device can obtain the resource storage path of the resource to be published based on the identifier information; and obtain the resource to be published based on the resource storage path.

[0045] S203. Generate a resource publishing path based on the resource information of the resource to be published.

[0046] Optionally, as mentioned above, the resource management device is used to manage resources in multiple projects under multiple different project groups. Assuming that the project to which the resource to be published belongs is the target project, the resource information of the resource to be published includes any one or more of the following: the name of the target project, the name of the project group to which the target project belongs, and the version number of the resource to be published. The resource publishing path is used to indicate the storage location of the resource to be published after it is published.

[0047] In one embodiment, the resource publishing device can input resource information into the publishing path generation rule to obtain the resource publishing path of the resource to be published. For example, the resource information of the resource to be published may include the name of the target project and the name of the project group to which the target project belongs. The resource publishing device can input the name of the target project and the name of the project group to which the target project belongs into the publishing path generation rule to obtain the resource publishing path of the resource to be published.

[0048] In one embodiment, the publishing path generation rule can correspond to the publishing environment. The resource publishing device can obtain the publishing environment and obtain the publishing path generation rule based on the publishing environment. Here, the publishing environment refers to the environment in which the resource to be published is published. The publishing environment can be a test environment or an application environment. Optionally, the test environment refers to a preview environment, and the application environment refers to a content delivery network. The preview environment refers to an environment in which resources are temporarily stored and tests are performed based on the resources. The preview environment can include at least one server.

[0049] The specific implementation method of the resource publishing device to obtain the publishing environment of the resource to be published is as follows: the resource publishing device detects the environment identifier of the resource to be published, which is used to indicate the publishing environment of the resource to be published; then the resource publishing device can determine the publishing environment based on the environment attribute.

[0050] In one embodiment, the environment identifier is configured by the resource management device based on the publishing operation of the resource to be published. If the resource management device determines that the publishing operation of the resource to be published is a test operation for the resource to be published, then the publishing environment configured for the resource to be published is a preview environment, and the environment identifier configured for the resource to be published is a preview environment identifier. If the resource management device determines that the publishing operation of the resource to be published is an application operation for the resource to be published, then the publishing environment configured for the resource to be published is a content delivery network, and the environment identifier configured for the resource to be published is a CDN identifier.

[0051] S204. Publish the resources to be published to the target location of the resource storage device according to the resource publishing path.

[0052] In practice, the resource publishing device can perform location parsing on the resource publishing path to obtain the target location of the resource storage device to which the resource to be published is to be published, and then the resource publishing device publishes the resource to be published to the target location of the resource storage device.

[0053] In one embodiment, when there are multiple resources to be published, each resource to be published can correspond to a resource publishing path; the resource publishing device can publish each resource to be published according to its publishing time; in a specific implementation, the resource publishing device can first perform location parsing on the resource publishing path of each resource to be published to obtain the target location of the resource storage device to which each resource to be published is to be published; then the resource publishing device will publish each resource to be published sequentially to the target location of the resource storage device to which each resource to be published is to be published according to its publishing time.

[0054] For example, suppose there are two resources to be published, namely resource 1 and resource 2. The publication time of resource 1 is earlier than that of resource 2. The resource publishing device parses resource 1 to obtain the target location 1 of the storage publishing device to which resource 1 should be published. Then, resource 1 is published to the target location 1 of the resource storage device. Next, the resource publishing device parses resource 2 to obtain the target location 2 of the resource storage device to which resource 2 should be published. Then, the resource publishing device publishes resource 2 to the target location 2 of the resource storage device.

[0055] In one embodiment, when there are multiple resources to be published, these resources can be added to a publishing task list first. Then, the resource publishing device publishes these resources according to the time they were added to the publishing task list. In a specific implementation, the resource management device can perform location parsing based on the resource publishing path of each resource to be published, according to the time it was added to the publishing task list, to obtain the target location of the resource storage device to which each resource should be published. Then, the resource management device sequentially publishes each resource to the target location of the resource storage device to which it should be published.

[0056] In this embodiment, the resource publishing device can obtain resources to be published based on a resource publishing request; generate a resource publishing path based on the resource information of the resources to be published; and then publish the resources to be published based on the resource publishing path. The entire resource publishing process requires no manual intervention, realizing automatic resource publishing and improving the efficiency of resource publishing. Furthermore, the elimination of manual selection of the publishing path reduces the probability of publishing errors and improves the accuracy of resource publishing.

[0057] Based on the resource publishing scheme and system described above, this application also provides a resource publishing method. Please refer to... Figure 3 , Figure 3 This is a flowchart illustrating a resource publishing method provided in an embodiment of this application. The resource publishing method can be executed by a resource publishing device, and the resource publishing method described in this embodiment may include the following steps 301-S306:

[0058] S301. Receive a resource publishing request. The resource publishing request is generated when a resource to be published is submitted in the resource management device and there is a publishing operation for the resource to be published. The resource publishing request includes the resource information of the resource to be published.

[0059] In one embodiment, the resource management device runs a version control tool for managing resources across multiple projects within multiple different project groups. For example, the version control tool could be a Git utility. The resource management device includes multiple resources, and when any resource is committed via the version control tool, the device generates a resource storage path for that resource, and the resource is stored at the storage location indicated by that resource storage path.

[0060] In this scenario, when a user submits a resource to be published via a version management tool, the resource management device can also generate a resource storage path for that resource. Furthermore, after the user submits the resource through the version management tool, the tool can automatically trigger a publish operation for that resource. Then, when the resource management device detects a submitted resource and a publish operation for that resource, it generates a resource publish request and sends it to the resource publishing device, which then receives the request. This publish operation can be a test operation on the resource to be published, or it can be an application operation on the resource to be published.

[0061] S302. Obtain the resources to be published based on the resource publication request.

[0062] In one embodiment, the resource management device includes multiple resources, each corresponding to a resource storage path. The resource publishing device runs a continuous integration tool. The resource publishing device can first use the continuous integration (CI) tool to copy multiple resources from the resource management device to the resource publishing device, providing a reliable and stable environment for automatically publishing resources to be published. Then, the resource publishing device obtains the resource storage path corresponding to the resource to be published based on the resource publishing request, and retrieves the resource to be published from the copied resources according to the resource storage path. It should be noted that the copied resources can constitute a CI configuration file, which also carries resource information of the resource to be published. At this point, the resource publishing device can also retrieve the resource to be published and its resource information from the CI configuration file according to the resource storage path corresponding to the resource to be published.

[0063] In this process, the resource publishing device can obtain the resource storage path corresponding to the resource to be published based on the resource publishing request in one of the following ways: the resource publishing request carries the resource storage path corresponding to the resource to be published, and the resource publishing device directly obtains the resource storage path corresponding to the resource to be published from the resource publishing request. Alternatively, in the resource management device, the resource storage path of each resource corresponds to the resource's identification information. The resource publishing request carries the identification information of the resource to be published, and the resource publishing device can determine the resource storage path of the resource to be published based on the identification information of the resource to be published.

[0064] S303. Generate a resource publishing path based on the resource information of the resource to be published.

[0065] In one embodiment, since the resource to be released is submitted through a version control tool, the version control tool can group the resource to be released when it detects that the resource has been submitted. In this case, if the project to which the resource to be released belongs is the target project, the resource information of the resource to be released can be any one or more of the following: the name of the target project, the name of the project group to which the target project belongs, and the version number of the resource to be released.

[0066] In one embodiment, the resource publishing device can first obtain a publishing path generation rule, and then input the resource information of the resource to be published into the publishing path generation rule to obtain the resource publishing path. In a specific implementation, the publishing path generation rule corresponds to the publishing environment. The resource publishing device first obtains the publishing environment of the resource to be published, and then obtains the publishing path generation rule corresponding to the publishing environment; next, it inputs the name of the target project and the name of the project group to which the target project belongs into the publishing path generation rule to obtain the resource publishing path of the resource to be published. The publishing environment can be a content delivery network, or it can be a preview environment.

[0067] For example, the resource information for the resource to be published includes: the name of the target project and the name of the project group to which the target project belongs. After obtaining the publishing environment of the resource to be published and the publishing path generation rule corresponding to the publishing environment, the resource publishing device can input the name of the target project and the name of the project group to which the target project belongs into the publishing path generation rule. Assume the name of the target project is xiaoxiao and the name of the project group to which the target project belongs is wenjian; the publishing environment obtained by the resource publishing device is CDN, and the publishing path generation rule corresponding to the CDN environment can be / data / cdn / {group} / {project} / ; where data represents the resource to be published, cdn represents the publishing environment, group represents the name of the project group, and project represents the name of the project group to which the project belongs. Then, the resource publishing device can input the name of the target project xiaoxiao and the name of the project group to which the target project belongs into the publishing path generation rule / data / cdn / {group} / {project} / to obtain the resource publishing path / data / cdn / {xiaoxiao} / {wenjian} / .

[0068] For example, the resource information for the resource to be published includes the name of the target project, the name of the project group to which the target project belongs, and the version number of the resource to be published. After obtaining the publishing environment of the resource to be published and the publishing path generation rule corresponding to the publishing environment, the resource publishing device can input the name of the target project, the name of the project group to which the target project belongs, and the version number of the resource to be published into the publishing path generation rule to obtain the resource publishing path of the resource to be published. For example, if the publishing environment obtained by the resource publishing device is CDN, the publishing path generation rule corresponding to CDN can be / data / cdn / {group} / {project} / version / ; where data represents the resource to be published, cdn represents the publishing environment, group represents the name of the project group, project represents the name of the project, and version represents the version number of the resource to be published.

[0069] In one embodiment, the aforementioned publishing environment can be obtained by the resource management device based on the publishing operation of the resource to be published. Specifically, the resource management device detects the publishing operation of the resource to be published and matches the corresponding publishing environment based on the publishing operation; when the published operation is detected as a test operation for the resource to be published, the publishing environment matched by the resource management device for the resource to be published is a preview environment; when the detected published operation is an application operation for the resource to be published, the publishing environment matched by the resource management device for the resource to be published is a CDN.

[0070] In one embodiment, since the resource is published for user use, the resource publishing process also requires generating an access path for the resource to be published based on its resource information. The access path indicates the location where the resource is stored; it can be understood as the path through which the resource can be accessed. This access path can be a Uniform Resource Locator (URL). In a specific implementation, the resource publishing device obtains the publishing environment of the resource to be published and the access path generation rules corresponding to that environment. Then, it inputs the resource information of the resource to be published into the access path generation rules to obtain the access path. For example, the resource information includes the name of the target project and the name of the project group to which the target project belongs. After obtaining the publishing environment of the resource to be published and the corresponding access path generation rules, the resource publishing device can input the name of the target project and the name of the project group to which the target project belongs into the access path generation rules. In this scenario, the resource publishing device obtains a CDN as the publishing environment, and the access path generation rule corresponding to the CDN can be: https: / / {group}.cdn.cn / {project}; where https represents Hyper Text Transfer Protocol over Secure Socket Layer; group represents the name of the project group to which the project belongs, as a second-level domain; .cdn.cn represents the first-level domain in the CDN publishing environment; and project represents the name of the project.

[0071] For example, the resource to be published includes the name of the target project, the name of the project group to which the target project belongs, and the version number of the resource to be published. After obtaining the publishing environment of the resource to be published and the publishing path generation rule corresponding to the publishing environment, the resource publishing device inputs the name of the target project, the name of the project group to which the target project belongs, and the resource version into the access path generation rule to obtain the resource publishing path of the resource to be published. In this case, the publishing environment obtained by the resource publishing device can be a CDN, and the access path generation rule corresponding to the CDN can be https: / / {group}.cdn.cn / {project} / {version} / , where version represents the resource version.

[0072] It should be noted that the publishing path generation rules and access path generation rules in this application embodiment can be set according to the requirements. For example, taking the access path generation rule as an example, HTTPS can be replaced with other network protocols, such as File Transfer Protocol (FTP). That is, if the publishing environment is CDN, the access path generation rule corresponding to CDN can be: ftp: / / {group}.cdn.cn / {project} / {version} / . Furthermore, when generating the access path and resource publishing path of the resource to be published, they can be generated simultaneously or sequentially; this application does not limit this.

[0073] After generating the access path and the resource publishing path, the resource publishing device sends the access path to the user terminal and establishes a mapping relationship between the access path and the resource publishing path. This allows the resource storage device to return the resource to be published at the target location based on the mapping relationship when it receives an access request carrying the access path. Specifically, when a user needs to access a resource to be published, they can use the access path of the resource to access it. In response to the access path triggering operation, the user terminal generates an access request carrying the access path and sends it to the resource storage device. The resource storage device then returns the resource to be published at the target location to the user terminal based on the mapping relationship between the access path and the resource publishing path, thus enabling resource access.

[0074] In one embodiment, the resource publishing device can send the generated access path, resource publishing path, and the mapping relationship between the access path and the resource publishing path to any node in the blockchain network. Upon receiving the access path, resource publishing path, and mapping relationship, any node verifies the legitimacy of the access path, resource publishing path, and mapping relationship. If verification is successful, the node generates a block containing the access path, resource publishing path, and mapping relationship, and sends this block to other nodes in the blockchain network for consensus. After successful consensus, the block is saved to the blockchain network, thereby preventing tampering with the access path, resource publishing path, and mapping relationship. It should be noted that the resource publishing device can also be any node in the blockchain network. In this case, the resource publishing device can directly generate a block containing the access path, resource publishing path, and mapping relationship and send this block to other nodes in the blockchain network for consensus.

[0075] S304. Obtain the attribute information of the resource to be published. The attribute information includes one or more of the following: resource type, resource size, resource version, and resource security.

[0076] In one embodiment, when the attribute information includes resource type and resource size, the resource publishing device can read the resource type and resource size of the resource to be published through a script tool, for example, a Node.js tool.

[0077] In one embodiment, when the attribute information includes resource security, the resource publishing device can first determine whether the resource to be published is an executable resource. If it is determined that the resource to be published is an executable resource, a security scan is performed on the resource to be published to obtain the resource security of the resource to be published.

[0078] In one embodiment, when the attribute information includes a resource version, the resource publishing device can obtain the resource version of the resource to be published through a version acquisition tool. Alternatively, the resource to be published corresponds to a version identifier, and the resource publishing device can obtain the version identifier of the resource to be published and determine the resource version of the resource to be published based on the version identifier. When submitting a resource to be published, the resource management device can set a corresponding version identifier for that resource. The resource version is used to indicate the version of the resource to be published.

[0079] S305. Verify the legality of the resource to be published based on its attribute information.

[0080] In one embodiment, the attribute information of the resource to be published includes the resource type. The resource publishing device can determine whether the resource type belongs to a publishing type. If the resource type belongs to a publishing type, the legality verification of the resource to be published passes, and step S306 is executed; if the resource type does not belong to a publishing type, the resource publishing device determines that the legality verification of the resource to be published fails. Here, the publishing type refers to the type that can support resource publishing.

[0081] In one embodiment, the attribute information of the resource to be published includes the resource size. The resource publishing device can determine whether the resource size belongs to the publishing size. If the resource size belongs to the publishing size, the legality verification of the resource to be published is determined to be passed, and step S306 is executed; if the resource size does not belong to the publishing size, the resource publishing device determines that the legality verification of the resource to be published has failed. The publishing size can be determined based on the publishing environment or based on user requirements.

[0082] In one embodiment, the attribute information of the resource to be published includes resource security. The resource publishing device can determine whether the resource to be published corresponding to the resource security includes a risk function. If the resource publishing device determines that the resource to be published corresponding to the resource security does not include a risk function, then the legality verification of the resource to be published is deemed to have passed, and step S306 is executed. If the resource publishing device determines that the resource to be published corresponding to the resource security includes a risk function, then the legality verification of the resource to be published is deemed to have failed, wherein the risk function may be an eval function.

[0083] In one embodiment, the attribute information of the resource to be published includes the resource version. The resource publishing device determines the historical version corresponding to the resource to be published, checks whether there is a conflict between the resource to be published and the historical version. If it is determined that there is no conflict between the resource to be published and the historical version, the resource publishing device determines that the legality verification of the resource to be published has passed, and executes step S306. If it is determined that there is a conflict between the resource to be published and the historical version, the resource publishing device determines that the legality verification of the resource to be published has passed. It should be noted that determining the legality of the resource to be published through the version resource can prevent the historical version from being overwritten. If the resource publishing device does not determine the historical version corresponding to the resource to be published, it means that the resource to be published is the first submitted resource, rather than a resource that needs to be updated. The resource to be published will not have the risk of overwriting the historical version, and the resource publishing device can directly determine that the legality verification of the resource to be published has passed.

[0084] In one embodiment, after determining that the legality verification of the resource to be published has failed, the resource publishing device may send a notification message to the user terminal. The notification message carries the verification result of the legality verification of the resource to be published based on attribute information. The notification message is used to indicate that the legality of the resource to be published has failed, so that the user can check the resource to be published according to the verification result of the legality verification of the resource to be published based on attribute information in the notification message.

[0085] S306. If the validity verification passes, the resource to be published will be published to the target location of the resource storage device according to the resource publishing path.

[0086] In a specific implementation, after verifying the legitimacy of the resource to be published, the resource publishing device can parse the resource publishing path to obtain the target location of the resource storage device in the publishing environment of the resource to be published. Then, the resource publishing device publishes the resource to be published to the target location of the resource storage device. In one embodiment, when the publishing environment is a preview environment, the preview environment includes at least one test server, and the resource storage device can be any one of the at least one test server, with the target location belonging to a location within any of the test servers; when the publishing environment is a CDN, the CDN includes one origin server and multiple node servers, and the resource storage device can be the origin server, with the target location belonging to a location within the origin server.

[0087] In one embodiment, after the resource publishing device publishes the resource to be published to the target location according to the resource publishing path, if the publishing environment is a preview environment, it also needs to periodically monitor the resources in the preview environment so that the resource storage device can promptly clean up the resources to be published to ensure sufficient space in the preview environment. Specifically, the resource publishing device can obtain the current time and determine the time difference between the current time and the time when the resource to be published is published to the target location; then it determines whether the time difference is greater than or equal to a time difference threshold; if the resource publishing device determines that the time difference is greater than or equal to the time difference threshold, it sends a notification message to the resource storage device, which instructs the resource storage device to delete the resource to be published in the target location. The time difference threshold can be set according to requirements, for example, it can be one week, one month, etc. Optionally, the resource storage device can also independently determine the time difference between the current time and the time when the resource to be published is published to the target location; then it determines whether the time difference is greater than or equal to the time difference threshold; if it determines that the time difference is greater than or equal to the time difference threshold, the resource storage device can directly delete the resource to be published in the target location.

[0088] In this embodiment, the resource publishing device can automatically generate a resource publishing path for the resource to be published, perform a legality verification on the resource based on its attribute information, and publish the resource to the target location based on the resource publishing path after the legality verification is passed. This achieves automatic resource publishing, improving the efficiency of resource publishing; and the legality verification of the resource to be published during the publishing process ensures the security and legality of the resource, improving the accuracy of the resource to be published.

[0089] The resource publishing method provided in this application can be used for the automated publishing of various types of file resources. Taking code or static resource publishing as an example, the code or static resource is the resource to be published. Please refer to... Figure 4 , Figure 4 A flowchart for publishing resources after a user submits code or static resources.

[0090] (1) Users can submit code using the version control tool Git running on the resource management device. When the version control tool detects a code submission and a release operation for that code, it actively triggers the continuous integration tool running on the resource release device. Specifically, the version control tool can send a resource release request to the continuous integration (CI) tool. This resource release device can be a build server. Upon receiving the resource release request, the continuous integration tool copies multiple resources from the resource management device to the resource release device (i.e., copies multiple resources to the resource release device) and generates a URL (i.e., the resource release path) based on the project group name and project name of the resource to be released in the version control tool.

[0091] (2) Then the CI tool can read the CI configuration file in the project where the resource to be published is located. The CI configuration file includes multiple copied resources. The resource storage path of the resource to be published can be obtained from the CI configuration file. The resource to be published can be obtained based on the resource storage path, such as the entire dist directory after the build. Generally, the path of the package output is a subset of the package output path. Then the resource storage path can be determined from the entire dist directory.

[0092] (3) CI tools check the legality of resources to be published. There are four ways to check the legality of resources to be published:

[0093] 1. The CI tool uses scripts (such as a check script written in Node.js) to read the resource type and size. Then, the CI tool determines if the resource type is included in the release types. If it is, the resource to be released is considered valid; otherwise, it is considered invalid. Next, the CI tool checks the resource size to see if it is within the specified range (corresponding to the release size mentioned above). If it is, the resource to be released is considered valid; otherwise, it is considered invalid.

[0094] 2. After determining that the resource to be published is an executable script file (such as a JS file or a Python file), the CI tool can perform a security scan on the resource to determine whether it uses risky functions (such as the eval function). If it is determined that the resource uses a risky function, the resource to be published is deemed invalid; if it is determined that the resource does not use a risky function, the resource to be published is deemed valid (i.e., the validity of the resource to be published is verified based on its security).

[0095] 3. The CI tool identifies the historical version of the resource to be released and checks for conflicts between the resource and the historical version. If there are no conflicts, the resource is deemed valid. If there are conflicts, the resource is deemed invalid.

[0096] (4) The CI tool generates the resource release path for the resource to be released based on the project group name and project name entered into the release path generation rule in the version management tool. After generating the resource release path, when there are multiple resources to be released, the CI tool, after confirming that the legality verification of all resources to be released has passed, publishes all resources to the target location of the CDN origin server (i.e., resource storage device) or the target location of the test server (i.e., resource storage device) of the preview environment through an asynchronous task. Specifically, if the CI tool determines that the release environment of the resource to be released is not the preview environment (i.e., the release environment is CDN), it publishes all resources to the target location of the CDN origin server (i.e., resource storage device); if the CI tool determines that the release environment of the resource to be released is the preview environment, it publishes all resources to the target location corresponding to the test server of the preview environment. It should be noted that the preview environment is not a CDN environment and cannot be used for official online services.

[0097] (5) The CI tool sends the generated URL from step (1) above to the user, who can use the URL directly.

[0098] The CI tool running on the resource publishing device automates the release of upcoming versions, simplifying CDN resource operation and maintenance management. Operations personnel only need to configure one CDN resource management solution, which can be reused for each newly added subdomain's CDN resources. There's no need to design separate operation and maintenance plans for each subdomain's resources. Subsequent releases do not require developer involvement; developers only need to observe the CI tool's execution process and obtain the returned URL, achieving the following beneficial effects:

[0099] 1. It can save a lot of valuable time and manpower costs. After the user submits code through the version management tool and triggers the release operation of the resource to be released, the version management tool generates a resource release request to trigger the continuous integration tool running in the resource release device to release the resource to be released. No user participation is required. The CI tool only needs to notify the user after the release is completed.

[0100] 2. Since CI tools will terminate the release process if an error occurs at any step, the probability of errors in releasing resources is very low, and release anomalies will not be caused by manual configuration errors.

[0101] 3. The CI tool will automatically generate URLs according to the access path generation rules, eliminating the need for users to manually concatenate the URLs.

[0102] 4. Resources to be published can be published to different publishing environments to avoid resource conflicts between different environments. For example, publishing resources to be published to the preview environment avoids resource conflicts caused by publishing to the production environment directly overwriting resources in the production environment when encountering the same resource publishing path.

[0103] Based on the resource publishing methods provided above, please refer to Figure 5 This is a schematic diagram of the structure of a resource publishing device provided in an embodiment of this application. Figure 5 As shown, the resource publishing device 50 can be applied to the above-mentioned Figure 2 or Figure 3 The resource publishing device in the corresponding embodiment; specifically, the resource publishing device can be a computer program (including program code) running on the resource publishing device, for example, the resource publishing device is an application software; the resource publishing device can be used to execute the corresponding steps in the method provided in the embodiments of this application.

[0104] The communication unit 501 is used to receive a resource publishing request, which is generated when a resource to be published is submitted in the resource management device and a publishing operation for the resource to be published exists. The resource publishing request includes the resource information of the resource to be published.

[0105] Processing unit 502 is used to obtain the resource to be published based on the resource publishing request;

[0106] The processing unit 502 is further configured to generate a resource publishing path based on the resource information of the resource to be published;

[0107] The processing unit 502 is further configured to publish the resource to be published to the target location of the resource storage device according to the resource publishing path.

[0108] In one embodiment, the resource management device runs a version management tool, which manages resources in multiple projects under multiple different project groups; the resources to be released are submitted through the version management tool; the resource management device stores multiple resources, and when any resource is submitted through the version management tool, the resource management device generates a resource storage path for that resource, and the resource is stored in the storage location indicated by the resource storage path; the processing unit 502, in obtaining the resources to be released based on the resource release request, can specifically be used for:

[0109] The multiple resources are copied from the resource management device using a continuous integration tool;

[0110] Based on the resource publishing request, obtain the resource storage path corresponding to the resource to be published, and obtain the resource to be published from the multiple copied resources according to the resource storage path corresponding to the resource to be published.

[0111] In one embodiment, if the project to which the resource to be published belongs is a target project, then the resource information of the resource to be published includes any one or more of the following: the name of the target project, the name of the project group to which the target project belongs, and the version number of the resource to be published. When generating a resource publishing path based on the resource information of the resource to be published, the processing unit 502 may specifically be used for:

[0112] Obtain the publishing environment corresponding to the resource to be published, and obtain the publishing path generation rules corresponding to the publishing environment;

[0113] The resource information of the resource to be published is input into the publishing path generation rule to obtain the resource publishing path of the resource to be published.

[0114] In one embodiment, the processing unit 502 is further configured to:

[0115] Obtain the access path generation rules corresponding to the publishing environment;

[0116] The resource information of the resource to be published is input into the access path generation rule to obtain the access path of the resource to be published;

[0117] A mapping relationship is established between the access path and the resource publishing path so that when the resource storage device receives an access request carrying the access path, the resource to be published in the target location is returned based on the mapping relationship between the access path and the resource publishing path.

[0118] In one embodiment, if the publishing operation is a test operation on the resource to be published, then the publishing environment is a preview environment, which includes at least one test server, and the resource storage device refers to any one of the at least one test server; if the publishing operation is an application operation, then the publishing environment is a content delivery network, which includes one source server and multiple node servers, and the resource storage device refers to the source server.

[0119] In one embodiment, the publishing environment is a preview environment, and the processing unit 502 is further configured to determine the time difference between the current time and the time when the resource to be published is published to the target location;

[0120] If the time difference is greater than or equal to the time difference threshold, the communication unit 501 sends a notification message to the resource storage device, the notification message being used to instruct the resource storage device to delete the resource to be published in the target location.

[0121] In one embodiment, when the processing unit 502 publishes the resource to be published to the target location of the resource storage device according to the resource publishing path, it may specifically be used to:

[0122] Obtain the attribute information of the resource to be published, wherein the attribute information includes one or more of the following: resource type, resource size, resource version, and resource security;

[0123] The legality of the resource to be published is verified based on its attribute information.

[0124] If the validity verification passes, the resource to be published will be published to the target location of the resource storage device according to the resource publishing path.

[0125] According to one embodiment of this application, Figure 2 and Figure 3 The steps involved in the resource publishing method shown can be... Figure 5 This is performed by the individual units within the resource publishing device shown. For example, Figure 2 The aforementioned step S201 can be performed by Figure 5 The communication unit 501 in the resource publishing device shown executes the steps S202 to S204, which can be performed by... Figure 5 The processing unit 501 in the resource publishing device shown executes this; for example, Figure 3 In the resource publishing method shown, step S301 can be performed by... Figure 5 The communication unit 501 in the resource publishing device shown is used to execute steps S302 to S306, which can be performed by... Figure 5 The processing unit 302 in the resource publishing device shown executes this.

[0126] According to another embodiment of this application, Figure 5 The various units in the resource publishing device shown can be individually or entirely merged into one or more other units, or some of the units can be further divided into multiple functionally smaller units. This achieves the same operation without affecting the technical effects of the embodiments of this application. The above units are divided based on logical functions. In practical applications, the function of one unit can be implemented by multiple units, or the function of multiple units can be implemented by one unit. In other embodiments of this application, the resource publishing device may also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented collaboratively by multiple units.

[0127] According to another embodiment of this application, the following can be achieved by running on a general-purpose computing device, such as a computer, which includes processing elements and storage elements such as a central processing unit (CPU), random access memory (RAM), and read-only memory (ROM), a device capable of performing operations such as... Figure 2 and Figure 3 The computer program (including program code) for each step involved in the corresponding method shown, to construct such... Figure 5 The resource publishing apparatus shown herein, and the resource publishing method for implementing the embodiments of this application, are described. The computer program may be recorded on, for example, a computer-readable storage medium, loaded onto the aforementioned resource publishing apparatus via the computer-readable storage medium, and run therein.

[0128] In this embodiment, the resource publishing device can obtain resources to be published based on a resource publishing request; generate a resource publishing path based on the resource information of the resources to be published; and then publish the resources to be published based on the resource publishing path. The entire resource publishing process requires no manual intervention, realizing automatic resource publishing and improving the efficiency of resource publishing. Furthermore, the elimination of manual selection of the publishing path reduces the probability of publishing errors and improves the accuracy of resource publishing.

[0129] Further, please see Figure 6 This is a schematic diagram of a resource publishing device provided in an embodiment of this application. Specifically, the resource publishing device can be as described above. Figure 2 or Figure 3 The resource publishing device in the corresponding embodiment. For example... Figure 6 As shown, the resource publishing device 60 may include a processor 601, an input device 602, an output device 603, and a computer storage medium 604. The processor 601, input device 602, output device 603, and computer storage medium 604 are connected via a bus 605.

[0130] The aforementioned computer storage medium 604 can be stored in the memory of the resource publishing device. The computer storage medium 604 is used to store computer programs, and the processor 601 is used to execute the computer programs stored in the computer storage medium 604. The processor 601 (or CPU (Central Processing Unit)) is the computing and control core of the resource publishing device, and it is suitable for implementing one or more computer programs, specifically for loading and executing them.

[0131] Receive a resource publishing request, which is generated when a resource to be published is submitted in the resource management device and a publishing operation for the resource to be published exists. The resource publishing request includes the resource information of the resource to be published.

[0132] The resource to be published is obtained based on the resource publishing request;

[0133] Generate a resource publishing path based on the resource information of the resource to be published;

[0134] The resource to be published is published to the target location of the resource storage device according to the resource publishing path.

[0135] In this embodiment, the resource publishing device can obtain resources to be published based on a resource publishing request; generate a resource publishing path based on the resource information of the resources to be published; and then publish the resources to be published based on the resource publishing path. The entire resource publishing process requires no manual intervention, realizing automatic resource publishing and improving the efficiency of resource publishing. Furthermore, the elimination of manual selection of the publishing path reduces the probability of publishing errors and improves the accuracy of resource publishing.

[0136] This application embodiment also provides a computer storage medium (memory), which is a memory device in resource publishing for storing programs and data. It is understood that the computer storage medium here may include the built-in storage medium of the resource publishing device, or it may include extended storage media supported by the resource publishing device. The computer storage medium provides storage space that stores the operating system of the resource publishing device. Furthermore, this storage space also stores one or more computer programs suitable for loading and execution by the processor 601. It should be noted that the computer storage medium here may be a high-speed RAM memory, or a non-volatile memory, such as at least one disk storage device; optionally, it may also be at least one computer storage medium located remotely from the aforementioned processor.

[0137] In one embodiment, the computer storage medium may be loaded and executed by the processor 601, along with one or more computer programs stored in the computer storage medium, to achieve the above-mentioned purpose. Figure 2 and Figure 3 The corresponding steps of the resource publishing method shown. In specific implementation, one or more computer programs in the computer storage medium are loaded by processor 601 and executed as follows:

[0138] Receive a resource publishing request, which is generated when a resource to be published is submitted in the resource management device and a publishing operation for the resource to be published exists. The resource publishing request includes the resource information of the resource to be published.

[0139] The resource to be published is obtained based on the resource publishing request;

[0140] Generate a resource publishing path based on the resource information of the resource to be published;

[0141] The resource to be published is published to the target location of the resource storage device according to the resource publishing path.

[0142] In one embodiment, the resource management device runs a version management tool for managing resources across multiple projects under multiple different project groups; the resource to be released is submitted through the version management tool; the resource management device stores multiple resources, and when any resource is submitted through the version management tool, the resource management device generates a resource storage path for that resource, and the resource is stored in the storage location indicated by the resource storage path; when retrieving the resource to be released based on the resource release request, one or more computer programs in the computer storage medium are loaded by the processor 601 and executed as follows:

[0143] The multiple resources are copied from the resource management device using a continuous integration tool;

[0144] Based on the resource publishing request, obtain the resource storage path corresponding to the resource to be published, and obtain the resource to be published from the multiple copied resources according to the resource storage path corresponding to the resource to be published.

[0145] In one embodiment, if the project to which the resource to be published belongs is a target project, then the resource information of the resource to be published includes any one or more of the following: the name of the target project, the name of the project group to which the target project belongs, and the version number of the resource to be published. A resource publishing path is generated based on the resource information of the resource to be published, and one or more computer programs in the computer storage medium are loaded by the processor 601 and executed in the following steps:

[0146] Obtain the publishing environment corresponding to the resource to be published, and obtain the publishing path generation rules corresponding to the publishing environment;

[0147] The resource information of the resource to be published is input into the publishing path generation rule to obtain the resource publishing path of the resource to be published.

[0148] In one embodiment, one or more computer programs in the computer storage medium are loaded by processor 601 and executed as follows:

[0149] Obtain the access path generation rules corresponding to the publishing environment;

[0150] The resource information of the resource to be published is input into the access path generation rule to obtain the access path of the resource to be published;

[0151] A mapping relationship is established between the access path and the resource publishing path so that when the resource storage device receives an access request carrying the access path, the resource to be published in the target location is returned based on the mapping relationship between the access path and the resource publishing path.

[0152] In one embodiment, if the publishing operation is a test operation on the resource to be published, then the publishing environment is a preview environment, the preview environment includes at least one test server, and the resource storage device refers to any one of the at least one test server;

[0153] If the publishing operation is an application operation, then the publishing environment is a content delivery network, which includes a source server and multiple node servers, and the resource storage device refers to the source server.

[0154] In one embodiment, the publishing environment is a preview environment. After the resource to be published is published to the target location of the resource storage device according to the resource publishing path, one or more computer programs in the computer storage medium are loaded by the processor 601 and executed as follows:

[0155] Determine the time difference between the current time and the time when the resource to be published is published to the target location;

[0156] If the time difference is greater than or equal to the time difference threshold, a notification message is sent to the resource storage device, which instructs the resource storage device to delete the resource to be published in the target location.

[0157] In one embodiment, when the resource to be published is published to the target location of the resource storage device according to the resource publishing path, one or more computer programs in the computer storage medium are loaded by the processor 601 and executed as follows:

[0158] Obtain the attribute information of the resource to be published, wherein the attribute information includes one or more of the following: resource type, resource size, resource version, and resource security;

[0159] The legality of the resource to be published is verified based on its attribute information.

[0160] If the validity verification passes, the resource to be published will be published to the target location of the resource storage device according to the resource publishing path.

[0161] In this embodiment, the resource publishing device can obtain resources to be published based on a resource publishing request; generate a resource publishing path based on the resource information of the resources to be published; and then publish the resources to be published based on the resource publishing path. The entire resource publishing process requires no manual intervention, realizing automatic resource publishing and improving the efficiency of resource publishing. Furthermore, the elimination of manual selection of the publishing path reduces the probability of publishing errors and improves the accuracy of resource publishing.

[0162] This application embodiment also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. When the computer program is executed by the processor of a resource publishing device, it performs the following actions: receiving a resource publishing request, which is generated when a resource to be published is submitted in a resource management device and a publishing operation for the resource to be published exists, the resource publishing request including resource information of the resource to be published; obtaining the resource to be published based on the resource publishing request; generating a resource publishing path according to the resource information of the resource to be published; and publishing the resource to be published to a target location of a resource storage device according to the resource publishing path.

[0163] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0164] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Those skilled in the art will understand that implementing all or part of the processes of the above embodiments and making equivalent changes in accordance with the claims of this application are still within the scope of the invention.

Claims

1. A resource publishing method, characterized in that, include: Receive a resource publishing request, which is generated when a resource to be published is submitted in the resource management device and a publishing operation for the resource to be published exists. The resource publishing request includes the resource information of the resource to be published. The resource to be published is obtained based on the resource publishing request; Generate a resource publishing path based on the resource information of the resource to be published; Publish the resource to be published to the target location of the resource storage device according to the resource publishing path; The method further includes: Obtain the access path generation rules corresponding to the publishing environment of the resource to be published; The resource information of the resource to be published is input into the access path generation rule to obtain the access path of the resource to be published; A mapping relationship is established between the access path and the resource publishing path so that when the resource storage device receives an access request carrying the access path, the resource to be published in the target location is returned based on the mapping relationship between the access path and the resource publishing path.

2. The method according to claim 1, characterized in that, The resource management device runs a version management tool, which is used to manage resources in multiple projects under multiple different project groups; the resources to be released are submitted through the version management tool; the resource management device stores multiple resources, and when any resource is submitted through the version management tool, the resource management device generates a resource storage path for the resource, and the resource is stored in the storage location indicated by the resource storage path. The step of obtaining the resource to be published based on the resource publishing request includes: The multiple resources are copied from the resource management device using a continuous integration tool; Based on the resource publishing request, obtain the resource storage path corresponding to the resource to be published; The resource to be published is obtained from multiple copied resources according to the resource storage path corresponding to the resource to be published.

3. The method according to claim 2, characterized in that, If the project to which the resource to be published belongs is the target project, then the resource information of the resource to be published includes any one or more of the following: the name of the target project, the name of the project group to which the target project belongs, and the version number of the resource to be published. Generating a resource publishing path based on the resource information of the resource to be published includes: Obtain the publishing environment corresponding to the resource to be published, and obtain the publishing path generation rules corresponding to the publishing environment; The resource information of the resource to be published is input into the publishing path generation rule to obtain the resource publishing path of the resource to be published.

4. The method according to claim 3, characterized in that, If the publishing operation is a test operation on the resource to be published, then the publishing environment is a preview environment, which includes at least one test server, and the resource storage device refers to any one of the at least one test server.

5. The method according to claim 3, characterized in that, If the publishing operation is an application operation, then the publishing environment is a content delivery network, which includes a source server and multiple node servers, and the resource storage device refers to the source server.

6. The method according to claim 1, characterized in that, After publishing the resource to be published to the target location of the resource storage device according to the resource publishing path, the method further includes: Determine the time difference between the current time and the time when the resource to be published is published to the target location; If the time difference is greater than or equal to a time difference threshold, a notification message is sent to the resource storage device, which instructs the resource storage device to delete the resource to be published in the target location.

7. The method according to claim 1, characterized in that, The step of publishing the resource to be published to the target location of the resource storage device according to the resource publishing path includes: Obtain the attribute information of the resource to be published, wherein the attribute information includes one or more of the following: resource type, resource size, resource version, and resource security; The legality of the resource to be published is verified based on its attribute information. If the validity verification passes, the resource to be published will be published to the target location of the resource storage device according to the resource publishing path.

8. A resource publishing device, characterized in that, include: A communication unit is used to receive a resource publishing request, which is generated when a resource to be published is submitted in the resource management device and a publishing operation for the resource to be published exists. The resource publishing request includes the resource information of the resource to be published. Processing unit, configured to obtain the resource to be published based on the resource publishing request; The processing unit is further configured to generate a resource publishing path based on the resource information of the resource to be published; The processing unit is further configured to publish the resource to be published to the target location of the resource storage device according to the resource publishing path; The processing unit is further configured to: Obtain the access path generation rules corresponding to the publishing environment of the resource to be published; The resource information of the resource to be published is input into the access path generation rule to obtain the access path of the resource to be published; A mapping relationship is established between the access path and the resource publishing path so that when the resource storage device receives an access request carrying the access path, the resource to be published in the target location is returned based on the mapping relationship between the access path and the resource publishing path.

9. A resource publishing device, characterized in that, include: A processor is used to implement one or more computer programs; as well as A computer storage medium storing one or more computer programs, said one or more computer programs being adapted to be loaded by the processor and executed as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the resource publishing method as described in any one of claims 1-7.

11. A computer program product, characterized in that, The computer program product stores a computer program, which, when executed by a processor, is a resource publishing method as described in any one of claims 1-7.