File sharing method and system based on container virtualization technology
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUIZHIAN INFORMATION TECH CO LTD
- Filing Date
- 2023-10-31
- Publication Date
- 2026-08-07
AI Technical Summary
对于共享空间中具有特殊格式的文件,需要特定的程序才能解码,但是用户端并不一定安装有匹配的程序来对下载得到的文件进行解码,从而导致用户端无法正常打开下载的文件,降低对不同格式文件的共享适用性
[0052]本申请提供的基于容器虚拟化技术的文件分享方法和系统将本地服务器的资源划分为对应不同组别的资源集合,并构建与资源集合所在存储区间匹配的虚拟服务器,利用容器虚拟化技术对本地服务器的存储区间进行虚拟扩展,使虚拟服务器直接与用户端进行文件共享;当用户端从虚拟服务器的镜像仓库中获得镜像包后,利用镜像包包含的解码器,在虚拟服务器层面上对镜像包包含的镜像文件资源直接进行解码,从而实现对镜像文件资源的直接解码阅读,这不需要用户端额外下载解码器来对共享得到的文件资源进行解码,降低用户端的文件共享成本和耗时,为用户端提供可靠便捷的文件共享与解码方案。
Smart Images

Figure CN117331903B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of file sharing, and more particularly to file sharing methods and systems based on container virtualization technology. Background Technology
[0002] File-sharing technologies typically utilize local servers as file-sharing sources. These servers contain shared spaces for different file types, and users simply log in to the corresponding shared space to download the desired files. However, files with specific formats in the shared space require dedicated programs for decoding. Users may not have the matching programs installed, leading to the inability to open downloaded files and reducing the applicability to sharing different file formats. While users can download a matching decoding program after the file is downloaded, this increases the cost and time involved in the file-sharing process, failing to provide a reliable and convenient file-sharing and decoding solution. Summary of the Invention
[0003] The purpose of this invention is to provide a file sharing method and system based on container virtualization technology. This method divides the resources of a local server into resource sets corresponding to different groups, and constructs virtual servers that match the storage areas of the resource sets. Container virtualization technology is used to virtually expand the storage areas of the local server, enabling direct file sharing between the virtual servers and user clients. When a user client obtains an image package from the virtual server's image repository, it uses the decoder contained in the image package to directly decode the image file resources at the virtual server level, thereby achieving direct decoding and reading of the image file resources. This eliminates the need for the user client to download an additional decoder to decode the shared file resources, reducing file sharing costs and time for the user client and providing a reliable and convenient file sharing and decoding solution.
[0004] This invention is achieved through the following technical solution:
[0005] File sharing methods based on container virtualization technology include:
[0006] Based on the resource storage information of the local server, the resources of the local server are divided into resource sets corresponding to different groups;
[0007] Based on the storage space change information of the local server, construct a virtual server that matches the storage range of the resource set of the corresponding group;
[0008] Based on the file resource type information of the storage range, a mirror file resource corresponding to the file resource stored in the storage range is generated for the virtual server;
[0009] Based on the resource acquisition request from the user, locate the image file resource that the user needs to acquire from the virtual server;
[0010] The located image file resources are packaged with the matching decoder to form an image package, and published to the image repository corresponding to the virtual server;
[0011] After authenticating the user terminal, the image package is downloaded to the user terminal, and the storage status of the downloaded image package in the image repository is changed.
[0012] Optionally, based on the resource storage information of the local server, the resources of the local server are divided into resource sets corresponding to different groups, including:
[0013] Based on the resource storage information directory of the local server, the file resource types stored on the local server are obtained;
[0014] Based on the file resource type, all file resources stored on the local server are divided into different resource sets; each resource set corresponds to a single file resource type, and the total data volume of file resources in each resource set is dynamically identified.
[0015] Based on the storage space change information of the local server, construct a virtual server that matches the storage range of the resource set of the corresponding group, including:
[0016] Based on the results of the dynamic identification, the rate at which the available storage space of the storage interval used to store each resource set on the local server decreases is obtained; if the rate at which the available storage space decreases is greater than or equal to a preset speed threshold, then a virtual server matching the storage interval of the resource set in the corresponding group is constructed.
[0017] Optionally, based on the file resource type information of the storage range, a mirror file resource corresponding to the file resources stored in the storage range is generated for the virtual server, including:
[0018] Based on the file resource type information of the storage range, obtain the matching decoder from the local server;
[0019] After mirroring all file resources in the storage area and the decoder, the images are uploaded to the virtual server to form image file resources; and the image file resources are sorted according to their data size.
[0020] Based on the resource acquisition request from the user client, locate the image file resource that the user client needs to acquire from the virtual server, including:
[0021] The resource acquisition request from the user client is parsed and processed to obtain the name of the file resource that the user client needs to acquire; based on the file resource name and the image file resource storage location mapping information of the virtual server, the storage path of the image file resource corresponding to the file resource that the user client needs to acquire on the virtual server is determined.
[0022] Optionally, the located image file resources are packaged with a matching decoder to form an image package, and published to the image repository corresponding to the virtual server, including:
[0023] Based on the data structure of the located image file resource, a matching packaging and compression mode is selected to package the located image file resource with the matching decoder to form an image package;
[0024] The image package is published to the image repository corresponding to the virtual server, and the address information of the image package in the image repository is sent to the user terminal;
[0025] After authenticating the user client, the image package is downloaded to the user client, and the storage status of the downloaded image package in the image repository is changed, including:
[0026] The image package download request from the user terminal is authenticated. When the authentication is successful, a download channel from the user terminal to the image repository is established, thereby downloading the image package to the user terminal.
[0027] Once the user client has finished downloading the image package, the image package is deleted from the image repository.
[0028] File sharing systems based on container virtualization technology include:
[0029] The resource classification module divides the resources of the local server into resource sets corresponding to different groups based on the resource storage information of the local server.
[0030] The virtual server construction module constructs a virtual server that matches the storage range of the resource set of the corresponding group, based on the storage space change information of the local server.
[0031] The image file resource storage module generates image file resources for the virtual server that correspond to the file resources stored in the storage area, based on the file resource type information of the storage area.
[0032] The image file resource location module locates the image file resource that the user needs to obtain from the virtual server based on the resource acquisition request from the user terminal;
[0033] The image package publishing module packages the located image file resources with the matching decoder to form an image package, and publishes it to the image repository corresponding to the virtual server.
[0034] The image package download and modification module authenticates the user terminal, downloads the image package to the user terminal, and changes the storage status of the downloaded image package in the image repository.
[0035] Optionally, the resource classification module divides the resources of the local server into resource sets corresponding to different groups based on the resource storage information of the local server, including:
[0036] Based on the resource storage information directory of the local server, the file resource types stored on the local server are obtained;
[0037] Based on the file resource type, all file resources stored on the local server are divided into different resource sets; each resource set corresponds to a single file resource type, and the total data volume of file resources in each resource set is dynamically identified.
[0038] The virtual server construction module constructs a virtual server that matches the storage range of the resource set in the corresponding group, based on the storage space change information of the local server, including:
[0039] Based on the results of the dynamic identification, the rate at which the available storage space of the storage interval used to store each resource set on the local server decreases is obtained; if the rate at which the available storage space decreases is greater than or equal to a preset speed threshold, then a virtual server matching the storage interval of the resource set in the corresponding group is constructed.
[0040] Optionally, the image file resource storage module generates image file resources for the virtual server corresponding to the file resources stored in the storage range based on the file resource type information of the storage range, including:
[0041] Based on the file resource type information of the storage range, obtain the matching decoder from the local server;
[0042] After mirroring all file resources in the storage area and the decoder, the images are uploaded to the virtual server to form image file resources; and the image file resources are sorted according to their data size.
[0043] The image file resource location module locates the image file resource that the user needs from the virtual server based on the resource acquisition request from the user's client, including:
[0044] The resource acquisition request from the user client is parsed and processed to obtain the name of the file resource that the user client needs to acquire; based on the file resource name and the image file resource storage location mapping information of the virtual server, the storage path of the image file resource corresponding to the file resource that the user client needs to acquire on the virtual server is determined.
[0045] Optionally, the image package publishing module packages the located image file resources with the matching decoder to form an image package, and publishes it to the image repository corresponding to the virtual server, including:
[0046] Based on the data structure of the located image file resource, a matching packaging and compression mode is selected to package the located image file resource with the matching decoder to form an image package;
[0047] The image package is published to the image repository corresponding to the virtual server, and the address information of the image package in the image repository is sent to the user terminal;
[0048] After authenticating the user terminal, the image package download and modification module downloads the image package to the user terminal and changes the storage status of the downloaded image package in the image repository, including:
[0049] The image package download request from the user terminal is authenticated. When the authentication is successful, a download channel from the user terminal to the image repository is established, thereby downloading the image package to the user terminal.
[0050] Once the user client has finished downloading the image package, the image package is deleted from the image repository.
[0051] Compared with the prior art, the present invention has the following beneficial effects:
[0052] The file sharing method and system based on container virtualization technology provided in this application divide the resources of the local server into resource sets corresponding to different groups, and construct virtual servers that match the storage range where the resource sets are located. Container virtualization technology is used to virtually expand the storage range of the local server, enabling the virtual servers to directly share files with the user. When the user obtains an image package from the image repository of the virtual server, the decoder contained in the image package is used to directly decode the image file resources contained in the image package at the virtual server level, thereby achieving direct decoding and reading of the image file resources. This eliminates the need for the user to download an additional decoder to decode the shared file resources, reducing the file sharing cost and time for the user, and providing a reliable and convenient file sharing and decoding solution for the user. Attached Figure Description
[0053] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein:
[0054] Figure 1 This is a flowchart illustrating the file sharing method based on container virtualization technology provided by the present invention.
[0055] Figure 2 This is a schematic diagram of the structure of a file sharing system based on container virtualization technology provided by the present invention. Detailed Implementation
[0056] To make the above-mentioned objectives, features, and advantages of this application more apparent and understandable, the specific embodiments of this application will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, it should be noted that, for ease of description, only the parts relevant to this application are shown in the accompanying drawings, not the entire structure. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of this application.
[0057] The terms “comprising” and “having”, and any variations thereof, used in this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the steps or units listed, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to such process, method, product, or apparatus.
[0058] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0059] Please see Figure 1 As shown, an embodiment of this application provides a file sharing method based on container virtualization technology, which includes:
[0060] Based on the resource storage information of the local server, the resources of the local server are divided into resource sets corresponding to different groups;
[0061] Based on the storage space change information of the local server, construct a virtual server that matches the storage range where the resource set of the corresponding group is located;
[0062] Based on the file resource type information of the storage range, a mirror file resource corresponding to the file resource stored in the storage range is generated for the virtual server;
[0063] Based on the resource acquisition request from the user, locate the image file resource that the user needs from the virtual server;
[0064] The located image file resources are packaged with the matching decoder to form an image package, and then published to the image repository corresponding to the virtual server.
[0065] After authenticating the user's client, the image package is downloaded to the user's client, and the storage status of the downloaded image package in the image repository is changed.
[0066] The beneficial effects of the above embodiments are that the file sharing method based on container virtualization technology divides the resources of the local server into resource sets corresponding to different groups, and constructs virtual servers that match the storage range where the resource sets are located. Container virtualization technology is used to virtually expand the storage range of the local server, enabling the virtual servers to directly share files with the user. When the user obtains an image package from the image repository of the virtual server, it uses the decoder contained in the image package to directly decode the image file resources contained in the image package at the virtual server level, thereby achieving direct decoding and reading of the image file resources. This eliminates the need for the user to download an additional decoder to decode the shared file resources, reducing the file sharing cost and time for the user, and providing a reliable and convenient file sharing and decoding solution for the user.
[0067] In another embodiment, based on the resource storage information of the local server, the resources of the local server are divided into resource sets corresponding to different groups, including:
[0068] Based on the resource storage information directory of the local server, obtain the file resource types stored on the local server;
[0069] Based on the file resource type, all file resources stored on the local server are divided into different resource sets; each resource set corresponds to a single file resource type, and the total data volume of file resources in each resource set is dynamically identified.
[0070] Based on the storage space change information of the local server, construct virtual servers that match the storage range of the resource set in the corresponding group, including:
[0071] Based on the results of dynamic identification, the rate at which the available storage space of the storage interval used to store each resource set on the local server decreases is obtained; if the rate at which the available storage space decreases is greater than or equal to a preset speed threshold, a virtual server matching the storage interval of the resource set in the corresponding group is constructed.
[0072] The beneficial effects of the above embodiments are that the local server (i.e., the physical server) internally stores file resources of different types and formats, and the local server forms a resource storage information directory. This resource storage information directory includes the type and format corresponding to each file resource currently stored on the local server, the file creation time, file name, and file size, and other related information. By analyzing the resource storage information directory, the format types of all file resources stored on the local server are obtained. Then, based on the file resource format types, all file resources stored on the local server are divided into different groups of resource sets, thereby distinguishing the type and format of all file resources, which facilitates the centralized processing of file resources of the same type and format in the future. Furthermore, during operation, the local server continuously receives file resources from the outside world, which increases the total data volume of each resource set. Consequently, the available storage space of the storage area on the local server where the resource set is located continuously decreases (i.e., the remaining storage space continuously decreases). The rate at which the available storage space decreases is then compared with a preset speed threshold. When the rate at which the available storage space decreases is greater than or equal to the preset speed threshold, it indicates that the available storage space of the storage area is decreasing rapidly. At this time, the local server cannot provide enough storage space for the file resources. Therefore, a virtual server matching the storage area of the corresponding resource set is constructed. The corresponding storage area is expanded with the help of the virtual server, which facilitates file sharing, downloading, decoding, and viewing at the virtual server level.
[0073] In another embodiment, based on the file resource type information of the storage range, a mirror file resource corresponding to the file resources stored in the storage range is generated for the virtual server, including:
[0074] Based on the file resource type information of the storage area, obtain the matching decoder from the local server;
[0075] After mirroring all file resources and decoders in the storage area, the images are uploaded to the virtual server to form image file resources; and the image file resources are sorted according to their data size.
[0076] Based on the resource retrieval request from the user, locate the image file resource that the user needs from the virtual server, including:
[0077] The resource acquisition request from the user is parsed and processed to obtain the name of the file resource that the user needs; based on the file resource name and the mapping information of the image file resource storage location of the virtual server, the storage path of the image file resource corresponding to the file resource that the user needs is determined on the virtual server.
[0078] The beneficial effects of the above embodiments are that different types of file resources require specific decoders to be converted into viewable and editable file formats. However, not all user terminals have the corresponding decoding programs installed to process file resources. In this case, based on the file resource format type information of the storage area, a matching decoder is obtained from the local server. All file resources and decoders in the storage area are then mirrored and uploaded to the virtual server to form a mirror file resource. When the user terminal shares and downloads files with the virtual server, it can obtain the corresponding decoder simultaneously, without spending extra time searching for and downloading the decoder, thus improving the convenience of file resource decoding for the user terminal. Furthermore, the resource acquisition request from the user terminal is parsed to determine the storage path of the mirror file resource corresponding to the file resource the user terminal needs on the virtual server. This allows the user terminal to quickly and accurately find the corresponding mirror file resource on the virtual server based on the storage path.
[0079] In another embodiment, the located image file resources are packaged with a matching decoder to form an image package, and then published to the image repository corresponding to the virtual server, including:
[0080] Based on the data structure of the located image file resources, a matching packaging and compression mode is selected to package the located image file resources with the matching decoder to form an image package.
[0081] Publish the image package to the image repository corresponding to the virtual server, and send the address information of the image package in the image repository to the client;
[0082] After authenticating the user's client, the image package is downloaded to the user's client, and the storage status of the downloaded image package in the image repository is changed, including:
[0083] The system authenticates image package download requests from users. Once authentication is successful, it establishes a download channel from the user to the image repository, thereby downloading the image package to the user.
[0084] Once the user has finished downloading the image package, the image package will be deleted from the image repository.
[0085] The beneficial effects of the above embodiments are that different image file resources have different data structures (such as the data code format and code arrangement of file resources). Based on the data structure of the image file resources, the image file resources and decoder are packaged using a suitable matching compression mode, effectively avoiding compression distortion or damage to the image file resources and decoder. The image package is then published to the image repository corresponding to the virtual server, and the address information of the image package in the image repository is sent to the user client. After successful authentication, the user client can establish a dedicated download channel to the image repository. Once the user client has completed downloading the image package, using the virtual server as the file resource operating space, the downloaded decoder is directly used to decode the downloaded image file resources, allowing the user client to browse and view the file resources. Simultaneously, after the user client completes downloading the image package, it is deleted from the image repository, effectively reducing the workload of the image repository.
[0086] Please see Figure 2 As shown, an embodiment of this application provides a file sharing system based on container virtualization technology, including:
[0087] The resource classification module divides the local server's resources into different groups based on the local server's resource storage information.
[0088] The virtual server construction module constructs virtual servers that match the storage range of the resource set in the corresponding group, based on the storage space change information of the local server.
[0089] The image file resource storage module generates image file resources for the virtual server that correspond to the file resources stored in the storage area, based on the file resource type information of the storage area.
[0090] The image file resource location module locates the image file resource that the user needs from the virtual server based on the resource acquisition request from the user.
[0091] The image package publishing module packages the located image file resources with the matching decoder to form an image package, and publishes it to the image repository corresponding to the virtual server.
[0092] The image package download and modification module authenticates the user client, downloads the image package to the user client, and changes the storage status of the downloaded image package in the image repository.
[0093] The beneficial effects of the above embodiments are that the file sharing system based on container virtualization technology divides the resources of the local server into resource sets corresponding to different groups, and constructs virtual servers that match the storage range where the resource sets are located. Container virtualization technology is used to virtually expand the storage range of the local server, enabling the virtual servers to directly share files with the user. When the user obtains an image package from the image repository of the virtual server, it uses the decoder contained in the image package to directly decode the image file resources contained in the image package at the virtual server level, thereby realizing direct decoding and reading of the image file resources. This eliminates the need for the user to download an additional decoder to decode the shared file resources, reducing the file sharing cost and time for the user, and providing a reliable and convenient file sharing and decoding solution for the user.
[0094] In another embodiment, the resource classification module divides the resources of the local server into resource sets corresponding to different groups based on the resource storage information of the local server, including:
[0095] Based on the resource storage information directory of the local server, obtain the file resource types stored on the local server;
[0096] Based on the file resource type, all file resources stored on the local server are divided into different resource sets; each resource set corresponds to a single file resource type, and the total data volume of file resources in each resource set is dynamically identified.
[0097] The virtual server construction module constructs virtual servers that match the storage range of the resource set in the corresponding group, based on the storage space change information of the local server, including:
[0098] Based on the results of dynamic identification, the rate at which the available storage space of the storage interval used to store each resource set on the local server decreases is obtained; if the rate at which the available storage space decreases is greater than or equal to a preset speed threshold, a virtual server matching the storage interval of the resource set in the corresponding group is constructed.
[0099] The beneficial effects of the above embodiments are that the local server (i.e., the physical server) internally stores file resources of different types and formats, and the local server forms a resource storage information directory. This resource storage information directory includes the type and format corresponding to each file resource currently stored on the local server, the file creation time, file name, and file size, and other related information. By analyzing the resource storage information directory, the format types of all file resources stored on the local server are obtained. Then, based on the file resource format types, all file resources stored on the local server are divided into different groups of resource sets, thereby distinguishing the type and format of all file resources, which facilitates the centralized processing of file resources of the same type and format in the future. Furthermore, during operation, the local server continuously receives file resources from the outside world, which increases the total data volume of each resource set. Consequently, the available storage space of the storage area on the local server where the resource set is located continuously decreases (i.e., the remaining storage space continuously decreases). The rate at which the available storage space decreases is then compared with a preset speed threshold. When the rate at which the available storage space decreases is greater than or equal to the preset speed threshold, it indicates that the available storage space of the storage area is decreasing rapidly. At this time, the local server cannot provide enough storage space for the file resources. Therefore, a virtual server matching the storage area of the corresponding resource set is constructed. The corresponding storage area is expanded with the help of the virtual server, which facilitates file sharing, downloading, decoding, and viewing at the virtual server level.
[0100] In another embodiment, the image file resource storage module generates image file resources for the virtual server corresponding to the file resources stored in the storage area based on the file resource type information of the storage area, including:
[0101] Based on the file resource type information of the storage area, obtain the matching decoder from the local server;
[0102] After mirroring all file resources and decoders in the storage area, the images are uploaded to the virtual server to form image file resources; and the image file resources are sorted according to their data size.
[0103] The image file resource location module locates the image file resource that the user needs from the virtual server based on the resource acquisition request from the user's client, including:
[0104] The resource acquisition request from the user is parsed and processed to obtain the name of the file resource that the user needs; based on the file resource name and the mapping information of the image file resource storage location of the virtual server, the storage path of the image file resource corresponding to the file resource that the user needs is determined on the virtual server.
[0105] The beneficial effects of the above embodiments are that different types of file resources require specific decoders to be converted into viewable and editable file formats. However, not all user terminals have the corresponding decoding programs installed to process file resources. In this case, based on the file resource format type information of the storage area, a matching decoder is obtained from the local server. All file resources and decoders in the storage area are then mirrored and uploaded to the virtual server to form a mirror file resource. When the user terminal shares and downloads files with the virtual server, it can obtain the corresponding decoder simultaneously, without spending extra time searching for and downloading the decoder, thus improving the convenience of file resource decoding for the user terminal. Furthermore, the resource acquisition request from the user terminal is parsed to determine the storage path of the mirror file resource corresponding to the file resource the user terminal needs on the virtual server. This allows the user terminal to quickly and accurately find the corresponding mirror file resource on the virtual server based on the storage path.
[0106] In another embodiment, the image package publishing module packages the located image file resources with the matching decoder to form an image package, and publishes it to the image repository corresponding to the virtual server, including:
[0107] Based on the data structure of the located image file resources, a matching packaging and compression mode is selected to package the located image file resources with the matching decoder to form an image package.
[0108] Publish the image package to the image repository corresponding to the virtual server, and send the address information of the image package in the image repository to the client;
[0109] After authenticating the user client, the image package download and modification module downloads the image package to the user client and modifies the storage status of the downloaded image package in the image repository, including:
[0110] The system authenticates image package download requests from users. Once authentication is successful, it establishes a download channel from the user to the image repository, thereby downloading the image package to the user.
[0111] Once the user has finished downloading the image package, the image package will be deleted from the image repository.
[0112] The beneficial effects of the above embodiments are that different image file resources have different data structures (such as the data code format and code arrangement of file resources). Based on the data structure of the image file resources, the image file resources and decoder are packaged using a suitable matching compression mode, effectively avoiding compression distortion or damage to the image file resources and decoder. The image package is then published to the image repository corresponding to the virtual server, and the address information of the image package in the image repository is sent to the user client. After successful authentication, the user client can establish a dedicated download channel to the image repository. Once the user client has completed downloading the image package, using the virtual server as the file resource operating space, the downloaded decoder is directly used to decode the downloaded image file resources, allowing the user client to browse and view the file resources. Simultaneously, after the user client completes downloading the image package, it is deleted from the image repository, effectively reducing the workload of the image repository.
[0113] In general, the file sharing method and system based on container virtualization technology divides the resources of the local server into resource sets corresponding to different groups, and constructs virtual servers that match the storage range of the resource sets. Container virtualization technology is used to virtually expand the storage range of the local server, enabling direct file sharing between the virtual servers and the user end. When the user end obtains an image package from the image repository of the virtual server, it uses the decoder contained in the image package to directly decode the image file resources contained in the image package at the virtual server level, thereby achieving direct decoding and reading of the image file resources. This eliminates the need for the user end to download an additional decoder to decode the shared file resources, reducing the file sharing cost and time for the user end, and providing a reliable and convenient file sharing and decoding solution for the user end.
[0114] The above is only one specific embodiment of the present invention, and any improvements made based on the concept of the present invention shall be considered within the scope of protection of the present invention.
Claims
1. A file sharing method based on container virtualization technology, characterized in that, include: Based on the resource storage information of the local server, the resources of the local server are divided into resource sets corresponding to different groups; Based on the storage space change information of the local server, construct a virtual server that matches the storage range of the resource set of the corresponding group; Based on the file resource type information of the storage range, a mirror file resource corresponding to the file resource stored in the storage range is generated for the virtual server; Based on the resource acquisition request from the user, locate the image file resource that the user needs to acquire from the virtual server; The located image file resources are packaged with the matching decoder to form an image package, and then published to the image repository corresponding to the virtual server. After authenticating the user terminal, the image package is downloaded to the user terminal, and the storage status of the downloaded image package in the image repository is changed.
2. The file sharing method based on container virtualization technology as described in claim 1, characterized in that: Based on the resource storage information of the local server, the resources of the local server are divided into resource sets corresponding to different groups, including: Based on the resource storage information directory of the local server, the file resource types stored on the local server are obtained; Based on the file resource type, all file resources stored on the local server are divided into different resource sets; each resource set corresponds to a single file resource type, and the total data volume of file resources in each resource set is dynamically identified. Based on the storage space change information of the local server, construct a virtual server that matches the storage range of the resource set of the corresponding group, including: Based on the results of the dynamic identification, the rate at which the available storage space of the storage interval used to store each resource set on the local server decreases is obtained; if the rate at which the available storage space decreases is greater than or equal to a preset speed threshold, then a virtual server matching the storage interval of the resource set in the corresponding group is constructed.
3. The file sharing method based on container virtualization technology as described in claim 1, characterized in that: Based on the file resource type information of the storage range, a mirror file resource corresponding to the file resources stored in the storage range is generated for the virtual server, including: Based on the file resource type information of the storage range, obtain the matching decoder from the local server; After mirroring all file resources in the storage area and the decoder, the images are uploaded to the virtual server to form image file resources; and the image file resources are sorted according to their data size. Based on the resource acquisition request from the user client, locate the image file resource that the user client needs to acquire from the virtual server, including: The resource acquisition request from the user client is parsed and processed to obtain the name of the file resource that the user client needs to acquire; based on the file resource name and the image file resource storage location mapping information of the virtual server, the storage path of the image file resource corresponding to the file resource that the user client needs to acquire on the virtual server is determined.
4. The file sharing method based on container virtualization technology as described in claim 1, characterized in that: The process of packaging the located image file resources with the matching decoder into an image package and publishing it to the image repository corresponding to the virtual server includes: Based on the data structure of the located image file resource, a matching packaging and compression mode is selected to package the located image file resource with the matching decoder to form an image package; The image package is published to the image repository corresponding to the virtual server, and the address information of the image package in the image repository is sent to the user terminal; After authenticating the user client, the image package is downloaded to the user client, and the storage status of the downloaded image package in the image repository is changed, including: The image package download request from the user terminal is authenticated. When the authentication is successful, a download channel from the user terminal to the image repository is established, thereby downloading the image package to the user terminal. Once the user client has finished downloading the image package, the image package is deleted from the image repository.
5. A file sharing system based on container virtualization technology, characterized in that, include: The resource classification module divides the resources of the local server into resource sets corresponding to different groups based on the resource storage information of the local server. The virtual server construction module constructs a virtual server that matches the storage range of the resource set of the corresponding group, based on the storage space change information of the local server. The image file resource storage module generates image file resources for the virtual server that correspond to the file resources stored in the storage area, based on the file resource type information of the storage area. The image file resource location module locates the image file resource that the user needs to obtain from the virtual server based on the resource acquisition request from the user terminal; The image package publishing module packages the located image file resources with the matching decoder to form an image package, and publishes it to the image repository corresponding to the virtual server. The image package download and modification module authenticates the user terminal, downloads the image package to the user terminal, and changes the storage status of the downloaded image package in the image repository.
6. The file sharing system based on container virtualization technology as described in claim 5, characterized in that: The resource classification module divides the resources of the local server into resource sets corresponding to different groups based on the resource storage information of the local server, including: Based on the resource storage information directory of the local server, the file resource types stored on the local server are obtained; Based on the file resource type, all file resources stored on the local server are divided into different resource sets; each resource set corresponds to a single file resource type, and the total data volume of file resources in each resource set is dynamically identified. The virtual server construction module constructs a virtual server that matches the storage range of the resource set in the corresponding group, based on the storage space change information of the local server, including: Based on the results of the dynamic identification, the rate at which the available storage space of the storage interval used to store each resource set on the local server decreases is obtained; if the rate at which the available storage space decreases is greater than or equal to a preset speed threshold, then a virtual server matching the storage interval of the resource set in the corresponding group is constructed.
7. The file sharing system based on container virtualization technology as described in claim 5, characterized in that: The image file resource storage module generates image file resources for the virtual server corresponding to the file resources stored in the storage range based on the file resource type information of the storage range, including: Based on the file resource type information of the storage range, obtain the matching decoder from the local server; After mirroring all file resources in the storage area and the decoder, the images are uploaded to the virtual server to form image file resources; and the image file resources are sorted according to their data size. The image file resource location module locates the image file resource that the user needs from the virtual server based on the resource acquisition request from the user's client, including: The resource acquisition request from the user client is parsed and processed to obtain the name of the file resource that the user client needs to acquire; based on the file resource name and the image file resource storage location mapping information of the virtual server, the storage path of the image file resource corresponding to the file resource that the user client needs to acquire on the virtual server is determined.
8. The file sharing system based on container virtualization technology as described in claim 5, characterized in that: The image package publishing module packages the located image file resources with the matching decoder to form an image package, and publishes it to the image repository corresponding to the virtual server, including: Based on the data structure of the located image file resource, a matching packaging and compression mode is selected to package the located image file resource with the matching decoder to form an image package; The image package is published to the image repository corresponding to the virtual server, and the address information of the image package in the image repository is sent to the user terminal; After authenticating the user terminal, the image package download and modification module downloads the image package to the user terminal and changes the storage status of the downloaded image package in the image repository, including: The image package download request from the user terminal is authenticated. When the authentication is successful, a download channel from the user terminal to the image repository is established, thereby downloading the image package to the user terminal. Once the user client has finished downloading the image package, the image package is deleted from the image repository.
Citation Information
Patent Citations
File sharing method, communication system and electronic equipment
CN114374690A
Data sharing method and device, electronic equipment and storage medium
CN115774701A