CN109582487A - Method and apparatus for sending information - Google Patents

Method and apparatus for sending information Download PDF

Info

Publication number
CN109582487A
CN109582487A CN201811453902.5A CN201811453902A CN109582487A CN 109582487 A CN109582487 A CN 109582487A CN 201811453902 A CN201811453902 A CN 201811453902A CN 109582487 A CN109582487 A CN 109582487A
Authority
CN
China
Prior art keywords
address
container
information
file system
file
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
CN201811453902.5A
Other languages
Chinese (zh)
Other versions
CN109582487B (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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201811453902.5A priority Critical patent/CN109582487B/en
Publication of CN109582487A publication Critical patent/CN109582487A/en
Application granted granted Critical
Publication of CN109582487B publication Critical patent/CN109582487B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0766Error or fault reporting or storing
    • G06F11/0787Storage of error reports, e.g. persistent data storage, storage using memory protection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1435Saving, restoring, recovering or retrying at system level using file system or storage system metadata

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Library & Information Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the present application discloses the method and apparatus for sending information.One specific embodiment of this method includes: the information of container for obtaining the container in run-stopping status, and information of container includes vessel identity mark;It is identified according to vessel identity, determines that information of container whether there is in history information of container list;It is not present in response to determination, determines the address of the indicated corresponding file system of container of vessel identity mark, and determine the backup address of file system;It controls destination server and the file in file system is stored into memory space corresponding to backup address;Backup address is sent to the client of communication connection.The operation maintenance personnel that the embodiment facilitates container user accurately checks container instance and abnormal reason occurs.

Description

Method and apparatus for sending information
Technical field
The invention relates to field of computer technology, and in particular to the method and apparatus for sending information.
Background technique
In the related technology, the life cycle of the container run on destination server is managed by control server.Hold After exception occurs in the container instance run in device, control server can control destination server and delete container.This affects appearance The operation maintenance personnel of device user checks the abnormal cause of container instance.
Summary of the invention
The embodiment of the present application proposes the method and apparatus for sending information.
In a first aspect, the embodiment of the present application provides a kind of method for sending information, it is in this method comprises: obtaining The information of container of the container of run-stopping status, information of container include vessel identity mark;It is identified according to vessel identity, determines and hold Device information whether there is in history information of container list;It is not present, is determined indicated by vessel identity mark in response to determination The address of the corresponding file system of container, and determine the backup address of file system;Destination server is controlled by file system In file store memory space corresponding to backup address;Backup address is sent to the client of communication connection.
In some embodiments, method further include: information of container is added to history information of container list.
In some embodiments, method further include: in response to determining that storage duration of the file in memory space is more than pre- The storage duration threshold value first set, control destination server delete file.
In some embodiments, the address for determining the indicated corresponding file system of container of vessel identity mark it Before, method further include: identified according to vessel identity, determine the storage driving mode of container, wherein storage driving mode is following One of: device map storage driving, another union file system storage driving.
In some embodiments, storage driving mode is device map storage driving;And determine that vessel identity identifies institute The address of the corresponding file system of the container of instruction, and determine the backup address of file system, comprising: according to vessel identity mark Know, finds the equipment metamessage of the corresponding virtual unit of container, wherein equipment metamessage includes equipment size and equipment identities Mark;It is identified according to equipment size and equipment identities, generates and execute the instruction of control virtual unit operation;According to equipment body Part mark, the device address of virtual unit is found in running equipment address list, device address is determined as file system Address;By device address carry in preset address, backup address is generated.
In some embodiments, storage driving mode is another union file system storage driving;And determine container body The address of the indicated corresponding file system of container of part mark, and determine the backup address of file system, comprising: according to appearance Device identity finds the writable layer identity of the corresponding writable layer of container;File is determined according to writable layer identity The address of system;The address of preset backup file system is determined as backup address.
Second aspect, the embodiment of the present application provide a kind of for sending the device of information, which includes: acquisition of information Unit, is configured to obtain the information of container of the container in run-stopping status, and information of container includes vessel identity mark;Letter Comparing unit is ceased, is configured to be identified according to vessel identity, determines that information of container whether there is in history information of container list; Address determination unit is configured in response to determination and is not present, and determines the indicated corresponding file of container of vessel identity mark The address of system, and determine the backup address of file system;File backup unit, being configured to control destination server will be literary File in part system stores memory space corresponding to backup address;Address transmission unit is configured to send out backup address Give the client of communication connection.
In some embodiments, device further include: information adding unit is configured to for information of container being added to history appearance Device information list.
In some embodiments, device further include: file deletes unit, is configured in response to determine that file is empty in storage Between in storage duration be more than preset storage duration threshold value, control destination server deletion file.
In some embodiments, device further include: driving determination unit is configured to be identified according to vessel identity, determine The storage driving mode of container, wherein storage driving mode is one of the following: device map storage driving, another combined paper System storage driving.
In some embodiments, address determination unit is further configured to: being identified according to vessel identity, is found appearance The equipment metamessage of the corresponding virtual unit of device, wherein equipment metamessage includes equipment size and equipment identities mark;According to setting Standby size and equipment identities identify, and generate and execute the instruction of control virtual unit operation;It is identified, is being transported according to equipment identities Device address is determined as the address of file system by the device address that virtual unit is found in row list of device addresses;It will set Standby address carry generates backup address in preset address.
In some embodiments, address determination unit is further configured to: being identified according to vessel identity, is found appearance The writable layer identity of the corresponding writable layer of device;The address of file system is determined according to writable layer identity;It will set in advance The address of fixed backup file system is determined as backup address.
The third aspect, the embodiment of the present application provide a kind of server, comprising: one or more processors;Storage device, One or more programs are stored thereon with, when one or more programs are executed by one or more processors, so that one or more A processor realizes the method such as any embodiment in the method for sending information.
Fourth aspect, the embodiment of the present application provide a kind of computer readable storage medium, are stored thereon with computer journey Sequence realizes the method such as any embodiment in the method for sending information when the computer program is executed by processor.
Method and apparatus provided by the embodiments of the present application for sending information, it is available in run-stopping status The information of container of container.Wherein, information of container includes vessel identity mark.Secondly, identifying according to vessel identity, determine that container is believed Breath is with the presence or absence of in history information of container list.Then, it is not present, is determined indicated by vessel identity mark in response to determination The address of the corresponding file system of container, and determine the backup address of file system.Later, destination server is controlled by file File in system stores memory space corresponding to backup address.Finally, backup address to be sent to the client of communication connection End.The method and apparatus of the present embodiment, due to the operational process of container instance of the file record in file system, will The file of file system stores memory space corresponding to backup address, may be implemented to the file in container instance operational process It is backed up, the operation maintenance personnel for facilitating container user accurately checks container instance and abnormal reason occurs.
Detailed description of the invention
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, the application's is other Feature, objects and advantages will become more apparent upon:
Fig. 1 is that one embodiment of the application can be applied to exemplary system architecture figure therein;
Fig. 2 is the flow chart according to one embodiment of the method for sending information of the application;
Fig. 3 is the schematic diagram according to an application scenarios of the method for sending information of the embodiment of the present application;
Fig. 4 is the flow chart according to another embodiment of the method for sending information of the application;
Fig. 5 is the structural schematic diagram according to one embodiment of the device for sending information of the application;
Fig. 6 is adapted for the structural schematic diagram for the computer system for realizing the server of the embodiment of the present application.
Specific embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to Convenient for description, part relevant to related invention is illustrated only in attached drawing.
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase Mutually combination.The application is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 is shown can the method for sending information using the embodiment of the present application or the device for sending information Exemplary system architecture 100.
As shown in Figure 1, system architecture 100 may include client 101, control server 102, destination server 103, net Network 104,105.Network 104,105 is to provide communication between client 101, control server 102 and destination server 103 The medium of link.Network 104,105 may include various connection types, such as wired, wireless communication link or fiber optic cables Etc..
Client 101 can be interacted by network 104 with control server 102, to receive information or transmission information etc..Visitor Various applications, such as the application of browsing class, searching class application, the application of accident analysis class etc. can be installed on the end of family.
Client 101 can be hardware, be also possible to software.When client 101 is hardware, can be with display screen And the various electronic equipments for supporting user information to input, including but not limited to tablet computer, pocket computer on knee and platform Formula computer etc..When client 101 is software, it may be mounted in above-mentioned cited electronic equipment.It may be implemented into Multiple softwares or software module (such as providing Distributed Services), also may be implemented into single software or software module.? This is not specifically limited.
Control server 102 can be interacted by network 104,105 with client 101 and destination server 103, with Receive or send information etc..Control server 102 can be to provide the server of various services.For example, backup address is sent To the control server of client.Control server 102 can be in the container letter for getting the container in run-stopping status It when breath, is identified according to vessel identity, determines that information of container whether there is in history information of container list;It is not deposited in response to determination Determining the address of the indicated corresponding file system of container of vessel identity mark, and with determining the backup of file system Location;File in file system is stored memory space corresponding to backup address by control destination server 103, and will backup Address is sent to the client 101 of communication connection.
Destination server 103 can be interacted by network 105 with control server 102, to receive or send information etc..Mesh Mark server 103 can be to provide the server of various services.For example, according to the control instruction of control server 102 by file File in system is stored to the destination server of the corresponding memory space of backup address.Destination server can receive control After the relevant control instruction of control server, the file in file system is stored into memory space corresponding to backup address.
It should be noted that for sending the method for information generally by control server provided by the embodiment of the present application 102 execute, and correspondingly, the device for sending information is generally positioned in control server 102.
It should be understood that the number of client, control server, destination server and network in Fig. 1 is only schematic 's.According to needs are realized, any number of client, control server, destination server and network can have.
With continued reference to Fig. 2, the process of one embodiment of the method for sending information according to the application is shown 200.The method for being used to send information, comprising the following steps:
Step 201, the information of container of the container in run-stopping status is obtained.
In the present embodiment, for sending the executing subject (such as control server 102 shown in FIG. 1) of the method for information It can be got from the destination server of communication connection in out of service by wired connection mode or radio connection The information of container of the container of state.Wherein, information of container includes but is not limited to vessel identity mark (identity, ID).It is above-mentioned Destination server can be various servers with executing subject communication connection, running on it for container.
Step 202, it is identified according to vessel identity, determines that information of container whether there is in history information of container list.
In the present embodiment, executing subject can use vessel identity obtained after getting vessel identity mark It identifies compared with being carried out one by one with the vessel identity mark in history information of container list.If in history information of container list exist with Obtained vessel identity identifies identical vessel identity mark, it may be considered that information of container obtained is present in history appearance In device information list.Otherwise, it is believed that information of container obtained is not present in history information of container list.Wherein, on It is empty for stating the list of history information of container in the initial state.
Step 203, it is not present in response to determination, determines the indicated corresponding file system of container of vessel identity mark Address, and determine the backup address of file system.
In the present embodiment, it after determining that information of container obtained is not present in history information of container list, holds Row main body can be determined as follows address and the backup of the indicated corresponding file system of container of vessel identity mark Address: firstly, being identified using vessel identity, from pre-stored vessel identity mark-file system address mapping table Find the file system address for corresponding to vessel identity mark.Here, vessel identity mark-file system address is corresponding closes Be table, can be it is that executing subject pre-establishes, be stored with multiple containers identity and the indicated appearance of vessel identity mark The mapping table of the address of the file system of device.Then, randomly selected from pre-stored backup address set one it is standby Backup address of part address as file system.
In some optional implementations of the present embodiment, executing subject can also determine that vessel identity mark is signified It before the address of the corresponding file system of the container shown, is identified according to vessel identity, determines the storage driving mode of container.
Optionally, above-mentioned storage driving mode can be one of the following: device map (devicemapper) storage driving, Another union file system (another union file system, aufs) storage driving.It should be pointed out that above-mentioned deposit Storage driving method can also be other storage driving modes.
Optionally, above-mentioned executing subject can be determined as follows the storage driving mode of container: use container body Part mark finds the storage corresponding to vessel identity mark from vessel identity mark-storage driving information mapping table Activation bit.Wherein, vessel identity mark-storage driving information mapping table can be executing subject pre-establish, note Record has the mapping table of multiple containers identity and storage driving information.Wherein, storage driving information can be for table Levy the various information of the storage driving mode of container.As example, storage driving information can be digital " 1 " for characterizing container Storage driving mode be aufs storage driving.
It is devicemapper storage driving in storage driving mode in some optional implementations of the present embodiment When, executing subject can be determined as follows the indicated corresponding file system of container of vessel identity mark address and Backup address:
The first step is identified according to vessel identity, finds the equipment metamessage of the corresponding virtual unit of container.It may be noted that , run on all containers shared one that on destination server, storage driving mode is devicemapper storage driving A resource pool.Each container correspondence in resource pool is assigned a virtual unit.Each virtual unit has equipment metamessage. In the present embodiment, equipment metamessage includes equipment size and equipment identities mark.In addition, equipment metamessage can also include it It is used to describe the various information of virtual unit.In the present embodiment, when container starts, destination server can be by container pair The equipment metamessage for the virtual unit answered feeds back to executing subject.In this way, executing subject can believe received equipment member Breath identifies associated storage with vessel identity.In this way, executing subject can use container body when container is in run-stopping status Equipment metamessage of part identifier lookup to the corresponding virtual unit of container.
Second step is identified according to equipment size and equipment identities, generates and execute the instruction of control virtual unit operation. Here, executing subject can be identified using equipment size and equipment identities, generate the instruction of control virtual unit operation.Execute master Body can also first be found from pre-stored size-coding mapping table corresponding to equipment size using equipment size Then size coding is identified using size coding and equipment identities, generate the instruction of control virtual unit operation.
Third step is identified according to equipment identities, and the device address of virtual unit is found in running equipment address list, Device address is determined as to the address of file system.Here, executing subject is empty after the instruction for executing control virtual unit operation It proposes for that can be activated, and the device address of virtual unit and equipment identities mark can be presented in running equipment address list In.It should be pointed out that generally, in running equipment address list having the corresponding virtual unit of all running containers Device address and equipment identities mark.When container is in run-stopping status, executing subject can be using control virtual unit The instruction control virtual unit operation of operation.Later, it can be identified using equipment identities, be searched from running equipment address list To the device address of virtual unit, also, the device address found is the address of the corresponding file system of container.
4th step generates backup address by device address carry in preset address.Here, executing subject can be with By obtained device address carry on preset address, to obtain backup address.As an example, if obtained set Standby address is A, and preset address is B, then by A carry after B, available backup address be B A.Wherein, it sets in advance Fixed address can be the preset various addresses of technical staff.
In some optional implementations of the present embodiment, when storage driving mode is aufs storage driving, execute Main body can be determined as follows the address and backup ground of the indicated corresponding file system of container of vessel identity mark Location:
The first step is identified according to vessel identity, finds the writable layer identity of the corresponding writable layer of container.Here, It should be pointed out that storage driving mode is the container of aufs storage driving, corresponding file system is to support different mesh The file system being mounted under the same Virtual File System is recorded, this document system has multiple layers, the mesh between every two layer Record is different.In addition, in this document system, the layer under top layer be all it is read-only, the file system of only top layer is writeable , this writeable layer is writable layer.
In the present embodiment, since the file system that storage driving mode is aufs is using format generally in the art to text Part is stored.Therefore, executing subject can be based on format generally in the art, obtain writable layer writable layer identity (that is, mount-id).Specifically, the format of the address for saving mount-id generally in the art are as follows:/var/lib/docker/ image/aufs/layerdb/mounts/{ContainerID}/mount-id.Therefore, executing subject can use container body Part mark (that is, ContainerID) finds the address for saving mount-id.Then the mount- stored in address is obtained id。
Second step determines the address of file system according to writable layer identity.
In the present embodiment, executing subject can be based on format generally in the art, obtain the address of file system.Specifically Ground, the format of the address of file system generally in the art are as follows:/var/lib/docker/aufs/diff/ { mount-id }.Cause This, executing subject can use obtained mount-id, obtain the address of file system.
The address of preset backup file system is determined as backup address by third step.Here, executing subject can be with The address of preset backup file system is directly determined as to the backup address of file system.Wherein, preset standby The address of part file system can be the preset various addresses of technical staff.
Step 204, the file in file system is stored memory space corresponding to backup address by control destination server.
In the present embodiment, executing subject can using file system address and backup address, generate for execute general File in file system is stored to the instruction of the corresponding memory space of backup address, to realize that control destination server will be literary File in part system stores memory space corresponding to backup address.It should be noted that in step 201, executing subject The information of container of one or more containers in operating status can once be obtained.In addition, once being got in executing subject When the information of container of multiple containers in operating status, multiple containers information obtained can be combined into information of container column Table.At this point, executing subject can use information of container for each information of container in information of container list, step is executed The step of 202-204.
Step 205, backup address is sent to the client of communication connection.
In the present embodiment, executing subject can be sent out backup address by wired connection mode or radio connection Give client.In this way, the operation maintenance personnel of container user can find backed up file using backup address, facilitate There is abnormal reason in accurate investigation container instance.
With continued reference to the signal that Fig. 3, Fig. 3 are according to the application scenarios of the method for sending information of the present embodiment Figure.Wherein, control server can be the various servers for being equipped with Kubernetes, destination server can be by The various servers for being equipped with Docker of Kubernetes management.The operation maintenance personnel that client can be container user uses Various terminal equipment.It should be noted that Docker is the application container engine of an open source, developer can be application And the dependence packet of application is integrated into a transplantable container, then publishes to any target for being mounted with Docker Server is run up.Kubernetes is the container orchestration engine of an open source, for being linked on destination server Container is managed.Kubernetes is acknowledged as large scale deployment container in the scenes such as public cloud, private clound and mixed cloud The fact that change application professional standard.
In the application scenarios 300 of Fig. 3, firstly, control server 302 is got from destination server 303 in stopping The information of container of the container M of operating status.Wherein, information of container includes vessel identity mark ContainerID-M.Then, root ContainerID-M is identified according to vessel identity, determines that information of container whether there is in history information of container list.Later, it rings It should be not present in determination, determine the address " address-X " of the corresponding file system of container M, and determine the standby of file system Part address " address-Y ".After again, control destination server 303 stores the file in file system to backup address " address-Y " corresponding memory space.Finally, backup address " address-Y " to be sent to the client of communication connection 301, so that the operation maintenance personnel 304 of container user can check backed up file using backup address " address-Y ".
The method provided by the above embodiment for sending information of the application, can obtain first in shape out of service The information of container of the container of state.Wherein, information of container includes vessel identity mark.Secondly, being identified according to vessel identity, determines and hold Device information whether there is in history information of container list.Then, it is not present in response to determination, determines that vessel identity mark is signified The address of the corresponding file system of the container shown, and determine the backup address of file system.Later, control destination server will File in file system stores memory space corresponding to backup address.Finally, backup address is sent to communication connection Client.The method of the present embodiment, due to the operational process of container instance of the file record in file system, will be literary The file of part system stores memory space corresponding to backup address, may be implemented to the file in container instance operational process into Row backup, the operation maintenance personnel for facilitating container user accurately check container instance and abnormal reason occur.
With further reference to Fig. 4, it illustrates the processes 400 of another embodiment of the method for sending information.The use In the process 400 for the method for sending information, comprising the following steps:
Step 401, the information of container of the container in run-stopping status is obtained.
Step 402, it is identified according to vessel identity, determines that information of container whether there is in history information of container list.
Step 403, it is not present in response to determination, determines the indicated corresponding file system of container of vessel identity mark Address, and determine the backup address of file system.
Step 404, the file in file system is stored memory space corresponding to backup address by control destination server.
Step 405, backup address is sent to the client of communication connection.
In the present embodiment, the behaviour of the concrete operations of step 401-405 and step 201-205 in embodiment shown in Fig. 2 Make essentially identical, details are not described herein.
Step 406, information of container is added to history information of container list.
In the present embodiment, executing subject can by determine be not present in history information of container list by information of container It is added to history information of container list.This way it is possible to avoid repeating to back up, help to be turned up to the standby of the file in file system Part efficiency.
Step 407, in response to determining that storage duration of the file in memory space is more than preset storage duration threshold Value, control destination server delete file.
In the present embodiment, after file is stored in above-mentioned memory space, executing subject can calculate above-mentioned file upper The storage duration of memory space is stated, if storage duration is more than preset storage duration threshold value, it may be considered that above-mentioned file It can be deleted.At this point, executing subject can be sent to destination server executes the instruction for deleting above-mentioned file, to realize control It makes above-mentioned destination server and deletes above-mentioned file.Wherein, above-mentioned storage duration threshold value can be the preset number of technical staff According to value.Wherein, in the present embodiment, it is more than that preset storage duration threshold value is deleted to storage duration, can saves The memory space of destination server helps to improve memory space utilization efficiency.
Figure 4, it is seen that the method for sending information compared with the corresponding embodiment of Fig. 2, in the present embodiment Process 400 embody the step of information of container for having executed back-up processing is added to history information of container list, with And the step of file that duration is more than preset storage duration threshold value is deleted will be stored.The present embodiment describes as a result, Scheme can help improve the backup efficiency to the file in the corresponding file system of container, while can save target clothes The memory space of business device, helps to improve memory space utilization efficiency.
With further reference to Fig. 5, as the realization to method shown in above-mentioned each figure, this application provides one kind for sending letter One embodiment of the device of breath, the Installation practice is corresponding with embodiment of the method shown in Fig. 2, which can specifically answer For in various servers.
As shown in figure 5, the present embodiment includes: information acquisition unit 501 for sending the device 500 of information, it is configured At the information of container for obtaining the container in run-stopping status, information of container includes vessel identity mark;Information comparison unit 502, it is configured to be identified according to vessel identity, determines that information of container whether there is in history information of container list;Address is true Order member 503 is configured in response to determination and is not present, and determines the indicated corresponding file system of container of vessel identity mark Address, and determine file system backup address;File backup unit 504, being configured to control destination server will be literary File in part system stores memory space corresponding to backup address;Address transmission unit 505 is configured to backup address It is sent to the client of communication connection.
In some optional implementations of the present embodiment, which further includes that information adding unit (is not shown in figure Out).Information adding unit may be configured to for information of container to be added to history information of container list.
In some optional implementations of the present embodiment, which further includes that file deletion unit (does not show in figure Out).File is deleted unit and be may be configured in response to determining that storage duration of the file in memory space is more than to preset Storage duration threshold value, control destination server delete file.
In some optional implementations of the present embodiment, which further includes that driving determination unit (is not shown in figure Out).Driving determination unit may be configured to be identified according to vessel identity, determine the storage driving mode of container.Wherein, it stores Driving method is one of the following: device map storage driving, another union file system storage driving.
In some optional implementations of the present embodiment, address determination unit can be further configured to: firstly, It is identified according to vessel identity, finds the equipment metamessage of the corresponding virtual unit of container.Wherein, equipment metamessage includes equipment Size and equipment identities mark.Then, it is identified according to equipment size and equipment identities, generates and execute control virtual unit fortune Capable instruction.Later, it is identified according to equipment identities, the device address of virtual unit is found in running equipment address list, Device address is determined as to the address of file system.Finally, device address carry is generated backup ground in preset address Location.
In some optional implementations of the present embodiment, address determination unit can be further configured to: firstly, It is identified according to vessel identity, finds the writable layer identity of the corresponding writable layer of container.Then, according to writable layer identity mark Know the address for determining file system.Finally, the address of preset backup file system is determined as backup address.
The device provided by the above embodiment of the application, information acquisition unit 501 obtain the appearance for being in run-stopping status The information of container of device, information of container include vessel identity mark.Information comparison unit 502 is identified according to vessel identity, is determined and is held Device information whether there is in history information of container list.Address determination unit 503 is not present in response to determination, determines container body The address of the indicated corresponding file system of container of part mark, and determine the backup address of file system.File backup list Member 504 controls destination server and the file in file system is stored memory space corresponding to backup address.Address sends single Backup address is sent to the client of communication connection by member 505.The device of the present embodiment, due to the file record in file system Therefore the file of file system is stored memory space corresponding to backup address, Ke Yishi by the operational process of container instance Now the file in container instance operational process is backed up, the operation maintenance personnel for facilitating container user accurately checks container reality There is abnormal reason in example.
Below with reference to Fig. 6, it illustrates the computer systems 600 for the server for being suitable for being used to realize the embodiment of the present application Structural schematic diagram.Server shown in Fig. 6 is only an example, should not function and use scope band to the embodiment of the present application Carry out any restrictions.
As shown in fig. 6, computer system 600 includes central processing unit (CPU) 601, it can be read-only according to being stored in Program in memory (ROM) 602 or be loaded into the program in random access storage device (RAM) 603 from storage section 608 and Execute various movements appropriate and processing.In RAM 603, also it is stored with system 600 and operates required various programs and data. CPU 601, ROM 602 and RAM 603 are connected with each other by bus 604.Input/output (I/O) interface 605 is also connected to always Line 604.
I/O interface 605 is connected to lower component: the importation 606 including keyboard, mouse etc.;It is penetrated including such as cathode The output par, c 607 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 608 including hard disk etc.; And the communications portion 609 of the network interface card including LAN card, modem etc..Communications portion 609 via such as because The network of spy's net executes communication process.Driver 610 is also connected to I/O interface 605 as needed.Detachable media 611, such as Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 610, in order to read from thereon Computer program be mounted into storage section 608 as needed.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable medium On computer program, which includes the program code for method shown in execution flow chart.In such reality It applies in example, which can be downloaded and installed from network by communications portion 609, and/or from detachable media 611 are mounted.When the computer program is executed by central processing unit (CPU) 601, limited in execution the present processes Above-mentioned function.It should be noted that the computer-readable medium of the application can be computer-readable signal media or calculating Machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but it is unlimited In system, device or the device of --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, or any above combination.It calculates The more specific example of machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, portable of one or more conducting wires Formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device or The above-mentioned any appropriate combination of person.In this application, computer readable storage medium can be it is any include or storage program Tangible medium, which can be commanded execution system, device or device use or in connection.And in this Shen Please in, computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal, In carry computer-readable program code.The data-signal of this propagation can take various forms, including but not limited to Electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer-readable Any computer-readable medium other than storage medium, the computer-readable medium can send, propagate or transmit for by Instruction execution system, device or device use or program in connection.The journey for including on computer-readable medium Sequence code can transmit with any suitable medium, including but not limited to: wireless, electric wire, optical cable, RF etc. are above-mentioned Any appropriate combination.
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the application, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of the module, program segment or code include one or more use The executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box The function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actually It can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it to infuse Meaning, the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart can be with holding The dedicated hardware based system of functions or operations as defined in row is realized, or can use specialized hardware and computer instruction Combination realize.
Being described in unit involved in the embodiment of the present application can be realized by way of software, can also be by hard The mode of part is realized.Described unit also can be set in the processor, for example, can be described as: a kind of processor packet Include information acquisition unit, information comparison unit, address determination unit, file backup unit and address transmission unit.Wherein, these The title of unit does not constitute the restriction to the unit itself under certain conditions, for example, information acquisition unit can also be retouched It states as " unit for obtaining the information of container of the container in run-stopping status ".
As on the other hand, present invention also provides a kind of computer-readable medium, which be can be Included in device described in above-described embodiment;It is also possible to individualism, and without in the supplying device.Above-mentioned calculating Machine readable medium carries one or more program, when said one or multiple programs are executed by the device, so that should Device: obtaining the information of container of the container in run-stopping status, and information of container includes vessel identity mark;According to container body Part mark determines that information of container whether there is in history information of container list;It is not present in response to determination, determines vessel identity The address of the indicated corresponding file system of container of mark, and determine the backup address of file system;Control destination service File in file system is stored memory space corresponding to backup address by device;Backup address is sent to the visitor of communication connection Family end.
Above description is only the preferred embodiment of the application and the explanation to institute's application technology principle.Those skilled in the art Member is it should be appreciated that invention scope involved in the application, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic Scheme, while should also cover in the case where not departing from foregoing invention design, it is carried out by above-mentioned technical characteristic or its equivalent feature Any combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed herein Can technical characteristic replaced mutually and the technical solution that is formed.

Claims (14)

1. a kind of method for sending information, comprising:
The information of container of the container in run-stopping status is obtained, the information of container includes vessel identity mark;
It is identified according to the vessel identity, determines that the information of container whether there is in history information of container list;
It is not present in response to determination, determines the address of the indicated corresponding file system of container of the vessel identity mark, with And determine the backup address of the file system;
It controls destination server and the file in the file system is stored into memory space corresponding to the backup address;
The backup address is sent to the client of communication connection.
2. according to the method described in claim 1, wherein, the method also includes:
The information of container is added to the history information of container list.
3. according to the method described in claim 1, wherein, the method also includes:
It is more than preset storage duration threshold value, control in response to storage duration of the determination file in the memory space It makes the destination server and deletes the file.
4. method described in one of -3 according to claim 1, wherein in the indicated appearance of the determination vessel identity mark Before the address of the corresponding file system of device, the method also includes:
According to the vessel identity identify, determine the storage driving mode of the container, wherein the storage driving mode be with It is one of lower: device map storage driving, another union file system storage driving.
5. according to the method described in claim 4, wherein, the storage driving mode is device map storage driving;And
The address of the indicated corresponding file system of container of the determination vessel identity mark, and determine the file The backup address of system, comprising:
It is identified according to the vessel identity, finds the equipment metamessage of the corresponding virtual unit of the container, wherein described to set Standby metamessage includes equipment size and equipment identities mark;
It is identified according to the equipment size and the equipment identities, generates and execute the finger for controlling the virtual unit operation It enables;
It is identified according to the equipment identities, the device address of the virtual unit is found in running equipment address list, it will The device address is determined as the address of the file system;
By the device address carry in preset address, the backup address is generated.
6. according to the method described in claim 4, wherein, the storage driving mode is that the storage of another union file system is driven It is dynamic;And
The address of the indicated corresponding file system of container of the determination vessel identity mark, and determine the file The backup address of system, comprising:
It is identified according to the vessel identity, finds the writable layer identity of the corresponding writable layer of the container;
The address of the file system is determined according to the writable layer identity;
The address of preset backup file system is determined as the backup address.
7. a kind of for sending the device of information, comprising:
Information acquisition unit is configured to obtain the information of container of the container in run-stopping status, the information of container packet Include vessel identity mark;
Information comparison unit is configured to be identified according to the vessel identity, determines that the information of container whether there is in history In information of container list;
Address determination unit is configured in response to determination and is not present, and determines the indicated container pair of the vessel identity mark The address for the file system answered, and determine the backup address of the file system;
File backup unit is configured to control destination server and stores the file in the file system to the backup ground The corresponding memory space in location;
Address transmission unit is configured to for the backup address being sent to the client of communication connection.
8. device according to claim 7, wherein described device further include:
Information adding unit is configured to for the information of container to be added to the history information of container list.
9. device according to claim 7, wherein described device further include:
File deletes unit, is configured in response to determine that storage duration of the file in the memory space is more than preparatory The storage duration threshold value of setting controls the destination server and deletes the file.
10. the device according to one of claim 7-9, wherein described device further include:
Determination unit is driven, is configured to be identified according to the vessel identity, determines the storage driving mode of the container, In, the storage driving mode is one of the following: device map storage driving, another union file system storage driving.
11. device according to claim 10, wherein the address determination unit is further configured to:
It is identified according to the vessel identity, finds the equipment metamessage of the corresponding virtual unit of the container, wherein described to set Standby metamessage includes equipment size and equipment identities mark;
It is identified according to the equipment size and the equipment identities, generates and execute the finger for controlling the virtual unit operation It enables;
It is identified according to the equipment identities, the device address of the virtual unit is found in running equipment address list, it will The device address is determined as the address of the file system;
By the device address carry in preset address, the backup address is generated.
12. device according to claim 10, wherein the address determination unit is further configured to:
It is identified according to the vessel identity, finds the writable layer identity of the corresponding writable layer of the container;
The address of the file system is determined according to the writable layer identity;
The address of preset backup file system is determined as the backup address.
13. a kind of server, comprising:
One or more processors;
Storage device is stored thereon with one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real Now such as method as claimed in any one of claims 1 to 6.
14. a kind of computer-readable medium, is stored thereon with computer program, wherein the realization when program is executed by processor Such as method as claimed in any one of claims 1 to 6.
CN201811453902.5A 2018-11-30 2018-11-30 Method and apparatus for transmitting information Active CN109582487B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811453902.5A CN109582487B (en) 2018-11-30 2018-11-30 Method and apparatus for transmitting information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811453902.5A CN109582487B (en) 2018-11-30 2018-11-30 Method and apparatus for transmitting information

Publications (2)

Publication Number Publication Date
CN109582487A true CN109582487A (en) 2019-04-05
CN109582487B CN109582487B (en) 2020-02-14

Family

ID=65925883

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811453902.5A Active CN109582487B (en) 2018-11-30 2018-11-30 Method and apparatus for transmitting information

Country Status (1)

Country Link
CN (1) CN109582487B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110647395A (en) * 2019-08-30 2020-01-03 联想(北京)有限公司 Task processing method, system and device and computer storage medium
CN112148420A (en) * 2019-06-28 2020-12-29 杭州海康威视数字技术股份有限公司 Abnormal task processing method based on container technology, server and cloud platform

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100049931A1 (en) * 2008-08-20 2010-02-25 Jacobson Michael B Copying Logical Disk Mappings Between Arrays
CN107391313A (en) * 2017-07-31 2017-11-24 郑州云海信息技术有限公司 The operation method and device of a kind of container
US10019323B1 (en) * 2014-03-25 2018-07-10 EMC IP Holding Company LLC Method and system for container data recovery in a storage system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100049931A1 (en) * 2008-08-20 2010-02-25 Jacobson Michael B Copying Logical Disk Mappings Between Arrays
US10019323B1 (en) * 2014-03-25 2018-07-10 EMC IP Holding Company LLC Method and system for container data recovery in a storage system
CN107391313A (en) * 2017-07-31 2017-11-24 郑州云海信息技术有限公司 The operation method and device of a kind of container

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112148420A (en) * 2019-06-28 2020-12-29 杭州海康威视数字技术股份有限公司 Abnormal task processing method based on container technology, server and cloud platform
CN112148420B (en) * 2019-06-28 2024-04-02 杭州海康威视数字技术股份有限公司 Abnormal task processing method based on container technology, server and cloud platform
CN110647395A (en) * 2019-08-30 2020-01-03 联想(北京)有限公司 Task processing method, system and device and computer storage medium

Also Published As

Publication number Publication date
CN109582487B (en) 2020-02-14

Similar Documents

Publication Publication Date Title
CN106775924B (en) Virtual machine starts method and apparatus
CN109697075A (en) File updating method, system and device
CN108351772A (en) Across the identifier of application example
CN104011698B (en) Supplementary data is accessed based on the identifier derived from corresponding primary application program data
CN110019080A (en) Data access method and device
US9848064B2 (en) Generation and distribution of named, definable, serialized tokens
CN109656889B (en) File system implementation method, device, equipment and storage medium based on block chain
CN109582873A (en) Method and apparatus for pushed information
CN109657174A (en) Method and apparatus for more new data
CN108431768A (en) Using the controlled deployment of feature
CN109446442A (en) Method and apparatus for handling information
CN110365745A (en) Data processing system, method, apparatus, server and computer-readable medium
CN114924751A (en) Method and device for distributing service access request flow
CN109582487A (en) Method and apparatus for sending information
CN109117153A (en) Processing method, device, terminal and the storage medium of application program
CN110221910A (en) Method and apparatus for executing MPI operation
CN108399046A (en) File operation requests treating method and apparatus
CN114493185A (en) Approval processing method, device, system, electronic equipment, storage medium and product
CN109918381A (en) Method and apparatus for storing data
CN109828830A (en) Method and apparatus for managing container
CN109491721A (en) Method and apparatus for load information
CN109787862B (en) Detection method, device, electronic equipment and the storage medium of invalid resource
CN109840072A (en) Information processing method and device
CN108696557A (en) Information processing system, method and apparatus
CN108810105A (en) For pushed information, the method and apparatus for showing information

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