Mirror file sharing method, apparatus, device, and storage medium

CN122903112APending Publication Date: 2026-10-13ZHENGZHOU INSPUR DATA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611230369.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-13
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

[0004]本申请提供了镜像文件共享方法、电子设备和存储介质,以至少解决共享功能缺乏精细化的权限控制的问题

Benefits of technology

[0010]通过本申请,由于创建私有镜像库,接收上传的至少一个镜像文件并存储至私有镜像库,其中镜像文件包括多个格式;根据镜像共享规则,配置私有镜像库中的至少一个镜像文件的共享状态和共享范围;根据至少一个镜像文件的共享状态和共享范围,创建至少一个共享镜像库并存储至少一个镜像文件的副本;响应于接收到用户查看指令,确定用户查看指令对应的目标共享镜像库,根据用户权限,从目标共享镜像库中确定并展示对应的镜像文件,因此,实现多格式镜像的统一管理,降低运维成本,还通过共享状态与范围的分级配置杜绝误操作导致的数据泄露风险,同时确保了用户仅能访问权限内的镜像,有效避免数据冗余与信息泄露。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122903112A_ABST
    Figure CN122903112A_ABST
Patent Text Reader

Abstract

The application discloses a mirror file sharing method, relates to the technical field of cloud computing, and comprises the following steps: creating a private mirror library, receiving at least one uploaded mirror file and storing the at least one mirror file into the private mirror library, wherein the mirror file comprises multiple formats; according to a mirror sharing rule, configuring a sharing state and a sharing range of at least one mirror file in the private mirror library; according to the sharing state and the sharing range of the at least one mirror file, creating at least one shared mirror library and storing a copy of the at least one mirror file; and in response to receiving a user viewing instruction, determining a target shared mirror library corresponding to the user viewing instruction, and according to a user authority, determining and displaying corresponding mirror files from the target shared mirror library, so that the problem of lacking fine authority control of a sharing function is solved, unified management of multiple-format mirrors is realized, operation and maintenance costs are reduced, and the technical effect of preventing data leakage risks caused by misoperations is achieved through hierarchical configuration of the sharing state and the range.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of cloud computing technology, and in particular to a method, apparatus, device, and storage medium for sharing image files. Background Technology

[0002] With the widespread adoption of cloud computing technology, enterprises and institutions commonly use multi-VDC (Virtual Data Center) architectures to achieve resource isolation and efficient management. Image files, as a core foundational resource for cloud server deployment, come in various formats, and the need for image sharing across different business scenarios is increasingly urgent. However, many related technologies lack granular access control for sharing functionality. They either only support global sharing, leading to data security risks, or they cannot achieve cross-VDC targeted sharing, and the unclear correlation between sharing status and sharing scope results in ineffective access control.

[0003] Therefore, in view of the shortcomings of related technical solutions, the present invention provides a method for sharing image files. Summary of the Invention

[0004] This application provides a method for sharing image files, an electronic device, and a storage medium to at least address the problem of a lack of granular access control in sharing functionality.

[0005] This application provides a method for sharing image files, the method comprising: creating a private image library; receiving and storing at least one uploaded image file in the private image library, wherein the image file includes multiple formats; configuring the sharing status and sharing scope of at least one image file in the private image library according to image sharing rules; creating at least one shared image library and storing a copy of at least one image file according to the sharing status and sharing scope of the at least one image file; and, in response to receiving a user viewing instruction, determining the target shared image library corresponding to the user viewing instruction, and determining and displaying the corresponding image file from the target shared image library according to the user's permissions.

[0006] This application also provides an image file sharing device, comprising: a first processing module, configured to create a private image library, receive at least one uploaded image file and store it in the private image library, wherein the image file includes multiple formats; a second processing module, configured to configure the sharing status and sharing scope of at least one image file in the private image library according to image sharing rules; a third processing module, configured to create at least one shared image library and store copies of at least one image file according to the sharing status and sharing scope of at least one image file; and a fourth processing module, configured to, in response to receiving a user viewing instruction, determine the target shared image library corresponding to the user viewing instruction, and determine and display the corresponding image file from the target shared image library according to the user's permissions.

[0007] This application also provides an electronic device, including: a memory for storing a computer program; and a processor for implementing the steps of any of the above-described image file sharing methods when executing the computer program.

[0008] This application also provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of any of the above-described image file sharing methods.

[0009] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above-described image file sharing methods.

[0010] This application achieves unified management of multi-format images by creating a private image library, receiving and storing at least one uploaded image file (including multiple formats) in the private image library, configuring the sharing status and scope of at least one image file in the private image library according to image sharing rules, creating at least one shared image library and storing a copy of at least one image file based on the sharing status and scope of the at least one image file, and responding to a user's viewing instruction by determining the target shared image library corresponding to the user's viewing instruction and, based on the user's permissions, identifying and displaying the corresponding image file from the target shared image library. This reduces operational costs, eliminates the risk of data leakage due to misoperation through hierarchical configuration of sharing status and scope, and ensures that users can only access images within their authorized permissions, effectively avoiding data redundancy and information leakage. Attached Figure Description

[0011] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments 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.

[0012] Figure 1 A flowchart illustrating a method for sharing image files provided in an embodiment of this application; Figure 2 A schematic diagram of the cloud host creation process for a method of sharing image files provided in this application embodiment; Figure 3 A structural block diagram of a mirror file sharing device provided in an embodiment of this application; Figure 4 This is an internal structural diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0013] 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 protection scope of this application.

[0014] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0015] It should be noted that the terms "S1," "S2," etc., are used only for descriptive purposes and do not specifically refer to the order or sequence, nor are they intended to limit this application. They are merely for the convenience of describing the method of this application and should not be construed as indicating the sequential order of the steps. Furthermore, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed in this application.

[0016] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0017] The embodiments of this application provide a method for sharing image files, and the method is described in detail below in conjunction with the execution flow of the image file sharing method.

[0018] S101: Create a private image library, receive at least one uploaded image file and store it in the private image library, wherein the image file includes multiple formats.

[0019] Here, a private image repository refers to a container image storage repository deployed on an internal network or a specific server, used for centralized management and distribution of container images.

[0020] Here, an image file is a collection of static files required for a container to run, containing a read-only template of the application and its dependencies (such as operating system libraries, configuration files, etc.).

[0021] The image file formats can include OVA (Open Virtualization Format Archive), ISO (Optical Disc Image), RAW (Raw Disk Image), QCOW2 (QEMU Copy-On-Write 2), etc. Specifically, OVA is used for virtual machine packaging, ISO is used for physical machine installation, and RAW or QCOW2 is used for cloud storage adaptation, etc.

[0022] The private image library may include one or more image files of different formats.

[0023] Specifically, the system administrator creates a private image repository under a specified VDC (Virtual Data Center) and uploads image files in OVA, ISO, RAW, and QCOW2 formats.

[0024] S102: Configure the sharing status and sharing scope of at least one image file in the private image library according to the image sharing rules.

[0025] Here, image sharing rules refer to the standardized management guidelines established by a private image repository to regulate the access permissions, dissemination scope, and usage rights of image files. These guidelines may include sharing activation conditions, authorization object definition, access permission division, and sharing validity period constraints.

[0026] Here, the shared status describes the visibility and accessibility level of an image in a private image repository. It defines whether the image is open to external access and is divided into two states: enabled sharing and disabled sharing. It is a basic configuration item for managing the visibility of images.

[0027] Here, the sharing scope refers to the boundary of objects that are authorized to access and obtain the image file, which is used to limit the users and distribution boundaries of the image.

[0028] Specifically, once the system administrator enables sharing for any image file and selects the sharing scope, the sharing control module immediately triggers the shared image library generation logic without manual intervention.

[0029] S103: Based on the sharing status and sharing scope of at least one image file, create at least one shared image library and store a copy of at least one image file.

[0030] Here, a shared image repository refers to an independent storage unit (such as a project, namespace, or repository) created in the current platform based on a specific sharing status and scope, used to centrally store image files with the same access permissions.

[0031] A shared image library may contain one image file or multiple image files.

[0032] You can create one shared image repository at a time, or create multiple shared image repositories simultaneously.

[0033] The shared image library stores copies of the image files.

[0034] Specifically, after the system administrator enables sharing for any image file and selects the sharing scope, the system automatically creates a new shared image library, the shared image library type is marked as "shared", and a copy of the image file and its associated sharing attribute information are stored synchronously.

[0035] S104: In response to receiving a user's viewing instruction, determine the target shared image library corresponding to the user's viewing instruction, and determine and display the corresponding image file from the target shared image library according to the user's permissions.

[0036] Here, a user viewing command refers to an operation command initiated by a user to request viewing image information within a specified shared image repository, including information such as the viewing target and viewing conditions.

[0037] Here, the target shared image library is the image storage unit specified in the user's viewing instructions or determined based on the context.

[0038] Specifically, user identity can be verified through session, token, or basic authentication. Anonymous access is considered an unauthenticated user.

[0039] It should be noted that this application achieves unified management of multi-format images, reduces operation and maintenance costs, and eliminates the risk of data leakage caused by accidental operation through hierarchical configuration of shared status and scope. At the same time, it ensures that users can only access images within their authorized permissions, effectively avoiding data redundancy and information leakage.

[0040] In some specific implementations, creating a private image repository, receiving at least one uploaded image file, and storing it in the private image repository includes: Perform a qualification check on at least one uploaded image file, including format check, integrity check and security check; In response to at least one image file passing the qualification check, associate the corresponding metadata with at least one image file and store the image file and the corresponding metadata in the private image library.

[0041] Here, qualification verification refers to a series of checks performed on the uploaded image file to ensure that it meets the storage requirements of the private image library and to guarantee the availability, integrity and security of the image.

[0042] Here, format validation verifies whether the image file conforms to the expected format specification (such as Docker V2 manifest format, OCI image format), ensuring that its structure is correct and can be parsed and stored by the image library.

[0043] Here, integrity verification checks whether the image file has been damaged or lost during transmission. This is usually done by calculating a hash value (such as SHA256) and comparing it with the original digest to ensure that each layer of data in the image is intact.

[0044] Here, security verification involves scanning the image content for security features, such as detecting known vulnerabilities (CVEs), malware, and sensitive information leaks, to prevent insecure images from entering the private repository. Security verification can be integrated with third-party scanning tools (such as Trivy and Clair).

[0045] Here, metadata is data that describes the attributes, origin, and management information of image files, and is used to assist in image retrieval, version management, and access control.

[0046] The metadata can include image identifier, format type, sharing status (off by default) and sharing scope (empty by default).

[0047] In this way, by receiving and storing image files in multiple formats to build a private image library, unified access and management of image formats are achieved.

[0048] In one embodiment, the method further includes: Parse at least one uploaded image file to obtain at least one base layer and application layer of the image file; Image files with the same base layer are grouped together, and base layer merging and storage are performed on image files within the same group, while retaining common base layer data. The incremental storage method stores the differences between the image files within the same group. Establish associations between the base layer and each incremental difference layer to complete the merging and incremental storage of image files.

[0049] Here, the base layer is the common and fundamental component of an image, usually referring to the operating system kernel, basic library files, etc. Multiple images may share the same base layer.

[0050] Here, the application layer is personalized content added on top of the base layer, such as specific application software, configuration files, user data, etc. The application layer varies from image to image.

[0051] Incremental storage is a storage method that only stores the changed parts of the data, avoiding the repeated storage of the same data.

[0052] In this way, duplicate storage of base layer data can be avoided, significantly reducing the storage footprint of the image library and improving storage resource utilization. At the same time, incremental storage only processes the differences between images, reducing data writing and storage time, and accelerating image storage, updates and synchronization.

[0053] In some specific implementations, the sharing status and sharing scope of at least one image file in the private image repository are configured according to the image sharing rules, including: Receive a sharing status configuration instruction for at least one image file, where the sharing status includes an enabled state and a disabled state; When at least one image file is detected to have its sharing state configured as enabled, the sharing range configuration function is activated, where the sharing range is a default empty value. When at least one image file is detected to have its sharing state configured as off, disable the sharing range configuration function. In response to the activation of the shared scope configuration function, obtain the data center identifier corresponding to at least one image file; Obtain the list of data center identifiers in the system, compare the data center identifier corresponding to at least one image file with the list of data center identifiers, automatically filter the data centers corresponding to at least one image file, and generate a list of selectable data centers; Receive a selection instruction for a list of available data centers, wherein the selection instruction includes one or more data centers; According to the selection instructions, the sharing scope of at least one image file is configured to at least one data center in the list of optional data centers, and the sharing status and sharing scope information are associated with the metadata of at least one image file and stored.

[0054] Here, the data center is VDC (Virtual Data Center).

[0055] Here, the data center list is a list of all available data centers maintained by the private image repository system.

[0056] Here, the list of available data centers is a filtered set of shared target data centers that users can choose from.

[0057] The sharing scope only supports selecting data centers other than the data center of the current image file, including specifying a single non-data center, multiple non-data center groups, or all non-data centers.

[0058] Specifically, the filtering rules are based on comparing the data center identifier of the current image file with the global list, excluding the data center where the image itself is located (to avoid redundancy in the same region), or allowing only specific regions according to compliance requirements.

[0059] In this way, we can achieve refined management and efficient construction of shared resources.

[0060] In some specific implementations, configuring the sharing status and sharing scope of at least one image file in the private image repository according to the image sharing rules also includes: Configure a sharing validity period for at least one image file and establish a relationship between the duration and the sharing status; In response to at least one image file reaching the shared validity period, the shared state of at least one image file is switched to the non-shared state.

[0061] Here, the shared validity period refers to the duration for which an image file remains in a shared state within a private image repository, typically measured in minutes, hours, or days. This duration can be configured by the administrator or the image owner and is linked to the image's shared state.

[0062] In this way, without manual intervention, the security risks caused by long-term exposure of images can be effectively prevented, permissions in temporary sharing scenarios can be revoked in a timely manner, and the burden of manually managing expired images can be reduced, thereby improving the security and operational efficiency of the image repository.

[0063] In one embodiment, the method further includes: Collect metadata and uploader-related data of the image file, and construct the image feature vector corresponding to the image file; Input the mirrored feature vector into the prediction model to obtain the shared probability and prediction result; Based on the prediction results, perform sharing operations on the image file, including enabling sharing, pending confirmation, and not enabling sharing; Monitor the status changes of the image file, update the features at preset intervals, and trigger a secondary prediction when the status change meets the prediction conditions, and update the prediction results.

[0064] The data associated with the uploader can include roles, historical behaviors, etc.

[0065] Specifically, the prediction results can also include the basis for the prediction. For example, a sharing probability of 78% is based on: a similar mirror sharing rate of 82%, a 90% historical sharing willingness of the uploader, and the absence of sensitive information.

[0066] Enabling sharing includes automatically matching the optimal sharing scope for similar images within the platform, synchronously issuing sharing permissions, updating the sharing status on the image details page, and allowing target objects to directly search for and pull images without additional application. For example, based on historical data, if similar images are shared to multiple VDCs across the platform, they will be automatically shared to the entire platform; if they are only shared to VDCs of related businesses, they will be shared selectively.

[0067] The pending confirmation includes automatically pushing the prediction results, sharing probability and prediction basis to the uploader and the corresponding department administrator. A confirmation deadline is set within a preset time (such as 24 hours). If no confirmation is made within the time limit, the sharing will be treated as not being enabled. The administrator or uploader can manually confirm whether to enable or disable the sharing. After confirmation, the system will automatically perform the corresponding operation and feed the confirmation result back to the model for subsequent parameter optimization.

[0068] Not enabling sharing includes automatically hiding the sharing option for the image, allowing only the uploader and authorized users to access it. It also records the basis for the prediction, and if the usage behavior or characteristics of the image change in the future, the prediction will be triggered again.

[0069] Specifically, the predictive conditions include one of the following: the image is updated (version upgrade, security hardening, content modification), and its core characteristics change; the image usage behavior changes abruptly (such as a surge in the number of pulls, multiple VDC applications, and a significant increase in the number of favorites); the sharing pattern of similar images on the platform changes (such as a recent decrease in the sharing demand for a certain type of image); the uploader's permissions are upgraded, and historical sharing behavior changes significantly.

[0070] In this way, based on historical data and real-time features, it can make autonomous predictions and adapt to diverse mirroring scenarios; no manual intervention is required, which improves sharing efficiency and reduces the maintenance costs for administrators.

[0071] In some specific implementations, based on the sharing status and sharing scope of at least one image file, at least one shared image library is created and a copy of at least one image file is stored, including: Detect whether a user has performed a share enable operation on at least one image file in the private image repository; In response to detecting an enabled sharing operation, determine the sharing scope of the image file; Aggregate image files that are in the shared state and have the same sharing scope to create corresponding shared image libraries; The aggregated copies of multiple image files and their associated metadata are batch synchronized to the shared image library; When multiple sets of image files with different sharing scopes exist, corresponding shared image libraries are created for each sharing scope and copies of the image files are stored.

[0072] Specifically, when an administrator enables sharing and configures the same sharing range for multiple image files in a private image repository, such as 10 image files, the sharing control module generates only one shared image repository and synchronizes the 10 image files and their metadata to that shared image repository in batches, thus avoiding the waste of resources where one image corresponds to one shared image repository.

[0073] In this way, scattered images are dynamically aggregated according to a shared scope, avoiding the tedious operation of repeatedly configuring permissions and significantly improving management efficiency.

[0074] In some specific implementations, in response to receiving a user's viewing instruction, the target shared image library corresponding to the user's viewing instruction is determined, and the corresponding image file is determined and displayed from the target shared image library according to the user's permissions, including: Based on user permissions, determine the first permission level and the second permission level; When the user has the highest level of permissions, display the image files in the target shared image repository; When the user's permissions are at the second permission level, the first data center corresponding to the user is determined, and shared image files shared from the second data center to the first data center are filtered and displayed, while shared image files shared from the first data center to the second data center are blocked. The second data center is the data center in the target shared image library other than the first data center.

[0075] Here, the first privilege level refers to the level of global access, such as an administrator or superuser. Users with this level can view all images in the target shared image repository, without being restricted by data center isolation.

[0076] Here, the second privilege level refers to the ordinary user level, whose access is restricted to the data center to which the user belongs. For example, it could be a VDC administrator or a VDC user.

[0077] Specifically, when a system administrator logs in to view the shared image library, all shared images can be displayed; when a VDC administrator or VDC user logs in to view the shared image library, only image files shared by other VDCs to this VDC can be viewed, and image files shared by this VDC to other VDCs will not be displayed.

[0078] Specifically, VDC administrators and VDC users have the permission to disable sharing, which means disabling the current VDC's permission to receive shares. Disabling sharing only cancels file sharing within the current VDC and does not affect the normal use of other VDCs.

[0079] In this way, permission-based differentiated views and access control are achieved.

[0080] In some specific implementations, the method further includes: When the user's permissions are at the second permission level, check whether the image file shared by the second data center exists in the first data center; When there is no shared image file in the second data center, the shared image library entry will not be displayed; When a shared image file exists in a second data center, the option to create a shared image library is displayed, allowing users to select an image file from the shared image library to create a cloud server. In response to receiving a cloud host creation request, perform a cloud host creation operation based on the selected shared image file; In response to the successful creation of the cloud server, a creation success message is returned, and the running status of the cloud server is updated; In response to a cloud server creation failure, determine the corresponding fault type, generate and return an error message corresponding to the fault type.

[0081] Here, cloud hosts refer to virtual machine instances created based on virtualization technology, which typically run on cloud platforms, allowing users to deploy applications on them.

[0082] Here, a cloud server creation request is an instruction issued by the user through the interface or API, requesting the system to create a new cloud server based on a specified image. This request includes parameters such as image identifier and resource configuration (e.g., CPU, memory).

[0083] The types of faults can include image format mismatch, image file corruption, insufficient resources, etc.

[0084] Specifically, if the current VDC does not have any images shared by other VDCs, the system will not display the shared image library, and the shared image library will not be displayed in the image source options on the cloud host creation page. If the current VDC has images shared by other VDCs, VDC administrators and VDC users can select image files from the shared image library when creating a cloud host. If the cloud host is created successfully, the system will return a creation success message of 0 and update the cloud host status. If the creation fails, the system will generate corresponding error messages based on the fault type (format mismatch, corrupted image file, insufficient resources, etc.).

[0085] For example, Figure 2 This is a schematic diagram of the cloud server creation process in the embodiments of this application, such as... Figure 2 As shown, the cloud server creation process in this application includes: S1: Create a private mirror repository; Specifically, the system administrator creates a private image library that supports OVA / ISO / RAW / QCOW2 formats. The associated identifier, format, and sharing status are disabled by default, and the sharing scope is empty. The sharing scope filters the batch sharing of this VDC to generate a library.

[0086] S2: Configure sharing rules; Specifically, the administrator configures sharing rules, enables sharing and activates scope settings, and can choose to share with one, multiple or all objects that are not in this VDC; after the shared image library is triggered to generate, the shared library is generated in batches by filtering this VDC according to the sharing scope, and the metadata is synchronized at the same time.

[0087] S3: Role viewing permission control; Specifically, a single image generates a corresponding shared library, while batches of images within the same scope generate a single shared library and synchronize metadata. System administrators can view all image libraries; VDC administrators / users can view image libraries shared by other VDCs to this VDC, and can disable sharing without affecting other libraries.

[0088] S4: Create cloud hosts based on shared images; Specifically, if no shared mirror exists, the corresponding library and source data will not be displayed; if a shared mirror exists, you can choose to use it. Upon successful creation, a prompt will be returned and the status updated; if creation fails, a prompt will be displayed according to the fault type.

[0089] In this way, intelligent entry guidance and automated resource creation based on the existence of the image are achieved, which not only avoids interference with users by invalid operations, but also ensures a smooth experience in the cloud host creation process. At the same time, through accurate identification of fault types and targeted prompts, the efficiency of problem location and the friendliness of system operation and maintenance are significantly improved.

[0090] It should be understood that, although Figure 1 and 2 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 1 and 2 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.

[0091] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.

[0092] Embodiments of this application also provide an image file sharing device, comprising: a first processing module 301, configured to create a private image library, receive at least one uploaded image file and store it in the private image library, wherein the image file includes multiple formats; a second processing module 302, configured to configure the sharing status and sharing scope of at least one image file in the private image library according to image sharing rules; a third processing module 303, configured to create at least one shared image library and store a copy of at least one image file according to the sharing status and sharing scope of at least one image file; and a fourth processing module 304, configured to, in response to receiving a user viewing instruction, determine the target shared image library corresponding to the user viewing instruction, and determine and display the corresponding image file from the target shared image library according to the user's permissions.

[0093] In a preferred embodiment of this application, the first processing module 301 is specifically used to: perform a qualification check on at least one uploaded image file, wherein the qualification check includes format check, integrity check and security check; in response to at least one image file passing the qualification check, associate corresponding metadata with at least one image file, and store the image file and the corresponding metadata in a private image library.

[0094] In this embodiment, the second processing module 302 is specifically configured to: receive a sharing status configuration instruction for at least one image file, the sharing status including an enabled state and a disabled state; activate the sharing range configuration function in response to detecting that the sharing status configuration of at least one image file is enabled, wherein the sharing range is a default null value; disable the sharing range configuration function in response to detecting that the sharing status configuration of at least one image file is disabled; obtain the data center identifier corresponding to at least one image file in response to the activation of the sharing range configuration function; obtain a list of data center identifiers in the system, compare the data center identifier corresponding to at least one image file with the data center identifier list, automatically filter the data centers corresponding to at least one image file, and generate a list of optional data centers; receive a selection instruction for the list of optional data centers, wherein the selection instruction includes one or more data centers; configure the sharing range of at least one image file to at least one data center in the list of optional data centers according to the selection instruction, and associate and store the sharing status and sharing range information with the metadata of at least one image file.

[0095] In a preferred embodiment of this application, the second processing module 302 is further configured to: configure a shared validity period for at least one image file and establish an association between the period and the sharing status; and switch the sharing status of at least one image file to a non-shared status when the shared validity period of at least one image file is reached.

[0096] In a preferred embodiment of this application, the third processing module 303 is specifically configured to: detect whether a user has performed an enable sharing operation on at least one image file in the private image library; in response to detecting an enable sharing operation, determine the sharing scope of the image file; aggregate image files with the same sharing scope and an enabled sharing status to create corresponding shared image libraries; batch synchronize copies of the aggregated image files and their associated metadata to the shared image libraries; and in response to the existence of multiple sets of image files with different sharing scopes, create corresponding shared image libraries for each different sharing scope and store copies of the image files.

[0097] In a preferred embodiment of this application, the fourth processing module 304 is specifically used to: determine a first permission level and a second permission level based on user permissions; display image files in the target shared image library in response to the user's permission being at the first permission level; and determine the first data center corresponding to the user in response to the user's permission being at the second permission level, filter and display shared image files shared from the second data center to the first data center, and block shared image files shared from the first data center to the second data center, wherein the second data center is a data center in the target shared image library other than the first data center.

[0098] In a preferred embodiment of this application, the device further includes a fifth processing module, which is specifically configured to: detect whether a shared image file exists in the second data center when the user's permission is at the second permission level; not display the shared image library entry when no shared image file exists in the second data center; display the shared image library option when a shared image file exists in the second data center, allowing the user to select an image file from the shared image library to create a cloud host; perform a cloud host creation operation based on the selected shared image file when a cloud host creation request is received; return a creation success message and update the running status of the cloud host when the cloud host creation is successful; and determine the corresponding fault type and generate and return an error message corresponding to the fault type when the cloud host creation fails.

[0099] For a description of the features in the embodiment corresponding to the image file sharing device, please refer to the relevant description in the embodiment corresponding to the image file sharing method, which will not be repeated here.

[0100] Embodiments of this application also provide an electronic device, which may be a terminal, and its internal structure diagram may be as follows: Figure 4As shown, the electronic device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage medium. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a mirror file sharing method. The display screen can be a liquid crystal display (LCD) or an e-ink display. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the device's casing, or an external keyboard, touchpad, or mouse.

[0101] Those skilled in the art will understand that Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device to which the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0102] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it performs the following steps: S1: Create a private image library, receive at least one uploaded image file and store it in the private image library, wherein the image file includes multiple formats; S2: Configure the sharing status and sharing scope of at least one image file in the private image library according to image sharing rules; S3: Create at least one shared image library and store a copy of at least one image file according to the sharing status and sharing scope of at least one image file; S4: In response to receiving a user viewing instruction, determine the target shared image library corresponding to the user viewing instruction, and determine and display the corresponding image file from the target shared image library according to the user's permissions.

[0103] In one embodiment, when the processor executes the computer program, it further performs the following steps: performing a qualification check on at least one uploaded image file, wherein the qualification check includes format check, integrity check and security check; in response to at least one image file passing the qualification check, associating corresponding metadata with at least one image file, and storing the image file and the corresponding metadata in a private image library.

[0104] In one embodiment, when the processor executes the computer program, it further performs the following steps: receiving a sharing state configuration instruction for at least one image file, the sharing state including an enabled state and a disabled state; activating a sharing range configuration function in response to detecting that the sharing state configuration for at least one image file is enabled, wherein the sharing range is a default null value; disabling the sharing range configuration function in response to detecting that the sharing state configuration for at least one image file is disabled; obtaining a data center identifier corresponding to at least one image file in response to the activation of the sharing range configuration function; obtaining a list of data center identifiers in the system, comparing the data center identifier corresponding to at least one image file with the data center identifier list, automatically filtering the data centers corresponding to at least one image file, and generating a list of optional data centers; receiving a selection instruction for the list of optional data centers, wherein the selection instruction includes one or more data centers; configuring the sharing range of at least one image file to at least one data center in the list of optional data centers according to the selection instruction, and storing the sharing state and sharing range information in association with the metadata of at least one image file.

[0105] In one embodiment, when the processor executes the computer program, it further performs the following steps: configuring a shared validity period for at least one image file and establishing an association between the duration and the shared state; in response to at least one image file reaching the shared validity period, switching the shared state of at least one image file to a non-shared state.

[0106] In one embodiment, when the processor executes the computer program, it further performs the following steps: detecting whether a user has performed an enable sharing operation on at least one image file in the private image library; in response to detecting an enable sharing operation, determining the sharing scope of the image file; aggregating image files with the share status enabled and the same sharing scope to create corresponding shared image libraries; batch synchronizing copies of the aggregated image files and associated metadata to the shared image libraries; and in response to the existence of multiple sets of image files with different sharing scopes, creating corresponding shared image libraries for different sharing scopes and storing copies of the image files.

[0107] In one embodiment, when the processor executes the computer program, it further performs the following steps: determining a first permission level and a second permission level based on user permissions; displaying image files in the target shared image library in response to the user's permission being at the first permission level; and determining the first data center corresponding to the user in response to the user's permission being at the second permission level, filtering and displaying shared image files shared from the second data center to the first data center, and blocking shared image files shared from the first data center to the second data center, wherein the second data center is a data center in the target shared image library other than the first data center.

[0108] In one embodiment, when the processor executes the computer program, it further performs the following steps: in response to a user having a second permission level, it checks whether a shared image file exists in the first data center and in the second data center; in response to a user not having a shared image file in the second data center, it does not display the shared image library entry; in response to a user having a user having a shared image file in the second data center, it displays the shared image library option so that the user can select an image file in the shared image library to create a cloud host; in response to receiving a cloud host creation request, it performs a cloud host creation operation based on the selected shared image file; in response to a successful cloud host creation, it returns a creation success message and updates the running status of the cloud host; in response to a failed cloud host creation, it determines the corresponding fault type, generates and returns an error message corresponding to the fault type.

[0109] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, it performs the following steps: S1: Create a private image library, receive at least one uploaded image file and store it in the private image library, wherein the image file includes multiple formats; S2: Configure the sharing status and sharing scope of at least one image file in the private image library according to image sharing rules; S3: Create at least one shared image library and store a copy of at least one image file according to the sharing status and sharing scope of at least one image file; S4: In response to receiving a user viewing instruction, determine the target shared image library corresponding to the user viewing instruction, and determine and display the corresponding image file from the target shared image library according to the user's permissions.

[0110] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: performing a qualification check on at least one uploaded image file, wherein the qualification check includes format verification, integrity verification and security verification; in response to at least one image file passing the qualification check, associating corresponding metadata with at least one image file, and storing the image file and the corresponding metadata in a private image library.

[0111] In one embodiment, when the computer program is executed by a processor, it further implements the following steps: receiving a sharing state configuration instruction for at least one image file, the sharing state including an enabled state and a disabled state; activating a sharing range configuration function in response to detecting that the sharing state configuration for at least one image file is enabled, wherein the sharing range is a default null value; disabling the sharing range configuration function in response to detecting that the sharing state configuration for at least one image file is disabled; obtaining a data center identifier corresponding to at least one image file in response to the activation of the sharing range configuration function; obtaining a list of data center identifiers in the system, comparing the data center identifier corresponding to at least one image file with the data center identifier list, automatically filtering the data centers corresponding to at least one image file, and generating a list of optional data centers; receiving a selection instruction for the list of optional data centers, wherein the selection instruction includes one or more data centers; configuring the sharing range of at least one image file to at least one data center in the list of optional data centers according to the selection instruction, and storing the sharing state and sharing range information in association with the metadata of at least one image file.

[0112] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: configuring a shared validity period for at least one image file and establishing an association between the duration and the shared state; in response to at least one image file reaching the shared validity period, switching the shared state of at least one image file to a non-shared state.

[0113] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: detecting whether a user has performed an enable sharing operation on at least one image file in the private image library; in response to detecting an enable sharing operation, determining the sharing scope of the image file; aggregating image files with the share status enabled and the same sharing scope to create corresponding shared image libraries; batch synchronizing copies of the aggregated image files and associated metadata to the shared image libraries; and in response to the existence of multiple sets of image files with different sharing scopes, creating corresponding shared image libraries for different sharing scopes and storing copies of the image files.

[0114] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: determining a first permission level and a second permission level based on user permissions; displaying image files in the target shared image library in response to the user's permission being at the first permission level; and determining the first data center corresponding to the user in response to the user's permission being at the second permission level, filtering and displaying shared image files shared from the second data center to the first data center, and blocking shared image files shared from the first data center to the second data center, wherein the second data center is a data center in the target shared image library other than the first data center.

[0115] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: in response to a user having a second permission level, it checks whether a shared image file exists in the first data center and in the second data center; in response to a user not having a shared image file in the second data center, it does not display the shared image library entry; in response to a user having a user having a shared image file in the second data center, it displays the shared image library option so that the user can select an image file in the shared image library to create a cloud host; in response to receiving a cloud host creation request, it performs a cloud host creation operation based on the selected shared image file; in response to a successful cloud host creation, it returns a creation success message and updates the running status of the cloud host; in response to a failed cloud host creation, it determines the corresponding fault type, generates and returns an error message corresponding to the fault type.

[0116] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0117] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0118] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application.

Claims

1. A method for sharing image files, characterized in that, The method includes: Create a private image library, receive at least one uploaded image file and store it in the private image library, wherein the image file includes multiple formats; Configure the sharing status and sharing scope of at least one image file in the private image library according to the image sharing rules; Based on the sharing status and sharing scope of the at least one image file, create at least one shared image library and store copies of the at least one image file; In response to receiving a user's viewing instruction, the system determines the target shared image library corresponding to the user's viewing instruction, and, based on the user's permissions, determines and displays the corresponding image file from the target shared image library.

2. The image file sharing method according to claim 1, characterized in that, The step of creating a private image repository, receiving at least one uploaded image file and storing it in the private image repository, includes: The at least one uploaded image file is subjected to a qualification check, wherein the qualification check includes format check, integrity check and security check; In response to the at least one image file passing the qualification check, the corresponding metadata is associated with the at least one image file, and the image file and the corresponding metadata are stored in the private image library.

3. The image file sharing method according to claim 1, characterized in that, The step of configuring the sharing status and sharing scope of at least one image file in the private image library according to the image sharing rules includes: Receive a sharing status configuration instruction for the at least one image file, wherein the sharing status includes an enabled state and a disabled state; When the sharing state configuration corresponding to the at least one image file is detected to be enabled, the sharing range configuration function is activated, wherein the sharing range is a default empty value; When the sharing state configuration corresponding to the at least one image file is detected to be in a closed state, the sharing range configuration function is disabled. In response to the activation of the shared scope configuration function, the data center identifier corresponding to the at least one image file is obtained; Obtain the list of data center identifiers in the system, compare the data center identifiers corresponding to the at least one image file with the list of data center identifiers, automatically filter the data centers corresponding to the at least one image file, and generate a list of selectable data centers; Receive a selection instruction for the list of optional data centers, wherein the selection instruction includes one or more data centers; According to the selection instruction, the sharing scope of the at least one image file is configured to be at least one data center in the list of optional data centers, and the sharing status and sharing scope information are associated with the metadata of the at least one image file and stored.

4. The image file sharing method according to claim 1, characterized in that, The step of configuring the sharing status and sharing scope of at least one image file in the private image library according to the image sharing rules also includes: Configure a shared validity period for the at least one image file, and establish a correlation between the duration and the sharing status; In response to the at least one image file reaching the shared validity period, the shared state of the at least one image file is switched to a non-shared state.

5. The image file sharing method according to claim 1, characterized in that, The step of creating at least one shared image library and storing copies of the at least one image file based on the sharing status and sharing scope of the at least one image file includes: Detect whether the user has performed an enable sharing operation on at least one image file in the private image repository; In response to detecting the sharing enable operation, the sharing scope of the image file is determined; Aggregate the image files that are in the shared state and have the same sharing scope to create a corresponding shared image library; The aggregated copies of multiple image files and their associated metadata are batch synchronized to the shared image library; When multiple sets of image files with different sharing scopes exist, corresponding shared image libraries are created for each sharing scope and copies of the image files are stored.

6. The image file sharing method according to claim 1, characterized in that, The step of responding to receiving a user viewing instruction, determining the target shared image library corresponding to the user viewing instruction, and determining and displaying the corresponding image file from the target shared image library according to the user's permissions, includes: Based on the user permissions, determine the first permission level and the second permission level; When the user's permissions are at the first permission level, the image files in the target shared image library are displayed; When the user's permission is at the second permission level, the first data center corresponding to the user is determined, and shared image files shared from the second data center to the first data center are filtered and displayed, while shared image files shared from the first data center to the second data center are blocked. The second data center is a data center in the target shared image library other than the first data center.

7. The image file sharing method according to claim 6, characterized in that, The method further includes: When the user's permission is at the second permission level, the system checks whether a shared image file exists in the first data center as a result of the second data center. If the shared image file for the second data center does not exist, the shared image library entry will not be displayed. When a shared image file exists in the second data center, a shared image library option is displayed, allowing the user to select an image file from the shared image library to create a cloud host; In response to receiving a cloud host creation request, perform a cloud host creation operation based on the selected shared image file; In response to the successful creation of the cloud server, a creation success message is returned, and the running status of the cloud server is updated; In response to the failure to create the cloud host, the corresponding fault type is determined, and an error message corresponding to the fault type is generated and returned.

8. A mirror file sharing device, characterized in that, The device includes: The first processing module is used to create a private image library, receive at least one uploaded image file and store it in the private image library, wherein the image file includes multiple formats; The second processing module is used to configure the sharing status and sharing scope of at least one image file in the private image library according to the image sharing rules. The third processing module is used to create at least one shared image library and store copies of the at least one image file according to the sharing status and sharing scope of the at least one image file; The fourth processing module is used to respond to a user's viewing instruction, determine the target shared image library corresponding to the user's viewing instruction, and determine and display the corresponding image file from the target shared image library according to the user's permissions.

9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing a computer program to implement the steps of the image file sharing method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, A computer-readable storage medium stores a computer program, wherein when executed by a processor, the computer program implements the steps of the image file sharing method as described in any one of claims 1 to 7.