Unbinding processing method and device, equipment and storage medium

By splitting the unbinding operation of the load balancer and the elastic public network IP and the unbinding operation of the monitoring device and the elastic public network IP into two independent stages, the problem of data processing peaks in the prior art is solved and the stability of the system is improved.

CN120455274AActive Publication Date: 2025-08-08BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510804917.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-16
Publication Date
2025-08-08
Estimated Expiration
2045-06-16

AI Technical Summary

Technical Problem

In the prior art, the synchronous unbinding operation of load balancers, monitoring devices and elastic public network IP causes data processing tasks to be highly concentrated in a short period of time, forming data processing peaks, affecting system stability.

Method used

The unbinding operation of the load balancer and the elastic public network IP and the unbinding operation of the monitoring device and the elastic public network IP are divided into two independent stages. First, the relationship between the load balancer and the elastic public network IP is unbind, and then the relationship between the monitoring device and the elastic public network IP is unbind, and the corresponding target operation is performed at each stage.

Benefits of technology

It avoids the generation of a large number of concurrent tasks in an instant, improves the stability of the system, and reduces sudden pressure on system resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120455274A_ABST
    Figure CN120455274A_ABST
Patent Text Reader

Abstract

The invention relates to an unbinding processing method and device, equipment and a storage medium, and the method comprises the steps: receiving an unbinding request which indicates target equipment to be unbound with an elastic public network IP, the target equipment comprises a load balancer and monitoring equipment, and the unbinding request carries an equipment identifier of the target equipment; executing a first unbinding operation of the load balancer and an elastic public network IP according to the device identifier and the elastic public network IP; after the execution of the first unbinding operation is completed, controlling the load balancer to execute a first target operation; executing a second unbinding operation between the monitoring device and an elastic public network IP according to the device identifier and the elastic public network IP; and after the second unbinding operation is executed, controlling the monitoring equipment to execute a second target operation. According to the method, the originally concentrated unbinding operation is divided into two independent stages, a large number of concurrent tasks are prevented from being generated instantly, and the stability of the system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an unbinding processing method, apparatus, device, and storage medium. Background Art

[0002] In the cloud computing and network services sector, binding and unbinding Elastic Public IPs (EIPs) to load balancers and monitoring devices is a crucial mechanism for ensuring flexible network resource allocation. As dynamically allocated public network address resources, EIPs can be quickly associated with load balancers to provide external services, while load balancers distribute traffic through monitoring devices. The binding relationship between these three directly impacts service access paths and resource utilization.

[0003] In related technologies, the network management system adopts a synchronous unbinding strategy, that is, it simultaneously unbinds the association between the load balancer, monitoring device and EIP, and centrally executes subsequent processing tasks after the entire unbinding process is completed.

[0004] However, since subsequent processing logic is executed only after all unbinding operations are completed, data processing tasks are highly concentrated in a short period of time, resulting in a data processing peak. This instantaneous surge in data processing volume can cause sudden pressure on system resources and even seriously affect system operation. Summary of the Invention

[0005] The present application provides an unbinding processing method, apparatus, device and storage medium, which can first unbind the association between the load balancer and the elastic public IP, and then unbind the association between the monitoring device and the elastic public IP. After unbinding the association between the load balancer and the elastic public IP, the relevant operations after the load balancer and the elastic public IP are unbound are performed. After unbinding the association between the monitoring device and the elastic public IP, the relevant operations after the monitoring device and the elastic public IP are unbound are performed. It can be seen that this solution splits the originally centralized unbinding operation into two independent stages, avoiding the instantaneous generation of a large number of concurrent tasks and improving the stability of the system.

[0006] In a first aspect, the present application provides an unbinding processing method, the method comprising:

[0007] Receive an unbinding request instructing a target device to unbind from an elastic public IP address, the target device including a load balancer and a monitoring device, the unbinding request carrying a device identifier of the target device;

[0008] Perform a first unbinding operation between the load balancer and the elastic public IP according to the device identifier and the elastic public IP;

[0009] After the first unbinding operation is completed, controlling the load balancer to perform a first target operation;

[0010] Perform a second unbinding operation between the monitoring device and the elastic public IP according to the device identifier and the elastic public IP;

[0011] After the second unbinding operation is completed, the monitoring device is controlled to perform a second target operation.

[0012] Optionally, when the device identifier includes the first device identifier corresponding to the monitoring device, performing the second unbinding operation between the monitoring device and the elastic public IP address according to the device identifier and the elastic public IP address includes:

[0013] Determine an asynchronous unbinding task corresponding to the monitoring device according to the first device identifier corresponding to the monitoring device and the elastic public IP address;

[0014] According to the preset rules, the asynchronous unbinding task corresponding to the monitoring device is added to the task cache queue;

[0015] The asynchronous unbinding task is extracted from the task cache queue, and a second unbinding operation between the monitoring device and the elastic public IP is performed.

[0016] Optionally, after determining the asynchronous unbinding task corresponding to the monitoring device, the method further includes:

[0017] Obtaining a first task identifier corresponding to the asynchronous unbinding task;

[0018] Detecting whether there is a task record corresponding to the first task identifier in the database;

[0019] When there is no task record corresponding to the first task identifier in the database, generating a task record according to the first task identifier, a preset first state and other relevant information;

[0020] The task record is stored in the database.

[0021] Optionally, extracting the asynchronous unbinding task from the task cache queue and performing a second unbinding operation between the monitoring device and the elastic public IP address includes:

[0022] Extract the asynchronous unbinding task from the task cache queue to obtain a pending asynchronous unbinding task;

[0023] According to the second task identifier corresponding to the pending asynchronous unbinding task, searching the database for a task status corresponding to the second task identifier;

[0024] When the task state is the first state, a second unbinding operation between the monitoring device and the elastic public IP is performed according to the pending asynchronous unbinding task.

[0025] Optionally, the method further includes:

[0026] In the database, obtaining the update time corresponding to each task record;

[0027] According to the update time corresponding to each task record, determine the preset task record with the earliest update time;

[0028] When the target task record meets the preset conditions, a cleanup notification is generated to enable relevant personnel to clean up the target task record.

[0029] Optionally, when the device identifier includes a second device identifier corresponding to the load balancer, performing a first unbinding operation between the load balancer and the elastic public IP address based on the device identifier and the elastic public IP address includes:

[0030] According to the second device identifier and the elastic public IP, searching for an association between the load balancer and the elastic public IP;

[0031] The association relationship is deleted to perform a first unbinding operation between the load balancer and the elastic public IP.

[0032] Optionally, the method further includes:

[0033] When the asynchronous unbinding task fails to execute, searching the database for a task record corresponding to the third task identifier according to the third task identifier corresponding to the asynchronous unbinding task;

[0034] The task status in the task record is updated to a second status.

[0035] In a second aspect, the present application provides an unbinding processing device, the device comprising:

[0036] a receiving unit, configured to receive an unbinding request instructing a target device to unbind from an elastic public IP, the target device including a load balancer and a monitoring device, the unbinding request carrying a device identifier of the target device;

[0037] A first execution unit, configured to perform a first unbinding operation between the load balancer and the elastic public IP according to the device identifier and the elastic public IP;

[0038] A second execution unit, configured to control the load balancer to execute a first target operation after the first unbinding operation is completed;

[0039] A third execution unit is configured to perform a second unbinding operation between the monitoring device and the elastic public IP according to the device identifier and the elastic public IP;

[0040] The fourth execution unit is configured to control the monitoring device to execute a second target operation after the second unbinding operation is completed.

[0041] Optionally, when the device identifier includes the first device identifier corresponding to the monitoring device, the third execution unit is configured to:

[0042] Determine an asynchronous unbinding task corresponding to the monitoring device according to the first device identifier corresponding to the monitoring device and the elastic public IP address;

[0043] According to the preset rules, the asynchronous unbinding task corresponding to the monitoring device is added to the task cache queue;

[0044] The asynchronous unbinding task is extracted from the task cache queue, and a second unbinding operation between the monitoring device and the elastic public IP is performed.

[0045] Optionally, after determining the asynchronous unbinding task corresponding to the monitoring device, the apparatus further includes a generating unit, the generating unit being configured to:

[0046] Obtaining a first task identifier corresponding to the asynchronous unbinding task;

[0047] Detecting whether there is a task record corresponding to the first task identifier in the database;

[0048] When there is no task record corresponding to the first task identifier in the database, generating a task record according to the first task identifier, a preset first state and other relevant information;

[0049] The task record is stored in the database.

[0050] Optionally, the third execution unit is configured to:

[0051] Extract the asynchronous unbinding task from the task cache queue to obtain a pending asynchronous unbinding task;

[0052] According to the second task identifier corresponding to the pending asynchronous unbinding task, searching the database for a task status corresponding to the second task identifier;

[0053] When the task state is the first state, a second unbinding operation between the monitoring device and the elastic public IP is performed according to the pending asynchronous unbinding task.

[0054] Optionally, the device further includes a detection unit, wherein the detection unit is configured to:

[0055] In the database, obtaining the update time corresponding to each task record;

[0056] According to the update time corresponding to each task record, determine the preset task record with the earliest update time;

[0057] When the target task record meets the preset conditions, a cleanup notification is generated to enable relevant personnel to clean up the target task record.

[0058] Optionally, when the device identifier includes a second device identifier corresponding to the load balancer, the first execution unit is configured to:

[0059] According to the second device identifier and the elastic public IP, searching for an association between the load balancer and the elastic public IP;

[0060] The association relationship is deleted to perform a first unbinding operation between the load balancer and the elastic public IP.

[0061] Optionally, the device further includes an updating unit, configured to:

[0062] When the asynchronous unbinding task fails to execute, searching the database for a task record corresponding to the third task identifier according to the third task identifier corresponding to the asynchronous unbinding task;

[0063] The task status in the task record is updated to a second status.

[0064] In a third aspect, the present application provides an unbinding processing device, comprising: at least one communication interface; at least one bus connected to the at least one communication interface; at least one processor connected to the at least one bus; and at least one memory connected to the at least one bus, wherein the processor is configured to:

[0065] Receive an unbinding request instructing a target device to unbind from an elastic public IP address, the target device including a load balancer and a monitoring device, the unbinding request carrying a device identifier of the target device;

[0066] Perform a first unbinding operation between the load balancer and the elastic public IP according to the device identifier and the elastic public IP;

[0067] After the first unbinding operation is completed, controlling the load balancer to perform a first target operation;

[0068] Perform a second unbinding operation between the monitoring device and the elastic public IP according to the device identifier and the elastic public IP;

[0069] After the second unbinding operation is completed, the monitoring device is controlled to perform a second target operation.

[0070] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the above-mentioned unbinding processing method when executed by a processor.

[0071] The above technical solution provided by the embodiment of the present application has the following advantages compared with the prior art: In the embodiment of the present application, an unbinding request is received to instruct the target device to unbind from the elastic public IP, the target device includes a load balancer and a monitoring device, and the unbinding request carries the device identifier of the target device; according to the device identifier and the elastic public IP, the first unbinding operation between the load balancer and the elastic public IP is performed; after the first unbinding operation is completed, the load balancer is controlled to perform the first target operation; according to the device identifier and the elastic public IP, the second unbinding operation between the monitoring device and the elastic public IP is performed; after the second unbinding operation is completed, the monitoring device is controlled to perform the second target operation. It can be seen that the present application can first unbind the association between the load balancer and the elastic public IP, and then unbind the association between the monitoring device and the elastic public IP. And after unbinding the association between the load balancer and the elastic public IP, the relevant operations after the load balancer and the elastic public IP are unbound are performed, and after unbinding the association between the monitoring device and the elastic public IP, the relevant operations after the monitoring device and the elastic public IP are unbound are performed. It can be seen that this solution splits the originally centralized unbinding operation into two independent stages, avoiding the instantaneous generation of a large number of concurrent tasks and improving the stability of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0073] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0074] One or more embodiments are exemplarily illustrated by pictures in the corresponding drawings. These exemplifications do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings are represented as similar elements. Unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0075] Figure 1 A flowchart of an unbinding processing method provided in an embodiment of the present application;

[0076] Figure 2 A flowchart of a method for executing a second unbinding operation provided in an embodiment of the present application;

[0077] Figure 3 A flowchart of a task record generation method provided in an embodiment of the present application;

[0078] Figure 4 A flowchart of a task processing method provided in an embodiment of the present application;

[0079] Figure 5 A flowchart of a task record detection method provided in an embodiment of the present application;

[0080] Figure 6 A flowchart of a method for performing a first unbinding operation provided in an embodiment of the present application;

[0081] Figure 7 A flowchart of a method for modifying task status provided in an embodiment of the present application;

[0082] Figure 8 A schematic diagram of a process flow of an unbinding processing device provided in an embodiment of the present application;

[0083] Figure 9 A schematic diagram of an unbinding processing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0084] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0085] The disclosure below provides many different embodiments or examples for implementing different configurations of the present invention. To simplify the disclosure of the present invention, the components and configurations of specific examples are described below. Of course, these are merely examples and are not intended to limit the present invention. In addition, the present invention may repeat reference numerals and / or letters in different examples. Such repetition is for the purpose of simplicity and clarity and does not in itself indicate the relationship between the various embodiments and / or configurations discussed.

[0086] In the cloud computing and network services sector, binding and unbinding Elastic Public IPs (EIPs) to load balancers and monitoring devices is a crucial mechanism for ensuring flexible network resource allocation. As dynamically allocated public network address resources, EIPs can be quickly associated with load balancers to provide external services, while load balancers distribute traffic through monitoring devices. The binding relationship between these three directly impacts service access paths and resource utilization. In related technologies, network management systems employ a synchronous unbinding strategy, simultaneously unbinding the associations between the load balancer, monitoring device, and EIP, and centralizing subsequent processing tasks after all unbinding processes are complete. However, since subsequent processing logic is executed only after all unbinding operations are complete, data processing tasks can be highly concentrated within a short period of time, resulting in data processing spikes. This sudden surge in data processing can place sudden pressure on system resources, leading to poor system stability.

[0087] In order to solve the above problems, an embodiment of the present application provides an unbinding processing method, which can first unbind the association between the load balancer and the elastic public IP, and then unbind the association between the monitoring device and the elastic public IP. After unbinding the association between the load balancer and the elastic public IP, the relevant operations after the load balancer and the elastic public IP are unbinded are performed. After unbinding the association between the monitoring device and the elastic public IP, the relevant operations after the monitoring device and the elastic public IP are unbinded are performed. It can be seen that this solution splits the originally centralized unbinding operation into two independent stages, avoiding the instantaneous generation of a large number of concurrent tasks and improving the stability of the system. This method is as follows Figure 1 As shown, the specific steps include:

[0088] Step 101: Receive an unbinding request instructing a target device to unbind an elastic public IP address.

[0089] The target device includes a load balancer and at least one monitoring device, and the unbinding request includes a device identifier of the target device. Since the target device includes the load balancer and the monitoring device, the device identifier of the target device includes a first device identifier corresponding to the monitoring device and a second device identifier corresponding to the load balancer.

[0090] In this step, the unbinding request can be executed in a variety of ways. It can be performed manually, such as by an operations and maintenance person executing the unbinding request through the console. Alternatively, the system can automatically execute the unbinding request, for example, to prevent the spread of a network attack and automatically unbind the load balancer from the elastic public IP address. When the system receives the unbinding request instructing the target device to unbind from the elastic public IP address, it executes the subsequent steps.

[0091] It should be noted that the executor of this application can be the resource management module of the cloud computing platform, through which the relevant configuration data is modified, or it can be a task scheduling system, which can also modify the relevant configuration data, or it can be other systems, which are not limited here.

[0092] Step 102: Perform a first unbinding operation between the load balancer and the elastic public IP according to the device identifier and the elastic public IP.

[0093] In this step, the association relationship between the load balancer and the elastic public IP may be in the configuration file or in the database. Therefore, it is necessary to search the configuration file and the database. The specific steps are: for the database, fill the second device identifier and elastic public IP corresponding to the load balancer into the query statement template, generate a query statement, and use the query statement to obtain the association relationship between the load balancer and the elastic public IP. For the configuration file, use the file reading function to parse and read the relevant fields therein, and based on the second device identifier and elastic public IP, extract the association relationship between the load balancer and the elastic public IP in the relevant fields. After obtaining the association relationship, the association relationship can be deleted. In the above manner, the association relationship between the load balancer and the elastic public IP is released.

[0094] Step 103: After the first unbinding operation is completed, control the load balancer to perform the first target operation.

[0095] The first target operation is the supporting processing flow after the load balancer is unbound from the elastic public IP. For example, the first target operation includes a series of operations such as port resource release, routing table update, and session state clearing. Port resource release refers to unbinding the load balancer's listening port from the EIP to prevent the port from being invalidly occupied; routing table update refers to removing the forwarding rules associated with the EIP from the load balancer's routing configuration and synchronizing the routing links to the backend server group; session state clearing refers to terminating all client connection sessions established through the EIP and releasing the connection metadata cached in memory.

[0096] In this step, it is detected whether the first unbinding operation is completed. After the first unbinding operation is completed, the first target operation corresponding to the monitoring device is executed.

[0097] It should be noted that after the first unbinding operation is completed, the first target operation corresponding to the load balancer can be executed first, or step 104 can be executed first, or the first target operation corresponding to the load balancer and step 104 can be executed at the same time, which is not limited here.

[0098] Step 104: Execute a second unbinding operation between the monitoring device and the elastic public IP according to the device identifier and the elastic public IP.

[0099] In this step, the association relationship between the monitoring device and the elastic public IP may be in the configuration file or in the database. Therefore, it is necessary to search the configuration file and the database. The specific steps are: for the database, fill the first device identifier and the elastic public IP corresponding to the monitoring device into the query statement template, generate a query statement, and use the query statement to obtain the association relationship between the monitoring device and the elastic public IP. For the configuration file, use the file reading function to parse and read the relevant fields therein, and based on the first device identifier and the elastic public IP, extract the association relationship between the monitoring device and the elastic public IP in the relevant fields. After obtaining the association relationship, the association relationship can be deleted, thereby releasing the association relationship between the monitoring device and the elastic public IP.

[0100] Step 105: After the second unbinding operation is completed, control the monitoring device to perform the second target operation.

[0101] The second target operation refers to the associated processing flow after the listener device is unbound from the elastic public IP. Specifically, the first target operation is the subsequent processing performed on the listener after the listener device is unbound from the EIP. For example, the first target operation includes a series of operations such as resetting the listener status, releasing port resources, and clearing configuration parameters. Resetting the listener status involves updating the listener from "Running" to "Stopped," terminating traffic reception and forwarding; releasing port resources involves reclaiming the transport layer port occupied by the listener and unbinding the port from the EIP; and clearing configuration parameters involves deleting metadata such as routing rules and health check rules associated with the original EIP in the listener configuration.

[0102] In this step, it is detected whether the second unbinding operation is completed. After the second unbinding operation is completed, the second target operation corresponding to the monitoring device is executed.

[0103] In an embodiment of the present application, an unbinding request is received to instruct the target device to unbind from the elastic public IP, the target device includes a load balancer and a monitoring device, and the unbinding request carries the device identifier of the target device; according to the device identifier and the elastic public IP, a first unbinding operation is performed between the load balancer and the elastic public IP; after the first unbinding operation is completed, the load balancer is controlled to perform the first target operation; according to the device identifier and the elastic public IP, a second unbinding operation is performed between the monitoring device and the elastic public IP; after the second unbinding operation is completed, the monitoring device is controlled to perform the second target operation. It can be seen that the present application can first unbind the association between the load balancer and the elastic public IP, and then unbind the association between the monitoring device and the elastic public IP. After unbinding the association between the load balancer and the elastic public IP, the relevant operations after the load balancer and the elastic public IP are unbinded are performed. After unbinding the association between the monitoring device and the elastic public IP, the relevant operations after the monitoring device and the elastic public IP are unbound are performed. It can be seen that this solution splits the originally centralized unbinding operation into two independent stages, avoiding the instantaneous generation of a large number of concurrent tasks and improving the stability of the system.

[0104] In an embodiment of the present application, when the device identifier includes the first device identifier corresponding to the monitoring device, an asynchronous unbinding task can be generated based on the first device identifier and the elastic public IP, and added to the task cache queue, so as to perform the second unbinding operation between the monitoring device and the elastic public IP based on the task cache queue, thereby ensuring the orderly execution of the task. Therefore, an embodiment of the present application provides a method for executing a second unbinding operation, which is as follows: Figure 2 As shown, the specific steps include:

[0105] Step 201: Determine an asynchronous unbinding task corresponding to the monitoring device according to the first device identifier and the elastic public IP address corresponding to the monitoring device.

[0106] In this step, the first device identifier of the monitoring device is extracted from the unbinding request, and the elastic public network IP, the first device identifier and other key information are combined to obtain structured data, thereby generating an asynchronous unbinding task corresponding to the monitoring device.

[0107] Among them, other key information includes key data such as task type and number of retries.

[0108] Step 202: Add the asynchronous unbinding task corresponding to the monitoring device to the task cache queue according to the preset rules.

[0109] In this step, there can be one or more task cache queues, such as a high-priority queue, a long-time queue, etc. When there is only one task cache queue, the generated asynchronous unbinding task can be directly added to the task cache queue. When there are multiple task cache queues, the attribute information of the asynchronous unbinding task can be obtained, and then the corresponding task cache queue can be searched based on the attribute information, and the asynchronous unbinding task can be added to the task cache queue.

[0110] Attribute information can include key parameters such as task priority and duration. For example, priority can be categorized as urgent, high, medium, and low, and duration can be estimated based on historical data into short (<100ms), medium (100ms-1s), and long (>1s) intervals.

[0111] Step 203: extract the asynchronous unbinding task from the task cache queue and perform the second unbinding operation between the monitoring device and the elastic public IP.

[0112] In this step, the system reads asynchronous unbinding tasks from the task cache queue according to a preset policy, for example, based on a first-in, first-out principle. For each task, the system analyzes the device ID and Elastic Public IP address within the task to find the association between the corresponding monitoring device and the EIP. The system then proactively deletes the association, ultimately unbinding the monitoring device from the EIP.

[0113] In an embodiment of the present application, when adding an asynchronous unbinding task to a task cache queue, it is also necessary to obtain the first task identifier corresponding to the asynchronous unbinding task, and then detect whether the database has a task record corresponding to the first task identifier based on the task identifier. If it exists, no processing is performed. If it does not exist, it is necessary to generate a task record based on the first task identifier, task related information, and the first state, so that the corresponding task record can be queried based on the first task identifier. Therefore, an embodiment of the present application provides a task record generation method, which is as follows: Figure 3 As shown, the specific steps include:

[0114] Step 301: Obtain a first task identifier corresponding to the asynchronous unbinding task.

[0115] In this step, the unbinding request also includes a task identifier, which can be a UUID submitted by the user or a temporary ID generated by the system. Therefore, the unbinding request can be parsed to obtain the first task identifier corresponding to the asynchronous unbinding task.

[0116] Among them, UUID (Universally Unique Identifier) is a 128-bit digital identifier generated by an algorithm, which is used to identify information in a computer system to ensure uniqueness in time and space.

[0117] Step 302: Check whether there is a task record corresponding to the first task identifier in the database.

[0118] Among them, the task record includes at least the task identifier, status information and other relevant information. The status information can be pending, executing, success and error. Among them, when the status information of a task is pending, the task is in the queue waiting for execution. When the status information of a task is executing, the task is in the execution stage. When the status information of a task is success, the task has been successfully executed. When the status information of a task is error, the task is in the execution failure stage. Other relevant information includes key data other than the task identifier and status information, such as elastic public network IP address, monitoring device identifier, operation type, execution source, etc.

[0119] In this step, the first task identifier is compared with the task identifiers in the existing task records. If there is a task identifier that matches the comparison, it is determined that a task record corresponding to the first task identifier already exists in the database. If there is no task identifier that matches the comparison, it is determined that there is no task record corresponding to the first task identifier in the database.

[0120] Step 303: When there is no task record corresponding to the first task identifier in the database, a task record is generated according to the first task identifier, the preset first state and other relevant information.

[0121] The first status information is pending, which means that the task is in the queue waiting for execution.

[0122] In this step, if the task record corresponding to the first task identifier does not exist in the database, other relevant information is parsed from the asynchronous unbinding task. Since the task has not yet entered the execution phase, the status information is set to the first state, clearly indicating that the task is currently in the queue waiting state. The first task identifier, the first state, and other extracted relevant information are then structured and integrated to generate a complete task record.

[0123] Step 304: Store the task record in the database.

[0124] In this step, the task records are persistently stored in the database.

[0125] In the embodiment of the present application, before executing the asynchronous unbinding task in the task cache queue, the system needs to first obtain the real-time status of the task and decide whether to execute the execution logic through the status judgment mechanism. For example, if the task status is "pending", the second unbinding operation is executed immediately. Therefore, the embodiment of the present application provides a task processing method, which is as follows: Figure 4 As shown, the specific steps include:

[0126] Step 401: extract the asynchronous unbinding task from the task cache queue to obtain the asynchronous unbinding task to be processed.

[0127] In this step, the asynchronous unbinding task can be extracted from the head of the task cache queue in a first-in-first-out order and determined as the asynchronous unbinding task to be processed. Alternatively, the asynchronous unbinding task to be processed can be extracted from the task cache queue according to other strategies.

[0128] Step 402: According to the second task identifier corresponding to the asynchronous unbinding task to be processed, the task status corresponding to the second task identifier is searched in the database.

[0129] In this step, the pre-assigned unique identifier is parsed from the pending asynchronous unbinding task and used as the second task identifier. The task record corresponding to the second task identifier is then searched in the database, and the task status is retrieved from the task record. This task status is the task status corresponding to the second task identifier.

[0130] Step 403: When the task status is the first status, a second unbinding operation between the monitoring device and the elastic public IP is performed according to the pending asynchronous unbinding task.

[0131] In this step, it is detected whether the task status determined in step 402 is the first state. When the task status is the first state, it indicates that the asynchronous unbinding task to be processed has not yet entered the execution stage and is in the ready state. At this time, the execution logic can continue to be executed. Therefore, the first device identifier and elastic public IP can be obtained in the asynchronous unbinding task. According to the device identifier and elastic public IP, the corresponding association relationship is found and the association relationship is deleted to unbind the monitoring device and the elastic public IP.

[0132] In the embodiment of the present application, in order to ensure the validity and data quality of the task records in the database, it is necessary to regularly clean up the expired records that have no corresponding running tasks. Such expired records have existed for too long and have no corresponding tasks. Therefore, it is possible to detect whether such task records exist in the database, and clean up such task records if they exist. Therefore, the embodiment of the present application provides a task record detection method, which is as follows: Figure 5 As shown, the specific steps include:

[0133] Step 501: Obtain the update time corresponding to each task record in the database.

[0134] The update time can be flexibly defined according to actual business needs, that is, it can be the time corresponding to the status update of the task record, or the creation time of the task record.

[0135] In this step, each task record also includes an update time, so the update time corresponding to each task record can be obtained in each task record.

[0136] Step 502: Determine the preset task record with the earliest update time based on the update time corresponding to each task record.

[0137] In this step, task records are sorted in ascending order based on their update time, generating an ordered sequence of task records. A preset number of task records ranked near the top of the sequence are then extracted and identified as target task records, allowing for prioritization of early tasks or batch data cleanup.

[0138] Step 503: When the target task record meets the preset conditions, a cleanup notification is generated to enable relevant personnel to clean up the target task record.

[0139] The preset condition can be flexibly defined according to actual business needs. It can be that there is no corresponding task record for the task, or there is no corresponding task record for the task and the existence time of the task record is greater than the preset time.

[0140] In this step, if the preset condition is that the corresponding task record does not exist, the task ID corresponding to the target task record can be first determined, and the corresponding task can be searched based on the task ID. If the corresponding task does not exist, the target task record is determined to meet the preset condition. If the corresponding task exists, the target task record is determined to not meet the preset condition. If the target task record meets the preset condition, a cleanup notice is generated based on the target task record's task ID, prompting relevant personnel to clean up the target task record.

[0141] In an embodiment of the present application, when the device identifier includes a second device identifier corresponding to the load balancer, the association relationship can be deleted in the database and configuration file based on the second device identifier and the elastic public IP to unbind the association relationship between the load balancer and the elastic public IP. Therefore, an embodiment of the present application provides a first unbinding operation execution method, which is as follows: Figure 6 As shown, the specific steps include:

[0142] Step 601: Find the association between the load balancer and the elastic public IP according to the second device identifier and the elastic public IP.

[0143] In this step, the load balancer configuration file is typically stored within the load balancer. Therefore, a preset API is called to retrieve the load balancer configuration file. The association between the load balancer and the EIP is then searched based on the second device identifier and the EIP. A corresponding query statement is generated based on the second device identifier and the EIP. This query statement is then used to search the database for the association between the load balancer and the EIP.

[0144] Step 602: Delete the association to unbind the association between the load balancer and the elastic public IP.

[0145] In this step, the association is deleted to unbind the load balancer from the elastic public IP.

[0146] It should be noted that if the association relationship obtained in the database is consistent with the association relationship obtained in the configuration file, the association relationship obtained in the database and the association relationship obtained in the configuration file can be compared. If the two are consistent, the association relationship is deleted. If the two are inconsistent, an alarm notification is generated to enable relevant personnel to perform relevant processing.

[0147] In the embodiment of the present application, the state corresponding to the task can be modified according to the execution result of the asynchronous unbinding task. Therefore, the embodiment of the present application provides a task state modification method, which is as follows: Figure 7 As shown, the specific steps include:

[0148] Step 701: When the asynchronous unbinding task fails to execute, the task record corresponding to the third task identifier is searched in the database according to the third task identifier corresponding to the asynchronous unbinding task.

[0149] The third task identifier, the second task identifier, and the first task identifier may be the same task identifier or different task identifiers. This is specifically related to the corresponding asynchronous unbinding task. For example, when the asynchronous unbinding task corresponding to the third task identifier is the same as the asynchronous unbinding task corresponding to the second task identifier, it means that the third task identifier and the second task identifier are the same identifier.

[0150] In this step, when the asynchronous unbinding task fails to execute, the third task identifier corresponding to the asynchronous unbinding task is obtained, and the task record corresponding to the third task identifier is searched in the database.

[0151] Step 702: Update the task status in the task record to the second status.

[0152] The second state is error (execution failure), which indicates that the corresponding task is in the task failure stage.

[0153] In this step, the task status in the task record is modified to the second status.

[0154] In addition, when the asynchronous unbinding task is successfully executed, the task record corresponding to the task ID of the asynchronous unbinding task is searched in the database, and the task status in the task record is changed to success.

[0155] If the asynchronous task status is pending and the task is not in the task cache queue, you need to re-enter the cache queue and execute it again. If the task is executing and the execution time is too long, it means that the task does not meet expectations and an exception message needs to be thrown for R&D personnel to investigate. If the task status is error (execution failed), you need to change the asynchronous task status to pending, re-enter the cache queue and execute the asynchronous task again.

[0156] like Figure 8 As shown, an embodiment of the present application provides an unbinding processing device, which corresponds to the method embodiment and specifically includes:

[0157] A receiving unit 801 is configured to receive an unbinding request instructing a target device to unbind from an elastic public IP address, wherein the target device includes a load balancer and a monitoring device, and the unbinding request carries a device identifier of the target device;

[0158] A first execution unit 802 is configured to perform a first unbinding operation between the load balancer and the elastic public IP according to the device identifier and the elastic public IP;

[0159] A second execution unit 803 is configured to control the load balancer to execute a first target operation after the first unbinding operation is completed;

[0160] The third execution unit 804 is configured to perform a second unbinding operation between the monitoring device and the elastic public IP according to the device identifier and the elastic public IP;

[0161] The fourth execution unit 805 is configured to control the monitoring device to execute a second target operation after the second unbinding operation is completed.

[0162] Optionally, when the device identifier includes the first device identifier corresponding to the monitoring device, the third execution unit 804 is configured to:

[0163] Determine an asynchronous unbinding task corresponding to the monitoring device according to the first device identifier corresponding to the monitoring device and the elastic public IP address;

[0164] According to the preset rules, the asynchronous unbinding task corresponding to the monitoring device is added to the task cache queue;

[0165] The asynchronous unbinding task is extracted from the task cache queue, and a second unbinding operation between the monitoring device and the elastic public IP is performed.

[0166] Optionally, after determining the asynchronous unbinding task corresponding to the monitoring device, the apparatus further includes a generating unit 806, wherein the generating unit 806 is configured to:

[0167] Obtaining a first task identifier corresponding to the asynchronous unbinding task;

[0168] Detecting whether there is a task record corresponding to the first task identifier in the database;

[0169] When there is no task record corresponding to the first task identifier in the database, generating a task record according to the first task identifier, a preset first state and other relevant information;

[0170] The task record is stored in the database.

[0171] Optionally, the third execution unit 804 is configured to:

[0172] Extract the asynchronous unbinding task from the task cache queue to obtain a pending asynchronous unbinding task;

[0173] According to the second task identifier corresponding to the pending asynchronous unbinding task, searching the database for a task status corresponding to the second task identifier;

[0174] When the task state is the first state, a second unbinding operation between the monitoring device and the elastic public IP is performed according to the pending asynchronous unbinding task.

[0175] Optionally, the apparatus further includes a detection unit 807, wherein the detection unit 807 is configured to:

[0176] In the database, obtaining the update time corresponding to each task record;

[0177] According to the update time corresponding to each task record, determine the preset task record with the earliest update time;

[0178] When the target task record meets the preset conditions, a cleanup notification is generated to enable relevant personnel to clean up the target task record.

[0179] Optionally, when the device identifier includes a second device identifier corresponding to the load balancer, the first execution unit 802 is configured to:

[0180] According to the second device identifier and the elastic public IP, searching for an association between the load balancer and the elastic public IP;

[0181] The association relationship is deleted to perform a first unbinding operation between the load balancer and the elastic public IP.

[0182] Optionally, the apparatus further includes an updating unit 808, wherein the updating unit 808 is configured to:

[0183] When the asynchronous unbinding task fails to execute, searching the database for a task record corresponding to the third task identifier according to the third task identifier corresponding to the asynchronous unbinding task;

[0184] The task status in the task record is updated to a second status.

[0185] like Figure 9 As shown, the embodiment of the present application provides an unbinding processing device, including a processor 901, a communication interface 902, a memory 903 and a communication bus 904, wherein the processor 901, the communication interface 902, and the memory 903 communicate with each other through the communication bus 904.

[0186] Memory 903, used for storing computer programs;

[0187] In one embodiment of the present application, the processor 901 is configured to implement the unbinding processing method provided by any of the aforementioned method embodiments when executing the program stored in the memory 903, including:

[0188] Receive an unbinding request instructing a target device to unbind from an elastic public IP address, the target device including a load balancer and a monitoring device, the unbinding request carrying a device identifier of the target device;

[0189] Perform a first unbinding operation between the load balancer and the elastic public IP according to the device identifier and the elastic public IP;

[0190] After the first unbinding operation is completed, controlling the load balancer to perform a first target operation;

[0191] Perform a second unbinding operation between the monitoring device and the elastic public IP according to the device identifier and the elastic public IP;

[0192] After the second unbinding operation is completed, the monitoring device is controlled to perform a second target operation.

[0193] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps performed by the unbinding processing method provided in any of the aforementioned method embodiments are implemented.

[0194] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.

[0195] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a general hardware platform, or of course, by hardware. Based on this understanding, the above technical solution, in essence, or the part that contributes to the relevant technology, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiment.

[0196] It should be understood that the terms used herein are for the purpose of describing specific example embodiments only and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "comprise", "include", "contain" and "have" are inclusive and therefore specify the presence of stated features, steps, operations, elements and / or parts, but do not exclude the presence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not to be construed as necessarily requiring them to be performed in the specific order described or illustrated, unless the order of execution is clearly indicated. It should also be understood that additional or alternative steps may be used.

[0197] The foregoing description is intended only to provide specific embodiments of the present invention, which will enable those skilled in the art to understand and implement the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not intended to be limited to the embodiments shown herein, but is intended to be accorded the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A method for unbinding, characterized in that: The method comprises: Receive an unbinding request instructing a target device to unbind from an elastic public IP address, the target device including a load balancer and a monitoring device, the unbinding request carrying a device identifier of the target device; Perform a first unbinding operation between the load balancer and the elastic public IP according to the device identifier and the elastic public IP; After the first unbinding operation is completed, controlling the load balancer to perform a first target operation; Perform a second unbinding operation between the monitoring device and the elastic public IP according to the device identifier and the elastic public IP; After the second unbinding operation is completed, the monitoring device is controlled to perform a second target operation.

2. The method according to claim 1, characterized in that In a case where the device identifier includes the first device identifier corresponding to the monitoring device, performing a second unbinding operation between the monitoring device and the elastic public IP address based on the device identifier and the elastic public IP address includes: Determine an asynchronous unbinding task corresponding to the monitoring device according to the first device identifier corresponding to the monitoring device and the elastic public IP address; According to the preset rules, the asynchronous unbinding task corresponding to the monitoring device is added to the task cache queue; The asynchronous unbinding task is extracted from the task cache queue, and a second unbinding operation between the monitoring device and the elastic public IP is performed.

3. The method according to claim 2, characterized in that After determining the asynchronous unbinding task corresponding to the monitoring device, the method further includes: Obtaining a first task identifier corresponding to the asynchronous unbinding task; Detecting whether there is a task record corresponding to the first task identifier in the database; When there is no task record corresponding to the first task identifier in the database, generating a task record according to the first task identifier, a preset first state and other relevant information; The task record is stored in the database.

4. The method according to claim 3, characterized in that The extracting the asynchronous unbinding task from the task cache queue and performing a second unbinding operation between the monitoring device and the elastic public IP address includes: Extract the asynchronous unbinding task from the task cache queue to obtain a pending asynchronous unbinding task; According to the second task identifier corresponding to the pending asynchronous unbinding task, searching the database for a task status corresponding to the second task identifier; When the task state is the first state, a second unbinding operation between the monitoring device and the elastic public IP is performed according to the pending asynchronous unbinding task.

5. The method according to claim 3, characterized in that: The method further comprises: In the database, obtaining the update time corresponding to each task record; According to the update time corresponding to each task record, determine the preset task record with the earliest update time; When the target task record meets the preset conditions, a cleanup notification is generated to enable relevant personnel to clean up the target task record.

6. The method according to claim 1, characterized in that In a case where the device identifier includes a second device identifier corresponding to the load balancer, performing a first unbinding operation between the load balancer and the elastic public IP address according to the device identifier and the elastic public IP address includes: According to the second device identifier and the elastic public IP, searching for an association between the load balancer and the elastic public IP; The association relationship is deleted to perform a first unbinding operation between the load balancer and the elastic public IP.

7. The method according to claim 1, characterized in that: The method further comprises: When the asynchronous unbinding task fails to execute, searching the database for a task record corresponding to the third task identifier according to the third task identifier corresponding to the asynchronous unbinding task; The task status in the task record is updated to a second status.

8. An unbinding processing device, characterized in that: The device comprises: a receiving unit, configured to receive an unbinding request instructing a target device to unbind from an elastic public IP, the target device including a load balancer and a monitoring device, the unbinding request carrying a device identifier of the target device; A first execution unit, configured to perform a first unbinding operation between the load balancer and the elastic public IP according to the device identifier and the elastic public IP; A second execution unit, configured to control the load balancer to execute a first target operation after the first unbinding operation is completed; A third execution unit is configured to perform a second unbinding operation between the monitoring device and the elastic public IP according to the device identifier and the elastic public IP; The fourth execution unit is configured to control the monitoring device to execute a second target operation after the second unbinding operation is completed.

9. An unbinding processing device, characterized in that: include: at least one communication interface; at least one bus connected to the at least one communication interface; at least one processor connected to the at least one bus; at least one memory connected to the at least one bus, wherein the processor is configured to: Receive an unbinding request instructing a target device to unbind from an elastic public IP address, the target device including a load balancer and a monitoring device, the unbinding request carrying a device identifier of the target device; According to the device identifier and the elastic public IP, performing a first unbinding operation between the load balancer and the elastic public IP; After the first unbinding operation is completed, controlling the load balancer to perform a first target operation; According to the device identifier and the elastic public IP, performing a second unbinding operation between the monitoring device and the elastic public IP; After the second unbinding operation is completed, the monitoring device is controlled to perform a second target operation.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the unbinding processing method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Method and device for deleting load balancer

    CN111061568A

  • Method and system for conveniently and quickly modifying IP of elastic network card in public cloud

    CN112118327A

  • Method for distinguishing NAT deletion elastic public network IP from NAT unbinding elastic public network IP

    CN112671939A

  • Cloud tenant EIP migration method and device, computer equipment and storage medium

    CN117880097A

  • Trustworthy application integration

    EP3907602A1