CN111240833B - Resource migration method and device - Google Patents

Resource migration method and device Download PDF

Info

Publication number
CN111240833B
CN111240833B CN201911424985.XA CN201911424985A CN111240833B CN 111240833 B CN111240833 B CN 111240833B CN 201911424985 A CN201911424985 A CN 201911424985A CN 111240833 B CN111240833 B CN 111240833B
Authority
CN
China
Prior art keywords
isolation space
identifier
resource
migration
space
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911424985.XA
Other languages
Chinese (zh)
Other versions
CN111240833A (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.)
Xiamen Wangsu Co Ltd
Original Assignee
Xiamen Wangsu 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 Xiamen Wangsu Co Ltd filed Critical Xiamen Wangsu Co Ltd
Priority to CN201911424985.XA priority Critical patent/CN111240833B/en
Publication of CN111240833A publication Critical patent/CN111240833A/en
Application granted granted Critical
Publication of CN111240833B publication Critical patent/CN111240833B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5022Mechanisms to release resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system
    • G06F9/5088Techniques for rebalancing the load in a distributed system involving task migration

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the invention discloses a resource migration method and a device, which are used for deleting protocol stack data corresponding to unmanaged resources and disconnecting protocol stack connection corresponding to unmanaged resources to release unmanaged resources aiming at any unmanaged resource in a first isolation space after receiving a migration request for migrating the first isolation space. In the embodiment of the invention, the protocol stack data corresponding to the unmanaged resource in the first isolation space is deleted, and the protocol stack connection corresponding to the unmanaged resource is disconnected, so that the unmanaged resource can be quickly released without waiting for the completion of the processing of the protocol stack data corresponding to the unmanaged resource and then releasing the unmanaged resource, and the resource migration efficiency can be improved.

Description

Resource migration method and device
Technical Field
The present invention relates to the field of data processing, and in particular, to a resource migration method and apparatus.
Background
At the present stage, when the operations such as expansion, upgrade, repair, etc. are performed on the isolation space, it is usually necessary to first perform an operation of migrating the isolation space, and then migrate the isolation space back again after the isolation space is repaired. When the isolation space is migrated, in the prior art, for any resource in the isolation space, the connection of the protocol stack corresponding to the resource is disconnected, and then the resource is released after the data processing of the protocol stack corresponding to the resource is completed, thereby completing the migration of the isolation space.
However, this approach has problems: before the processing of the protocol stack data corresponding to the resource is completed, the isolation space is always in a non-migrated state, and if the isolation space is migrated back in the period, the migration back will fail due to the existence of the isolation space with the same name. Due to the fact that the method needs to wait for the protocol stack data corresponding to all the resources in the isolation space to be migrated back to the isolation space after the protocol stack data corresponding to all the resources in the isolation space are processed, migration efficiency of the isolation space is poor.
In summary, a resource migration method is urgently needed at present to solve the technical problem of poor migration effect of the isolation space caused by the prior art needing to wait for the protocol stack data corresponding to all resources in the isolation space to be migrated back to the isolation space after the processing is completed.
Disclosure of Invention
The embodiment of the invention provides a resource migration method and device, which are used for solving the technical problem of poor migration effect of an isolation space caused by the fact that protocol stack data corresponding to all resources in the isolation space need to be migrated back to the isolation space after being processed in the prior art.
In a first aspect, a method for resource migration provided in an embodiment of the present invention is applied to a proxy node, and the method includes:
receiving a migration request, wherein the migration request is used for migrating a first isolation space, deleting protocol stack data corresponding to the unmanaged resource aiming at any unmanaged resource in the first isolation space, and disconnecting the protocol stack connection corresponding to the unmanaged resource to release the unmanaged resource; the unmanaged resources are resources which are not disconnected from the protocol stack.
In the embodiment of the invention, the protocol stack data corresponding to the unmanaged resource in the first isolation space is deleted, and the protocol stack connection corresponding to the unmanaged resource is disconnected, so that the unmanaged resource can be quickly released without waiting for the completion of the processing of the protocol stack data corresponding to the unmanaged resource and then releasing the unmanaged resource, and the resource migration efficiency can be improved.
In a possible implementation manner, before deleting protocol stack data corresponding to any unmanaged resource in the first isolation space, it is further determined that the migration mode corresponding to the first isolation space is a fast migration mode.
In the implementation manner, by setting the emigration mode corresponding to the first isolation space and setting the emigration operation corresponding to the first isolation space based on the emigration mode corresponding to the first isolation space, the flexibility of resource migration can be improved.
In a possible implementation manner, the emigration mode corresponding to the first isolation space is determined by: and obtaining a value of a flag bit corresponding to the first isolation space, if the value of the flag bit is a first value, determining that the migration mode corresponding to the first isolation space is a common migration mode, and if the value of the flag bit is a second value, determining that the migration mode corresponding to the first isolation space is a fast migration mode.
In the implementation mode, the emigration mode corresponding to the first isolation space is identified by setting the value of the flag bit, and compared with a text indication mode, the emigration mode can reduce the data occupation amount and enable the indicated emigration mode to be clearer and more definite.
In one possible implementation, the method further includes: if the migration mode corresponding to the first isolation space is the common migration mode, disconnecting the protocol stack connection corresponding to the resource aiming at any resource in the first isolation space, and releasing the resource after the protocol stack data processing corresponding to the resource is completed.
In the implementation manner, the migration mode corresponding to the first isolation space may be set to be a fast migration mode or a common migration mode, and the setting supports user-defined, so that the flexibility of resource migration is better, and the satisfaction of the user is higher.
In one possible implementation, the method further includes: for any taken over resource in the first isolation space, after the protocol stack data corresponding to the taken over resource is processed, releasing the taken over resource; the taken over resource is a resource which has disconnected the protocol stack connection but has not emptied the protocol stack data.
In the implementation manner, by quickly disconnecting the unmanaged resources and waiting for the completion of the processing of the protocol stack data corresponding to the taken-over resources, all unmanaged resources and taken-over resources in the first isolation space can be successfully released, and the time required for releasing the resources can be reduced.
In one possible implementation, the method further includes: if the migration mode corresponding to the first isolation space is the fast migration mode and the first isolation space comprises the taken over resources, or the migration mode corresponding to the first isolation space is a common migration mode, updating the identifier of the first isolation space to be a first identifier; the first identifier is different from an original identifier of the first isolated space.
In the implementation manner, when the connection of the resource in the ordinary migration mode or the protocol stack corresponding to the taken-over resource is disconnected and the protocol stack data corresponding to the taken-over resource cannot be acquired, the isolation space identical to the original identifier of the first isolation space does not exist in the proxy node by updating the identifier of the first isolation space, so that the first isolation space does not conflict when being migrated again, and the migration efficiency of the first isolation space is improved.
In a possible implementation manner, after the identifier of the first isolation space is updated to be the first identifier, the first isolation space is further moved to a set position; the set position is used for storing each isolation space to be migrated but which cannot be migrated quickly, and the identification of each isolation space is updated.
In the implementation mode, the set positions are used for uniformly managing the isolation spaces to be migrated but not migrated, so that the existing isolation spaces and the isolation spaces to be migrated but not migrated can be conveniently distinguished, and the flexibility of isolation space management is improved.
In one possible implementation, the first identifier includes a first field and a second field; the updating the identifier of the first isolation space to be a first identifier includes: setting a first field of the first identification as an original identification of the first isolation space, determining the isolation space matched with the first field of the first identification from the isolation spaces according to the first field of the identification of each isolation space stored in the set position, and setting a second field of the first identification according to a second field of the identification of the matched isolation space.
In the above implementation manner, by setting the update identifier of the first isolation space to include the original identifier and the second field, the corresponding relationship between the update identifier of the first isolation space and the original identifier can be established on the basis of distinguishing the update identifier of the first isolation space from the original identifier of the first isolation space, so that the original identifier of the corresponding first isolation space can be re-determined based on the update identifier of the first isolation space.
In a possible implementation manner, the setting the second field of the first identifier according to the second field of the identifier of the matched isolated space includes: determining a maximum value in a second field of the identity of the matched isolated space, and taking an incremental value of the maximum value as the second field.
In the implementation mode, the second field of the identifier of the same isolation space is set in a numerical value increasing mode, so that the scheme distinguishes each same isolation space on the basis of supporting the emigration operation of a plurality of same isolation spaces, and the operation flexibility is improved.
In a possible implementation manner, before the emigration request is received, an emigration request is further received, where the emigration request includes an identifier of the first isolation space, and if an isolation space whose identifier matches the identifier of the first isolation space does not exist in an existing isolation space, an alternative isolation space whose first field of the identifier matches the identifier of the first isolation space is determined from the isolation spaces according to the identifier of each isolation space stored in the set position, the alternative isolation space is moved out of the set position, and the identifier of the alternative isolation space is updated to be the identifier of the first isolation space.
In the implementation manner, the first isolation space stored in the set position and to be migrated but not migrated is migrated back to the proxy node, so that the first isolation space can be prevented from being created again, useless operation can be avoided, and the resource migration efficiency can be improved.
In one possible implementation, the method further includes: and if the set position does not store the alternative isolation space matched with the identifier of the first isolation space, creating the first isolation space, and moving the network card resource into the first isolation space.
In a second aspect, an embodiment of the present invention provides an apparatus for resource migration, where the apparatus includes:
the receiving and sending module is used for receiving a migration request, and the migration request is used for migrating the first isolation space;
the migration module is used for deleting the protocol stack data corresponding to any unmanaged resource in the first isolation space and disconnecting the protocol stack connection corresponding to the unmanaged resource so as to release the unmanaged resource; the unmanaged resources are resources which are not disconnected from the protocol stack.
In a possible implementation manner, the migration module further determines that the migration mode corresponding to the first isolation space is the fast migration mode before deleting the protocol stack data corresponding to the unmanaged resource for any unmanaged resource in the first isolation space.
In one possible implementation, the migration module is further configured to: and obtaining a value of a flag bit corresponding to the first isolation space, if the value of the flag bit is a first value, determining that the emigration mode corresponding to the first isolation space is a common emigration mode, and if the value of the flag bit is a second value, determining that the emigration mode corresponding to the first isolation space is a rapid emigration mode.
In one possible implementation, the migration module is further configured to: if the migration mode corresponding to the first isolation space is the common migration mode, disconnecting the protocol stack connection corresponding to the resource for any resource in the first isolation space, and releasing the resource after the protocol stack data processing corresponding to the resource is completed.
In one possible implementation, the migration module is further configured to: for any taken-over resource in the first isolation space, after the protocol stack data processing corresponding to the taken-over resource is completed, releasing the taken-over resource; the taken over resource is a resource which has disconnected the protocol stack connection but has not cleared the protocol stack data.
In one possible implementation, the migration module is further configured to: if the migration mode corresponding to the first isolation space is the fast migration mode and the first isolation space comprises the taken over resources, or the migration mode corresponding to the first isolation space is a common migration mode, updating the identifier of the first isolation space to be a first identifier; the first identifier is different from an original identifier of the first isolation space.
In a possible implementation manner, after the migration module updates the identifier of the first isolation space to be the first identifier, the migration module is further configured to: moving the first isolation space to a set position; the set position is used for storing each isolation space to be migrated but which cannot be migrated quickly, and the identification of each isolation space is updated.
In one possible implementation, the first identifier includes a first field and a second field; the migration module is specifically configured to: setting a first field of the first identification as an original identification of the first isolation space, determining the isolation space matched with the first field of the first identification from the isolation spaces according to the first field of the identification of each isolation space stored in the set position, and setting a second field of the first identification according to a second field of the identification of the matched isolation space.
In a possible implementation manner, the migration module is specifically configured to: determining a maximum value in a second field of the identity of the matched isolated space, and taking an incremental value of the maximum value as the second field.
In a possible implementation manner, before the transceiver module receives the emigration request, the transceiver module is further configured to: receiving a migration request, wherein the migration request comprises an identifier of the first isolation space; accordingly, the migration module is further configured to: if the existing isolation space does not have an isolation space with an identifier matched with the identifier of the first isolation space, determining an alternative isolation space with the identifier matched with the identifier of the first isolation space from each isolation space according to the identifier of each isolation space stored in the set position; and moving the candidate isolation space out of the set position, and updating the identifier of the candidate isolation space to be the identifier of the first isolation space.
In one possible implementation, the migration module is further configured to: and if the set position does not store the alternative isolation space matched with the identifier of the first isolation space, creating the first isolation space, and moving the network card resource into the first isolation space.
In a third aspect, an embodiment of the present invention provides a computing device, including at least one processor and at least one memory, where the memory stores a computer program, and when the program is executed by the processor, the processor is caused to execute the method according to any of the first aspect.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium storing a computer program executable by a computing apparatus, where the program is configured to cause the computing apparatus to execute any of the methods described in the first aspect.
These and other aspects of the invention will be apparent from and elucidated with reference to the embodiments described hereinafter.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a schematic diagram of a possible system architecture according to an embodiment of the present invention;
fig. 2 is a schematic flowchart corresponding to a resource migration method according to an embodiment of the present invention;
fig. 3 is a schematic overall flow chart corresponding to a resource migration method according to an embodiment of the present invention;
fig. 4 is a schematic overall flow chart corresponding to a resource migration method according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a resource migration apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a computing device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic diagram of a possible system architecture provided by an embodiment of the present invention, as shown in fig. 1, the system architecture may include a proxy node 110, a client 120, and at least one service system, such as a service system 131, a service system 132, and a service system 133. The proxy node 110 may be connected to the client 120, for example, through a wired connection or a wireless connection, which is not limited in particular.
As shown in fig. 1, at least one isolation space may be disposed in the proxy node 110, where the at least one isolation space corresponds to at least one service system one to one, and each isolation space is connected to the corresponding service system and the client 120, and is used for proxying data interaction between the corresponding service system and the client 120, and simultaneously isolating resources in the corresponding service system from resources in other service systems, and protecting security of resources in the corresponding service system. For example, as shown in fig. 1, the agent nodes 110 may be respectively provided with isolation spaces a corresponding to the service systems 131 1 Isolation space a corresponding to service system 132 2 An isolated space A corresponding to the service system 133 3 Isolation space A 1 For data interaction between proxy service system 131 and client 120, isolation space A 2 For data interaction between proxy service system 132 and client 120, isolation space A 3 For data interaction between proxy service system 133 and client 120.
In the embodiment of the present invention, each service system may be provided with one service node, or may be provided with a plurality of service nodes, and the actual connection of the isolation space with the corresponding service system means connection with each service node in the corresponding service system, for example, the service system 131 is provided with a service node 1311, a service node 1312, a service node 1313, and a service node 1314, and the isolation space a is provided 1 May be connected to serving node 1311, serving node 1312, serving node 1313, and serving node 1314, respectively. As such, when a service node in the service system fails, isolation occursThe space may still acquire service resources from other service nodes in the service system to ensure availability of the services provided to the client 120.
It should be noted that fig. 1 is only an exemplary illustration and does not constitute a limitation to the present disclosure, and in the embodiment of the present disclosure, each isolation space may be simultaneously disposed on one proxy node, or may be separately disposed on multiple isolation nodes, which is not limited specifically.
Based on the system architecture illustrated in fig. 1, fig. 2 is a flowchart illustrating a corresponding resource processing method according to an embodiment of the present invention, where the method is applied to a proxy node 110, and the method includes:
step 201, receiving a migration request, where the migration request is used to migrate the first isolation space.
Here, the migration request may be sent to the proxy node 110 by any service node, and the identifier of the first isolation space may be included in the migration request.
In a possible implementation manner, before receiving the migration request sent by the service node, the proxy node 110 may also migrate to the first isolation space, which specifically includes:
step a, a service node sends a migration request to a proxy node 110, where the migration request carries an identifier of a first isolation space.
Step b, the agent node 110 obtains the identifier of the currently existing isolation space, compares the identifier of the first isolation space with the identifier of the currently existing isolation space, and determines whether the first isolation space currently exists, if so, step c is executed, and if not, step d is executed.
In step c, the proxy node 110 refuses to create the first isolation space.
Step d, the agent node 110 creates a first isolation space, and moves the network card resource of the service node into the first isolation space.
In an example, after the first isolation space is successfully created, the proxy node 110 may further record a corresponding relationship between the first isolation space and the service node, so that after a migration request sent by a certain service node (for example, the service node 1311) is obtained, the proxy node 110 may further determine whether the first isolation space corresponds to the service node 1311 by querying the corresponding relationship, and if so, it indicates that the service node 1311 is the service node that creates the first isolation space, and the service node 1311 has an authority to perform migration operation on the first isolation space, so that the proxy node 110 may receive the migration request sent by the service node 1311; if not, it indicates that service node 1311 is not the service node that created the first isolation space, and service node 1311 does not have the authority to perform the migration operation on the first isolation space, so that proxy node 110 may reject the migration request sent by service node 1311, and may send a response message indicating that the authority authentication has failed to service node 1311.
In the above example, by determining whether the service node corresponds to the first isolation space to be migrated in the migration request before receiving the migration request sent by the service node, it may be ensured that only the migration request sent by the service node having the migration operation permission is received, so as to ensure accuracy of migrating the first isolation space.
Step 202, deleting data in a protocol stack corresponding to any unmanaged resource in the first isolation space, and disconnecting the protocol stack; the unmanaged resources are resources which are not disconnected from the protocol stack.
In an example, before migrating the resource in the first isolation space, an migration mode corresponding to the first isolation space may also be determined, so that the resource in the first isolation space is migrated in a migration manner matched with the migration mode corresponding to the first isolation space. The migration mode corresponding to the first isolation space may be set by the service node that creates the first isolation space, for example, the migration mode may be carried in a migration request sent by the service node, may also be carried in a migration request sent by the service node, and may also be sent to the agent node 110 by the service node alone, which is not limited specifically.
In the above example, the migration mode corresponding to the first isolation space can support the service node customization, so that the resource migration can meet various different scenarios, thereby achieving higher flexibility and better customer satisfaction.
In the embodiment of the present invention, the emigration mode corresponding to the first isolation space may be set to a fast emigration mode or a normal emigration mode, where the fast emigration mode refers to fast releasing the resource in the first isolation space, and the normal emigration mode refers to releasing the resource in the first isolation space according to a conventional emigration strategy. Wherein, the conventional emigration strategy is as follows: each isolation space is deployed by adopting a freebsd architecture, the agent node 110 can directly call a default bottom close function in the kernel to release any resource in the first isolation space, and after the bottom close function is called, the protocol stack connection corresponding to the resource can be directly disconnected; however, if the processing of the protocol stack data corresponding to the resource is not completed, the protocol stack connection corresponding to the resource is disconnected, so that the proxy node 110 cannot operate the protocol stack data corresponding to the resource any more, and therefore, in the conventional migration policy, the proxy node 110 needs to wait for the completion of the processing of the protocol stack data corresponding to the resource to release the resource.
In a possible implementation manner, the migration mode corresponding to the first isolation space may be indicated by a value of a flag bit corresponding to the first isolation space, where the value of the flag bit corresponding to the first isolation space may include a first value or a second value, the first value is used to indicate that the migration mode corresponding to the first isolation space is the normal migration mode, and the second value is used to indicate that the migration mode corresponding to the first isolation space is the fast migration mode. The first value and the second value may be set by a person skilled in the art based on experience, for example, the first value is set to 0, and the second value is set to 1, which is not limited in particular.
In specific implementation, the value of the flag bit corresponding to the first isolation space may be set in multiple ways, and for convenience of understanding, the following may be listed as several possible setting ways:
the setting mode is as follows: when migrating into the first isolation space, the agent node 110 may set a flag bit corresponding to the first isolation space after the first isolation space is successfully created, and set an initial value of the flag bit to be a first value. Correspondingly, when migrating the first isolation space, if the service node determines to migrate the first isolation space in the fast migration mode, the service node may also simultaneously carry the identifier and the second value of the first isolation space in the migration request, so that the proxy node 110 updates the value of the flag bit corresponding to the first isolation space to the second value based on the migration request; if the service node determines to migrate the first isolation space in the normal migration mode, the service node may only carry the identifier of the first isolation space in the migration request, and since the migration request does not carry the second value, the agent node 110 does not update the value of the flag bit corresponding to the first isolation space, that is, the value of the flag bit corresponding to the first isolation space is still the first value.
The setting mode is two: when migrating the first isolation space, if the service node determines to migrate the first isolation space in the fast migration mode, the service node may also simultaneously carry the identifier and the second value of the first isolation space in the migration request, so that the proxy node 110 sets the flag bit corresponding to the first isolation space based on the migration request, and sets the value of the flag bit as the second value; if the service node determines to migrate the first isolation space in the normal migration mode, the service node may simultaneously carry the identifier and the first value of the first isolation space in the migration request, so that the proxy node 110 sets the flag bit corresponding to the first isolation space based on the migration request, and sets the value of the flag bit to be the first value.
The setting mode is three: when migrating into the first isolation space, the agent node 110 may set a flag bit corresponding to the first isolation space after the first isolation space is successfully created, and set an initial value of the flag bit to be a third value. Correspondingly, when migrating the first isolation space, if the service node determines to use the fast migration mode to migrate the first isolation space, the service node may also carry the identifier and the second value of the first isolation space in the migration request, so that the proxy node 110 updates the value of the flag bit corresponding to the first isolation space to the second value based on the migration request; if the service node determines to migrate the first isolation space in the normal migration mode, the service node may simultaneously carry the identifier and the first value of the first isolation space in the migration request, so that the proxy node 110 updates the value of the flag bit corresponding to the first isolation space to the first value based on the migration request.
In the implementation mode, the emigration mode corresponding to the first isolation space is identified by setting the value of the flag bit, and compared with a text indication mode, the emigration mode can reduce data occupation amount and make the indicated emigration mode clearer and more definite.
In a possible implementation manner, the proxy node 110 modifies the implementation logic of the underlying close function in the kernel, and performs a corresponding emigration operation by using the modified underlying close function in combination with the value of the flag bit corresponding to the first isolation space. In a specific implementation, when the proxy node 110 calls a modified bottom layer close function in the freebsd kernel to migrate out of the first isolation space, the modification logic of the modified bottom layer close function may determine whether a value of a flag bit corresponding to the first isolation space is a second value, and if the value of the flag bit corresponding to the first isolation space is not the second value but is a first value or another value, the modified bottom layer close function may directly call the original logic to disconnect a protocol stack connection corresponding to the resource, and after the protocol stack data corresponding to the resource is processed, release the resource.
Correspondingly, if the value of the flag bit corresponding to the first isolation space is a second value, for any unmanaged resource in the first isolation space, the modified bottom layer close function adds a socket option SO _ LINGER parameter to the unmanaged resource in a freebsd kernel, and the parameter can send an RST data packet to the unmanaged resource SO that a tcp state machine corresponding to the unmanaged resource can be quickly restored to a closed state, SO that protocol stack data corresponding to the unmanaged resource is deleted; and, the modified underlying close function may also call the original logic to disconnect the protocol stack connection corresponding to the unmanaged resource, such as the connection between the unmanaged resource and the service node, or the connection between the unmanaged resource and the client 120. Thus, the proxy node 110 can quickly release the unmanaged resource by deleting the protocol stack data corresponding to the unmanaged resource and disconnecting the protocol stack connection corresponding to the unmanaged resource. The unmanaged resource refers to a resource which has not executed the original logic of the underlying close function, and the protocol stack corresponding to the unmanaged resource is not disconnected.
In the embodiment of the present invention, after the current-stage close function is called, only the connection of the protocol stack corresponding to the resource can be disconnected, but the data in the protocol stack cannot be deleted, so that the proxy node 110 must wait for the completion of the data processing in the protocol stack to clear the resource, but the embodiment of the present invention modifies the lower-stage close function, so that the lower-stage close function can execute the corresponding emigration operation according to the value of the flag bit corresponding to the first isolation space, and when the value of the flag bit indicates the fast emigration mode, the lower-stage close function can simultaneously delete the protocol stack data corresponding to the unmanaged resource and disconnect the protocol stack connection corresponding to the unmanaged resource, so that the unmanaged resource can be quickly released, and when the value of the flag bit indicates the normal emigration mode, the lower-stage close function can release the resource according to the normal emigration strategy. By modifying the implementation logic of the underlying close function, the proxy node can be compatible with the fast migration mode and the common migration mode at the same time, so that the service node has better experience and higher flexibility.
In a possible scenario, although the value of the flag bit corresponding to the first isolation space is the second value, when the service node sends the migration request, the proxy node 110 may already call the original logic of the underlying close function to release part of the resources in the first isolation space, so that the connection of the protocol stack corresponding to the part of the resources in the first isolation space is disconnected. Therefore, the first isolation space can simultaneously have the taken-over resource and the unmanaged resource, and the protocol stack connection corresponding to the unmanaged resource is not disconnected, so that the modified bottom layer close function can be called to quickly release the unmanaged resource; however, the connection of the protocol stack corresponding to the taken-over resource is disconnected, and the protocol stack data may not be cleared yet, but because the connection of the protocol stack corresponding to the taken-over resource is disconnected, the proxy node 110 cannot clear the protocol stack data corresponding to the taken-over resource any more, and therefore the proxy node 110 needs to wait for the completion of the processing of the protocol stack data corresponding to the taken-over resource to release the taken-over resource.
Based on this, in an example, if there is a taken-over resource in the first isolation space, which results in that the agent node 110 cannot fast migrate out of the first isolation space, the agent node 110 may further update the identifier of the first isolation space to be a first identifier, where the first identifier is different from the original identifier of the first isolation space. Therefore, although the agent node cannot rapidly release the taken-over resource in the first isolation space, the identifier of the first isolation space is not the original identifier of the first isolation space any longer by updating the identifier of the first isolation space, so that the re-migration of the agent node to the first isolation space is not affected, and the resource migration efficiency is improved.
The manner of updating the identifier of the first isolation space may be set by a person skilled in the art according to experience, and is not limited specifically.
As an example, the first isolation space after the identifier is updated may also be placed in a set location, where the set location is used to store each isolation space to be migrated in the proxy node 110 but cannot be migrated quickly, and each isolation space has already been updated with the identifier. In this example, the respective isolation spaces to be migrated but not rapidly migrated are uniformly managed by using the set positions, so that the existing isolation spaces and the isolation spaces to be migrated can be distinguished conveniently, and the flexibility of the management of the isolation spaces is improved.
In a possible implementation manner, the first identifier may include a first field and a second field, and the first field may be set as an original identifier of the first isolation space, so that the identifier of each isolation space stored in the set position may include the first field and the second field, and the first field of the identifier of each isolation space is the original identifier of the isolation space. Correspondingly, when the second field of the first identifier is set, the isolation space matched with the first isolation space can be determined from each isolation space according to the first field of the identifier of each isolation space stored in the set position and the original identifier of the first isolation space, and then the second field of the first identifier is set according to the second field of the identifier of the matched isolation space. The setting manner of the second field of the first identifier may be set by a person skilled in the art according to experience, and is not limited.
For example, if the identifier of the matching isolated space is nsl.12.Bak, the second field of the first identifier may be set to nsl.121.Bak, or to nsl.12a. Bak, or to nsl.1212.Bak, without limitation.
In the above implementation manner, the update identifier of the first isolation space includes the original identifier and the second field, and the corresponding relationship between the update identifier of the first isolation space and the original identifier can be established on the basis of distinguishing the update identifier of the first isolation space from the original identifier of the first isolation space, so that the original identifier of the corresponding first isolation space can be determined again based on the update identifier of the first isolation space.
In an example, the second field of the first identifier may be a value satisfying a set range, the agent node 110 may count a maximum value from the second fields of the identifiers of the matched isolation spaces, and then calculate an incremental value of the maximum value, if the incremental value satisfies the set range, the incremental value may be used as the second field of the first identifier, and if the incremental value exceeds the set range, it is determined that the first isolation space stored in the set location is full, so the second field of the first identifier may not be set, and the first isolation space may be moved out of the set location. The setting range can be set empirically by those skilled in the art, and can be set to any integer of [1,1024], for example.
For example, if the identifier of the matched isolated space is nsl.12.Bak, the second field of the first identifier may be set to nsl.13.Bak, and if the identifiers of the matched isolated space are nsl.25.Bak, nsl.27.Bak, the second field of the first identifier may be set to nsl.28.Bak.
In the above example, the second field of the identifier of the same isolation space is set in a manner of increasing the numerical value incrementally, so that the scheme can regularly distinguish each same isolation space on the basis of supporting the migration operation on a plurality of same isolation spaces, and the orderliness and flexibility of the migration operation can be improved.
In the embodiment of the present invention, the identifier of the isolation space is updated according to the above-mentioned manner, after the isolation space is moved to the set position, if a migration request for the second isolation space is received, the proxy node 110 may further determine, according to the first field of the identifier of each isolation space and the identifier of the second isolation space, which are stored in the set position, whether an alternative isolation space in which the first field of the identifier matches the identifier of the second isolation space exists in each isolation space, and if the alternative isolation space exists, may delete the second field in the identifier of the alternative isolation space, or update the identifier of the alternative isolation space to the identifier of the first isolation space, and move the alternative isolation space out of the set position, so that it is not necessary to create the second isolation space again, and resource migration consumption is reduced.
If a plurality of candidate isolation spaces exist, the agent node may randomly select one candidate isolation space from the plurality of candidate isolation spaces to move out, or may move out the candidate isolation space with the largest numerical value of the identified second field, which is not limited specifically.
Fig. 3 is a schematic overall flow chart corresponding to a resource migration method provided in an embodiment of the present invention, where the method is applied to a proxy node 110, and as shown in fig. 3, the method includes:
step 301, receiving a migration request sent by a service node, where the migration request carries an identifier of a first isolation space.
Step 302, comparing the identifier of the first isolation space with the identifier of the currently existing isolation space, and determining whether the first isolation space currently exists, if yes, executing step 303, and if not, executing step 307.
Step 303, determining whether each isolation space has an alternative isolation space whose first field of the identifier is the same as the identifier of the first isolation space, if yes, executing step 304, and if not, executing step 305, according to the identifier of each isolation space which is stored in the set position and is to be migrated but cannot be migrated quickly.
Step 304, updating the identifier of the candidate isolation space to be the identifier of the first isolation space, or deleting the second field in the identifier of the candidate isolation space, moving the candidate isolation space out of the set position, updating the value of the flag bit corresponding to the candidate isolation space to be the first value, and executing step 306.
The first value is used for indicating that the migration mode corresponding to the alternative isolation space is a common migration mode.
Step 305, creating a first isolation space, setting the value of the flag bit corresponding to the first isolation space as a first value, and executing step 306.
The first value is used for indicating that the migration mode corresponding to the first isolation space is a common migration mode.
Step 306, the network card resource of the service node is moved into the first isolation space or the alternative isolation space.
The network card resource of the service node is used to configure a first Internet Protocol (IP) address and a second IP address for the first isolation space, where the first IP address is used for communication between the first isolation space and the client 120, and the second IP address is used for communication between the first isolation space and the service node.
Step 307, the creation of the first isolated space is rejected.
Fig. 4 is a schematic overall flow chart corresponding to a resource migration method provided in an embodiment of the present invention, where the method is applied to a proxy node 110, and as shown in fig. 4, the method includes:
step 401, receiving a migration request sent by a service node, where the migration request carries an identifier of a first isolation space.
Step 402, determining whether the value of the flag bit corresponding to the first isolation space is a first value, if so, the migration mode corresponding to the first isolation space is a normal migration mode, executing step 403, if not, the migration mode corresponding to the first isolation space is a fast migration mode, and executing step 405.
Step 403, determining whether unprocessed resources exist in the first isolation space, if yes, performing step 404, and if not, performing step 409.
Step 404, for any unprocessed resource, disconnecting the protocol stack connection corresponding to the resource, and after the protocol stack data processing corresponding to the resource is completed, releasing the resource, and executing step 403.
Step 405, determining whether unprocessed resources exist in the first isolation space, if yes, executing step 406, and if not, executing step 409.
Step 406, for any unprocessed resource, determine whether the resource belongs to a non-managed resource, if yes, execute step 407, otherwise execute step 408.
Step 407, deleting the protocol stack data corresponding to the resource, disconnecting the protocol stack connection corresponding to the resource, releasing the resource, and executing step 405.
Step 408, because the protocol stack connection corresponding to the resource is disconnected and the protocol stack data corresponding to the resource cannot be operated, the resource is released after the protocol stack data corresponding to the resource is processed, and step 405 is executed.
Step 409, whether the first isolation space has the taken-over resource or not is performed, if yes, step 410 is performed, and if not, step 411 is performed.
And step 410, updating the identifier of the first isolation space, placing the first isolation space with the updated identifier at a set position, moving out the network card resource after the protocol stack data corresponding to all the taken-over resources in the first isolation space are processed, and deleting the first isolation space.
Step 411, remove the network card resource and delete the first isolation space.
In the above embodiment of the present invention, an agent node receives a migration request, where the migration request is used to migrate a first isolation space, and deletes protocol stack data corresponding to a non-managed resource and disconnects a protocol stack connection corresponding to the non-managed resource, so as to release the non-managed resource, for any non-managed resource in the first isolation space; the unmanaged resources are resources which are not disconnected from the protocol stack. In the embodiment of the invention, the protocol stack data corresponding to the unmanaged resource in the first isolation space is deleted, and the protocol stack connection corresponding to the unmanaged resource is disconnected, so that the unmanaged resource can be quickly released without waiting for the completion of the processing of the protocol stack data corresponding to the unmanaged resource and then releasing the unmanaged resource, and the resource migration efficiency can be improved.
For the above method flow, an embodiment of the present invention further provides a resource migration apparatus, and specific contents of the apparatus may be implemented with reference to the above method.
Fig. 5 is a schematic structural diagram of a resource migration apparatus according to an embodiment of the present invention, including:
a transceiver module 501, configured to receive a migration request, where the migration request is used to migrate a first isolation space;
a migration module 502, configured to delete, for any unmanaged resource in the first isolation space, protocol stack data corresponding to the unmanaged resource, and disconnect a protocol stack connection corresponding to the unmanaged resource, so as to release the unmanaged resource; the unmanaged resources are resources which are not disconnected from the protocol stack.
Optionally, the migration module 502 is further configured to, for any unmanaged resource in the first isolation space, before deleting the protocol stack data corresponding to the unmanaged resource:
and determining that the migration mode corresponding to the first isolation space is a fast migration mode.
Optionally, the migration module 502 determines the migration mode corresponding to the first isolation space by:
obtaining the value of a flag bit corresponding to the first isolation space;
and if the value of the flag bit is a first value, determining that the migration mode corresponding to the first isolation space is a common migration mode, and if the value of the flag bit is a second value, determining that the migration mode corresponding to the first isolation space is a fast migration mode.
Optionally, the migration module 502 is further configured to:
if the migration mode corresponding to the first isolation space is the common migration mode, disconnecting the protocol stack connection corresponding to the resource aiming at any resource in the first isolation space, and releasing the resource after the protocol stack data processing corresponding to the resource is completed.
Optionally, the migration module 502 is further configured to:
for any taken over resource in the first isolation space, after the protocol stack data corresponding to the taken over resource is processed, releasing the taken over resource; the taken over resource is a resource which has disconnected the protocol stack connection but has not emptied the protocol stack data.
Optionally, the migration module 502 is further configured to:
if the migration mode corresponding to the first isolation space is the fast migration mode and the first isolation space comprises the taken over resources, or the migration mode corresponding to the first isolation space is a common migration mode, updating the identifier of the first isolation space to be a first identifier; the first identifier is different from an original identifier of the first isolated space.
Optionally, after the migration module 502 updates the identifier of the first isolation space to be the first identifier, the migration module is further configured to:
moving the first isolation space to a set position; the set position is used for storing each isolation space to be migrated but which cannot be migrated quickly, and the identification of each isolation space is updated.
Optionally, the first identifier comprises a first field and a second field;
the migration module 502 is specifically configured to:
setting a first field of the first identifier as an original identifier of the first isolation space;
and according to the first fields of the identifications of the isolation spaces stored in the set positions, determining the isolation space matched with the first field of the first identification from the isolation spaces, and setting the second field of the first identification according to the second field of the identification of the matched isolation space.
Optionally, the migration module 502 is specifically configured to:
and determining the maximum numerical value in the second field of the identification of the matched isolation space, and taking the increment numerical value of the maximum numerical value as the second field.
Optionally, before the transceiver module 501 receives the emigration request, it is further configured to: receiving a migration request, wherein the migration request comprises an identifier of the first isolation space;
the migration module 502 is further configured to: if the existing isolation space does not have an isolation space with an identifier matched with the identifier of the first isolation space, determining an alternative isolation space with the identifier matched with the identifier of the first isolation space from each isolation space according to the identifier of each isolation space stored in the set position; and moving the alternative isolation space out of the set position, and updating the identifier of the alternative isolation space to be the identifier of the first isolation space.
Optionally, the migration module 502 is further configured to:
and if the set position does not store the alternative isolation space matched with the identifier of the first isolation space, creating the first isolation space, and moving the network card resource into the first isolation space.
From the above, it can be seen that: in the above embodiment of the present invention, an agent node receives a migration request, where the migration request is used to migrate a first isolation space, and deletes protocol stack data corresponding to a non-managed resource and disconnects a protocol stack connection corresponding to the non-managed resource, so as to release the non-managed resource, for any non-managed resource in the first isolation space; the unmanaged resources are resources which are not disconnected from the protocol stack. In the embodiment of the invention, the protocol stack data corresponding to the unmanaged resource in the first isolation space is deleted, and the protocol stack connection corresponding to the unmanaged resource is disconnected, so that the unmanaged resource can be quickly released without waiting for the completion of the processing of the protocol stack data corresponding to the unmanaged resource and then releasing the unmanaged resource, and the resource migration efficiency can be improved.
Based on the same inventive concept, an embodiment of the present invention further provides a computing device, as shown in fig. 6, including at least one processor 601 and a memory 602 connected to the at least one processor, where a specific connection medium between the processor 601 and the memory 602 is not limited in the embodiment of the present invention, and the processor 601 and the memory 602 are connected through a bus in fig. 6 as an example. The bus may be divided into an address bus, a data bus, a control bus, etc.
In the embodiment of the present invention, the memory 602 stores instructions executable by the at least one processor 601, and the at least one processor 601 may execute the steps included in the foregoing resource migration method by executing the instructions stored in the memory 602.
The processor 601 is a control center of the computing device, and can connect various parts of the computing device by using various interfaces and lines, and implement data processing by executing or executing instructions stored in the memory 602 and calling data stored in the memory 602. Optionally, the processor 601 may include one or more processing units, and the processor 601 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application program, and the like, and the modem processor mainly processes an issued instruction. It will be appreciated that the modem processor described above may not be integrated into the processor 601. In some embodiments, processor 601 and memory 602 may be implemented on the same chip, or in some embodiments, they may be implemented separately on separate chips.
The processor 601 may be a general-purpose processor, such as a Central Processing Unit (CPU), a digital signal processor, an Application Specific Integrated Circuit (ASIC), a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof, configured to implement or perform the methods, steps, and logic blocks disclosed in the embodiments of the present invention. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the disclosed methods in connection with the resource migration embodiments may be embodied directly in a hardware processor, or in a combination of hardware and software modules within a processor.
The memory 602, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The Memory 602 may include at least one type of storage medium, and may include, for example, a flash Memory, a hard disk, a multimedia card, a card-type Memory, a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Programmable Read Only Memory (PROM), a Read Only Memory (ROM), a charge Erasable Programmable Read Only Memory (EEPROM), a magnetic Memory, a magnetic disk, an optical disk, and so on. The memory 602 is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 602 in the embodiments of the present invention may also be circuitry or any other device capable of performing a storage function for storing program instructions and/or data.
Based on the same inventive concept, embodiments of the present invention further provide a computer-readable storage medium storing a computer program executable by a computing device, where the program, when executed on the computing device, causes the computing device to execute the resource migration method described in any of fig. 2 to fig. 4.
It should be apparent to those skilled in the art that embodiments of the present invention may be provided as a method, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (20)

1. A resource migration method is characterized in that the method is applied to a proxy node, at least one isolation space is arranged in the proxy node, the at least one isolation space corresponds to at least one service system one by one, each isolation space is connected with the corresponding service system and a client, and is used for acting data interaction between the corresponding service system and the client and isolating resources in the corresponding service system and resources in other service systems; the method comprises the following steps:
receiving a migration request, wherein the migration request is used for migrating a first isolation space;
when determining that the migration mode corresponding to the first isolation space is the fast migration mode, deleting the protocol stack data corresponding to the unmanaged resource and disconnecting the protocol stack connection corresponding to the unmanaged resource aiming at any unmanaged resource in the first isolation space so as to release the unmanaged resource; the unmanaged resources are resources which are not connected with the protocol stack;
and when determining that the migration mode corresponding to the first isolation space is a common migration mode, disconnecting the protocol stack connection corresponding to the resource aiming at any resource in the first isolation space, and releasing the resource after the protocol stack data processing corresponding to the resource is completed.
2. The method of claim 1, wherein the emigration mode corresponding to the first isolation space is determined by:
obtaining the value of a zone bit corresponding to the first isolation space;
if the value of the flag bit is a first value, determining that the migration mode corresponding to the first isolation space is the common migration mode, and if the value of the flag bit is a second value, determining that the migration mode corresponding to the first isolation space is the fast migration mode.
3. The method of claim 1, further comprising:
for any taken-over resource in the first isolation space, after the protocol stack data processing corresponding to the taken-over resource is completed, releasing the taken-over resource; the taken over resource is a resource which has disconnected the protocol stack connection but has not cleared the protocol stack data.
4. The method according to any one of claims 1 to 3, further comprising:
if the migration mode corresponding to the first isolation space is the fast migration mode and the first isolation space includes the taken over resource, or the migration mode corresponding to the first isolation space is the common migration mode, updating the identifier of the first isolation space to be the first identifier; the first identifier is different from an original identifier of the first isolated space.
5. The method of claim 4, wherein after updating the first identifier of the first isolated space to the first identifier, further comprising:
moving the first isolated space to a set position; the set position is used for storing each isolation space to be migrated but which cannot be migrated quickly, and the identification of each isolation space is updated.
6. The method of claim 5, wherein the first identifier comprises a first field and a second field;
the updating the identifier of the first isolation space to be a first identifier includes:
setting a first field of the first identifier as an original identifier of the first isolation space;
and according to the first fields of the identifications of the isolation spaces stored in the set positions, determining the isolation space matched with the first field of the first identification from the isolation spaces, and setting the second field of the first identification according to the second field of the identification of the matched isolation space.
7. The method of claim 6, wherein setting the second field of the first identifier according to the second field of the identifier of the matching isolated space comprises:
determining a maximum value in a second field of the identity of the matched isolated space, and taking an incremental value of the maximum value as the second field.
8. The method of claim 5, wherein before receiving the emigration request, further comprising:
receiving a migration request, wherein the migration request comprises an identifier of the first isolation space;
if the existing isolation space does not have an isolation space with an identifier matched with the identifier of the first isolation space, determining an alternative isolation space with the identifier matched with the identifier of the first isolation space from each isolation space according to the identifier of each isolation space stored in the set position;
and moving the alternative isolation space out of the set position, and updating the identifier of the alternative isolation space to be the identifier of the first isolation space.
9. The method of claim 8, further comprising:
and if the set position does not store the alternative isolation space matched with the first field of the identifier and the identifier of the first isolation space, creating the first isolation space, and moving the network card resource into the first isolation space.
10. An apparatus for resource migration, the apparatus comprising:
the receiving and sending module is used for receiving a migration request, and the migration request is used for migrating the first isolation space;
the migration module is configured to delete, for any unmanaged resource in the first isolation space, protocol stack data corresponding to the unmanaged resource and disconnect a protocol stack connection corresponding to the unmanaged resource to release the unmanaged resource when it is determined that the migration mode corresponding to the first isolation space is the fast migration mode; the unmanaged resources are resources which are not disconnected from the protocol stack connection; when the migration mode corresponding to the first isolation space is determined to be a common migration mode, disconnecting the protocol stack connection corresponding to the resource aiming at any resource in the first isolation space, and releasing the resource after the protocol stack data processing corresponding to the resource is completed;
the first isolation space is arranged in an agent node, at least one isolation space is arranged in the agent node, the at least one isolation space corresponds to at least one service system one by one, each isolation space is connected with the corresponding service system and a client, and is used for acting data interaction between the corresponding service system and the client and isolating resources in the corresponding service system and resources in other service systems.
11. The apparatus of claim 10, wherein the migration module determines the migration pattern corresponding to the first isolation space by:
obtaining the value of a zone bit corresponding to the first isolation space;
if the value of the flag bit is a first value, determining that the migration mode corresponding to the first isolation space is the common migration mode, and if the value of the flag bit is a second value, determining that the migration mode corresponding to the first isolation space is the fast migration mode.
12. The apparatus of claim 10, wherein the migration module is further configured to:
for any taken-over resource in the first isolation space, after the protocol stack data processing corresponding to the taken-over resource is completed, releasing the taken-over resource; the taken over resource is a resource which has disconnected the protocol stack connection but has not cleared the protocol stack data.
13. The apparatus of any of claims 10 to 12, wherein the migration module is further configured to:
if the migration mode corresponding to the first isolation space is the fast migration mode and the first isolation space includes the taken over resource, or the migration mode corresponding to the first isolation space is the common migration mode, updating the identifier of the first isolation space to be the first identifier; the first identifier is different from an original identifier of the first isolated space.
14. The apparatus of claim 13, wherein after the migration module updates the identifier of the first isolation space to be the first identifier, the migration module is further configured to:
moving the first isolated space to a set position; the set position is used for storing each isolation space to be migrated but which cannot be migrated quickly, and the identification of each isolation space is updated.
15. The apparatus of claim 14, wherein the first identifier comprises a first field and a second field;
the migration module is specifically configured to:
setting a first field of the first identifier as an original identifier of the first isolation space;
and according to the first fields of the identifications of the isolation spaces stored in the set positions, determining the isolation space matched with the first field of the first identification from the isolation spaces, and setting the second field of the first identification according to the second field of the identification of the matched isolation space.
16. The apparatus according to claim 15, wherein the migration module is specifically configured to:
determining a maximum value in a second field of the identity of the matched isolated space, and taking an incremental value of the maximum value as the second field.
17. The apparatus of claim 15, wherein before the transceiver module receives the emigration request, the transceiver module is further configured to: receiving a migration request, wherein the migration request comprises an identifier of the first isolation space;
the migration module is further to: if the existing isolation space does not have an isolation space with an identifier matched with the identifier of the first isolation space, determining an alternative isolation space with the identifier matched with the identifier of the first isolation space from each isolation space according to the identifier of each isolation space stored in the set position; and moving the candidate isolation space out of the set position, and updating the identifier of the candidate isolation space to be the identifier of the first isolation space.
18. The apparatus of claim 17, wherein the migration module is further configured to:
and if the set position does not store the alternative isolation space matched with the identifier of the first isolation space, creating the first isolation space, and moving the network card resource into the first isolation space.
19. A computing device comprising at least one processor and at least one memory, wherein the memory stores a computer program that, when executed by the processor, causes the processor to perform the method of any one of claims 1 to 9.
20. A computer-readable storage medium, having stored thereon a computer program executable by a computing device, the program, when run on the computing device, causing the computing device to perform the method of any one of claims 1 to 9.
CN201911424985.XA 2019-12-31 2019-12-31 Resource migration method and device Active CN111240833B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911424985.XA CN111240833B (en) 2019-12-31 2019-12-31 Resource migration method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911424985.XA CN111240833B (en) 2019-12-31 2019-12-31 Resource migration method and device

Publications (2)

Publication Number Publication Date
CN111240833A CN111240833A (en) 2020-06-05
CN111240833B true CN111240833B (en) 2023-03-17

Family

ID=70863872

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911424985.XA Active CN111240833B (en) 2019-12-31 2019-12-31 Resource migration method and device

Country Status (1)

Country Link
CN (1) CN111240833B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015143904A1 (en) * 2014-03-28 2015-10-01 华为技术有限公司 Method for managing parallel user mode protocol stacks and protocol stack system
CN105007272A (en) * 2015-07-21 2015-10-28 陈巨根 Information exchange system with safety isolation
CN105790985A (en) * 2014-12-23 2016-07-20 中兴通讯股份有限公司 Data switching method, first device, second device and device
CN105933383A (en) * 2016-04-05 2016-09-07 西安电子科技大学 Virtualization carrier wave migration method based on L3 and L2 layers protocol
CN108737465A (en) * 2017-04-19 2018-11-02 中兴通讯股份有限公司 A kind of User Agreement stack operation method and device
CN109582459A (en) * 2017-09-29 2019-04-05 阿里巴巴集团控股有限公司 The method and device that the trustship process of application is migrated
CN110383787A (en) * 2017-03-31 2019-10-25 华为技术有限公司 A kind of data migration method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110153715A1 (en) * 2009-12-17 2011-06-23 Microsoft Corporation Lightweight service migration

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015143904A1 (en) * 2014-03-28 2015-10-01 华为技术有限公司 Method for managing parallel user mode protocol stacks and protocol stack system
CN105790985A (en) * 2014-12-23 2016-07-20 中兴通讯股份有限公司 Data switching method, first device, second device and device
CN105007272A (en) * 2015-07-21 2015-10-28 陈巨根 Information exchange system with safety isolation
CN105933383A (en) * 2016-04-05 2016-09-07 西安电子科技大学 Virtualization carrier wave migration method based on L3 and L2 layers protocol
CN110383787A (en) * 2017-03-31 2019-10-25 华为技术有限公司 A kind of data migration method and device
CN108737465A (en) * 2017-04-19 2018-11-02 中兴通讯股份有限公司 A kind of User Agreement stack operation method and device
CN109582459A (en) * 2017-09-29 2019-04-05 阿里巴巴集团控股有限公司 The method and device that the trustship process of application is migrated

Also Published As

Publication number Publication date
CN111240833A (en) 2020-06-05

Similar Documents

Publication Publication Date Title
US10785655B2 (en) Telecommunication network utilizing network slice information
EP3800926B1 (en) Alarm method and device
US10667123B2 (en) Method for installing subscription profile, terminal, and server
CN107005426B (en) Method and device for managing life cycle of virtual network function
CN110225078B (en) Application service updating method, system and terminal equipment
CN112470119B (en) Service upgrading method and device in distributed system and distributed system
CN108319492B (en) Method, device and system for resetting physical machine
WO2020232887A1 (en) Configuration modification method and apparatus for container application, and computer device and storage medium
EP3108678A1 (en) System and method for handling inactive sim cards
CN110990415A (en) Data processing method and device, electronic equipment and storage medium
CN113127023B (en) Service upgrading method, device and system
CN106603125B (en) Method and device for data interaction with Bluetooth equipment
US9794351B2 (en) Distributed management with embedded agents in enterprise apps
US10637748B2 (en) Method and apparatus for establishing interface between VNFMS, and system
CN111240833B (en) Resource migration method and device
CN109783196B (en) Virtual machine migration method and device
CN113918268A (en) Multi-tenant management method and device
CN111399866B (en) Updating method and device of VNF (virtual network function) package
CN110308914B (en) Upgrade processing method, device, equipment, system and computer readable storage medium
CN116483477A (en) API calling method and device
CN107431636B (en) Control of ad hoc network functions
CN110362350A (en) Manage multiple operating systems in integrated circuit card
CN114780177A (en) Transaction execution method and device, storage medium and electronic device
CN111857941B (en) Security policy management method and device
CN109901933B (en) Operation method and device of business system, storage medium and electronic device

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