CN111291017A - Mirror image storage and extraction method and device of mirror image warehouse - Google Patents

Mirror image storage and extraction method and device of mirror image warehouse Download PDF

Info

Publication number
CN111291017A
CN111291017A CN202010138587.8A CN202010138587A CN111291017A CN 111291017 A CN111291017 A CN 111291017A CN 202010138587 A CN202010138587 A CN 202010138587A CN 111291017 A CN111291017 A CN 111291017A
Authority
CN
China
Prior art keywords
mirror image
warehouse
mirror
source
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010138587.8A
Other languages
Chinese (zh)
Other versions
CN111291017B (en
Inventor
王佳君
沈震宇
任政
沈一帆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202010138587.8A priority Critical patent/CN111291017B/en
Publication of CN111291017A publication Critical patent/CN111291017A/en
Application granted granted Critical
Publication of CN111291017B publication Critical patent/CN111291017B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/1737Details of further file system functions for reducing power consumption or coping with limited storage space, e.g. in mobile devices

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Processing Or Creating Images (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a mirror image storage and extraction method and a device of a mirror image warehouse, wherein the mirror image storage method comprises the following steps: receiving a mirror image to be stored pushed to a mirror image warehouse; determining a source of a mirror image to be stored; and storing the mirror image to be stored into the corresponding mirror image sub-warehouse according to the source of the mirror image to be stored and the pre-established corresponding relationship between the mirror image source and the mirror image sub-warehouse. The invention stores the mirror images in the sub-warehouses based on the mirror image source, effectively reduces the quantity of the mirror images stored in each warehouse, and queries the mirror images based on the sub-warehouse storage, thereby improving the query speed and the cleaning speed of the mirror images.

Description

Mirror image storage and extraction method and device of mirror image warehouse
Technical Field
The invention relates to a data processing technology, in particular to a mirror image storage and extraction method and device of a mirror image warehouse.
Background
At present, as the number of applications on the cloud continuously increases, the number of images in the image warehouse also continuously increases.
With the increase of the number of images in the image warehouse, the image query and cleaning of the image warehouse are affected in performance, and the cleaning frequency and the cleaning time are increased. Risks and hazards are also increased due to unavailability during mirror warehouse cleaning.
Disclosure of Invention
In order to reduce the storage capacity of a mirror image warehouse and improve the speed of mirror image query, an embodiment of the present invention provides a mirror image storage method for a mirror image warehouse, including:
receiving a mirror image to be stored pushed to a mirror image warehouse;
determining a source of a mirror image to be stored;
and storing the mirror image to be stored into the corresponding mirror image sub-warehouse according to the source of the mirror image to be stored and the pre-established corresponding relationship between the mirror image source and the mirror image sub-warehouse.
In an embodiment of the present invention, the determining a source of the mirror image to be stored includes:
analyzing the mirror name to determine a character which identifies the mirror source in the prefix of the mirror name;
and determining the source of the mirror image to be stored according to the character for identifying the source of the mirror image.
In the embodiment of the present invention, the method further includes:
establishing a mirror image sub-warehouse in a mirror image warehouse in advance;
and establishing a corresponding relation between the mirror image source and the mirror image sub-warehouse.
Meanwhile, the invention also provides a mirror image storage device of the mirror image warehouse, which comprises:
the mirror image receiving module is used for receiving the mirror image to be stored pushed to the mirror image warehouse;
the source determining module is used for determining the source of the mirror image to be stored;
and the storage processing module is used for storing the mirror image to be stored to the corresponding mirror image sub-warehouse according to the source of the mirror image to be stored and the pre-established corresponding relationship between the mirror image source and the mirror image sub-warehouse.
In an embodiment of the present invention, the source determining module includes:
the name analyzing unit is used for analyzing the mirror name to determine a character which identifies the mirror source in the prefix of the mirror name;
and the determining unit is used for determining the source of the mirror image to be stored according to the character for identifying the source of the mirror image.
In the embodiment of the present invention, the apparatus further includes:
the sub-warehouse establishing module is used for establishing a mirror sub-warehouse in the mirror warehouse in advance;
and the relation establishing module is used for establishing the corresponding relation between the mirror image source and the mirror image sub-warehouse.
Further, the invention provides a mirror image extraction method of a mirror image warehouse, comprising the following steps:
receiving a mirror image name to be extracted;
determining the source of the mirror image to be extracted according to the mirror image name;
determining a mirror sub-warehouse where the mirror to be extracted is located according to the source of the mirror to be extracted and the pre-established corresponding relationship between the mirror source and the mirror sub-warehouse;
and extracting the mirror image from the determined mirror image sub-warehouse according to the mirror image name.
In the embodiment of the present invention, the determining the source of the mirror image to be extracted according to the mirror image name includes:
analyzing the mirror name to determine a character which identifies the mirror source in the prefix of the mirror name;
and determining the source of the mirror image to be extracted according to the character for identifying the source of the mirror image.
In the embodiment of the invention, the method comprises the following steps:
establishing a mirror image sub-warehouse in a mirror image warehouse in advance;
establishing a corresponding relation between a mirror image source and a mirror image sub-warehouse;
and storing the mirror image to the corresponding mirror image sub-warehouse according to the mirror image source.
In the embodiment of the present invention, the extracting the mirror image from the determined mirror image sub-warehouse according to the mirror image name includes:
replacing the character which identifies the mirror image warehouse in the mirror image name prefix with a character which identifies the mirror image warehouse according to the determined mirror image warehouse;
and extracting the mirror image from the mirror image sub-warehouse according to the replaced mirror image name.
The invention also provides a mirror image extraction device of a mirror image warehouse, comprising:
the receiving module is used for receiving the name of the mirror image to be extracted;
the source determining module is used for determining the source of the mirror image to be extracted according to the mirror image name;
the sub-warehouse determining module is used for determining a sub-warehouse of the mirror image where the mirror image to be extracted is located according to the source of the mirror image to be extracted and the pre-established corresponding relationship between the mirror image source and the sub-warehouse of the mirror image;
and the extraction module is used for extracting the mirror image from the determined mirror image sub-warehouse according to the mirror image name.
In an embodiment of the present invention, the source determining module includes:
the name analyzing unit is used for analyzing the mirror name to determine a character which identifies the mirror source in the prefix of the mirror name;
and the determining unit is used for determining the source of the mirror image to be stored according to the character for identifying the source of the mirror image.
In the embodiment of the present invention, the apparatus further includes:
the sub-warehouse establishing module is used for establishing a mirror sub-warehouse in the mirror warehouse in advance;
the relation establishing module is used for establishing the corresponding relation between the mirror image source and the mirror image sub-warehouse
And the storage processing module is used for storing the mirror image to the corresponding mirror image sub-warehouse according to the mirror image source.
In the embodiment of the present invention, the extraction module includes:
the character replacing unit is used for replacing the character which identifies the mirror image warehouse in the mirror image name prefix with the character which identifies the mirror image warehouse according to the determined mirror image warehouse;
and the mirror image extraction unit is used for extracting the mirror images from the mirror image sub-warehouse according to the replaced mirror image names.
Meanwhile, the invention also provides computer equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor realizes the method when executing the computer program.
Meanwhile, the invention also provides a computer readable storage medium, and a computer program for executing the method is stored in the computer readable storage medium.
The invention provides a method and a device for storing and extracting mirror images in a mirror image warehouse.
In order to make the aforementioned and other objects, features and advantages of the invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flowchart of a mirror storage method of a mirror repository according to the present invention;
FIG. 2 is a flow chart in an embodiment of the present invention;
FIG. 3 is a block diagram of a mirror storage device of a mirror repository provided in the present invention;
FIG. 4 is a block diagram of a source determination module provided in the present embodiment;
FIG. 5 is a flow chart of a mirror image extracting method for a mirror image warehouse according to the present invention;
fig. 6 is a block diagram of an image extracting apparatus of an image warehouse provided in the present invention;
fig. 7 is a block diagram of an image extracting apparatus of an image repository provided in an embodiment of the present invention;
FIG. 8 is a schematic diagram of mirror storage and extraction provided in this embodiment;
fig. 9 is a flowchart of query processing provided in the present embodiment;
fig. 10 is a schematic diagram of an electronic device provided in the disclosure.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The original mirror image warehouse in production is used for storing the full amount of mirror images, the mirror image storage mode can bring about two aspects of influences, firstly, the hit rate in query is low, and the efficiency of querying some mirror images from the full amount of mirror images is low because the base number of the mirror images is large. Secondly, the mirror image warehouse is frequently cleaned and consumes a long time, because the capacity of the warehouse is limited, all mirror images are stored in the same warehouse, the occupied space is large, the disk capacity early warning is easily achieved, the cleaning frequency is high, and because the base number of the mirror images is large, the time consumption for screening the mirror images to be deleted according to a specific rule is long (the principle is consistent with the query).
Based on the above consideration, the invention provides a mirror image storage and extraction method and device for a mirror image warehouse. As shown in fig. 1, a mirror storage method for a mirror warehouse provided by the present invention includes:
step S101, receiving a mirror image to be stored pushed to a mirror image warehouse;
step S102, determining the source of the mirror image to be stored;
and step S103, storing the mirror image to be stored to the corresponding mirror image sub-warehouse according to the source of the mirror image to be stored and the corresponding relationship between the pre-established mirror image source and the mirror image sub-warehouse.
Namely, the scheme of the invention classifies the sources of the mirror images pushed to the mirror image warehouse and stores the mirror images according to the mirror image sources.
In this embodiment of the present invention, as shown in fig. 2, in step S102, determining a source of the mirror image to be stored includes:
step S1021, analyzing the mirror image name to determine the character which marks the mirror image source in the prefix of the mirror image name;
in step S1022, the source of the mirror image to be stored is determined according to the character identifying the source of the mirror image.
In the embodiment of the present invention, before performing mirror image storage, the method includes:
establishing a mirror image sub-warehouse in a mirror image warehouse in advance;
and establishing a corresponding relation between the mirror image source and the mirror image sub-warehouse.
Different mirror image sub-warehouses are established in the mirror image warehouse in advance, and the corresponding relation between the mirror image sub-warehouse and the mirror image source is defined, so that the mirror images of different sources are stored in the respective corresponding mirror image sub-warehouses.
The mirror image name comprises prefixes of all bases (mirror image sources), the mirror image sources can be easily distinguished according to the prefixes, the services in all the bases are relatively close, and resources can be fully utilized according to the mirror image warehouse mirror image storage principle. According to the rule, the mirror name is easily replaced when the mirror is imported, and the target warehouse which requests to send is conveniently distinguished after the mirror is divided into the warehouses. As shown below, is an example of a docker mirror name:
dockerhub.icbc:5000/bj1/wapb-b2-app:V1.84.01.0.19051915014957
wherein "dockerhub. icbc" is an identifier identifying the name of the total image, from which the source of the image can be determined, based on the identifier "bj". The invention determines the mirror image source according to the character 'bj' in the mirror image name, and stores the mirror image with the character 'bj' in the name into a sub-warehouse, thereby realizing the sub-warehouse storage of the mirror image.
According to the invention, by storing the mirror images in the mirror image warehouse in the warehouse, the problems that in the prior art, the hit rate is low during mirror image query due to large mirror image base number and the time consumption for screening the mirror images to be deleted according to a specific rule is long are solved.
Meanwhile, the present invention also provides a mirror image storage apparatus of a mirror image warehouse, as shown in fig. 3, the apparatus includes:
the mirror image receiving module 301 is configured to receive a mirror image to be stored, which is pushed to a mirror image warehouse;
a source determining module 302, configured to determine a source of the mirror image to be stored;
and the storage processing module 303 is configured to store the mirror image to be stored in the corresponding mirror sub-warehouse according to the source of the mirror image to be stored and the pre-established correspondence between the mirror image source and the mirror image sub-warehouse.
In this embodiment of the present invention, as shown in fig. 4, the source determining module 302 includes:
a name resolution unit 3021, configured to resolve the mirror name to determine a character identifying a source of the mirror image in a prefix of the mirror name;
a determining unit 3022, configured to determine a source of the mirror image to be stored according to the character identifying the source of the mirror image.
In the embodiment of the present invention, the apparatus further includes:
the sub-warehouse establishing module is used for establishing a mirror sub-warehouse in the mirror warehouse in advance;
and the relation establishing module is used for establishing the corresponding relation between the mirror image source and the mirror image sub-warehouse.
The invention provides a method and a device for storing mirror images by utilizing a split mirror image warehouse based on a mirror image source.
Based on the mirror image storage method provided by the present invention, the present invention further provides a mirror image extraction method of a mirror image warehouse, as shown in fig. 5, including:
step S401, receiving a mirror image name to be extracted;
step S402, determining the source of the mirror image to be extracted according to the mirror image name;
step S403, determining a mirror sub-warehouse where the mirror to be extracted is located according to the source of the mirror to be extracted and the pre-established corresponding relationship between the mirror source and the mirror sub-warehouse;
and S404, extracting the mirror image from the determined mirror image sub-warehouse according to the mirror image name.
In this embodiment of the present invention, in step S402, determining a source of the mirror image to be extracted according to the mirror image name includes:
analyzing the mirror name to determine a character which identifies the mirror source in the prefix of the mirror name;
and determining the source of the mirror image to be extracted according to the character for identifying the source of the mirror image.
In the embodiment of the present invention, in the mirror image extraction of the mirror image warehouse, the method further includes:
establishing a mirror image sub-warehouse in a mirror image warehouse in advance;
establishing a corresponding relation between a mirror image source and a mirror image sub-warehouse;
and storing the mirror image to the corresponding mirror image sub-warehouse according to the mirror image source.
In this embodiment of the present invention, in step S404, extracting a mirror image from the determined mirror image sub-warehouse according to the mirror image name includes:
replacing the character which identifies the mirror image warehouse in the mirror image name prefix with a character which identifies the mirror image warehouse according to the determined mirror image warehouse;
and extracting the mirror image from the mirror image sub-warehouse according to the replaced mirror image name.
In the embodiment of the invention, the character which identifies the mirror image warehouse in the prefix of the received mirror image name is replaced by the character which identifies the mirror image warehouse, and the mirror image can be extracted from the corresponding warehouse by the replacement.
Meanwhile, as shown in fig. 6, the present invention also provides a mirror image extracting apparatus for a mirror image warehouse, including:
a receiving module 501, configured to receive a name of a mirror image to be extracted;
a source determining module 502, configured to determine a source of the mirror image to be extracted according to the mirror image name;
a sub-warehouse determining module 503, configured to determine a sub-warehouse of the mirror image to be extracted according to the source of the mirror image to be extracted and a pre-established correspondence between the mirror image source and the sub-warehouse of the mirror image;
an extracting module 504, configured to extract the mirror from the determined mirror sub-warehouse according to the mirror name.
In this embodiment of the present invention, the source determining module 502 in the image extracting apparatus of the image warehouse includes:
the name analyzing unit is used for analyzing the mirror name to determine a character which identifies the mirror source in the prefix of the mirror name;
and the determining unit is used for determining the source of the mirror image to be stored according to the character for identifying the source of the mirror image.
In this embodiment of the present invention, as shown in fig. 7, the mirror image extracting apparatus of the mirror image warehouse further includes:
a sub-warehouse establishing module 505, configured to establish a mirror sub-warehouse in the mirror warehouse in advance;
a relationship establishing module 506 for establishing the corresponding relationship between the mirror image source and the mirror image sub-warehouse
And the storage processing module 507 is configured to store the mirror image to the corresponding mirror image sub-warehouse according to the mirror image source.
In the embodiment of the present invention, the extracting module 504 includes:
the character replacing unit is used for replacing the character which identifies the mirror image warehouse in the mirror image name prefix with the character which identifies the mirror image warehouse according to the determined mirror image warehouse;
and the mirror image extraction unit is used for extracting the mirror images from the mirror image sub-warehouse according to the replaced mirror image names.
The embodiment of the invention provides a split mirror image warehouse storage mirror image based on mirror image names and a using method thereof.
Firstly, the application pushes the mirror image to a total mirror image warehouse, and then the total mirror image warehouse respectively synchronizes the mirror image to each sub mirror image warehouse according to the prefix of the mirror image name. When the mirror image configuration is imported on the cloud platform, the mirror image name is replaced according to the prefix, and then when a query and mirror image pulling request is initiated, the request is sent to the corresponding mirror image warehouse.
As shown in fig. 8, which is a schematic diagram of mirror storage and extraction provided in this embodiment, in fig. 8, different mirrors are pushed to the total mirror warehouse by the mirror pushing device 1 in the test environment, and the total mirror warehouse synchronizes the mirrors to the mirror warehouses of each sub-system respectively according to prefixes of mirror names. When the mirror image is extracted and inquired, the mirror image pulling device 2 replaces the mirror image name according to the prefix of the mirror image name, and extracts and inquires the mirror image name from each sub-warehouse.
Fig. 9 is a flowchart of query processing provided in this embodiment. It includes:
step S901, a distribution rule is established between a total mirror image warehouse and a sub mirror image warehouse;
step S902, pushing the test environment mirror image to a total mirror image warehouse;
step S903, importing mirror names needing to be pulled in a production environment;
step S904, replacing the mirror name according to the rule;
step S905, requesting different warehouses according to the mirror image name, namely extracting and inquiring mirror images from different mirror image sub-warehouses according to the replaced mirror image name.
Mirror store principle of mirroring: a mirror corresponds to a file that consists of many layers (which can be understood as a command), and if two mirrors have the same layer, only one copy will be stored in the mirror repository.
Because the services in the same department are similar, the used tools are also similar, the similarity of the images is high probably, and the utilization rate of the image storage resources according to the base is high.
The mirror image name comprises the prefix of each base, the source of the mirror image can be easily distinguished according to the prefix, the services in each base are relatively close, and resources can be fully utilized according to the mirror image storage principle of the mirror image warehouse. According to the rule, the mirror name is easily replaced when the mirror is imported, and the target warehouse which requests to send is conveniently distinguished after the mirror is divided into the warehouses.
In this embodiment, the name of the original mirror image is as follows:
dockerhub.icbc:5000/bj1/wapb-b2-app:V1.84.01.0.19051915014957
dockerhub.icbc:5000/bj2/wapb-b2-app:V1.86.01.0.19051915014957
dockerhub.icbc:5000/sh1/wapb-b2-app:V1.87.01.0.19051915014957
dockerhub.icbc:5000/hz1/wapb-b2-app:V1.88.01.0.19051915014957
warehouse splitting, namely when the total warehouse distributes the images to the sub-warehouses, each image is distributed to each sub-warehouse according to the source identification, namely partial prefixes of 'bj 1', 'bj 2', 'sh 1' and 'hz 1'.
And receiving a mirror image request to separate the request, wherein dockerubicbc in the mirror image name can be resolved into ip of a total mirror image warehouse in production on a test environment pushing device, and then all the ip can be pushed to the total mirror image warehouse. When the mirror name is imported into the production environment, the dockerubb.
The replacement rule is to replace icbc with a prefix that identifies the mirrored source portion, such as:
dockerhub.icbc:5000/bj1/wapb-b2-app:V1.84.01.0.19051915014957
instead, the following steps are carried out: bj:5000/bj1/wapb-b2-app: V1.84.01.0.19051915014957.
The mirror image pulling device can analyze ip according to the prefix, dockerhub.bj can be analyzed into ip of a Beijing warehouse, dockerhub.sh can be analyzed into ip of a Shanghai warehouse, and then the request is sent to the corresponding mirror image warehouse for extraction, query or cleaning of the mirror image.
The method and the device solve the problems that in the prior art, efficiency is low when some mirror images are required to be inquired from the total number of mirror images because the mirror image base number is large, occupied space is large because all the mirror images are stored in one warehouse due to limited capacity of the warehouse, disk capacity early warning is easily achieved, and time consumption is long when the mirror images to be deleted are screened according to a specific rule because the mirror image base number is large.
The embodiment of the invention also provides electronic equipment which can be a desktop computer, a tablet computer, a mobile terminal and the like, and the embodiment is not limited thereto. In this embodiment, the electronic device may refer to the implementation of the method and the apparatus, and the contents thereof are incorporated herein, and repeated descriptions are omitted.
Fig. 10 is a schematic block diagram of a system configuration of an electronic apparatus 600 according to an embodiment of the present invention. As shown in fig. 10, the electronic device 600 may include a central processor 100 and a memory 140; the memory 140 is coupled to the central processor 100. Notably, this diagram is exemplary; other types of structures may also be used in addition to or in place of the structure to implement telecommunications or other functions.
In one embodiment, the functions of mirror storage and mirror query may be integrated into the central processor 100. The central processing unit 100 may be configured to perform the following control to implement the mirror storage:
receiving a mirror image to be stored pushed to a mirror image warehouse;
determining a source of a mirror image to be stored;
and storing the mirror image to be stored into the corresponding mirror image sub-warehouse according to the source of the mirror image to be stored and the pre-established corresponding relationship between the mirror image source and the mirror image sub-warehouse.
In one embodiment, the function of image extraction may be integrated into the central processor 100. The central processing unit 100 may be configured to perform the following control to implement image extraction:
receiving a mirror image name to be extracted;
determining the source of the mirror image to be extracted according to the mirror image name;
determining a mirror sub-warehouse where the mirror to be extracted is located according to the source of the mirror to be extracted and the pre-established corresponding relationship between the mirror source and the mirror sub-warehouse;
and extracting the mirror image from the determined mirror image sub-warehouse according to the mirror image name.
As shown in fig. 10, the electronic device 600 may further include: communication module 110, input unit 120, audio processing unit 130, display 160, power supply 170. It is noted that the electronic device 600 does not necessarily include all of the components shown in FIG. 10; furthermore, the electronic device 600 may also comprise components not shown in fig. 10, which may be referred to in the prior art.
As shown in fig. 10, the central processor 100, sometimes referred to as a controller or operational control, may include a microprocessor or other processor device and/or logic device, the central processor 100 receiving input and controlling the operation of the various components of the electronic device 600.
The memory 140 may be, for example, one or more of a buffer, a flash memory, a hard drive, a removable media, a volatile memory, a non-volatile memory, or other suitable device. The information relating to the failure may be stored, and a program for executing the information may be stored. And the central processing unit 100 may execute the program stored in the memory 140 to realize information storage or processing, etc.
The input unit 120 provides input to the cpu 100. The input unit 120 is, for example, a key or a touch input device. The power supply 170 is used to provide power to the electronic device 600. The display 160 is used to display an object to be displayed, such as an image or a character. The display may be, for example, an LCD display, but is not limited thereto.
The memory 140 may be a solid state memory such as Read Only Memory (ROM), Random Access Memory (RAM), a SIM card, or the like. There may also be a memory that holds information even when power is off, can be selectively erased, and is provided with more data, an example of which is sometimes called an EPROM or the like. The memory 140 may also be some other type of device. Memory 140 includes buffer memory 141 (sometimes referred to as a buffer). The memory 140 may include an application/function storage section 142, and the application/function storage section 142 is used to store application programs and function programs or a flow for executing the operation of the electronic device 600 by the central processing unit 100.
The memory 140 may also include a data store 143, the data store 143 for storing data, such as contacts, digital data, pictures, sounds, and/or any other data used by the electronic device. The driver storage portion 144 of the memory 140 may include various drivers of the electronic device for communication functions and/or for performing other functions of the electronic device (e.g., messaging application, address book application, etc.).
The communication module 110 is a transmitter/receiver 110 that transmits and receives signals via an antenna 111. The communication module (transmitter/receiver) 110 is coupled to the central processor 100 to provide an input signal and receive an output signal, which may be the same as in the case of a conventional mobile communication terminal.
Based on different communication technologies, a plurality of communication modules 110, such as a cellular network module, a bluetooth module, and/or a wireless local area network module, may be provided in the same electronic device. The communication module (transmitter/receiver) 110 is also coupled to a speaker 131 and a microphone 132 via an audio processor 130 to provide audio output via the speaker 131 and receive audio input from the microphone 132 to implement general telecommunications functions. Audio processor 130 may include any suitable buffers, decoders, amplifiers and so forth. In addition, an audio processor 130 is also coupled to the central processor 100, so that recording on the local can be enabled through a microphone 132, and so that sound stored on the local can be played through a speaker 131.
Embodiments of the present invention further provide a computer-readable program, where when the program is executed in an electronic device, the program causes a computer to execute the mirror image storage and extraction method in the electronic device according to the above embodiments.
The embodiment of the present invention further provides a storage medium storing a computer-readable program, where the computer-readable program enables a computer to execute the mirror image storage and extraction method described in the above embodiment in an electronic device.
The preferred embodiments of the present invention have been described above with reference to the accompanying drawings. The many features and advantages of the embodiments are apparent from the detailed specification, and thus, it is intended by the appended claims to cover all such features and advantages of the embodiments that fall within the true spirit and scope thereof. Further, since numerous modifications and changes will readily occur to those skilled in the art, it is not desired to limit the embodiments of the invention to the exact construction and operation illustrated and described, and accordingly, all suitable modifications and equivalents may be resorted to, falling within the scope thereof.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The principle and the implementation mode of the invention are explained by applying specific embodiments in the invention, and the description of the embodiments is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (18)

1. A mirror storage method of a mirror warehouse, the method comprising:
receiving a mirror image to be stored pushed to a mirror image warehouse;
determining a source of a mirror image to be stored;
and storing the mirror image to be stored into the corresponding mirror image sub-warehouse according to the source of the mirror image to be stored and the pre-established corresponding relationship between the mirror image source and the mirror image sub-warehouse.
2. The image storage method of an image repository of claim 1, wherein the determining a source of the image to be stored comprises:
analyzing the mirror name to determine a character which identifies the mirror source in the prefix of the mirror name;
and determining the source of the mirror image to be stored according to the character for identifying the source of the mirror image.
3. The mirror storage method of claim 1, wherein the method further comprises:
establishing a mirror image sub-warehouse in a mirror image warehouse in advance;
and establishing a corresponding relation between the mirror image source and the mirror image sub-warehouse.
4. A mirror storage apparatus of a mirror warehouse, the apparatus comprising:
the mirror image receiving module is used for receiving the mirror image to be stored pushed to the mirror image warehouse;
the source determining module is used for determining the source of the mirror image to be stored;
and the storage processing module is used for storing the mirror image to be stored to the corresponding mirror image sub-warehouse according to the source of the mirror image to be stored and the pre-established corresponding relationship between the mirror image source and the mirror image sub-warehouse.
5. The mirrored storage of the mirrored warehouse of claim 4, wherein the provenance determination module includes:
the name analyzing unit is used for analyzing the mirror name to determine a character which identifies the mirror source in the prefix of the mirror name;
and the determining unit is used for determining the source of the mirror image to be stored according to the character for identifying the source of the mirror image.
6. The mirrored storage apparatus of the mirrored warehouse of claim 4, wherein the apparatus further comprises:
the sub-warehouse establishing module is used for establishing a mirror sub-warehouse in the mirror warehouse in advance;
and the relation establishing module is used for establishing the corresponding relation between the mirror image source and the mirror image sub-warehouse.
7. A mirror image extraction method of a mirror image warehouse is characterized by comprising the following steps:
receiving a mirror image name to be extracted;
determining the source of the mirror image to be extracted according to the mirror image name;
determining a mirror sub-warehouse where the mirror to be extracted is located according to the source of the mirror to be extracted and the pre-established corresponding relationship between the mirror source and the mirror sub-warehouse;
and extracting the mirror image from the determined mirror image sub-warehouse according to the mirror image name.
8. The image extraction method of the image warehouse according to claim 7, wherein the determining the source of the image to be extracted according to the image name comprises:
analyzing the mirror name to determine a character which identifies the mirror source in the prefix of the mirror name;
and determining the source of the mirror image to be extracted according to the character for identifying the source of the mirror image.
9. The image extraction method of an image warehouse according to claim 7, wherein the method comprises:
establishing a mirror image sub-warehouse in a mirror image warehouse in advance;
establishing a corresponding relation between a mirror image source and a mirror image sub-warehouse;
and storing the mirror image to the corresponding mirror image sub-warehouse according to the mirror image source.
10. The image extraction method of the image warehouse according to claim 7, wherein the extracting an image from the determined image sub-warehouse according to the image name comprises:
replacing the character which identifies the mirror image warehouse in the mirror image name prefix with a character which identifies the mirror image warehouse according to the determined mirror image warehouse;
and extracting the mirror image from the mirror image sub-warehouse according to the replaced mirror image name.
11. An image extraction device for an image warehouse, the device comprising:
the receiving module is used for receiving the name of the mirror image to be extracted;
the source determining module is used for determining the source of the mirror image to be extracted according to the mirror image name;
the sub-warehouse determining module is used for determining a sub-warehouse of the mirror image where the mirror image to be extracted is located according to the source of the mirror image to be extracted and the pre-established corresponding relationship between the mirror image source and the sub-warehouse of the mirror image;
and the extraction module is used for extracting the mirror image from the determined mirror image sub-warehouse according to the mirror image name.
12. The image extraction device of an image warehouse of claim 11, wherein the source determination module comprises:
the name analyzing unit is used for analyzing the mirror name to determine a character which identifies the mirror source in the prefix of the mirror name;
and the determining unit is used for determining the source of the mirror image to be stored according to the character for identifying the source of the mirror image.
13. The image-capturing apparatus of an image warehouse as claimed in claim 11, wherein the apparatus further comprises:
the sub-warehouse establishing module is used for establishing a mirror sub-warehouse in the mirror warehouse in advance;
the relation establishing module is used for establishing the corresponding relation between the mirror image source and the mirror image sub-warehouse
And the storage processing module is used for storing the mirror image to the corresponding mirror image sub-warehouse according to the mirror image source.
14. The image capturing apparatus of an image warehouse as claimed in claim 11, wherein the capturing module comprises:
the character replacing unit is used for replacing the character which identifies the mirror image warehouse in the mirror image name prefix with the character which identifies the mirror image warehouse according to the determined mirror image warehouse;
and the mirror image extraction unit is used for extracting the mirror images from the mirror image sub-warehouse according to the replaced mirror image names.
15. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of any of claims 1 to 3 when executing the computer program.
16. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program for executing the method of any one of claims 1 to 3.
17. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of any of claims 7 to 10 when executing the computer program.
18. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program for executing the method of any one of claims 7 to 10.
CN202010138587.8A 2020-03-03 2020-03-03 Mirror image storage and extraction method and device of mirror image warehouse Active CN111291017B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010138587.8A CN111291017B (en) 2020-03-03 2020-03-03 Mirror image storage and extraction method and device of mirror image warehouse

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010138587.8A CN111291017B (en) 2020-03-03 2020-03-03 Mirror image storage and extraction method and device of mirror image warehouse

Publications (2)

Publication Number Publication Date
CN111291017A true CN111291017A (en) 2020-06-16
CN111291017B CN111291017B (en) 2024-04-05

Family

ID=71023970

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010138587.8A Active CN111291017B (en) 2020-03-03 2020-03-03 Mirror image storage and extraction method and device of mirror image warehouse

Country Status (1)

Country Link
CN (1) CN111291017B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113793229A (en) * 2021-08-30 2021-12-14 东风柳州汽车有限公司 Parts warehouse-dividing method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107247793A (en) * 2017-06-21 2017-10-13 平安科技(深圳)有限公司 The mirror image synchronization method and mirror image synchronization system in Docker mirror images warehouse
CN108200155A (en) * 2017-12-29 2018-06-22 平安科技(深圳)有限公司 The mirror image synchronization method in Docker mirror images warehouse and mirror image synchronization system
WO2019127973A1 (en) * 2017-12-29 2019-07-04 平安科技(深圳)有限公司 Authority authentication method, system and device for mirror repository, and storage medium
CN110187954A (en) * 2019-04-23 2019-08-30 平安科技(深圳)有限公司 Using mirror image method for pushing, device, computer equipment and storage medium
CN110442480A (en) * 2019-07-31 2019-11-12 中国工商银行股份有限公司 A kind of mirror image data method for cleaning, apparatus and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107247793A (en) * 2017-06-21 2017-10-13 平安科技(深圳)有限公司 The mirror image synchronization method and mirror image synchronization system in Docker mirror images warehouse
CN108200155A (en) * 2017-12-29 2018-06-22 平安科技(深圳)有限公司 The mirror image synchronization method in Docker mirror images warehouse and mirror image synchronization system
WO2019127973A1 (en) * 2017-12-29 2019-07-04 平安科技(深圳)有限公司 Authority authentication method, system and device for mirror repository, and storage medium
CN110187954A (en) * 2019-04-23 2019-08-30 平安科技(深圳)有限公司 Using mirror image method for pushing, device, computer equipment and storage medium
CN110442480A (en) * 2019-07-31 2019-11-12 中国工商银行股份有限公司 A kind of mirror image data method for cleaning, apparatus and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113793229A (en) * 2021-08-30 2021-12-14 东风柳州汽车有限公司 Parts warehouse-dividing method and system

Also Published As

Publication number Publication date
CN111291017B (en) 2024-04-05

Similar Documents

Publication Publication Date Title
CN104967647A (en) Message push method and apparatus
CN106909595B (en) Data migration method and device
CN104572952A (en) Identification method and device for live multi-media files
CN111782470B (en) Distributed container log data processing method and device
CN104268229A (en) Resource obtaining method and device based on multi-process browser
CN104394601A (en) WiFi (wireless fidelity) network access control method, device and router
CN113110944A (en) Information searching method, device, server, readable storage medium and program product
CN112328413A (en) Application service calling method, device and system
CN109302449B (en) Data writing method, data reading device and server
CN111431818A (en) Cross-domain request traffic distribution method and device, storage medium and computer equipment
CN111291017A (en) Mirror image storage and extraction method and device of mirror image warehouse
CN110300222B (en) Short message display method, system, terminal equipment and computer readable storage medium
CN103365892A (en) Method and device for processing multiple contact objects
CN108960378B (en) Data downloading method, system, device and storage medium
CN113625936A (en) Data processing method, device, storage medium and equipment
CN111641690B (en) Session message processing method and device and electronic equipment
CN113486025B (en) Data storage method, data query method and device
CN104639973A (en) Information pushing method and device
CN111698337B (en) Method, device and equipment for establishing communication connection
CN111460037A (en) Financial data query method and device
CN113094454A (en) Map data searching method and device
CN115373831A (en) Data processing method, device and computer readable storage medium
CN111858765A (en) Data processing method, device and system applied to database capacity expansion scene
CN110928895A (en) Data query method, data table establishing method, device and equipment
CN111800742B (en) Management method and device of mobile position data, storage medium and terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant