An image bed asset management method, device, equipment, medium and product

By employing a two-tier CDN architecture and redirection mechanism, dynamically calculating signatures and automatically refreshing them, the problem of inconsistent validity period control in image hosting asset management is solved, achieving efficient CDN cache management and stable resource access.

CN122179472APending Publication Date: 2026-06-09深圳墨世科技有限公司

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
深圳墨世科技有限公司
Filing Date
2026-03-04
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

In existing technologies, image hosting asset management is inefficient, dynamic validity period control is not possible, and CDN cache management is inconsistent, leading to increased pressure on origin servers and unstable resource access.

Method used

A two-tier CDN architecture and redirection mechanism are adopted. The first-tier CDN caches redirected responses, and the second-tier CDN caches image content. The signature is dynamically calculated and automatically refreshed, enabling flexible control and unified management of the validity period.

Benefits of technology

It reduces origin server load and bandwidth costs, improves image hosting asset management efficiency, and ensures link stability and resource access security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122179472A_ABST
    Figure CN122179472A_ABST
Patent Text Reader

Abstract

The application discloses a kind of image bed asset management method, device, equipment, medium and product, it is related to network communication technical field, especially to cloud computing and content distribution network technical field.The method comprises: extracting picture identification from the first level picture access request sent by client through the first level CDN;Obtain the redirection response corresponding to the picture identification from the local cache of the first level CDN or the image bed service;The redirection response is fed back to client by the first level CDN;Extract signature from the second level picture access request sent by client through the second level CDN;Second level picture access request is the access request determined based on redirection response;Picture content is obtained according to signature by the second level CDN, and the picture content is fed back to client.Through the above technical scheme, the efficiency of image bed resource management can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of network communication technology, and more particularly to the field of cloud computing and content delivery network technology, and especially to a method, apparatus, equipment, medium and product for image hosting asset management. Background Technology

[0002] With the rapid development of AI image generation technology, AIGC (Artificial Intelligence Generated Content) applications are becoming increasingly widespread, generating a large number of digital assets such as images and videos. These assets are typically stored in cloud object storage services and accessed through Content Delivery Networks (CDNs). Regarding image access link design, existing technologies have the following problems: First, traditional solutions directly return the resource address with a valid signature as the image resource address to the client. When the signature expires, the resource address held by the client becomes invalid, requiring a new signed resource address to be obtained. Changes in the signed resource address cause CDN cache invalidation, increasing the pressure on the origin server; the client needs to frequently update the image resource address, increasing request overhead; and it is difficult to uniformly manage image resources with different validity periods. Second, to simplify management, some solutions use a unified long-term signed resource address. However, this solution cannot achieve differentiated validity period control for different business scenarios; once the resource address is leaked, the resource can be illegally accessed throughout its validity period; and it is difficult to dynamically adjust the validity period based on user status or business needs. Third, in existing technologies, the management of access link validity and the physical cleanup of resources are often two separate systems, which may lead to situations where "the link has expired but the resource still occupies storage" or "the resource has been cleaned up but the link is still valid, resulting in access errors"; there is a lack of a unified policy management mechanism.

[0003] Therefore, a technical solution is needed that can achieve dynamic validity period control, efficient use of CDN caching, and unified coordination with resource lifecycle management. Summary of the Invention

[0004] This invention provides a method, apparatus, equipment, medium, and product for image hosting asset management, in order to solve the problem of low efficiency in image hosting asset management.

[0005] According to one aspect of the present invention, a method for managing image hosting assets is provided, applied to a server, the server deploying an image hosting service and a CDN, the CDN including a primary CDN and a secondary CDN, the method comprising: The image identifier is extracted from the first-level image access request sent by the client through the first-level CDN; Obtain the redirection response corresponding to the image identifier from the local cache of the primary CDN or the image hosting service; The redirection response is fed back to the client via the primary CDN. The signature is extracted from the secondary image access request sent by the client through the secondary CDN; the secondary image access request is an access request determined based on the redirect response; The image content is obtained based on the signature through the secondary CDN, and the image content is then fed back to the client.

[0006] According to another aspect of the present invention, an image hosting asset management device is provided, configured on a server, the server deploying an image hosting service and a CDN, the CDN including a primary CDN and a secondary CDN, the device comprising: The first request extraction module is used to extract the image identifier from the first-level image access request sent by the client through the first-level CDN; The redirect response acquisition module is used to acquire the redirect response corresponding to the image identifier from the local cache of the first-level CDN or the image hosting service; The first feedback module is used to feed back the redirection response to the client through the first-level CDN; The second request extraction module is used to extract a signature from a secondary image access request sent by the client through the secondary CDN; the secondary image access request is an access request determined based on the redirect response; The second feedback module is used to obtain the image content based on the signature through the secondary CDN and then feed the image content back to the client.

[0007] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the image hosting asset management method according to any embodiment of the present invention.

[0008] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the image hosting asset management method according to any embodiment of the present invention.

[0009] According to another aspect of the present invention, a computer program product is provided, comprising a computer program / instructions that, when executed by a processor, implement the image hosting asset management method as described in any embodiment of the present invention.

[0010] This invention, through a two-tier CDN architecture and redirection mechanism, achieves dynamic calculation and automatic refresh of signatures, ensuring link stability while enabling flexible control over validity periods. The first-tier CDN caches redirection responses, and the second-tier CDN caches image content, fully utilizing the edge acceleration capabilities of CDN. When asset validity periods are adjusted, only the redirection response corresponding to the new signature needs to be replaced, without redistributing image content, reducing origin server pressure and bandwidth costs, thereby improving the efficiency of image hosting asset management.

[0011] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

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

[0013] Figure 1 This is a flowchart of a drawing bed asset management method provided in an embodiment of the present invention; Figure 2 This is a flowchart of another image hosting asset management method provided in an embodiment of the present invention; Figure 3 This is a flowchart of another image hosting asset management method provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of a drawing bed asset management device provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of the structure of an electronic device that implements the image hosting asset management method of this invention. Detailed Implementation

[0014] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0015] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0016] Furthermore, it should be noted that the information collected in the technical solution of this invention is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of related data all comply with the relevant laws, regulations and standards of relevant countries and regions, necessary confidentiality measures have been taken, and public order and good morals are not violated. Corresponding operation entry points are provided for users to choose to authorize or refuse.

[0017] Figure 1 This is a flowchart of an image hosting asset management method provided by an embodiment of the present invention. This embodiment is applicable to situations involving the management of image hosting assets. Image hosting assets include the image files themselves, as well as associated information generated during the storage, access, and management of the images. This method can be executed by an image hosting asset management device, which can be implemented in hardware and / or software. This device can be configured in an electronic device with corresponding data processing capabilities, such as a server. The server deploys image hosting services and a CDN (Content Delivery Network), which includes a primary CDN and a secondary CDN. Figure 1 As shown, the method includes: S110. Extract the image identifier from the first-level image access request sent by the client through the first-level CDN.

[0018] In this system, the Tier 1 CDN is an edge node that faces the client and receives Tier 1 image access requests from the client. The Tier 1 CDN is used to cache redirect responses. A Tier 1 image access request is a request sent by the client to the Tier 1 CDN to retrieve an image. The image identifier is the identification information for the image.

[0019] Specifically, when a client uses a first-level image access request to request an image, the first-level image access request first reaches the first-level CDN, and the image identifier can be extracted from the first-level image access request sent by the client through the first-level CDN.

[0020] S120. Obtain the redirect response corresponding to the image identifier from the local cache of the primary CDN or the image hosting service.

[0021] Image hosting services are used to store and manage image resources. A redirect response is an HTTP (Hypertext Transfer Protocol) response returned by the primary CDN to the client, informing them of the actual storage address of the image.

[0022] Specifically, if the local cache of the first-level CDN stores the redirect response corresponding to the image identifier, it directly retrieves the redirect response from the cache. If the local cache of the first-level CDN does not store the redirect response corresponding to the image identifier, the first-level image access request is sent back to the image hosting service to retrieve the redirect response corresponding to the image identifier. This approach, prioritizing the retrieval of the redirect response corresponding to the image identifier from the first-level CDN's local cache, and only retrieving it from the image hosting service if it is not found there, significantly reduces the number of origin server requests, lowers the pressure on the image hosting service, speeds up the redirect response, and improves the overall efficiency of image access.

[0023] S130. The redirection response is fed back to the client through the first-level CDN.

[0024] Specifically, by directly feeding back the redirection response to the client through the primary CDN, the request chain is shortened, network latency is reduced, and the client's response speed in obtaining image addresses is improved. At the same time, the redirection logic is converged on the edge CDN nodes, reducing the overhead of backend service interaction and improving the overall concurrency processing capability and access stability of the system.

[0025] S140. Extract the signature from the secondary image access request sent by the client through the secondary CDN; the secondary image access request is an access request determined based on the redirect response.

[0026] In this context, a secondary CDN is an edge node that receives redirect addresses from the primary CDN and provides image resources to clients. A secondary image access request is a request made by the client after receiving a redirect response from the primary CDN, based on the address indicated in the redirect response, to retrieve the actual image resource. The signature is a string used to verify the secondary image access request.

[0027] Specifically, the secondary CDN receives secondary image access requests initiated by clients based on redirected addresses, parses and extracts the signature from the requests; the secondary image access request is an access request determined based on the redirected response.

[0028] S150: Obtain the image content based on the signature through a secondary CDN and send the image content back to the client.

[0029] The image content refers to the final image resources obtained.

[0030] Specifically, the secondary CDN performs a validity check on the extracted signature. After the check passes, it retrieves the corresponding image content based on the image identifier of the request and returns the image content to the client.

[0031] This invention separates request routing (redirect response caching) and content distribution (image resource caching) into two independent CDN nodes. The primary CDN and the secondary CDN each assume different responsibilities, thereby decoupling fixed links and dynamic signatures, efficiently utilizing CDN caching, and improving the security and efficiency of image distribution.

[0032] Figure 2 This is a flowchart of another image hosting asset management method provided by an embodiment of the present invention. Based on the above embodiments, this embodiment optimizes the "obtaining the redirection response corresponding to the image identifier from the image hosting service" and provides an optional implementation scheme. For example... Figure 2 As shown, the method includes: S210. Extract the image identifier from the first-level image access request sent by the client through the first-level CDN.

[0033] S220. Obtain the redirect response corresponding to the image identifier from the local cache of the primary CDN or the image hosting service.

[0034] S230: The redirection response is fed back to the client through the first-level CDN.

[0035] S240. Extract the signature from the secondary image access request sent by the client through the secondary CDN; the secondary image access request is an access request determined based on the redirect response.

[0036] S250 retrieves image content based on the signature via a secondary CDN and sends the image content back to the client.

[0037] Optionally, the redirect response corresponding to the image identifier can be obtained from the image hosting service, including: if no redirect response corresponding to the image identifier is found in the local cache of the first-level CDN, a back-to-origin request is sent to the image hosting service; the image hosting service determines the pre-signed address based on the back-to-origin request; the image hosting service generates a redirect response corresponding to the image identifier based on the pre-signed address, and feeds the redirect response back to the first-level CDN.

[0038] The origin pull request can be a request initiated by a primary CDN to the image hosting service to obtain the redirect response corresponding to the image identifier. The pre-signed address is a temporary, accessible address generated by the image hosting service for the image identifier, containing a valid signature and time-limited controls, used to authorize clients to securely access the corresponding image resources.

[0039] Specifically, when the primary CDN does not find a redirect response matching the image identifier in its local cache, the primary CDN initiates a back-to-origin request to the image hosting service. After receiving the back-to-origin request, the image hosting service determines the corresponding pre-signed address based on the image identifier and other information in the request, generates a redirect response corresponding to the image identifier based on the pre-signed address, and then returns the generated redirect response to the primary CDN.

[0040] Optionally, based on the origin request, the pre-signature address is determined, including: extracting the image identifier from the origin request and querying the task record corresponding to the image identifier; parsing the task record to obtain task characteristics; determining the validity period information based on the task characteristics; and calculating the pre-signature address based on the validity period information.

[0041] The task record is a structured record associated with the image identifier, containing task configuration and execution information. Task characteristics are the feature information of the task record. Validity information includes the CDN signature validity period and physical cleanup time; the CDN signature validity period is the effective duration of the pre-signed address, used to limit the time window for legal access to the resource; the physical cleanup time is the duration from the creation of the image resource to its physical deletion, used to control the storage lifecycle of the image resource.

[0042] Specifically, through the image hosting service, image identifiers are extracted from received origin requests. The corresponding task records are then queried based on these identifiers, parsed to obtain task characteristics, and validity period information is determined based on these characteristics. A pre-signed address is then calculated and generated based on this validity period information. Thus, the image hosting service dynamically generates pre-signed addresses with permissions and time-limited controls based on image identifiers, achieving unified management of image resource access permissions and storage lifecycle.

[0043] Optionally, task features include task metadata; correspondingly, based on the task features, validity period information is determined, including: parsing the task features according to priority to obtain the task's payment features; determining candidate validity period information based on the payment features; the candidate validity period information includes the CDN signature validity period and the first physical cleanup duration; detecting whether the task metadata contains a user feedback identifier; if it contains one, the duration obtained by adding the first physical cleanup duration and the feedback retention duration is used as the second physical cleanup duration; the second physical cleanup duration and the CDN signature validity period are determined as validity period information; if they are not contained, the candidate validity period information is determined as validity period information.

[0044] The task metadata describes extended information such as task details. Payment characteristics reflect the user's payment type. Candidate validity period information is the validity period initially determined based on the payment characteristics. The first physical cleanup duration is the initial base duration from resource creation to physical deletion, determined based on the payment characteristics. The user feedback identifier is used to indicate whether a user has provided feedback. The second physical cleanup duration is the total physical cleanup duration obtained by adding the first physical cleanup duration to the feedback retention duration when a user feedback identifier exists. The feedback retention duration is the additional physical storage duration extended for the resource when a user feedback identifier exists.

[0045] Specifically, the user's payment level is first identified from the task characteristics according to priority. Then, candidate validity period information (including CDN signature validity period and first physical cleanup duration) is generated based on the payment level. Next, it is checked whether there is a user feedback identifier in the task. If there is, the feedback retention period is added to the first physical cleanup duration to obtain the second physical cleanup duration. The second physical cleanup duration and the CDN signature validity period are used together as the final validity period information. If there is no user feedback, the candidate validity period information is used directly as the final validity period information.

[0046] Optionally, task features may also include a points source identifier or a user identifier, with priority given to points source identifier over task metadata, and task metadata over user identifier. Correspondingly, task features are parsed according to priority to obtain the task's payment features, including: if a points source identifier exists in the task features, the payment features are obtained from the points source table based on the points source identifier; if no points source identifier exists in the task features, it is determined whether the task metadata contains a points source identifier; if the task metadata contains a points source identifier, the payment features are obtained from the points source table based on the points source identifier; if the task metadata does not contain a points source identifier, the user's current subscription status is determined based on the user identifier, and the payment features are determined based on the user's current subscription status. The points source identifier identifies the source of points consumed by the task; the user identifier identifies the user to whom the task belongs; the user's current subscription status includes the service package type, subscription level, subscription validity period, payment method, and corresponding service permissions. Payment features include payment type; payment types include: on-demand purchase type, points purchase type, subscription type, renewal type, etc.

[0047] Optionally, based on the validity period information, the pre-signed address is calculated, including: determining the expiration time of the signature based on the CDN signature validity period and the current time; and generating the pre-signed address based on the expiration time and the resource path corresponding to the image identifier.

[0048] The expiration time is the effective end date of the signature. The resource path is the storage location path of the image resource corresponding to the image identifier. For example, if the CDN signature validity period is 10 days, and the current time is 13:00 on January 1, 2026, then the signature expiration time is 13:00 on January 11, 2026. That is, the pre-signed address will expire on January 11, 2026 at 13:00 and can no longer be accessed. The expiration time and resource path are encrypted and signed together to generate the pre-signed address.

[0049] Optionally, based on the pre-signed address, a redirection response corresponding to the image identifier is generated, including: embedding the pre-signed address into the response header; and obtaining the redirection response corresponding to the image identifier based on the response status code and the response header.

[0050] The response header is a set of fields in the redirection response used to carry control information. The response status code is a status code used to indicate the type of the redirection response.

[0051] Specifically, the pre-signed URL is placed in the HTTP response header, along with the response status code, to form a complete redirect response. This enables secure and efficient redirection access to image resources, ensuring controllable resource access permissions while reducing the bandwidth and computational overhead of directly returning resources, thus improving system stability and user experience.

[0052] This invention, through its embodiments, analyzes the payment characteristics of tasks to achieve a precise match between validity period strategies and the commercial value of tasks. For example, paid tasks have a longer validity period, while free tasks have a shorter validity period, ensuring a better user experience for paid users while effectively controlling storage costs. A three-tiered priority payment characteristic analysis mechanism accurately identifies tasks with clear payment identifiers and provides a reasonable fallback strategy for historical data. By detecting feedback identifiers in task metadata, the physical retention time of tasks involving user feedback is automatically extended, facilitating troubleshooting and customer service.

[0053] Figure 3 This is a flowchart of another image hosting asset management method provided by an embodiment of the present invention. Based on the above embodiments, this embodiment describes "performing corresponding refresh operations in response to triggering events through image hosting services" and "asset cleanup," providing an optional implementation scheme. For example... Figure 3 As shown, the method includes: S310. Extract the image identifier from the first-level image access request sent by the client through the first-level CDN.

[0054] S320: Obtain the redirect response corresponding to the image identifier from the local cache of the primary CDN or the image hosting service.

[0055] S330: The redirection response is fed back to the client through the first-level CDN.

[0056] S340. Extract the signature from the secondary image access request sent by the client through the secondary CDN; the secondary image access request is an access request determined based on the redirect response.

[0057] S350 retrieves image content based on signature via a secondary CDN and sends the image content back to the client.

[0058] Optionally, it also includes: via image hosting service, in response to a triggered event, recalculating the pre-signed address and updating the database mapping table based on the current task characteristics, or writing the task to be refreshed to intermediate storage; the triggered event includes at least one of user login, client version upgrade, account merging, and free user to subscription user conversion.

[0059] The database mapping table stores the relationships between image identifiers, pre-signed addresses, validity periods, task characteristics, and corresponding resource paths. Tasks awaiting refresh are image-related tasks that require recalculation of pre-signed addresses due to triggering events. Intermediate storage is a storage medium used to temporarily cache tasks awaiting refresh. User login is the triggering event when a user completes login through account verification. Client version upgrade is the triggering event when the client calls the version upgrade interface. Account merging is the triggering event for merging the assets of multiple user accounts. Free user to subscription user conversion is the triggering event when a user upgrades from a free user to a subscription user.

[0060] Specifically, through the image hosting service, when a preset trigger event (at least one of user login, client version upgrade, account merging, and free user to subscription user conversion) is detected, the pre-signature address is immediately recalculated and the database mapping table is updated synchronously based on the latest task characteristics after the trigger event occurs. Alternatively, the permission refresh requirement to be processed is encapsulated as a refresh task and written to intermediate storage to complete subsequent processing asynchronously, ensuring the consistency between the pre-signature address and user permissions and service policies.

[0061] Optionally, it also includes: scanning intermediate storage periodically, parsing the task to be refreshed to obtain the characteristics of the task to be refreshed; determining the validity period information to be refreshed based on the characteristics of the task to be refreshed; regenerating the pre-signed address based on the validity period information to be refreshed, and updating the image links in the database and cache.

[0062] Among them, the characteristics of the task to be refreshed are the task features of the task to be refreshed. The validity period information to be refreshed is the validity period information of the task to be refreshed.

[0063] Specifically, the process involves periodically scanning intermediate storage to retrieve tasks requiring pre-signature address updates. These tasks are then parsed to obtain their characteristics. Based on these characteristics, the validity period for updating the pre-signature addresses is determined. Finally, based on this validity period, the pre-signature addresses are regenerated, and the image links in the database and cache are updated—that is, all old image links in the database and cache are updated with the newly generated pre-signature addresses. This allows for periodic batch updates of image access addresses, ensuring that users always see the latest and most valid image links.

[0064] Optionally, after determining the validity period information to be refreshed, the process further includes: obtaining the third physical cleanup duration of the validity period information to be refreshed; determining the planned cleanup time based on the recorded time of the task to be refreshed and the third physical cleanup duration; if the current time is after the planned cleanup time, marking the task to be refreshed as a task to be deleted; obtaining the planned deletion time based on the planned cleanup time and the task retention duration; and executing the task to be deleted at the planned deletion time to complete the physical resource deletion.

[0065] The planned cleanup time point is used to determine whether a resource has reached the required cleanup stage. The task to be deleted is the task that requires the physical deletion of image resources. The planned deletion time point is the scheduled time for the physical deletion of image resources. Therefore, by determining the planned cleanup time point based on the third physical cleanup duration and setting the planned deletion time point in conjunction with the task retention duration, automatic identification, tiered cleanup, and scheduled deletion of expired resources can be achieved. This ensures that expired physical resources are released from storage space in a timely manner, while a buffering mechanism prevents accidental deletion, improving system storage utilization and the stability, security, and automation of resource management.

[0066] This invention, through its asset expiration refresh triggering mechanism and processing flow design, ensures that the signature is refreshed only when a triggering event occurs, thereby achieving precise control over asset access permissions. Furthermore, by automatically identifying expired resources, implementing tiered cleanup, and periodically deleting assets, it ensures that resources are only cleaned up after CDN links fail, thus avoiding inconsistencies between access links and storage status.

[0067] Figure 4 This is a schematic diagram of an image hosting asset management device provided in an embodiment of the present invention. This embodiment is applicable to situations involving the management of image hosting assets, which include the image files themselves and associated information generated during the storage, access, and management of the images. The device can be implemented in hardware and / or software and can be configured in an electronic device with corresponding data processing capabilities, such as a server. The server deploys image hosting services and a CDN (Content Delivery Network), which includes a primary CDN and a secondary CDN. Figure 4 As shown, the device includes: The first request extraction module 410 is used to extract the image identifier from the first-level image access request sent by the client through the first-level CDN; The redirect response acquisition module 420 is used to obtain the redirect response corresponding to the image identifier from the local cache of the first-level CDN or the image hosting service; The first feedback module 430 is used to send the redirection response back to the client through the first-level CDN; The second request extraction module 440 is used to extract the signature from the secondary image access request sent by the client through the secondary CDN; the secondary image access request is an access request determined based on the redirect response; The second feedback module 450 is used to obtain the image content based on the signature through the secondary CDN and then feed the image content back to the client.

[0068] This invention, through a two-tier CDN architecture and redirection mechanism, achieves dynamic calculation and automatic refresh of signatures, ensuring link stability while enabling flexible control over validity periods. The first-tier CDN caches redirection responses, and the second-tier CDN caches image content, fully utilizing the edge acceleration capabilities of CDN. When asset validity periods are adjusted, only the redirection response corresponding to the new signature needs to be replaced, without redistributing image content, reducing origin server pressure and bandwidth costs, thereby improving the efficiency of image hosting asset management.

[0069] Optionally, the redirection response acquisition module 420 includes: The origin request sending unit is used to send an origin request to the image hosting service if no redirect response corresponding to the image identifier is found in the local cache of the first-level CDN. The pre-signature address determination unit is used to determine the pre-signature address based on the origin request through the image hosting service; The redirect response feedback unit is used to generate a redirect response corresponding to the image identifier based on the pre-signed address through the image hosting service, and to feed the redirect response back to the first-level CDN.

[0070] Optionally, the pre-signed address determination unit includes: The task record query subunit is used to extract image identifiers from the origin request and query the task record corresponding to the image identifier. The task feature acquisition subunit is used to parse task records and obtain task features; The validity period information determination subunit is used to determine the validity period information based on the task characteristics; The pre-signature address determination sub-unit is used to calculate the pre-signature address based on the validity period information.

[0071] Optionally, the task features include task metadata; correspondingly, the validity period information determination subunit is specifically used for: parsing the task features according to priority to obtain the task's payment features; determining candidate validity period information based on the payment features; the candidate validity period information includes the CDN signature validity period and the first physical cleanup duration; detecting whether the task metadata contains a user feedback identifier; if it does, adding the first physical cleanup duration to the feedback retention duration to obtain the second physical cleanup duration; determining the second physical cleanup duration and the CDN signature validity period as the validity period information; if it does not contain these, determining the candidate validity period information as the validity period information.

[0072] Optionally, the pre-signature address determination sub-unit is used to: determine the expiration time of the signature based on the CDN signature validity period and the current time; and generate a pre-signature address based on the expiration time and the resource path corresponding to the image identifier.

[0073] Optionally, the redirection response feedback unit is specifically used to: embed the pre-signed address into the response header; and obtain a redirection response corresponding to the image identifier based on the response status code and the response header.

[0074] Optionally, the device further includes: a trigger event processing module, used to: recalculate the pre-signature address and update the database mapping table based on the current task characteristics, or write the task to be refreshed to intermediate storage, in response to a trigger event via an image hosting service; the trigger event includes at least one of user login, client version upgrade, account merging, and free user to subscription user conversion.

[0075] Optionally, the device further includes: a task processing module for: periodically scanning intermediate storage, parsing the task to be refreshed, and obtaining the characteristics of the task to be refreshed; determining the validity period information of the task to be refreshed based on the characteristics of the task to be refreshed; and regenerating the pre-signed address and updating the image links in the database and cache based on the validity period information of the task to be refreshed.

[0076] Optionally, the device further includes: a task deletion module, comprising: The planned cleanup time point determination unit is used to obtain the third physical cleanup duration of the validity period information to be refreshed, and to determine the planned cleanup time point based on the recorded time point of the task to be refreshed and the third physical cleanup duration. The task to be deleted marker unit is used to mark the task to be refreshed as a task to be deleted if the current time point is after the planned cleanup time point; The planned deletion time point determination unit is used to obtain the planned deletion time point based on the planned cleanup time point and the task retention duration; The task deletion unit is used to execute the task to be deleted at the scheduled deletion time to complete the deletion of physical resources.

[0077] The image hosting asset management device provided in the embodiments of the present invention can execute the image hosting asset management method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the method execution.

[0078] According to embodiments of the present invention, the present invention also provides an electronic device, a readable storage medium, and a computer program product.

[0079] Figure 5 A schematic diagram of an electronic device 10, which can be used to implement embodiments of the present invention, is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0080] like Figure 5 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0081] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0082] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as image hosting asset management methods.

[0083] In some embodiments, the image hosting asset management method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the image hosting asset management method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the image hosting asset management method by any other suitable means (e.g., by means of firmware).

[0084] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0085] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0086] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0087] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0088] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0089] A computing system can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product within the cloud computing service system to address the shortcomings of traditional physical hosts and virtual private servers, such as high management difficulty and weak business scalability.

[0090] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0091] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method for managing image hosting assets, characterized in that, Applied to a server, the server deploying image hosting services and a CDN, the CDN including a primary CDN and a secondary CDN, the method includes: The image identifier is extracted from the first-level image access request sent by the client through the first-level CDN; Obtain the redirection response corresponding to the image identifier from the local cache of the primary CDN or the image hosting service; The redirection response is fed back to the client via the primary CDN. The signature is extracted from the secondary image access request sent by the client through the secondary CDN; the secondary image access request is an access request determined based on the redirect response; The image content is obtained based on the signature through the secondary CDN, and the image content is then fed back to the client.

2. The method according to claim 1, characterized in that, Obtaining the redirect response corresponding to the image identifier from the image hosting service includes: If no redirect response corresponding to the image identifier is found in the local cache of the first-level CDN, a request to return to the origin server is sent to the image hosting service. Based on the origin request, the pre-signed address is determined using the image hosting service. Using the image hosting service, a redirect response corresponding to the image identifier is generated based on the pre-signed address, and the redirect response is fed back to the first-level CDN.

3. The method according to claim 2, characterized in that, Based on the origin request, the pre-signed address is determined, including: Extract the image identifier from the origin request and query the task record corresponding to the image identifier; The task records are parsed to obtain task characteristics; Based on the aforementioned task characteristics, the validity period information is determined; Based on the validity period information, the pre-signature address is calculated.

4. The method according to claim 3, characterized in that, The task characteristics include task metadata; correspondingly, determining the validity period information based on the task characteristics includes: The task features are parsed according to priority to obtain the payment features of the task; Based on the payment characteristics, candidate validity period information is determined; the candidate validity period information includes CDN signature validity period and first physical cleanup duration; Detect whether the task metadata contains a user feedback identifier; If included, the duration obtained by adding the first physical cleanup duration to the feedback retention duration shall be used as the second physical cleanup duration; The second physical cleanup duration and the CDN signature validity period are determined as validity period information; If not included, the candidate validity period information will be determined as validity period information.

5. The method according to claim 4, characterized in that, The calculation of the pre-signature address based on the validity period information includes: Based on the CDN signature validity period and the current time, determine the signature expiration time; A pre-signed address is generated based on the expiration time and the resource path corresponding to the image identifier.

6. The method according to claim 2, characterized in that, Based on the pre-signed address, a redirection response corresponding to the image identifier is generated, including: Embed the pre-signed address in the response header; Based on the response status code and the response header, a redirection response corresponding to the image identifier is obtained.

7. The method according to claim 1, characterized in that, The method further includes: Through the image hosting service, in response to a triggered event, the pre-signature address is recalculated and the database mapping table is updated based on the current task characteristics, or the task to be refreshed is written to intermediate storage; the triggered event includes at least one of user login, client version upgrade, account merging, and free user to subscription user conversion.

8. The method according to claim 7, characterized in that, The method further includes: According to the cycle, the intermediate storage is scanned, the task to be refreshed is parsed, and the characteristics of the task to be refreshed are obtained; Based on the characteristics of the task to be refreshed, the validity period information to be refreshed is determined; Based on the validity period information to be refreshed, the pre-signed address is regenerated, and the image links in the database and cache are updated.

9. The method according to claim 8, characterized in that, After determining the validity period information to be refreshed, the method further includes: The third physical cleanup duration of the validity period information to be refreshed is obtained, and the planned cleanup time is determined based on the recorded time of the task to be refreshed and the third physical cleanup duration. If the current time point is after the planned cleanup time point, then the task to be refreshed will be marked as a task to be deleted; Based on the planned cleanup time and task retention duration, the planned deletion time is obtained; At the scheduled deletion time, the task to be deleted is executed to complete the deletion of physical resources.

10. A drawing bed asset management device, characterized in that, Configured on a server, the server deploying image hosting services and CDN, the CDN including a primary CDN and a secondary CDN, the device comprising: The first request extraction module is used to extract the image identifier from the first-level image access request sent by the client through the first-level CDN; The redirect response acquisition module is used to acquire the redirect response corresponding to the image identifier from the local cache of the first-level CDN or the image hosting service; The first feedback module is used to feed back the redirection response to the client through the first-level CDN; The second request extraction module is used to extract a signature from a secondary image access request sent by the client through the secondary CDN; the secondary image access request is an access request determined based on the redirect response; The second feedback module is used to obtain the image content based on the signature through the secondary CDN and then feed the image content back to the client.

11. An electronic device, characterized in that, The electronic device includes: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores a computer program that can be executed by the at least one processor, which is then executed by the at least one processor to enable the at least one processor to perform the image hosting asset management method according to any one of claims 1-9.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the image hosting asset management method according to any one of claims 1-9.

13. A computer program product comprising a computer program that, when executed by a processor, implements the image hosting asset management method according to any one of claims 1-9.