CN106790719A - A kind of method and device of memory image configuration information - Google Patents

A kind of method and device of memory image configuration information Download PDF

Info

Publication number
CN106790719A
CN106790719A CN201710169584.9A CN201710169584A CN106790719A CN 106790719 A CN106790719 A CN 106790719A CN 201710169584 A CN201710169584 A CN 201710169584A CN 106790719 A CN106790719 A CN 106790719A
Authority
CN
China
Prior art keywords
mirror image
resource space
resource
space
target
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
CN201710169584.9A
Other languages
Chinese (zh)
Other versions
CN106790719B (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.)
Hangzhou DPTech Technologies Co Ltd
Original Assignee
Hangzhou DPTech 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 Hangzhou DPTech Technologies Co Ltd filed Critical Hangzhou DPTech Technologies Co Ltd
Priority to CN201710169584.9A priority Critical patent/CN106790719B/en
Publication of CN106790719A publication Critical patent/CN106790719A/en
Application granted granted Critical
Publication of CN106790719B publication Critical patent/CN106790719B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The present invention provides a kind of method and device of memory image configuration information, and methods described includes:When mirror configuration information is got, the corresponding business board of mirror image source port that will be included in mirror configuration information is defined as target board;The corresponding mirror image capability set of target board is obtained, mirror image capability set provides the set of mirror image processing ability for target board;Based on the mirror image destination interface and direction of mirror image, default determination rule that are included in the corresponding groove position of target board, mirror configuration information, a target resource space is determined from default mirror image resources pond;When determining that target resource space can use based on mirror image capability set, by mirror image source port and the storage of mirror image destination interface in target resource space.Using the embodiment of the present invention, the disposal ability of the Port Mirroring of each business board is fully utilized, and is prevented effectively from the wasting of resources.

Description

A kind of method and device of memory image configuration information
Technical field
The present invention relates to network communication technology field, more particularly to a kind of method and device of memory image configuration information.
Background technology
In the prior art, distributed apparatus can realize Port Mirroring, and generally, distributed apparatus process the energy of Port Mirroring Power is determined according to the quantity of whole distributed apparatus memory image configuration information, but each business that distributed apparatus are included The ability of board treatment Port Mirroring is different, thus the Port Mirroring of each business board disposal ability not by fully profit With causing the wasting of resources.
The content of the invention
In view of this, the present invention provides a kind of method and device of memory image configuration information, to solve each business The disposal ability of the Port Mirroring of board is not fully utilized, and causes the problem of the wasting of resources.
To achieve the above object, present invention offer technical scheme is as follows:
According to the first aspect of the invention, it is proposed that a kind of method of memory image configuration information, methods described includes:
When mirror configuration information is got, the corresponding business board of mirror image source port that will be included in mirror configuration information It is defined as target board, mirror image destination interface and direction of mirror image is also included in the mirror configuration information;
The corresponding mirror image capability set of the target board is obtained, the mirror image capability set provides mirror image for the target board The set of disposal ability;
Based on the mirror image destination interface and mirror image that are included in the corresponding groove position of the target board, the mirror configuration information Direction, default determination rule, determine a target resource space, the default mirror image resources pond note from default mirror image resources pond At least one groove position is recorded, each groove position correspondence at least one groove position enters the two kinds of direction of mirror image in direction and outgoing direction Resource space, in described two direction of mirror image either image direction correspondence multiple resource spaces;
When determining that the target resource space can use based on the mirror image capability set, by the mirror image source port and described Mirror image destination interface is stored in the target resource space.
According to the second aspect of the invention, it is proposed that a kind of device of memory image configuration information, including:
Target board determining module, for when mirror configuration information is got, the mirror that will be included in mirror configuration information The corresponding business board in image source port is defined as target board, and mirror image destination interface and mirror are also included in the mirror configuration information Image space to;
Capability set acquisition module, the target board for obtaining determination in the target board determining module is corresponding Mirror image capability set, the mirror image capability set provides the set of mirror image processing ability for the target board;
Object space determining module, for based on the target board correspondence determined in the target board determining module Groove position, the mirror image destination interface that includes in the mirror configuration information and direction of mirror image, it is default determine rule, from default mirror image A target resource space is determined in resource pool, the default mirror image resources pond have recorded at least one groove position, described at least one Each groove position correspondence in individual groove position enters the two kinds of resource spaces of direction of mirror image in direction and outgoing direction, described two direction of mirror image In either image direction correspondence multiple resource spaces;
Mirror port memory module, the mirror image capability set for being obtained in the capability set acquisition module is based on is true When the target resource space determined in the fixed object space determining module is available, by the mirror image source port and the mirror As destination interface storage is in the target resource space.
From above technical scheme, when distributed apparatus get mirror configuration information, distributed apparatus are by mirror image The corresponding business board of mirror image source port included in configuration information is defined as target board, and distributed apparatus obtain target board Corresponding mirror image capability set, distributed apparatus are based on the mirror image mesh included in the corresponding groove position of target board, mirror configuration information Port and direction of mirror image, it is default determine rule, a target resource space is determined from default mirror image resources pond, work as distribution When equipment determines that target resource space can use based on mirror image capability set, distributed apparatus are by mirror image source port and mirror image destination interface In target resource space, default mirror image resources pond is carried out carefully to the disposal ability of the Port Mirroring of each business board for storage Change, so as to make full use of the disposal ability of the Port Mirroring of each business board, it is to avoid the wasting of resources.
Brief description of the drawings
Fig. 1 is the embodiment flow chart for the method for memory image configuration information that the present invention is provided;
Fig. 2 is the embodiment flow chart of the method for another memory image configuration information that the present invention is provided;
Fig. 3 is the embodiment flow chart of the method for another the memory image configuration information that the present invention is provided;
Fig. 4 is a kind of hardware structure diagram of distributed apparatus that the present invention is provided;
Fig. 5 is the embodiment block diagram of the device for memory image configuration information that the present invention is provided;
Fig. 6 is the embodiment block diagram of the device of another memory image configuration information that the present invention is provided.
Specific embodiment
Here exemplary embodiment will be illustrated in detail, its example is illustrated in the accompanying drawings.Following description is related to During accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represent same or analogous key element.Following exemplary embodiment Described in implementation method do not represent and the consistent all implementation methods of the present invention.Conversely, they be only with it is such as appended The example of the consistent apparatus and method of some aspects being described in detail in claims, of the invention.
It is the purpose only merely for description specific embodiment in terminology used in the present invention, and is not intended to be limiting the present invention. " one kind ", " described " and " being somebody's turn to do " of singulative used in the present invention and appended claims is also intended to include majority Form, unless context clearly shows that other implications.It is also understood that term "and/or" used herein refers to and wraps May be combined containing one or more associated any or all of project listed.
It will be appreciated that though various information, but this may be described using term first, second, third, etc. in the present invention A little information should not necessarily be limited by these terms.These terms are only used for being distinguished from each other open same type of information.For example, not departing from In the case of the scope of the invention, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as One information.Depending on linguistic context, word as used in this " if " can be construed to " ... when " or " when ... When " or " in response to determining ".
Fig. 1 is the embodiment flow chart for the method for memory image configuration information that the present invention is provided, and is carried out with reference to Fig. 1 Exemplary illustration, as shown in figure 1, comprising the following steps:
Step 101:When mirror configuration information is got, the mirror image source port that will be included in mirror configuration information is corresponding Business board is defined as target board, and mirror image destination interface and direction of mirror image are also included in mirror configuration information.
Step 102:The corresponding mirror image capability set of target board is obtained, mirror image capability set provides mirror image processing for target board The set of ability.
Step 103:Based on the mirror image destination interface and mirror image that are included in the corresponding groove position of target board, mirror configuration information Direction, default determination rule, determine a target resource space from default mirror image resources pond, and default mirror image resources pond have recorded At least one groove position, each groove position correspondence at least one groove position enters the two kinds of resource spaces of direction of mirror image in direction and outgoing direction Between, the either image direction correspondence multiple resource space in two kinds of direction of mirror image.
Step 104:Determine whether target resource space can use based on mirror image capability set, when determining mesh based on mirror image capability set When mark resource space is available, step 105 is performed, when determining that target resource space is unavailable based on mirror image capability set, perform step Rapid 106- steps 107.
Step 105:By mirror image source port and the storage of mirror image destination interface in target resource space.
Step 106:Generation cannot store the warning message of the mirror configuration information.
Step 107:Send warning message.
In a step 101, in one embodiment, included in mirror configuration information:Mirror image source port, mirror image destination interface, The information such as direction of mirror image, wherein, mirror image source port is message into port during distributed apparatus, and mirror image destination interface is message Port during output distributed apparatus, direction of mirror image is divided into direction and outgoing direction, enters direction and refer to message from mirror image source port Copy to the duplication direction of mirror image destination interface, outgoing direction refers to and for message to copy to answering for mirror image source port from mirror image destination interface Direction processed.When distributed apparatus get mirror configuration information, the mirror image that distributed apparatus will be included in mirror configuration information The business board of source port correspondence connection is defined as target board.
In a step 102, in one embodiment, distributed apparatus include at least one business board, each business board The Port Mirroring disposal ability of card is different, Port Mirroring disposal ability one mirror image capability set of correspondence of each business board, Mirror image capability set provides the set of mirror image processing ability for business board, and mirror image capability set can be included:Whether two kind mirrors are supported Image space enters the resource quantity in direction, supports the resource for the treatment of mirror image outgoing direction to (entering direction and outgoing direction), support treatment mirror image Quantity, is the example of the corresponding mirror image capability set of target board as shown in table 1:
Table 1
In table 1, if the corresponding "Yes" of two kinds of direction of mirror image of support represents that the target board supports that two kinds of direction of mirror image (enter Direction and outgoing direction) processing mode, it is 2, target board branch that target board supports that treatment mirror image enters the resource quantity in direction The resource quantity for holding treatment mirror image outgoing direction is 2.It will be appreciated by persons skilled in the art that herein at the support of target board Reason mirror image enters the resource quantity 2 in direction and supports that the resource quantity 2 for the treatment of mirror image outgoing direction is exemplary illustration, can not Form limitation of the present invention.
In step 103, in one embodiment, each business board that distributed apparatus are included corresponds to a groove Position, for installing business board, in distributed apparatus, presets a default mirror image resources pond, in the default mirror image resources pond At least one groove position is have recorded, each groove position correspondence at least one groove position enters the two kinds of direction of mirror image in direction and outgoing direction Resource space, the either image direction correspondence multiple resource space in two kinds of direction of mirror image, as shown in table 2, to default mirror image money The structure in source pond is illustrative:
Table 2
In table 2, a, b, c represent three groove positions in distributed apparatus, and groove position a, groove position b, groove position c correspondences enter direction and the side of going out To two kinds of resource spaces of direction of mirror image, either image direction 3 resource spaces of correspondence in two kinds of direction of mirror image, each money Source space is used to store corresponding mirror image source port and mirror image destination interface.Groove position a's enters the corresponding resource space 1 in direction Mirror image source port 14 and mirror image destination interface 12 are stored, image source is stored in the corresponding resource space 1 of outgoing direction of groove position a Port 11 and mirror image destination interface 13, mirror image source port 15 and mirror image are stored in the corresponding resource space 2 of outgoing direction of groove position a Destination interface 14, entering for groove position b store mirror image source port 16 and mirror image destination interface 12 in the corresponding resource space 2 in direction, Mirror image source port 11 and mirror image destination interface 13 are stored in the corresponding resource space 2 of outgoing direction of groove position b, the "-" table in table 3 Show and be stored as sky.
It will be appreciated by persons skilled in the art that tri- groove positions of a, b, c are exemplary illustration, the groove position of distributed apparatus Depending on quantity is according to specific number of slots amount in distributed apparatus.Either image direction herein in two kinds of direction of mirror image corresponding 3 Individual resource space, 3 resource spaces are merely illustrative, it will usually which, according to the memory space of distributed apparatus, configuration is most The resource space of big quantity, it is therefore intended that, when distributed apparatus install the stronger business board of Port Mirroring disposal ability, in advance If mirror image resources pond can be very good adaptation, the business is applied for card so that the Port Mirroring function of distributed apparatus has good opening up Malleability.Specifically, how distributed apparatus are based on the mirror image purpose included in the corresponding groove position of target board, mirror configuration information Port and direction of mirror image, default determination rule, one target resource space of determination, refers to down from default mirror image resources pond The associated description of step 201- steps 205 in Fig. 2 is stated, is first not detailed herein.
At step 104, specifically, how distributed apparatus determine that target resource space can use based on mirror image capability set , the associated description of step 301- steps 304 in following Fig. 3 is referred to, first it is not detailed herein.When distributed apparatus are based on mirror When determining that target resource space can use as capability set, step 105 is performed, when distributed apparatus determine target based on mirror image capability set When resource space is unavailable, step 106- steps 107 are performed.
In step 105, in one embodiment, when distributed apparatus determine that target resource space can based on mirror image capability set Used time, distributed apparatus are by mirror image source port and the storage of mirror image destination interface in target resource space.With reference to table 2 and step 103, the corresponding resource space 3 in direction is entered as groove position a with target resource space, mirror image source port is 11, mirror image destination interface As a example by 22, mirror image source port 11 and mirror image destination interface 22 are stored and enter the corresponding money in direction in groove position a by distributed apparatus In source space 2, as shown in table 3:
Table 3
In table 3, what mirror image source port 11 and mirror image destination interface 22 were stored in groove position a enters the corresponding resource space in direction In 2.Stored in default mirror image resources pond by by the mirror image source port in mirror configuration information and mirror image destination interface so that point Cloth equipment is received when the message of mirror image processing, can be according to the mirror image source port and mirror recorded in default mirror image resources pond As the corresponding relation of destination interface, mirror image source port and mirror image destination interface are searched, it is ensured that Port Mirroring is achieved.
It will be appreciated by persons skilled in the art that following step 106- steps 107 are walked for optional in one embodiment Suddenly, not necessarily step.
In step 106, in one embodiment, when distributed apparatus determine target resource space not based on mirror image capability set When available, distributed apparatus generation cannot store the warning message of the mirror configuration information.
In step 107, in one embodiment, distributed apparatus send warning message, to point out the mirror configuration information Cannot be stored, be easy to user to be processed in time according to warning message.
In the embodiment of the present invention, when distributed apparatus get mirror configuration information, distributed apparatus are by mirror configuration The corresponding business board of mirror image source port included in information is defined as target board, and distributed apparatus obtain target board correspondence Mirror image capability set, distributed apparatus are based on the mirror image destination included in target board corresponding groove position, mirror configuration information Mouth and direction of mirror image, default determination rule, one target resource space of determination, works as distributed apparatus from default mirror image resources pond When determining that target resource space can use based on mirror image capability set, distributed apparatus store mirror image source port and mirror image destination interface In target resource space, default mirror image resources pond refines to the disposal ability of the Port Mirroring of each business board, So as to make full use of the disposal ability of the Port Mirroring of each business board, it is to avoid the wasting of resources.
Fig. 2 is the embodiment flow chart of the method for another memory image configuration information that the present invention is provided, and the present invention is real Example combination Fig. 1, Fig. 2 are applied, on the basis of step 101- steps 104, to how to match somebody with somebody based on the corresponding groove position of target board, mirror image Mirror image destination interface and direction of mirror image, the default determination rule included in confidence breath, determine one from default mirror image resources pond Target resource space, it is illustrative, as shown in Fig. 2 comprising the following steps:
Step 201:Based on the corresponding groove position of target board, determine from default mirror image resources pond and groove position corresponding first Group resource space.
Step 202:Second group of resource corresponding with direction of mirror image is determined from first group of resource space based on direction of mirror image Space.
Step 203:Determine whether mirror image destination interface has been stored in second group of resource space, when it is determined that mirror image purpose When port is not stored in second group of resource space, step 204 is performed, when it is determined that mirror image destination interface has been stored in second When in the one of resource space in group resource space, step 205 is performed.
Step 204:Determine that rule determines a unappropriated resource space in second group of resource space based on default It is target resource space.
Step 205:One of resource space is defined as target resource space.
In step 201, by taking a of target board corresponding groove position as an example, with reference to table 2, distributed apparatus are from default mirror image resources Determine in pond with the groove position corresponding first group of resource space of a, first group of resource space be groove position a it is corresponding enter direction and the side of going out Distinguish corresponding resource space 1, resource space 2, resource space 3 to two kinds of direction of mirror image and amount to 6 resource spaces.
In step 202., so that the direction of mirror image in mirror configuration information is direction as an example, distributed apparatus are based on into side To second group of resource space corresponding with direction is entered is determined from first group of resource space, second group of resource space is groove position a It is corresponding enter the corresponding resource space 1 in direction, resource space 2, resource space 3 amount to 3 resource spaces.
In step 203, distributed apparatus determine whether mirror image destination interface has been stored in second group of resource space, It will be appreciated by persons skilled in the art that a usual mirror image destination interface can correspond to multiple mirror image source ports, therefore, when When determining that mirror image destination interface is not stored in second group of resource space, perform step 204, when it is determined that mirror image destination interface When being stored in the one of resource space in second group of resource space, step 205 is performed.
In step 204, distributed apparatus are based on default determination rule by unappropriated one in second group of resource space Individual resource space is defined as target resource space, default to determine that rule be:According to corresponding 1,2,3 numbering of resource space, From small to large or from big to small or one resource space of random selection, and it is defined as target resource space, presets and determine rule Specific determination method then is not limited, with reference to table 2, for example, distributed apparatus by groove position a to enter the corresponding resource space 2 in direction true It is set to target resource space.
In step 205, mirror image destination interface has been stored in distributed apparatus the resource in second group of resource space Space is defined as target resource space, is 12 with mirror image destination interface, mirror image source port be 11 as a example by, as shown in table 4:
Table 4
In table 4, groove position a it is corresponding enter the corresponding resource space 1 in direction in mirror image destination interface 12 existed, then, Distributed apparatus by the corresponding groove of mirror image destination interface 12 position a it is corresponding enter the corresponding resource space 1 in direction be defined as target money Source space, mirror image source port for 11 be stored in groove position a it is corresponding enter the corresponding resource space 1 in direction in because a mirror image Destination interface can correspond to multiple mirror image source ports.
In the embodiment of the present invention, distributed apparatus are based on the corresponding groove position of target board, from default mirror image resources pond really Fixed first group of resource space corresponding with groove position, distributed apparatus are determined and mirror based on direction of mirror image from first group of resource space Image space determines whether mirror image destination interface has been stored in second group of resource to corresponding second group of resource space, distributed apparatus In space, when it is determined that mirror image destination interface is not stored in second group of resource space, distributed apparatus are based on default determination A unappropriated resource space in second group of resource space is defined as target resource space by rule;When distributed apparatus are true Horizontal glass as destination interface be stored in the one of resource space in second group of resource space when, distributed apparatus by its In a resource space be defined as target resource space, distributed apparatus for each groove position enter direction and outgoing direction is set up Default mirror image resources pond so that each business board can well be adapted to the default mirror image resources pond, while greatly The Port Mirroring disposal ability that make use of each business board of limit, makes full use of resource.
Fig. 3 is the embodiment flow chart of the method for another the memory image configuration information that the present invention is provided, and the present invention is real Example combination Fig. 1, Fig. 2, Fig. 3 are applied, to how based on mirror image capability set to determine whether target resource space is available, is carried out exemplary Illustrate, as shown in figure 3, comprising the following steps:
Step 301:Determine the default resource quantity corresponding with direction of mirror image of mirror image ability centralized recording.
Step 302:Determine whether the quantity of occupied resource space is more than or equal in second group of resource space Default resource quantity, when the quantity of occupied resource space is more than or equal to default number of resources in second group of resource space During amount, step 303 is performed, when the quantity of occupied resource space is less than default resource quantity in second group of resource space When, perform step 304.
Step 303:Determine that target resource space is unavailable.
Step 304:Determine that target resource space can use.
In step 301, with reference to table 1, so that direction of mirror image is direction as an example, distributed apparatus are determined in mirror image capability set The default resource quantity corresponding with direction is entered of record is 2.
In step 302, distributed apparatus determine that the quantity of occupied resource space is in second group of resource space It is no more than or equal to default resource quantity, it will be appreciated by persons skilled in the art that each business board treatment port Mirror image it is limited in one's ability, therefore in second group of resource space the quantity of occupied resource space more than or equal to default During resource quantity, step 303 is performed, when the quantity of occupied resource space is less than default resource in second group of resource space During quantity, step 304 is performed.
In step 303, with target resource space as the corresponding resource space 3 of the corresponding outgoing directions of groove position a for target is provided As a example by source space, with reference to table 2, the corresponding resource space 1 of the corresponding outgoing directions of groove position a and the corresponding outgoing directions of groove position a are corresponding Resource space 2 is occupied, and the quantity of occupied resource space is equal to default resource quantity 2 in second group of resource space, Because target board supports that the resource quantity for the treatment of mirror image outgoing direction is 2, if by the corresponding resource of the groove position corresponding outgoing directions of a Used as target resource space, beyond the disposal ability of Target Board card port mirror image, therefore distributed apparatus determine groove position in space 3 The corresponding resource space 3 of the corresponding outgoing directions of a is unavailable.
In step 304, with reference to table 1, table 2 and step 204, groove position a is entered the corresponding money in direction by equipment in a distributed manner Source space 2 is defined as target resource space, and the quantity 1 of occupied resource space is provided less than default in second group of resource space Source quantity 2, distributed apparatus determine groove position a it is corresponding enter the corresponding resource space 2 in direction can use.
In the embodiment of the present invention, distributed apparatus determine the default money corresponding with direction of mirror image of mirror image ability centralized recording Source quantity, distributed apparatus determine whether the quantity of occupied resource space is more than or equal in second group of resource space Default resource quantity, when the quantity of occupied resource space is more than or equal to default number of resources in second group of resource space During amount, distributed apparatus determine that target resource space is unavailable;When occupied resource space in second group of resource space When quantity is less than default resource quantity, distributed apparatus determine that target resource space can use so that target board is in port mirror In the range of the disposal ability of picture, so that it is guaranteed that target board normally realizes the treatment of Port Mirroring.
Corresponding to the method for above-mentioned memory image configuration information, the invention allows for the distributed apparatus shown in Fig. 4 Hardware structure diagram.Fig. 4 is refer to, in hardware view, the distributed apparatus include processor, internal bus, network interface, internal memory And nonvolatile memory, the hardware required for other business are also possible that certainly.Processor is from nonvolatile memory It is middle to read corresponding computer program to then operation in internal memory, the dress of memory image configuration information is formed on logic level Put.Certainly, in addition to software realization mode, the present invention is not precluded from other implementations, such as logical device or soft or hard Mode that part is combined etc., that is to say, that the executive agent of following handling process is not limited to each logic unit, it is also possible to It is hardware or logical device.
Fig. 5 is the embodiment block diagram of the device for memory image configuration information that the present invention is provided, as shown in figure 5, should The device of memory image configuration information can include:Target board determining module 51, capability set acquisition module 52, object space is true Cover half block 53, mirror port memory module 54, wherein:
Target board determining module 51, for when mirror configuration information is got, by what is included in mirror configuration information The corresponding business board of mirror image source port is defined as target board, and mirror image destination interface and mirror image are also included in mirror configuration information Direction;
Capability set acquisition module 52, for obtaining the corresponding mirror image of target board determined in target board determining module 51 Capability set, mirror image capability set provides the set of mirror image processing ability for target board;
Object space determining module 53, for based on the corresponding groove of target board determined in target board determining module 51 Mirror image destination interface and direction of mirror image, the default determination rule included in position, mirror configuration information, from default mirror image resources pond Determine a target resource space, default mirror image resources pond have recorded at least one groove position, each at least one groove position Groove position correspondence enters the two kinds of resource spaces of direction of mirror image in direction and outgoing direction, the either image direction correspondence in two kinds of direction of mirror image Multiple resource spaces;
Mirror port memory module 54, the mirror image capability set for being obtained in capability set acquisition module 52 is based on determines mesh When the target resource space determined in mark space determining module 53 is available, by mirror image source port and the storage of mirror image destination interface in mesh In mark resource space.
Fig. 6 is the embodiment block diagram of the device of another memory image configuration information that the present invention is provided, as shown in fig. 6, On the basis of above-mentioned embodiment illustrated in fig. 5, object space determining module 53 includes:
First determination sub-module 531, for based on the corresponding groove of target board determined in target board determining module 51 Position, determines first group of resource space corresponding with groove position from default mirror image resources pond;
Second determination sub-module 532, for the first group of money determined from the first determination sub-module 531 based on direction of mirror image Second group of resource space corresponding with direction of mirror image is determined in source space;
3rd determination sub-module 533, for determining whether mirror image destination interface has been stored in the second determination sub-module 532 In second group of resource space of middle determination;
4th determination sub-module 534, for that ought determine that mirror image destination interface is not stored in the 3rd determination sub-module 533 When in second group of resource space, determine that rule is true by a unappropriated resource space in second group of resource space based on default It is set to target resource space;
5th determination sub-module 535, for that ought determine that mirror image destination interface has been stored in the 3rd determination sub-module 533 When in the one of resource space in second group of resource space, one of resource space is defined as target resource space.
In one embodiment, the device of memory image configuration information also includes:
Resource quantity determining module 55, for the mirror image ability centralized recording that determines to obtain in capability set acquisition module 52 Default resource quantity corresponding with direction of mirror image;
Quantity determining module 56 is taken, in second group of resource space for determining determination in the second determination sub-module 532 Whether the quantity of occupied resource space is more than or equal to the default number of resources determined in resource quantity determining module 55 Amount;
Resource space determining module 57, for when second determination sub-module in the occupancy quantity determining module 56 The quantity of occupied resource space is more than or equal to the number of resources in the second group of resource space determined in 532 During the default resource quantity determined in amount determining module 55, determine that the target resource space is unavailable, when the occupancy It is occupied in the second group of resource space determined in second determination sub-module 532 in quantity determining module 56 When the quantity of resource space is less than the default resource quantity determined in the resource quantity determining module 55, the mesh is determined Mark resource space can use.The unavailable determining module in space, for when the second group of resource space determined in the second determination sub-module 532 Between in occupied resource space quantity more than or equal to the default number of resources determined in resource quantity determining module 55 During amount, determine that target resource space is unavailable;
Space can use determining module, in second group of resource space determining in the second determination sub-module 532 by When the quantity of the resource space of occupancy is less than the default resource quantity determined in resource quantity determining module 55, target resource is determined Space can use.
In one embodiment, the device of memory image configuration information also includes:
Warning message generation module 58, the mirror image capability set for being obtained in capability set acquisition module 52 is based on determines mesh When the target resource space determined in mark space determining module 53 is unavailable, generation cannot store the alarm of the mirror configuration information Message;
Warning message sending module 59, for sending the warning message generated in warning message generation module 58.
The function of unit and the implementation process of effect correspond to step in specifically referring to the above method in said apparatus Implementation process, will not be repeated here.
For device embodiment, because it corresponds essentially to embodiment of the method, so related part is referring to method reality Apply the part explanation of example.Device embodiment described above is only schematical, wherein described as separating component The unit of explanation can be or may not be physically separate, and the part shown as unit can be or can also It is not physical location, you can with positioned at a place, or can also be distributed on multiple NEs.Can be according to reality Selection some or all of module therein is needed to realize the purpose of the present invention program.Those of ordinary skill in the art are not paying In the case of going out creative work, you can to understand and implement.
As seen from the above-described embodiment, when distributed apparatus get mirror configuration information, distributed apparatus match somebody with somebody mirror image The corresponding business board of mirror image source port included in confidence breath is defined as target board, and distributed apparatus obtain target board pair The mirror image capability set answered, distributed apparatus are based on the mirror image purpose included in the corresponding groove position of target board, mirror configuration information Port and direction of mirror image, default determination rule, determine a target resource space, when distribution sets from default mirror image resources pond For when determining that target resource space can use based on mirror image capability set, distributed apparatus deposit mirror image source port and mirror image destination interface In target resource space, distributed apparatus make full use of the disposal ability of the Port Mirroring of each business board for storage, it is to avoid The wasting of resources.
Those skilled in the art considering specification and after putting into practice invention disclosed herein, will readily occur to it is of the invention its Its embodiment.It is contemplated that cover any modification of the invention, purposes or adaptations, these modifications, purposes or Person's adaptations follow general principle of the invention and including undocumented common knowledge in the art of the invention Or conventional techniques.Description and embodiments are considered only as exemplary, and true scope and spirit of the invention are by following Claim is pointed out.
Also, it should be noted that term " including ", "comprising" or its any other variant be intended to nonexcludability Comprising so that process, method, commodity or equipment including a series of key elements not only include those key elements, but also wrapping Include other key elements being not expressly set out, or also include for this process, method, commodity or equipment is intrinsic wants Element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that wanted including described Also there is other identical element in process, method, commodity or the equipment of element.
Presently preferred embodiments of the present invention is the foregoing is only, is not intended to limit the invention, it is all in essence of the invention Within god and principle, any modification, equivalent substitution and improvements done etc. should be included within the scope of protection of the invention.

Claims (8)

1. a kind of method of memory image configuration information, it is characterised in that methods described includes:
When mirror configuration information is got, the corresponding business board of mirror image source port that will be included in mirror configuration information determines It is target board, mirror image destination interface and direction of mirror image is also included in the mirror configuration information;
The corresponding mirror image capability set of the target board is obtained, the mirror image capability set provides mirror image processing for the target board The set of ability;
Based on the mirror image destination interface and mirror image side that are included in the corresponding groove position of the target board, the mirror configuration information To, it is default determine rule, a target resource space, the default mirror image resources pond record are determined from default mirror image resources pond At least one groove position, each groove position correspondence at least one groove position enters direction and outgoing direction two kinds of direction of mirror image Resource space, the either image direction correspondence multiple resource space in described two direction of mirror image;
When determining that the target resource space can use based on the mirror image capability set, by the mirror image source port and the mirror image Destination interface is stored in the target resource space.
2. method according to claim 1, it is characterised in that it is described based on the corresponding groove position of the target board, it is described Mirror image destination interface and direction of mirror image, the default determination rule included in mirror configuration information, from default mirror image resources pond really A fixed target resource space, including:
Based on the corresponding groove position of the target board, first group of money corresponding with groove position is determined from default mirror image resources pond Source space;
Second group of resource corresponding with the direction of mirror image is determined from first group of resource space based on the direction of mirror image Space;
Determine whether the mirror image destination interface has been stored in second group of resource space;
When it is determined that the mirror image destination interface is not stored in second group of resource space, determine that rule will based on default A unappropriated resource space is defined as the target resource space in second group of resource space;
When it is determined that in one of resource space during the mirror image destination interface has been stored in second group of resource space When, one of resource space is defined as target resource space.
3. method according to claim 2, it is characterised in that methods described also includes:
Determine the default resource quantity corresponding with the direction of mirror image of the mirror image ability centralized recording;
Determine whether the quantity of occupied resource space is default more than or equal to described in second group of resource space Resource quantity;
When the quantity of occupied resource space is more than or equal to the default number of resources in second group of resource space During amount, determine that the target resource space is unavailable;
When the quantity of occupied resource space is less than the default resource quantity in second group of resource space, it is determined that The target resource space can use.
4. method according to claim 1, it is characterised in that methods described also includes:
When determining that the target resource space is unavailable based on the mirror image capability set, generation cannot store the mirror configuration The warning message of information;
Send the warning message.
5. a kind of device of memory image configuration information, it is characterised in that described device includes:
Target board determining module, for when mirror configuration information is got, the image source that will be included in mirror configuration information The corresponding business board in port is defined as target board, and mirror image destination interface and mirror image side are also included in the mirror configuration information To;
Capability set acquisition module, for obtaining the corresponding mirror image of the target board determined in the target board determining module Capability set, the mirror image capability set provides the set of mirror image processing ability for the target board;
Object space determining module, for based on the corresponding groove of the target board determined in the target board determining module Mirror image destination interface and direction of mirror image, the default determination rule included in position, the mirror configuration information, from default mirror image resources A target resource space is determined in pond, the default mirror image resources pond have recorded at least one groove position, at least one groove Each groove position correspondence in position enters the two kinds of resource spaces of direction of mirror image in direction and outgoing direction, in described two direction of mirror image Either image direction correspondence multiple resource space;
Mirror port memory module, the mirror image capability set for being obtained in the capability set acquisition module is based on determines institute When the target resource space for stating determination in object space determining module can use, by the mirror image source port and the mirror image mesh Port store in the target resource space.
6. device according to claim 5, it is characterised in that the object space determining module includes:
First determination sub-module, for based on the corresponding groove of the target board determined in the target board determining module Position, determines first group of resource space corresponding with groove position from default mirror image resources pond;
Second determination sub-module, for described first group determined from first determination sub-module based on the direction of mirror image Second group of resource space corresponding with the direction of mirror image is determined in resource space;
3rd determination sub-module, for determining whether the mirror image destination interface has been stored in second determination sub-module In the second group of resource space for determining;
4th determination sub-module, for when determining that the mirror image destination interface is not stored in institute in the 3rd determination sub-module When stating in second group of resource space, determine rule by a unappropriated resource in second group of resource space based on default Space is defined as the target resource space;
5th determination sub-module, for when determining that the mirror image destination interface has been stored in institute in the 3rd determination sub-module When stating in the one of resource space in second group of resource space, one of resource space is defined as target resource Space.
7. device according to claim 6, it is characterised in that described device also includes:
Resource quantity determining module, for the mirror image ability centralized recording that determines to obtain in the capability set acquisition module Default resource quantity corresponding with the direction of mirror image;
Take quantity determining module, in second group of resource space for determining to determine in second determination sub-module Whether the quantity of occupied resource space is more than or equal to the described default money determined in the resource quantity determining module Source quantity;
Resource space determining module, for when determination in second determination sub-module in the occupancy quantity determining module The quantity of occupied resource space is more than or equal to the resource quantity determining module in second group of resource space During the default resource quantity of middle determination, determine that the target resource space is unavailable, when the occupancy quantity determining module In second determination sub-module in second group of resource space for determining occupied resource space quantity it is small During the default resource quantity determined in the resource quantity determining module, determine that the target resource space can use.
8. device according to claim 5, it is characterised in that described device also includes:
Warning message generation module, the mirror image capability set for being obtained in the capability set acquisition module is based on determines institute State the target resource space determined in object space determining module it is unavailable when, generation cannot store the mirror configuration letter The warning message of breath;
Warning message sending module, for sending the warning message generated in the warning message generation module.
CN201710169584.9A 2017-03-21 2017-03-21 Method and device for storing mirror image configuration information Active CN106790719B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710169584.9A CN106790719B (en) 2017-03-21 2017-03-21 Method and device for storing mirror image configuration information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710169584.9A CN106790719B (en) 2017-03-21 2017-03-21 Method and device for storing mirror image configuration information

Publications (2)

Publication Number Publication Date
CN106790719A true CN106790719A (en) 2017-05-31
CN106790719B CN106790719B (en) 2019-12-06

Family

ID=58967216

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710169584.9A Active CN106790719B (en) 2017-03-21 2017-03-21 Method and device for storing mirror image configuration information

Country Status (1)

Country Link
CN (1) CN106790719B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112639783A (en) * 2018-08-31 2021-04-09 美光科技公司 Simultaneous mirror measurement and execution
CN113342362A (en) * 2021-05-31 2021-09-03 联想(北京)有限公司 Container engine docker information processing method, device, equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2714745A1 (en) * 2008-02-12 2009-08-20 Netapp, Inc. Hybrid media storage system architecture
CN104731528B (en) * 2015-03-17 2017-12-15 清华大学 A kind of construction method and system of cloud computing block storage service
CN106330503A (en) * 2015-06-26 2017-01-11 中兴通讯股份有限公司 Automatically switched optical network resource control method and device
CN105094948B (en) * 2015-07-31 2018-11-09 杭州华为数字技术有限公司 A kind of system image file updating method, cloud data center and the system of virtual machine

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112639783A (en) * 2018-08-31 2021-04-09 美光科技公司 Simultaneous mirror measurement and execution
CN113342362A (en) * 2021-05-31 2021-09-03 联想(北京)有限公司 Container engine docker information processing method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN106790719B (en) 2019-12-06

Similar Documents

Publication Publication Date Title
US6266399B1 (en) Outgoing message selection based on caller identification and time/date constraints
US7827246B2 (en) Dynamic domain based electronic mail signature lines
WO2018209028A1 (en) Display method and device
US7349528B2 (en) Unified messaging system
US20070244970A1 (en) Conference System
CN107872377A (en) Message prompt method and device
CN105516296B (en) The configuration method and device of group identification image
JP2005209106A (en) Portable communication terminal, received e-mail management method, program and recording medium
US20070276862A1 (en) Organizing and sharing digital content
CN105187599B (en) A kind of method for managing contact person information and terminal
GB2503704A (en) Adaptive communication anonymization
CN109117664A (en) The access control method and device of application program
WO2021147727A1 (en) Instant messaging sending method, apparatus and device
CN107402950A (en) Divide the document handling method and device of table based on point storehouse
CN107798135A (en) Paging query method and device and electronic equipment
CN106790719A (en) A kind of method and device of memory image configuration information
CN107291486A (en) The installation method and device of a kind of operating system
CN106874718A (en) privacy processing method, device and terminal
CN107391100A (en) A kind of configuration file generation method and device for supporting multilingual bill
CN106227752A (en) A kind of photograph sharing method and terminal
CN102750185A (en) Adaptive output method and system for data
US11575526B2 (en) Web conference asset management
CN107102971A (en) Pattern clone method, device and equipment
CN108228773A (en) A kind of method and device realized information and preserved
CN108270973A (en) One kind is taken pictures processing method, mobile terminal and computer readable storage medium

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