CN113360244B - Remote container mirror image application method, system and equipment - Google Patents

Remote container mirror image application method, system and equipment Download PDF

Info

Publication number
CN113360244B
CN113360244B CN202110524333.4A CN202110524333A CN113360244B CN 113360244 B CN113360244 B CN 113360244B CN 202110524333 A CN202110524333 A CN 202110524333A CN 113360244 B CN113360244 B CN 113360244B
Authority
CN
China
Prior art keywords
client
container
address field
virtual
server
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.)
Active
Application number
CN202110524333.4A
Other languages
Chinese (zh)
Other versions
CN113360244A (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.)
Fiberhome Telecommunication Technologies Co Ltd
Original Assignee
Fiberhome Telecommunication Technologies Co Ltd
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 Fiberhome Telecommunication Technologies Co Ltd filed Critical Fiberhome Telecommunication Technologies Co Ltd
Priority to CN202110524333.4A priority Critical patent/CN113360244B/en
Publication of CN113360244A publication Critical patent/CN113360244A/en
Application granted granted Critical
Publication of CN113360244B publication Critical patent/CN113360244B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a remote container mirror image application method, a system and equipment, wherein the method comprises the steps of receiving a container generation request of a client through a server, and generating a virtual container and virtual container information of the server according to the container generation request; creating I/O mapping rules of the server and the client on the server through the virtual container information; and after the I/O mapping rule is successfully created, the creation success information is replied to the client, so that the container mirror image can be locally removed, the safety risk existing in the remote transmission of the mirror image file is avoided, the safety of the container application is improved, the container mirror image is synchronously updated without local downloading and upgrading, the accuracy of data input and output is ensured, and the speed and the efficiency of the remote container mirror image application are improved.

Description

Remote container mirror image application method, system and equipment
Technical Field
The invention relates to the technical field of container mirror image application, in particular to a method, a system and equipment for remote container mirror image application.
Background
The remote container mirror image remotely maintains a set of container mirror images by utilizing the remote data connection function of the storage equipment separated from the physical position, and once a problem occurs, data distributed on a remote storage cannot be affected; the remote mirror performs relevant mirror synchronization according to the client host information of the requested mirror.
In the current container application, the container mirror image is applied after being loaded to a local client, so that the application of the container is well coupled locally, but the problems of security and real-time updating are also existed, the container mirror image is easily downloaded from a far end and lost locally, and the container mirror image must be downloaded again after the version of the container mirror image is upgraded to meet the corresponding expected requirements.
Disclosure of Invention
The invention mainly aims to provide a method, a system and equipment for applying a remote container mirror image, and aims to solve the technical problems that in the prior art, after a container mirror image is loaded to a local client, the application of a container is poor in safety and cannot be updated in real time.
In a first aspect, the present invention provides a remote container mirror image application method, where the remote container mirror image application method includes the following steps:
the server receives a container generation request of a client, and generates a virtual container and virtual container information of the server according to the container generation request;
creating I/O mapping rules of the server and the client on the server through the virtual container information;
and replying creation success information to the client after the I/O mapping rule is successfully created.
Optionally, the container generation request includes a mirror image identifier, a client I/O memory address field, and a client I/O port address field, and the server receives the container generation request from the client and generates the virtual container and the virtual container information of the server according to the container generation request, including:
when a server receives a container generation request of a client, acquiring a mirror image identifier from the container generation request;
finding a corresponding target mirror image in a preset mirror image warehouse according to the mirror image identification;
and generating a virtual container of the server according to the target mirror image, and recording the mirror image identifier, the client I/O memory address field, the client I/O port address field and the virtual container identifier in the virtual container information.
Optionally, the creating, by the virtual container information, an I/O mapping rule of the server and the client on the server includes:
obtaining the client I/O memory address field from the virtual container information, and calculating the size of the client I/O memory address field according to the starting address and the ending address of the client I/O memory address field;
acquiring a physical address of the server, mapping a virtual I/O memory address segment with the same size as the I/O memory address segment of the client on the physical address of the server, and recording an I/O mapping rule corresponding to the virtual I/O memory address segment and the I/O memory address segment of the client;
and acquiring the client I/O port address field from the container information, and creating an I/O mapping rule corresponding to the public port address field of the server and the client I/O port address field of the client.
Optionally, the replying a creation success message to the client after the I/O mapping rule is successfully created includes:
extracting the mirror image identification and the virtual container identification from the virtual container information;
and after the I/O mapping rule is successfully created, creating success information is generated according to the mirror image identifier and the virtual container identifier, and the creating success information is replied to the client.
Optionally, after replying a creation success message to the client after the I/O mapping rule is successfully created, the remote container mirror image application method further includes:
acquiring a client I/O address field input by the client, stream data to be transmitted corresponding to the client I/O address field and the virtual container identifier;
positioning a corresponding virtual container according to the virtual container identifier, and processing the data of the to-be-transmitted stream according to the virtual container to obtain an output I/O address field and an output stream;
and feeding back the output I/O address field, the output stream, the virtual container identifier and the mirror image identifier obtained from the virtual container information to the client.
Optionally, the positioning to the corresponding virtual container according to the virtual container identifier, and processing the data of the to-be-transmitted stream according to the virtual container to obtain an output I/O address segment and an output stream include:
acquiring a client I/O port address field and a client I/O memory address field from the client I/O address field;
mapping the client I/O port address field to a public port address field corresponding to the server according to the I/O mapping rule and the virtual container, and mapping an I/O memory address field input by the client to the corresponding virtual I/O memory address field;
and positioning a corresponding virtual container according to the virtual container identifier, and processing the input of a data client of the to-be-transmitted stream through the virtual container, the public port address field and the virtual I/O memory address field to obtain an output I/O address field and an output stream, wherein the output I/O address field comprises an output I/O port address field and an output I/O memory address field.
Optionally, before the server receives a container generation request from a client, and generates a virtual container and virtual container information of the server according to the container generation request, the remote container mirroring application method further includes:
when detecting that the mirror image identification needs to be used, the client sends a container generation request to the server through an end-to-end protocol.
In a second aspect, to achieve the above object, the present invention further provides a remote container mirroring application system, including:
the system comprises a container generation module, a container generation module and a virtual container generation module, wherein the container generation module is used for receiving a container generation request of a client by a server and generating a virtual container and virtual container information of the server according to the container generation request;
a mapping rule creating module, configured to create, on the server, I/O mapping rules of the server and the client through the virtual container information;
and the replying module is used for replying creation success information to the client after the I/O mapping rule is successfully created.
Optionally, the remote container mirroring application system further includes:
the identification acquisition module is used for acquiring a client I/O address field input by the client, stream data to be transmitted corresponding to the client I/O address field and the virtual container identification;
the data processing module is used for positioning the corresponding virtual container according to the virtual container identifier, processing the data of the to-be-transmitted stream according to the virtual container, and obtaining an output I/O address section and an output stream;
and the feedback module is used for feeding back the output I/O address field, the output stream, the virtual container identifier and the mirror image identifier obtained from the virtual container information to the client.
In a third aspect, to achieve the above object, the present invention further provides a remote container mirroring application device, including: a memory, a processor, and a remote container mirror application stored on the memory and executable on the processor, the remote container mirror application configured to implement the steps of the remote container mirror application method as recited above.
The invention provides a remote container mirror image application method, which comprises the steps of receiving a container generation request of a client through a server, and generating a virtual container and virtual container information of the server according to the container generation request; creating I/O mapping rules of the server and the client on the server through the virtual container information; and after the I/O mapping rule is successfully created, the creation success information is replied to the client, so that the container mirror image can be locally removed, the safety risk existing in the remote transmission of the mirror image file is avoided, the safety of the container application is improved, the container mirror image is synchronously updated without local downloading and upgrading, the accuracy of data input and output is ensured, and the speed and the efficiency of the remote container mirror image application are improved.
Drawings
FIG. 1 is a schematic diagram of an apparatus architecture of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a method for remote container mirroring application according to a first embodiment of the present invention;
FIG. 3 is a flowchart illustrating a second embodiment of a remote container mirror application method according to the present invention;
FIG. 4 is a flowchart illustrating a method for remote container mirroring application according to a third embodiment of the present invention;
FIG. 5 is a flowchart illustrating a method for remote container mirroring application according to a fourth embodiment of the present invention;
FIG. 6 is a flow chart illustrating a fifth embodiment of a remote container mirroring application method according to the present invention;
FIG. 7 is a flowchart illustrating a method for remote container mirroring application according to a sixth embodiment of the present invention;
FIG. 8 is a schematic flow chart illustrating the container mirror image creation in the remote container mirror image application method according to the present invention;
FIG. 9 is a sequence diagram of application policies in the remote container mirror application method of the present invention;
FIG. 10 is a functional block diagram of a first embodiment of a remote container mirroring application system according to the invention;
FIG. 11 is a functional block diagram of a second embodiment of a remote container mirroring application system according to the invention;
the implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The solution of the embodiment of the invention is mainly as follows: receiving a container generation request of a client through a server, and generating a virtual container and virtual container information of the server according to the container generation request; creating I/O mapping rules of the server and the client on the server through the virtual container information; the method and the system have the advantages that after the I/O mapping rule is successfully established, the establishment success information is replied to the client, so that the container mirror image can be locally removed, the safety risk existing in the remote transmission of the mirror image file is avoided, the safety of the container application is improved, the container mirror image is synchronously updated without local downloading and upgrading, the accuracy of data input and output is ensured, the speed and the efficiency of the remote container mirror image application are improved, and the technical problems that in the prior art, the safety is poor and real-time updating cannot be realized when the container mirror image is loaded to the local client.
Referring to fig. 1, fig. 1 is a schematic device structure diagram of a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the apparatus may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., a Wi-Fi interface). The Memory 1005 may be a high-speed RAM Memory or a Non-Volatile Memory (Non-Volatile Memory), such as a disk Memory. The memory 1005 may alternatively be a storage device separate from the processor 1001 described previously.
Those skilled in the art will appreciate that the configuration of the device shown in fig. 1 is not intended to be limiting of the device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of storage medium, may include therein an operating system, a network communication module, a user interface module, and a remote container mirroring application program.
The apparatus of the present invention calls a remote container mirroring application stored in the memory 1005 through the processor 1001, and performs the following operations:
the server receives a container generation request of a client, and generates a virtual container and virtual container information of the server according to the container generation request;
creating I/O mapping rules of the server and the client on the server through the virtual container information;
and replying creation success information to the client after the I/O mapping rule is successfully created.
Further, processor 1001 may invoke a remote container mirroring application stored in memory 1005 to also perform the following operations:
when a server receives a container generation request of a client, acquiring a mirror image identifier from the container generation request;
finding a corresponding target mirror image in a preset mirror image warehouse according to the mirror image identification;
and generating a virtual container of the server according to the target mirror image, and recording the mirror image identifier, the client I/O memory address field, the client I/O port address field and the virtual container identifier in the virtual container information.
Further, processor 1001 may invoke a remote container mirroring application stored in memory 1005 to also perform the following operations:
obtaining the client I/O memory address field from the virtual container information, and calculating the size of the client I/O memory address field according to the starting address and the ending address of the client I/O memory address field;
acquiring a physical address of the server, mapping a virtual I/O memory address segment with the same size as the I/O memory address segment of the client on the physical address of the server, and recording an I/O mapping rule corresponding to the virtual I/O memory address segment and the I/O memory address segment of the client;
and acquiring the client I/O port address field from the container information, and creating an I/O mapping rule corresponding to the public port address field of the server and the client I/O port address field of the client.
Further, processor 1001 may invoke a remote container mirroring application stored in memory 1005 to also perform the following operations:
extracting the mirror image identification and the virtual container identification from the virtual container information;
and after the I/O mapping rule is successfully created, creating success information is generated according to the mirror image identifier and the virtual container identifier, and the creating success information is replied to the client.
Further, processor 1001 may invoke a remote container mirroring application stored in memory 1005 to also perform the following operations:
acquiring a client I/O address field input by the client, stream data to be transmitted corresponding to the client I/O address field and the virtual container identifier;
positioning a corresponding virtual container according to the virtual container identifier, and processing the data of the to-be-transmitted stream according to the virtual container to obtain an output I/O address field and an output stream;
and feeding back the output I/O address field, the output stream, the virtual container identifier and the mirror image identifier obtained from the virtual container information to the client.
Accordingly, the apparatus of the present invention may also invoke, by processor 1001, a remote container mirroring application stored in memory 1005, and perform the following operations:
acquiring a client I/O port address field and a client I/O memory address field from the client I/O address field;
mapping the client I/O port address field to a public port address field corresponding to the server according to the I/O mapping rule and the virtual container, and mapping an I/O memory address field input by the client to the corresponding virtual I/O memory address field;
and positioning a corresponding virtual container according to the virtual container identifier, and processing the input of a data client of the to-be-transmitted stream through the virtual container, the public port address field and the virtual I/O memory address field to obtain an output I/O address field and an output stream, wherein the output I/O address field comprises an output I/O port address field and an output I/O memory address field.
Further, processor 1001 may invoke a remote container mirror application stored in memory 1005 to also perform the following operations:
when detecting that the mirror image identification needs to be used, the client sends a container generation request to the server through an end-to-end protocol.
In this embodiment, by using the above scheme, a server receives a container generation request from a client, and generates a virtual container and virtual container information of the server according to the container generation request; creating I/O mapping rules of the server and the client on the server through the virtual container information; and after the I/O mapping rule is successfully created, the creation success information is replied to the client, the mirror image file is not required to be loaded to a local client, so that the container mirror image can be delocalized, the safety risk existing in the remote transmission of the mirror image file is avoided, the safety of container application is improved, the synchronous updating of the container mirror image is not required to be updated by local downloading, the accuracy of data input and output is ensured, and the speed and the efficiency of the remote container mirror image application are improved.
Based on the above hardware structure, an embodiment of the remote container mirror image application method of the present invention is provided.
Referring to fig. 2, fig. 2 is a flowchart illustrating a method for applying a remote container mirror image according to a first embodiment of the present invention.
In a first embodiment, the remote container mirror application method comprises the steps of:
step A10, the server receives a container generation request of the client, and generates the virtual container and the virtual container information of the server according to the container generation request.
It should be noted that the server is a remote server, the container generation request of the client is a request sent by the client for generating a corresponding virtual container at the server, and is generally sent to the server by an end-to-end protocol, when receiving the container generation request, the server may generate a corresponding virtual container according to the container generation request, and the virtual container information is container related information corresponding to the virtual container.
Step A20, creating I/O mapping rules of the server and the client on the server through the virtual container information.
It should be noted that the virtual container information is related container parameter information of a virtual container in a server corresponding to the client; the I/O mapping rules comprise mapping rules of client I/O port address fields and server public port address fields and mapping rules of client I/O memory address fields and server virtual I/O memory address fields.
And step A30, replying creation success information to the client after the I/O mapping rule is successfully created.
It should be noted that, after the I/O mapping rule is successfully created, a creation success message is replied to the client in time to notify the client that the creation is successful.
In this embodiment, by using the above scheme, a server receives a container generation request from a client, and generates a virtual container and virtual container information of the server according to the container generation request; creating I/O mapping rules of the server and the client on the server through the virtual container information; after the I/O mapping rule is successfully established, the client side replies establishment success information, so that the container mirror image can be locally removed, the safety risk existing in the remote transmission of the mirror image file is avoided, the safety of the container application is improved, the container mirror image is synchronously updated without local downloading and upgrading, the accuracy of data input and output is ensured, and the speed and the efficiency of the remote container mirror image application are improved.
Further, fig. 3 is a schematic flow chart of a remote container mirroring application method according to a second embodiment of the present invention, and as shown in fig. 3, the second embodiment of the remote container mirroring application method according to the present invention is proposed based on the first embodiment, in this embodiment, the step a10 specifically includes the following steps:
step A11, when receiving a container generation request from a client, a server obtains an image identifier from the container generation request.
It should be noted that the image identifier is an identifier of a known container image for implementing a container creation client, where the container generation request includes the image identifier, the server may extract a corresponding image identifier from the container generation request, and the container generation request further includes information for creating a container, an I/O port address segment of the client, an I/O memory address segment (i.e., starting and ending addresses of an I/O memory of the client), and the like, and certainly may further include more or less information, which is not limited in this embodiment.
And A12, finding a corresponding target mirror image in a preset mirror image warehouse according to the mirror image identification.
It can be understood that the preset mirror image warehouse is a preset warehouse for performing container mirror image management, the target mirror image is a mirror image corresponding to the container generation request in the mirror image warehouse of the server, and the virtual container of the server is generated according to the target mirror image, that is, a virtual container can be created in the server through the mirror image; the mirror image file does not need to be loaded to a local client, the mirror image file can be stored in the server side by establishing the preset mirror image warehouse, and after the server side receives a container generation request, a mirror image corresponding to the relevant mirror image file data can be found in the preset mirror image warehouse according to the mirror image identification to serve as a target mirror image.
Step A13, generating a virtual container of the server according to the target mirror image, and recording the mirror image identifier, the client I/O memory address field, the client I/O port address field and the virtual container identifier in the virtual container information.
It should be understood that, according to the target image, a corresponding virtual container may be generated in the server, that is, a virtualized container at a far end of the server is generated, where an image identifier, a virtual container identifier, and corresponding client information are recorded in the virtual container, and the client information includes the client I/O memory address field and the client I/O port address field.
According to the scheme, when a server receives a container generation request of a client, the server obtains a mirror image identifier from the container generation request; finding a corresponding target mirror image in a preset mirror image warehouse according to the mirror image identification; and generating a virtual container of the server according to the target mirror image, and recording the mirror image identifier, the client I/O memory address field, the client I/O port address field and the virtual container identifier in the virtual container information, so that the mirror image update does not need local download and upgrade, but only needs to update the container mirror image in the document warehouse, the container mirror image is localized, and the speed and the efficiency of mirror image file transmission are improved.
Further, fig. 4 is a schematic flow chart of a third embodiment of the remote container mirror image application method of the present invention, and as shown in fig. 4, the third embodiment of the remote container mirror image application method of the present invention is proposed based on the first embodiment, and in this embodiment, the step a20 specifically includes the following steps:
step A21, obtaining the client I/O memory address field from the virtual container information, and calculating the size of the client I/O memory address field according to the start and end addresses of the client I/O memory address field.
It can be understood that the virtual container records the mirror image identifier and the corresponding client information, the client information includes a client I/O memory address segment, and the size of the client memory address pool can be calculated according to the start and end addresses of the client I/O memory address segment.
Step A22, obtaining the physical address of the server, mapping a virtual I/O memory address segment with the same size as the I/O memory address segment of the client on the physical address of the server, and recording the I/O mapping rule corresponding to the virtual I/O memory address segment and the I/O memory address segment of the client.
It should be understood that the physical address is an address corresponding to the server at a physical layer, and after obtaining the physical address, a virtual I/O address segment having the same size as the client address pool may be mapped on the physical address of the server.
It should be noted that, by establishing a mapping relationship between the virtual I/O address field of the server and the I/O memory address field of the client, a mapping rule about the memory between the server and the client can be formed.
Step A23, obtaining the client I/O port address field from the container information, and creating an I/O mapping rule corresponding to the public port address field of the server and the client I/O port address field of the client.
It can be understood that, by establishing a mapping relationship between the public port address field of the server and the client I/O port address field of the client, a mapping rule about a port between the server and the client can be formed, and the establishment process of the mapping relationship may be determined by a corresponding physical address head address and a client I/O address pool head address, or may be determined by other manners, for example, mapping to different physical storage banks in advance, which is not limited in this embodiment.
In this embodiment, by the above scheme, the size of the I/O memory address segment of the client is calculated according to the start address and the end address of the I/O memory address segment of the client by obtaining the I/O memory address segment of the client from the virtual container information; acquiring a physical address of the server, mapping a virtual I/O memory address segment with the same size as the I/O memory address segment of the client on the physical address of the server, and recording an I/O mapping rule corresponding to the virtual I/O memory address segment and the I/O memory address segment of the client; acquiring the client I/O port address field from the container information, and creating an I/O mapping rule corresponding to the public port address field of the server and the client I/O port address field of the client; the accuracy of virtual container generation can be improved, the accuracy of data input and output is guaranteed, and the speed and the efficiency of remote container mirror image application are improved.
Further, fig. 5 is a schematic flow chart of a fourth embodiment of the remote container mirror image application method of the present invention, and as shown in fig. 5, the fourth embodiment of the remote container mirror image application method of the present invention is proposed based on the first embodiment, in this embodiment, the step a30 specifically includes the following steps:
step A31, extracting the mirror image identification and the virtual container identification from the virtual container information.
It should be noted that the virtual container identifier is an identifier used to identify a corresponding virtual container, the image identifier is an identifier of a container image known by a client that implements container creation, and the image identifier and the virtual container identifier can be obtained from the virtual container information.
Step A32, after the I/O mapping rule is successfully created, creating success information is generated according to the mirror image identifier and the virtual container identifier, and the creating success information is replied to the client.
It should be understood that, the virtual container identifier is used for finding a corresponding virtual container when a subsequent client processes input, and generally, a mirror image identifier is returned after the creation success information is returned, where the mirror image identifier is returned because the client can run a virtual container corresponding to multiple mirror image identifiers, and therefore the information of the returned mirror image identifier and virtual container identifier can make the client know which mirror image identifier the returned virtual container identifier corresponds to.
It can be understood that, after the I/O mapping rule is successfully created, a creation success message is generated according to the mirror image identifier and the virtual container identifier, the creation success message is replied to the client in time, and the client is notified of success, so that the client can conveniently operate mirror image application of a mirror image container through the mirror image identifier and the virtual container identifier.
In this embodiment, by the above scheme, the mirror image identifier and the virtual container identifier are extracted from the virtual container information; after the I/O mapping rule is successfully created, creating success information is generated according to the mirror image identification and the virtual container identification, and the creating success information is replied to the client, so that the timeliness of virtual container generation is ensured, the client is rapidly informed that the mapping rule is successfully created, and the speed and the efficiency of remote container mirror image application are improved.
Further, fig. 6 is a schematic flow chart of a fifth embodiment of the remote container mirror image application method of the present invention, and as shown in fig. 6, the fifth embodiment of the remote container mirror image application method of the present invention is proposed based on the first embodiment, and in this embodiment, after the step a30, the remote container mirror image application method further includes the following steps:
and A40, acquiring the client I/O address field input by the client, the stream data to be transmitted corresponding to the client I/O address field and the virtual container identifier.
It should be noted that the client I/O address field records relevant information of the client I/O address field, and the to-be-transmitted stream data is stream data obtained by the client according to the client I/O address field; the client I/O port address field and the client I/O memory address field of the client can be obtained through the client I/O address field; the stream data to be transmitted may include a relevant command line, an instruction set, a protocol packet, or the like, and may also include other types of data, which is not limited in this embodiment.
And A50, positioning the virtual container corresponding to the virtual container identifier, and processing the data of the stream to be transmitted according to the virtual container to obtain an output I/O address segment and an output stream.
It can be understood that the virtual container identifier can be used to locate a corresponding remote virtual container, and the virtual container is used to process the streaming data to be transmitted, that is, execute the streaming data to be transmitted, so that a processed output stream and an I/O address segment can be obtained, which is convenient for a client to use.
And step A60, feeding back the output I/O address field, the output stream, the virtual container identifier and the image identifier obtained from the virtual container information to the client.
It should be understood that, because the client may run a plurality of virtual containers corresponding to the mirror identifiers, the returned information lets the client know that the returned virtual container identifier corresponds to the mirror identifier through the mirror identifier and the virtual container identifier; and after the output I/O address field, the output stream, the virtual container identifier and the mirror image identifier obtained from the virtual container information are fed back to the client, the client performs related service processing on the output stream according to the output I/O address field, the output stream, the virtual container identifier and the mirror image identifier.
According to the scheme, the method comprises the steps of obtaining a client I/O address field input by a client, stream data to be transmitted corresponding to the client I/O address field and a virtual container identifier; positioning a corresponding virtual container according to the virtual container identifier, and processing the data of the to-be-transmitted stream according to the virtual container to obtain an output I/O address field and an output stream; the output I/O address segment, the output stream, the virtual container identifier and the image identifier obtained from the virtual container information are fed back to the client, so that the container image can be localized, the security risk in remote transmission of image files is avoided, the application security of the container is improved, the container image is updated synchronously without local downloading and upgrading, the accuracy of data input and output can be ensured, and the speed and efficiency of remote container image application are improved.
Further, fig. 7 is a schematic flowchart of a sixth embodiment of the remote container mirror image application method according to the present invention, and as shown in fig. 7, a fifth embodiment of the remote container mirror image application method according to the present invention is proposed based on the fifth embodiment, and in this embodiment, the step a50 specifically includes the following steps:
and A51, acquiring a client I/O port address field and a client I/O memory address field from the client I/O address field.
It should be noted that the client I/O address field is related information for recording the client I/O address, and the client I/O port address field and the client I/O memory address field of the client can be known through the client I/O address field.
Step A52, mapping the client I/O port address field to the public port address field corresponding to the server according to the I/O mapping rule and the virtual container, and mapping the I/O memory address field input by the client to the corresponding virtual I/O memory address field.
It can be understood that, through the I/O mapping rule and the virtual container, each client I/O port address field can be mapped into a common port address field, and an I/O memory address field input by the client is mapped into the corresponding virtual I/O memory address field.
Step A53, positioning the virtual container according to the virtual container identifier, and processing the input of the data to be transmitted to the stream data client through the virtual container, the public port address field and the virtual I/O memory address field to obtain an output I/O address field and an output stream, wherein the output I/O address field includes an output I/O port address field and an output I/O memory address field.
It should be understood that, the virtual container identifier can be used to locate a corresponding remote virtual container, the to-be-transmitted stream data is processed through the virtual container, the public port address segment and the virtual I/O memory address segment, that is, the to-be-transmitted stream data is executed, and after the execution is completed, an output stream and an output I/O address segment that can be used by the processed client can be obtained through inverse mapping of an I/O mapping rule, where the output I/O address segment includes an output I/O port address segment and an output I/O memory address segment.
In this embodiment, by the above-mentioned scheme, a client I/O port address field and a client I/O memory address field are obtained from the client I/O address field, the client I/O port address field is mapped to a public port address field corresponding to the server according to the I/O mapping rule and the virtual container, the I/O memory address field input by the client is mapped to the corresponding virtual I/O memory address field, the corresponding virtual container is located according to the virtual container identifier, the input of the client for transmitting stream data is processed through the virtual container, the public port address field and the virtual I/O memory address field, and an output I/O address field and an output stream are obtained, the output I/O address field includes an output I/O port address field and an output I/O memory address field, the container mirror image can be locally removed, the safety risk existing in remote transmission of the mirror image file is avoided, the safety of container application is improved, the container mirror image is synchronously updated without local downloading and upgrading, and the accuracy of data input and output can be ensured.
Further, fig. 8 is a schematic flow diagram illustrating the establishment of a container mirror image in the remote container mirror image application method of the present invention; as shown in fig. 8:
step S101-S103, the client side realizes the container creation by sending a container creation request to a remote server side through an end-to-end protocol under the condition that a mirror image identifier required to be used is known, wherein the request message comprises the mirror image identifier, the information of the created container, an I/O port address field of the client side and an I/O memory address field;
after receiving the request, the server side searches a corresponding mirror image in a mirror image warehouse according to the mirror image identification to generate a virtual container and virtual container information, wherein the virtual container information records the mirror image identification and corresponding client information;
steps S301-S303 are to calculate the size of the address pool of the local memory according to the I/O memory address field of the client, to map the same size of the virtual I/O memory address on the physical address of the server, to establish and record the corresponding I/O mapping rule in the virtual container, and to map the I/O port address field to the public port address field and establish the corresponding I/O mapping rule;
and S401-S403, the server side replies the container information and the mirror image identifier to the client side.
The mirror image of the container in this step diagram and the established container are shown in a one-to-many relationship.
Further, fig. 9 is a sequence diagram of an application policy in the remote container mirror application method of the present invention; as shown in fig. 9:
and step S1, the client reads in the IO register after receiving the relevant input, forms the corresponding I/O port address field, I/O memory address field and bit stream data of the corresponding address field, the data stream of the I/O port address field, I/O memory address field and bit stream data of the corresponding address field comprises relevant command lines, instruction sets or protocol messages, the I/O port address field, I/O memory address field and bit stream data are transmitted to the server through end-to-end communication, and the server is positioned to the corresponding virtual container through the virtual container identifier.
And step S2, the virtual container maps the I/O memory address field transmitted by the client to the corresponding virtual I/O memory address field and the I/O port address field to the corresponding server public address field according to the I/O mapping rule, and performs the relevant I/O read-in and execution processing on the corresponding bit stream data.
Sequence step S3, the server side replies the output stream of the processing result and the I/O address field obtained by the I/O mapping rule reverse mapping to the corresponding client side through end-to-end communication; and the client finally completes service processing through the I/O address field and the output stream.
Accordingly, the first to sixth embodiments of the remote container mirror application method according to the present invention further provide a remote container mirror application system.
Referring to fig. 10, fig. 10 is a functional block diagram of a first embodiment of a remote container mirror application system according to the present invention.
In a first embodiment of a remote container mirroring application system according to the present invention, the remote container mirroring application system includes:
the container generation module 10 is configured to receive a container generation request of a client, obtain a corresponding target image according to the container generation request, and generate a virtual container and virtual container information of the server according to the target image.
And a mapping rule creating module 20, configured to create, on the server, I/O mapping rules of the server and the client according to the virtual container information.
And a replying module 30, configured to reply to the client with creation success information after the I/O mapping rule is successfully created.
Further, based on the first embodiment of the remote container mirroring application system of the present invention, a second embodiment of the remote container mirroring application system of the present invention is proposed, referring to fig. 11, where fig. 11 is a functional block diagram of the second embodiment of the remote container mirroring application system of the present invention; the remote container mirroring application system further comprises:
an identifier obtaining module 40, configured to obtain a client I/O address segment input by the client, to-be-transmitted stream data corresponding to the client I/O address segment, and the virtual container identifier;
the data processing module 50 is configured to locate a corresponding virtual container according to the virtual container identifier, and process the data of the to-be-transmitted stream according to the virtual container to obtain an output I/O address segment and an output stream;
a feedback module 60, configured to feed back the output I/O address field, the output stream, the virtual container identifier, and the image identifier obtained from the virtual container information to the client.
The steps implemented by each functional module of the remote container mirror application system may refer to each embodiment of the remote container mirror application method of the present invention, and are not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are only for description, and do not represent the advantages and disadvantages of the embodiments.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (7)

1. A remote container mirror image application method, wherein the remote container mirror image application method comprises:
the server receives a container generation request of a client, and generates a virtual container and virtual container information of the server according to the container generation request; the container generation request comprises a mirror image identifier, a client I/O memory address field and a client I/O port address field;
creating I/O mapping rules of the server and the client on the server through the virtual container information;
replying creation success information to the client after the I/O mapping rule is successfully created;
the method for the server side to receive a container generation request of a client side and generate a virtual container and virtual container information of the server side according to the container generation request includes the following steps:
when a server receives a container generation request of a client, acquiring a mirror image identifier from the container generation request;
finding a corresponding target mirror image in a preset mirror image warehouse according to the mirror image identification;
generating a virtual container of the server according to the target mirror image, and recording the mirror image identifier, the client I/O memory address field, the client I/O port address field and the virtual container identifier in the virtual container information;
wherein the creating the I/O mapping rule of the server and the client on the server through the virtual container information includes:
obtaining the client I/O memory address field from the virtual container information, and calculating the size of the client I/O memory address field according to the starting address and the ending address of the client I/O memory address field;
acquiring a physical address of the server, mapping a virtual I/O memory address segment with the same size as the I/O memory address segment of the client on the physical address of the server, and recording an I/O mapping rule corresponding to the virtual I/O memory address segment and the I/O memory address segment of the client;
and acquiring the client I/O port address field from the container information, and creating an I/O mapping rule corresponding to the public port address field of the server and the client I/O port address field of the client.
2. The remote container mirror application method of claim 1, wherein said replying to the client a creation success message after the I/O mapping rule was created successfully comprises:
extracting the mirror image identification and the virtual container identification from the virtual container information;
and after the I/O mapping rule is successfully created, creating success information is generated according to the mirror image identifier and the virtual container identifier, and the creating success information is replied to the client.
3. The remote container mirror application method according to claim 1, wherein after replying a creation success message to the client after the I/O mapping rule is successfully created, the remote container mirror application method further comprises:
acquiring a client I/O address field input by the client, stream data to be transmitted corresponding to the client I/O address field and the virtual container identifier;
positioning a corresponding virtual container according to the virtual container identifier, and processing the data of the to-be-transmitted stream according to the virtual container to obtain an output I/O address field and an output stream;
and feeding back the output I/O address field, the output stream, the virtual container identifier and the mirror image identifier obtained from the virtual container information to the client.
4. The method for applying a mirror image of a remote container according to claim 3, wherein the locating a corresponding virtual container according to the virtual container identifier, and processing the data to be transmitted according to the virtual container to obtain an output I/O address segment and an output stream comprise:
acquiring a client I/O port address field and a client I/O memory address field from the client I/O address field;
mapping the client I/O port address field to a public port address field corresponding to the server according to the I/O mapping rule and the virtual container, and mapping an I/O memory address field input by the client to the corresponding virtual I/O memory address field;
and positioning a corresponding virtual container according to the virtual container identifier, and processing the input of a data client side of the to-be-transmitted stream through the virtual container, the public port address field and the virtual I/O memory address field to obtain an output I/O address field and an output stream, wherein the output I/O address field comprises an output I/O port address field and an output I/O memory address field.
5. The method for applying a remote container mirror image according to any one of claims 1 to 4, wherein the server receives a container generation request from a client, and before generating the virtual container and the virtual container information of the server according to the container generation request, the method for applying a remote container mirror image further comprises:
when detecting that the mirror image identification needs to be used, the client sends a container generation request to the server through an end-to-end protocol.
6. A remote container mirroring application system, the remote container mirroring application system comprising:
the system comprises a container generation module, a container generation module and a virtual container generation module, wherein the container generation module is used for receiving a container generation request of a client by a server and generating a virtual container and virtual container information of the server according to the container generation request; the container generation request comprises a mirror image identifier, a client I/O memory address field and a client I/O port address field;
a mapping rule creating module, configured to create, on the server, an I/O mapping rule between the server and the client according to the virtual container information;
the reply module is used for replying creation success information to the client after the I/O mapping rule is successfully created;
the identification acquisition module is used for acquiring a client I/O address field input by the client, stream data to be transmitted corresponding to the client I/O address field and the virtual container identification;
the data processing module is used for positioning the corresponding virtual container according to the virtual container identifier, processing the data of the to-be-transmitted stream according to the virtual container, and obtaining an output I/O address section and an output stream;
a feedback module, configured to feed back the output I/O address segment, the output stream, the virtual container identifier, and a mirror identifier obtained from the virtual container information to the client;
the mapping rule creating module is further configured to obtain the client I/O memory address field from the virtual container information, and calculate the size of the client I/O memory address field according to the start address and the end address of the client I/O memory address field; acquiring a physical address of the server, mapping a virtual I/O memory address segment with the same size as the I/O memory address segment of the client on the physical address of the server, and recording an I/O mapping rule corresponding to the virtual I/O memory address segment and the I/O memory address segment of the client; and acquiring the client I/O port address field from the container information, and creating an I/O mapping rule corresponding to the public port address field of the server and the client I/O port address field of the client.
7. A remote container mirroring application device, wherein the remote container mirroring application device comprises: a memory, a processor and a remote container mirror application stored on the memory and executable on the processor, the remote container mirror application being configured to obtain the physical address of the server and the client I/O port address field of the client by implementing the steps of the remote container mirror application method as claimed in any one of claims 1 to 5.
CN202110524333.4A 2021-05-13 2021-05-13 Remote container mirror image application method, system and equipment Active CN113360244B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110524333.4A CN113360244B (en) 2021-05-13 2021-05-13 Remote container mirror image application method, system and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110524333.4A CN113360244B (en) 2021-05-13 2021-05-13 Remote container mirror image application method, system and equipment

Publications (2)

Publication Number Publication Date
CN113360244A CN113360244A (en) 2021-09-07
CN113360244B true CN113360244B (en) 2022-07-01

Family

ID=77526671

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110524333.4A Active CN113360244B (en) 2021-05-13 2021-05-13 Remote container mirror image application method, system and equipment

Country Status (1)

Country Link
CN (1) CN113360244B (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105653901A (en) * 2015-12-29 2016-06-08 深圳市科漫达智能管理科技有限公司 Component repository management method and system
CN106775924B (en) * 2016-11-07 2018-08-07 北京百度网讯科技有限公司 Virtual machine starts method and apparatus
CN108415795B (en) * 2018-02-12 2019-04-05 人和未来生物科技(长沙)有限公司 A kind of container Dockerfile, container mirror image rapid generation and system
CN109274721B (en) * 2018-08-24 2021-03-16 南京壹进制信息科技有限公司 LAN-free transmission method and system based on virtual disk mapping
CN110308972A (en) * 2019-07-05 2019-10-08 北京百度网讯科技有限公司 Method and apparatus for managing container mirror image
CN110442430B (en) * 2019-08-06 2021-11-19 上海浦东发展银行股份有限公司信用卡中心 Publishing method based on distributed storage container cloud application

Also Published As

Publication number Publication date
CN113360244A (en) 2021-09-07

Similar Documents

Publication Publication Date Title
US8364845B2 (en) Method and system for thin client configuration
RU2754720C1 (en) Method and device for displaying interface
CN110557433B (en) Resource management method, platform, cloud gateway, system and storage medium
CN107463453B (en) Method, device, equipment and storage medium for communication between different applications of same terminal
CN110750222A (en) Printing method, printing device, computer equipment and storage medium
JP2020532784A (en) Information transmission method and device
CN107391277B (en) Information processing method and device
CN110113250B (en) Method for sharing wireless access point through instant messaging software
CN111324905A (en) Image data labeling method and device, computer equipment and storage medium
CN109729121B (en) Cloud storage system and method for realizing custom data processing in cloud storage system
JP5677005B2 (en) Image processing apparatus, image processing apparatus control method, and program
CN113360244B (en) Remote container mirror image application method, system and equipment
EP2845090B1 (en) Transmitting a job to a destination
CN111327680B (en) Authentication data synchronization method, device, system, computer equipment and storage medium
US8959126B2 (en) Device management apparatus and device management method
US7444430B2 (en) Terminal apparatus and control method thereof
US7747711B2 (en) Network configuration method and system
CN103490985A (en) Method and device for processing picture messages
US10904295B2 (en) Dynamically updating feature set recommendation databases
CN103491087A (en) Multimedia message processing method and device
EP3176986A1 (en) Method, device and system for remote desktop protocol gateway to conduct routing and switching
CN115390858A (en) Method, device, processor and storage medium for managing mirror image file
CN112714068A (en) Method, device and system for processing coded image, storage medium and electronic device
KR100597586B1 (en) Data Synchronization method using Session Management
JP2007199992A (en) Computer system

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