A service data processing method and system
By configuring message acknowledgment tables in the databases of the virtualization platform and Neutron nodes, the problem of data inconsistency caused by Neutron node failures or communication anomalies was resolved, achieving accurate synchronization of resource operations and data consistency, and improving the stability of the cloud environment.
Patent Information
- Application Number
- CN202410788500.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-18
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2044-06-18
AI Technical Summary
When Neutron node services fail or communication is abnormal, data inconsistency occurs between the virtualization platform and Neutron nodes, resulting in resource residue and waste of system resources, increasing the complexity of resource allocation and management.
Configure message confirmation tables in the databases of the virtualization platform and Neutron nodes to record and track the status of each resource operation request. Ensure data consistency by comparing and synchronizing the business data in the message confirmation tables after the Neutron nodes are restored to online status.
It effectively eliminated resource residue issues caused by communication anomalies, ensured the consistency of business data between the virtualization platform and Neutron nodes, and improved the reliability and stability of the cloud environment.
Smart Images

Figure CN118631642B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the field of data synchronization, in particular to a business data processing method and system. BACKGROUND
[0002] Under the background of rapid development of cloud computing and virtualization technology, software-defined network (SDN) technology has been widely applied. Through frequent communication between the virtualization platform and the Neutron node, flexible management of network resources is realized, and the programmability and dynamic configuration capability of the network are improved.
[0003] However, when the Neutron node service fails or communication is abnormal, the operation of the virtualization platform may not be correctly executed and returned, resulting in inconsistent data between the virtualization platform and the Neutron node. Due to the inconsistent data, the virtualization platform may have a problem of residual fixed quota resources that cannot be cleared. This not only wastes system resources, but also increases the complexity of subsequent resource allocation and management. SUMMARY
[0004] The embodiments of the present disclosure provide a business data processing method and system, aiming to solve the problems in the above background technology.
[0005] In order to solve the above technical problems, the present disclosure is implemented as follows: in a first aspect, the embodiments of the present disclosure provide a business data processing method applied to a virtualization platform, wherein a platform message confirmation table is configured in a local database of the virtualization platform; the method comprises:
[0006] initiating a target request of a resource operation to a Neutron node;
[0007] capturing a response of an execution result of the resource operation returned by the Neutron node;
[0008] waiting for the Neutron node to recover to an online state in a preset period of time if the response returned by the Neutron node is not captured;
[0009] synchronizing business data related to the resource operation between the virtualization platform and the Neutron node based on target request information in the platform message confirmation table and target request information in a node message confirmation table after detecting that the Neutron node has recovered to the online state, wherein the node message confirmation table is configured in a database of the Neutron node.
[0010] Optionally, the target request of the resource operation initiated to the Neutron node comprises:
[0011] receiving a platform identification allocated by the Neutron node for the virtualization platform;
[0012] generating a target request identification according to the platform identification and a timestamp when the target request is initiated, and carrying the target request identification into a data header of the target request;
[0013] sending the target request to the Neutron node, and recording target request information of the target request in the platform message confirmation table, the target request information including: target request identification, resource ID and confirmation status;
[0014] setting the confirmation status of the target request information in the platform message confirmation table as to-be-executed.
[0015] Optionally, the method further includes:
[0016] updating the confirmation status of the target request information in the platform message confirmation table as completed in a case that a response returned by the Neutron node is captured within the preset period of time;
[0017] sending a confirmation notification to the Neutron node, the confirmation notification being used to notify the Neutron node to update the confirmation status of the target request information in the node message confirmation table as confirmed.
[0018] Optionally, the method further includes:
[0019] updating the confirmation status of the target request information in the platform message confirmation table as to-be-confirmed in a case that the response returned by the Neutron node is not captured within the preset period of time;
[0020] synchronizing service data related to the resource operation between the virtualization platform and the Neutron node based on the target request information in the platform message confirmation table and the target request information in the node message confirmation table after detecting that the Neutron node resumes the online state, including:
[0021] scanning the platform message confirmation table to determine the target request information with the confirmation status of to-be-confirmed after detecting that the Neutron node resumes the online state;
[0022] querying the node message confirmation table of the Neutron node according to the target request identification of the target request information, and determining the target request information corresponding to the target request identification from the node message confirmation table;
[0023] According to the confirmation state of the target request information in the node message confirmation table, synchronizing the service data related to the resource operation between the virtualization platform and the Neutron node.
[0024] Optionally, according to the confirmation state of the target request information in the node message confirmation table, synchronizing the service data related to the resource operation between the virtualization platform and the Neutron node comprises:
[0025] When the confirmation state of the target request information in the node message confirmation table is to be executed, performing data rollback on the service data related to the resource operation in the database of the virtualization platform, restoring the service data to the version before the request is initiated, and updating the platform message confirmation table to be confirmed;
[0026] When the confirmation state of the target request information in the node message confirmation table is completed, performing corresponding resource addition on the service data related to the resource operation in the database of the virtualization platform, and updating the platform message confirmation table to be confirmed;
[0027] When the confirmation state of the target request information in the node message confirmation table is to be confirmed, updating the confirmation state in the platform message confirmation table to be confirmed.
[0028] Optionally, the Neutron node is configured with a service state detection interface; the method further comprises:
[0029] After successfully accessing the Neutron node, detecting the service state of the Neutron node by periodically calling the service state detection interface of the Neutron node, the service state comprising an online state and an offline state.
[0030] Optionally, the virtualization platform is configured with a message recording interface;
[0031] Before initiating a target request for resource operation to a Neutron node, the method further comprises:
[0032] In the message recording interface, defining a message recording aspect based on SpringAOP technology;
[0033] After initiating a target request for resource operation to a Neutron node, further comprising:
[0034] Calling the message recording interface, intercepting the target request through the message recording aspect, and returning the interface parameters corresponding to the target request;
[0035] Extract the target request identifier, resource ID, and confirmation status from the interface parameters, and write the extracted target request identifier, resource ID, and confirmation status into the target request information in the platform message confirmation table.
[0036] Secondly, this disclosure provides a business data processing method applied to a Neutron node. The Neutron node has a node message confirmation table configured in its local database and a service status detection interface configured to enable the virtualization platform to detect the service status of the Neutron node. The service status includes online status and offline status.
[0037] The method includes:
[0038] Receive target requests for resource operations from the virtualization platform;
[0039] Perform the resource operation indicated by the target request, and return the execution result to the virtualization platform;
[0040] If the execution result cannot be successfully returned to the virtualization platform within a preset time period due to a communication anomaly, the system will wait for the communication anomaly to be resolved before resuming the online status.
[0041] After the virtualization platform detects that the Neutron node has returned to online status through the service status detection interface, it synchronizes the business data related to the resource operation between the virtualization platform and the Neutron node based on the target request information in the platform message confirmation table and the target request information in the node message confirmation table.
[0042] Optionally, after receiving a target request for a resource operation from the virtualization platform, the method further includes:
[0043] Obtain the target request identifier from the target request header;
[0044] Based on the target request identifier, the target request information of the target request is recorded in the node message confirmation table, and the confirmation status of the target request information in the node message confirmation table is set to pending execution. The target request information includes: target request identifier, resource ID, and confirmation status.
[0045] Perform the resource operation indicated by the target request;
[0046] Obtain the execution result of the resource operation and return the execution result to the virtualization platform;
[0047] In a case where the execution result of the resource operation is acquired, a response of the resource operation execution result is returned to the virtualization platform, and the confirmation state of the target request information in the node message confirmation table is updated to completed.
[0048] In a third aspect, the embodiments of the present disclosure provide a service data processing system, the system comprising:
[0049] a virtualization platform, wherein the virtualization platform is deployed with a virtual machine, and the virtual machine communicates with a Neutron node multiple times when using an SDN function;
[0050] a Neutron node, configured to provide a service for implementing the SDN function to a virtual machine in the virtualization platform;
[0051] the virtualization platform performs steps of a service data processing method;
[0052] the Neutron node performs steps of the service data processing method.
[0053] The technical solutions provided by the embodiments of the present disclosure at least bring the following beneficial effects:
[0054] The present disclosure can record and track the state of each resource operation request when communication is abnormal by configuring a message confirmation table in the database of the virtualization platform and the Neutron node. Even in the case of communication interruption, the target request corresponding service data can be accurately recorded and recovered. After waiting for the Neutron node to recover online, by comparing and synchronizing the service data in the message confirmation table, the resource residual problem caused by communication abnormality is effectively solved, and finally the consistency of service data between the virtualization platform and the Neutron node is ensured. BRIEF DESCRIPTION OF DRAWINGS
[0055] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor based on these drawings.
[0056] Figure 1 is a step schematic diagram of a service data processing method provided by one embodiment of the present disclosure;
[0057] Figure 2 is a step schematic diagram of another service data processing method provided by one embodiment of the present disclosure;
[0058] Figure 3is a communication interaction process schematic diagram of a service data processing method provided by one embodiment of the disclosure.
[0059] Figure 4 is a framework schematic diagram of a service processing system provided by one embodiment of the disclosure. DETAILED DESCRIPTION
[0060] The technical solutions in the embodiments of the disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the disclosure. Obviously, the described embodiments are part of the embodiments of the disclosure, rather than all the embodiments. Based on the embodiments in the disclosure, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the protection scope of the disclosure.
[0061] The disclosure can be applied to a virtualization platform in a cloud computing environment, especially in scenarios involving network resource management and allocation. For example, in an OpenStack cloud platform, a Neutron node is responsible for the management and operation of SDN services. When the Neutron node has a network failure or service interruption, through the method of the disclosure, the virtualization platform can continue to operate normally, and automatically synchronize and repair data after the node recovers, avoiding resource allocation errors and service interruptions, thereby improving the reliability and stability of the entire cloud environment.
[0062] Figure 1 is a step schematic diagram of a service data processing method provided by one embodiment of the disclosure, as shown in Figure 1 The method is applied to a virtualization platform, and a platform message confirmation table is configured in a local database of the virtualization platform; the method comprises the following steps.
[0063] Step S101, a target request of a resource operation is initiated to a Neutron node.
[0064] Step S102, a response of an execution result of the resource operation returned by the Neutron node is captured.
[0065] Step S103, in the case that the response returned by the Neutron node is not captured within a preset period, the Neutron node is waited to recover to an online state.
[0066] Step S104, after detecting that the Neutron node recovers to the online state, service data related to the resource operation is synchronized between the virtualization platform and the Neutron node based on target request information in the platform message confirmation table and target request information in a node message confirmation table, and the node message confirmation table is configured in a database of the Neutron node.
[0067] The target request is a network resource management request for a specific resource operation sent by the virtualization platform to the Neutron node in the OpenStack cloud platform environment. The target request can include creating, deleting, or modifying network, subnet, port, router, security group, and other network resources. For example, when a user needs to create a new virtual network, the client initiates a request to create a network to the Neutron node. After receiving the request, the Neutron node allocates corresponding network resources according to the configuration and requirements and returns the detailed information of the network to the virtualization platform.
[0068] The virtualization platform needs to configure the connection information of the third-party Neutron node. After the configuration is completed and the access is successful, the request can be initiated. Specifically, the connection information of the Neutron node includes an IP address, a username, and a password, which are used for authentication and access to the Neutron service. The IP address is the network address of the third-party Neutron node, which is used for communication and API calling; the username is used for authentication of identity information, representing a platform user with access and operation authority; and the password corresponds to the username and is also used for identity verification. Optionally, the configuration can be performed in the management interface or configuration file of the virtualization platform. Once the configuration is completed, the virtualization platform needs to call the API interface of the Neutron service for connection. This process involves the following steps: first, the virtualization platform sends an API request to the Neutron node through a specific network protocol, which can be HTTP / HTTPS protocol; then, according to the username and password contained in the request, the Neutron node verifies these information. If the verification is successful, an authentication token is returned; the subsequent API request uses this token for authorization to ensure the legality and security of the request. When the Neutron node verifies and accepts the connection request, the virtualization platform successfully accesses the third-party Neutron node, and the virtualization platform can now communicate with the Neutron node.
[0069] After receiving the request, the Neutron node performs the corresponding operation, and returns a response for the execution result if the operation is completed. The response contains the result of the operation, including success, failure, error information, detailed state of resources, etc. The virtualization platform needs to capture this response at a regular time after the request is initiated to determine whether the Neutron node normally completes the resource operation. The response returned by the Neutron node can be received through a specific network protocol. The response can include a status code, a response body, and header information. When the response is received, it needs to be parsed. Optionally, the response body is processed in JSON format to extract the execution result of the resource operation by the Neutron node.
[0070] S103, the preset time period is a time window for waiting for a response from the Neutron node on the virtualization platform side. Within the time window, the virtualization platform will continue to attempt to communicate with the Neutron node and wait for a response returned therefrom. The length of the preset time period can be configured according to specific requirements, for example, several seconds to several minutes. If the response cannot be captured within the preset time period, that is, the virtualization platform fails to receive any response from the Neutron node. It can be caused by network failure on the Neutron node side, such as service crash, downtime or resource overload. It can also be caused by communication failure between the two parties, resulting in a request unable to reach the Neutron node or a response unable to be returned. After failing to capture the response from the Neutron node, the virtualization platform does not immediately give up, but enters a waiting state to wait for the Neutron node to recover online. The virtualization platform will continue to monitor the state of the Neutron node, periodically send requests to detect whether it recovers, and the number of retries and interval time can be configured to balance system performance and waiting time. Once it is detected that the Neutron node recovers online (i.e., the response returned therefrom is successfully captured), step S104 will be continued.
[0071] S104, the platform message confirmation table is a data table configured in the database of the virtualization platform, which records attribute information of various resource operation requests, representing resource objects indicated by the requests and identifiers of the requests, and the like. Similarly, the Neutron node side is also configured with such a node message confirmation table. In this step, according to the request information corresponding to the target request in the platform message confirmation table and the node message confirmation table, the target request to be synchronized is determined through interaction and identification, and the business data related to the resource operation indicated by the target request is synchronized to keep the business data consistent on both sides, which will be described in detail hereinafter.
[0072] The present disclosure can record and track the state of each resource operation request through the message confirmation table configured in the database of the virtualization platform and the Neutron node when communication is abnormal. Even in the case of communication interruption, the business data corresponding to the target request can be accurately recorded and recovered. After waiting for the Neutron node to recover online, the business data in the message confirmation table is compared and synchronized to effectively clear the resource residual problem caused by communication abnormality, and finally ensure that the business data between the virtualization platform and the Neutron node is consistent.
[0073] Exemplarily, the target request for initiating the resource operation to the Neutron node includes: receiving a platform identifier allocated by the Neutron node for the virtualization platform; generating a target request identifier according to the platform identifier and a time stamp when the target request is initiated, and carrying the target request identifier into a data header of the target request; sending the target request to the Neutron node, and recording target request information of the target request in the platform message confirmation table, the target request information including: target request identifier, resource ID and confirmation status; setting the confirmation status of the target request information in the platform message confirmation table as "to be executed".
[0074] When the virtualization platform accesses the Neutron node, the Neutron node generates and allocates a unique platform identifier (systemId) according to the IP address of the virtualization platform. The systemId is used to uniquely identify the virtualization platform, so as to ensure that different virtualization platforms can be correctly distinguished and managed when using the Neutron node service. When the virtualization platform needs to initiate a resource operation request to the Neutron node, a unique target request identifier (requestId) needs to be generated. The target request identifier is generated according to the platform identifier and the current time stamp when the target request is initiated. The significance of the request identifier is to ensure that each request is unique, facilitating subsequent tracking and confirmation. The generated requestId needs to be carried in the data header (Header) of the target request. When the Neutron node receives the request, the requestId can be extracted from the request header for subsequent operation and confirmation process.
[0075] After the virtualization platform prepares the target request, the request is sent to the Neutron node through the network, including: target request identifier, resource ID and confirmation status: the target request identifier is used to uniquely identify the request; the resource ID (resourceId) is a unique identifier of the resource operation object involved in the target request; the confirmation status (status) is used to represent the current state of the interaction or communication between the two parties. The initial state can be set as "to be executed", or it can be empty. After recording the information of the target request in the message confirmation table, the confirmation status of the target request information in the platform message confirmation table needs to be set as "to be executed". This means that the request has been sent, but the processing result and confirmation reply from the Neutron node have not been received.
[0076] Exemplarily, the method further comprises: in the preset time period, updating the confirmation state of the target request information in the platform message confirmation table to completed in a case that the response returned by the Neutron node is captured; and sending a confirmation notification to the Neutron node, the confirmation notification being used to inform the Neutron node to update the confirmation state of the target request information in the node message confirmation table to confirmed.
[0077] If the target request information in the platform message confirmation table needs to be updated after the response returned by the Neutron node is captured in the preset time period, the confirmation state in the platform message confirmation table is updated from to be executed to completed, indicating that the virtualization platform has received the processing result of the Neutron node, regardless of success or failure. In order to ensure that the Neutron node also knows that the virtualization platform has received and processed its response, the virtualization platform needs to send a confirmation notification to the Neutron node. The function of this confirmation notification is to synchronize the states of the two systems and ensure data consistency. After the Neutron node receives the confirmation notification sent by the virtualization platform, the node message confirmation table needs to be updated, and the confirmation state of the node message confirmation table is updated from to be confirmed to confirmed. This indicates that the Neutron node knows that the virtualization platform has received and processed the response of the request. Ensuring the state synchronization of the request and the response between the two systems ensures the consistency and stability of the system. At this time, the virtualization platform does not care whether the Neutron node has received the confirmation notification or not, because unilateral confirmation means that the business data is consistent, and it is no longer concerned whether the notification reaches or not.
[0078] Exemplarily, the method further comprises: in the preset time period, updating the confirmation state of the target request information in the platform message confirmation table to to be confirmed in a case that the response returned by the Neutron node is not captured.
[0079] If the response times out, that is, in a case that the virtualization platform does not capture the response returned by the Neutron node in the preset time period, the confirmation state of the target request information in the platform message confirmation table is updated from to be executed to to be confirmed through the callBack mechanism. This indicates that the virtualization platform fails to capture the response of the Neutron node in the preset time period, and further verification, repair and synchronization are needed.
[0080] Exemplarily, after detecting that the Neutron node resumes the online state, the business data related to the resource operation is synchronized between the virtualization platform and the Neutron node based on the target request information in the platform message confirmation table and the target request information in the node message confirmation table, including: after detecting that the Neutron node resumes the online state, scanning the platform message confirmation table to determine the target request information with the confirmation state being to be confirmed; querying the node message confirmation table of the Neutron node according to the target request identifier of the target request information, and determining the target request information corresponding to the target request identifier from the node message confirmation table; and synchronizing the business data related to the resource operation between the virtualization platform and the Neutron node according to the confirmation state of the target request information in the node message confirmation table.
[0081] When the virtualization platform detects that the Neutron node resumes the online state (i.e., resumes normal communication), the data synchronization operation is started. The virtualization platform scans the platform message confirmation table to find the target request information with the confirmation state being to be confirmed. Assuming that there is a request information with the state being to be confirmed on the virtualization platform, the request information is determined as the target request information. If the requestId of the target request information is REQ123, the operation type is to create a virtual network. According to the target request identifier (REQ123), the node message confirmation table of the Neutron node is queried to obtain the corresponding target request information, that is, in the message confirmation table of the Neutron node, the target request information with the requestId being REQ123 is found. The business data related to the resource operation is synchronized between the virtualization platform and the Neutron node according to the confirmation state of the target request information in the node message confirmation table. In the embodiment of the present disclosure, the business data is updated along with the change of the resource operation. Assuming that there is a request of creating a virtual network, the related business data is as follows:
[0082] request ID: REQ001;
[0083] operation type: create a virtual network;
[0084] network ID: net-12345;
[0085] network name: MyNetwork;
[0086] network type: VXLAN;
[0087] Creation time: 2024-06-1210:00:00. On the virtualization platform, if the platform and the node maintain normal communication, the virtualization platform will synchronize the business data according to the execution of the resource operation of the Neutron node, but at this time, due to the response timeout, it indicates that the platform and the node are disconnected, and the business data may be out of synchronization or resource residual, which needs to be re-verified according to the specific situation, and corresponding repair and adjustment measures are taken to make the business data of both sides synchronized.
[0088] Exemplarily, according to the confirmation state of the target request information in the node message confirmation table, the business data related to the resource operation is synchronized between the virtualization platform and the Neutron node, including: when the confirmation state of the target request information in the node message confirmation table is to be executed, the data rollback of the business data related to the resource operation is performed in the database of the virtualization platform, the business data is restored to the version before the request is initiated, and the platform message confirmation table is updated to be confirmed; when the confirmation state of the target request information in the node message confirmation table is completed, the corresponding resource addition of the business data related to the resource operation is performed in the database of the virtualization platform, and the platform message confirmation table is updated to be confirmed; when the confirmation state of the target request information in the node message confirmation table is to be confirmed, the confirmation state in the platform message confirmation table is updated to be confirmed.
[0089] As described above, the message confirmation table records the state information of various resource operation requests. For the node message confirmation table on the Neutron node side, when the node cannot normally communicate with the virtualization platform due to various faults or communication abnormalities, the confirmation state in the node message confirmation table has important indicative significance, which is used to reflect different situations.
[0090] First, when the confirmation state of the target request information in the node message confirmation table is to be executed, it indicates that the target request has been sent but has not been executed, which indicates that the network fault or communication abnormality occurs during the execution of the resource operation of the Neutron node, and the resource operation is forced to interrupt. At this time, the data rollback of the business data related to the resource operation is needed, that is, in the database of the virtualization platform, the business data related to the resource operation is rolled back to the version before the request is initiated, any changes made by the request are revoked, and the previous state is restored. And the confirmation state of the request in the platform message confirmation table is updated to "confirmed".
[0091] Second, when the confirmation state of the target request information in the node message confirmation table is completed, it means that the target request has been successfully executed, and network failure or communication exception occurs during the return of the response. For example, a request to create a resource has been successfully created on the Neutron node side, but a communication exception occurs during the return of the response, resulting in the response being unable to return to the virtual platform side. At this time, the corresponding resource addition needs to be performed on the resource operation related business data, and the confirmation state of the request in the platform message confirmation table is updated to "confirmed".
[0092] Third, when the confirmation state of the target request information in the node message confirmation table is to be confirmed, it means that the request has been executed, and the business data of both sides has been synchronized, but only in that it has not been confirmed on the virtualization platform, that is, the "not concerned" case described above. At this time, only the confirmation state of the request in the platform message confirmation table needs to be updated to "confirmed", and the business data of both sides has been synchronized and does not need to be operated.
[0093] The present disclosure provides a processing strategy for the synchronization and confirmation of various resource operation requests in different states, especially in the case of communication exception or network failure. The virtualization platform can effectively deal with network failure or communication exception, ensuring the accuracy and consistency of resource operation. The data rollback and resource addition mechanism ensures that the data synchronization between the virtualization platform and the Neutron node can be ensured in any case, avoiding the problem of inconsistent data.
[0094] Exemplarily, the Neutron node is configured with a service state detection interface; the method further comprises: after successfully accessing the Neutron node, detecting the service state of the Neutron node by timing calling the service state detection interface of the Neutron node, the service state including online state and offline state.
[0095] The Neutron node is configured with a service state detection interface for detecting the service state of the node. After the virtualization platform successfully accesses the Neutron node, the service state detection interface is called in a timely manner to detect the service state of the Neutron node, which can include an online state and an offline state. For example, the virtualization platform successfully accesses the Neutron node and the service state detection interface has been configured. In a normal case, when the Neutron node is running normally, its service state is detected as online. This means that the Neutron node can normally provide services, and the virtualization platform can communicate and interact with it. However, if the Neutron node fails or has network problems due to some reason, its service state will be detected as offline, that is, the Neutron node cannot provide services, and the virtualization platform cannot communicate and interact with it. By calling the service state detection interface of the Neutron node in a timely manner, the virtualization platform can monitor the service state change of the Neutron node in real time. In this way, when the service state of the Neutron node changes from offline to online, the virtualization platform can timely handle it and trigger data compensation (i.e., data rollback or resource addition as described above) to ensure the consistency of communication and data between the virtualization platform and the Neutron node.
[0096] Exemplarily, the virtualization platform is configured with a message recording interface; before initiating the target request of the resource operation to the Neutron node, the method further comprises: in the message recording interface, defining a message recording aspect based on the SpringAOP technology.
[0097] The virtualization platform is also configured with a message recording interface for recording target request information into a platform message confirmation table. In the embodiment of the present disclosure, before initiating the target request of the resource operation to the Neutron node, a message recording aspect is defined in the message recording interface based on the SpringAOP technology. Specifically, by using the SpringAOP technology, an aspect (Aspect) can be defined in the message recording interface of the virtualization platform, which is used to automatically record a message before each request is sent, which is equivalent to performing some specific operations before the request is initiated. The present disclosure performs the operation of recording the target request information. Accordingly, the detailed information of the target request is tracked subsequently, providing traceability of interface call data and the ability of comparison and verification.
[0098] Exemplarily, after initiating a target request of a resource operation to a Neutron node, the message recording interface is invoked, the target request is intercepted through the message recording aspect, and interface parameters corresponding to the target request are returned; the target request identification, resource ID and confirmation status are extracted from the interface parameters, and the extracted target request identification, resource ID and confirmation status are written into the target request information in the platform message confirmation table.
[0099] After initiating a target request of a resource operation to a Neutron node, the system invokes a message recording interface. The target request is intercepted through a message recording aspect. In this interception process, the aspect can obtain and process detailed information of the target request. The process of aspect interception will capture all relevant data of the target request, including interface parameters. After the aspect interception, interface parameters corresponding to the target request are returned. These parameters contain detailed information of the target request, such as request identification, resource ID and confirmation status. From the returned interface parameters, the virtualization platform extracts key information, including target request identification, resource ID and confirmation status. These information are necessary for subsequent operations. The extracted information is written into the target request information in the platform message confirmation table. Specifically, the extracted target request identification, resource ID and confirmation status are written into the corresponding table entry of the platform message confirmation table.
[0100] Exemplarily, an intelligent fault prediction and self-healing mechanism is added between the virtualization platform and the Neutron node. Based on machine learning algorithms and historical data analysis, possible faults are predicted in advance, and preventive measures are taken before the fault occurs, or self-healing operations are automatically triggered after the fault occurs, so as to minimize the impact on business data.
[0101] Collect historical log data from the virtualization platform and the Neutron node, including request response time, failure times, and node state changes. Extract key features related to faults from the historical log data, such as abnormal response time, frequent state changes, and high failure rate of specific resource operations. Select a target model suitable for fault prediction and train the target model using the extracted key features. Label the historical data to distinguish between normal operation and fault conditions. In runtime, monitor the business data of the virtualization platform and the Neutron node in real time, extract features consistent with the training target model, and obtain real-time feature data. Input the real-time feature data into the pre-trained target model to predict whether there is a potential fault. When a possible fault is predicted, the virtualization platform triggers preventive measures in advance, such as adjusting resource allocation, reallocating virtual machine network configuration, etc. If a fault has occurred, automatically perform self-healing operations, optionally perform corresponding data rollback on the business data, or switch to other standby nodes to recover to normal state as soon as possible. After the Neutron node is back online, continue the business data synchronization and repair operations described above for the Neutron node. Optionally, after obtaining the prediction result, feed back the prediction result and the actual fault condition to the target model to iteratively optimize the prediction and self-healing capabilities of the target model.
[0102] The intelligent fault prediction and self-healing mechanism provided by the present disclosure enables the virtualization platform to not only have fault response capability when interacting with the Neutron node, but also to further avoid the out-of-sync problem of business data between the two parties through active prevention and rapid recovery.
[0103] Figure 2 is a step schematic diagram of another business data processing method provided by an embodiment of the present disclosure, as shown in Figure 2 The method is applied to a Neutron node, and a node message confirmation table is configured in a local database of the Neutron node. The Neutron node is configured with a service state detection interface, which is configured to enable the virtualization platform to detect the service state of the Neutron node, including online and offline states.
[0104] The method comprises:
[0105] Step S201, receiving a target request for resource operation from a virtualization platform;
[0106] Step S202, performing the resource operation indicated by the target request, and returning the execution result to the virtualization platform;
[0107] Step S203, in the case of communication abnormality leading to failure to successfully return the execution result to the virtualization platform within the preset time period, waiting for the communication abnormality to be repaired and then resuming the online state;
[0108] Step S204, after the virtualization platform detects that the Neutron node resumes the online state through the service state detection interface, synchronizing the service data related to the resource operation between the virtualization platform and the Neutron node based on the target request information in the platform message confirmation table and the target request information in the node message confirmation table.
[0109] Step S201, the Neutron node receives a resource operation request from the virtualization platform, which contains specific operation instructions such as creating, deleting, or updating network resources. The target request is the specific resource operation instruction that the Neutron node needs to execute.
[0110] Step S202, the Neutron node executes the corresponding resource operation according to the received target request. These operations may involve configuration, modification, or deletion of network resources. After the operation is completed, the Neutron node returns the execution result (such as information about the success or failure of the operation) to the virtualization platform, so that the platform can understand the status and result of the operation.
[0111] Step S203, if the Neutron node fails to successfully return the execution result to the virtualization platform within a preset time period due to communication abnormality (such as network failure or node failure), the system will enter a waiting state. During the waiting period, the Neutron node will monitor the communication state until the communication abnormality is repaired and the normal online state is resumed, ensuring that the operation request will not be lost in the case of communication failure.
[0112] Step S204, the virtualization platform detects that the Neutron node has resumed the online state through the service state detection interface. The virtualization platform and the Neutron node synchronize data based on the message confirmation tables (platform message confirmation table and node message confirmation table) maintained by each other. The message confirmation table records all uncompleted target requests and their states. By synchronizing these information, the data consistency between the platform and the node is ensured. During the synchronization process, the virtualization platform will reconfirm the service data related to the resource operation that has not been successfully executed due to communication abnormality, to further synchronize the service data.
[0113] Exemplarily, after receiving a target request of a resource operation from a virtualization platform, the method further comprises: obtaining a target request identifier from the target request data header; recording target request information of the target request into the node message confirmation table according to the target request identifier, and setting a confirmation state of the target request information in the node message confirmation table as to-be-executed, the target request information comprising: the target request identifier, a resource ID, and the confirmation state; executing the resource operation indicated by the target request; obtaining an execution result of the resource operation, and returning the execution result to the virtualization platform; in a case where the execution result of the resource operation is obtained, returning a response of the resource operation execution result to the virtualization platform, and updating the confirmation state of the target request information in the node message confirmation table as completed.
[0114] When the Neutron node receives a resource operation request from the virtualization platform, a unique identifier, i.e., a target request identifier, is first extracted from the request data header. After the target request identifier is extracted, the Neutron node records detailed information of the target request, i.e., target request information, in the local node message confirmation table of the Neutron node, records a resource ID, and updates a confirmation state. The target request information has been described in detail in the foregoing, and will not be described here again. After the target request information is recorded, the Neutron node executes a specific resource operation according to an instruction in the target request, for example, creates, deletes, or updates a network resource. Here, the resource operation executed by the Neutron node corresponds to a specific interface call to implement. After the operation is executed, the Neutron node obtains an execution result of the operation. The execution result includes whether the operation is successful, and any error information or state update generated in the operation process. The Neutron node returns the execution result to the virtualization platform in a response, so that the platform can know the result and state of the operation. Subsequently, the Neutron node updates the local node message confirmation table, and updates the confirmation state of the corresponding target request information from "to-be-executed" to "completed".
[0115] Figure 3 is a communication interaction process schematic diagram of a service data processing method provided by one embodiment of the present disclosure, as shown in Figure 3As shown, the virtualization platform configures and accesses the Neutron node, and after successful access, the Neutron node allocates a unique systemId for the virtualization platform, which is used to identify and verify the virtualization platform. When the virtualization platform needs to use the SDN resource, a unique requestId based on the systemId and timestamp is generated and added to the Header of the target request. The virtualization platform records the target request information of the request in the platform message confirmation table and sets the confirmation state as "to be executed". After the Neutron node receives the request, the requestId is extracted from the Header, and the corresponding record is found in the node message confirmation table in the database of the Neutron node, and the confirmation state is also "to be executed". The Neutron node performs the resource operation specified in the request, makes the corresponding interface call, and after the execution is completed (including execution success and execution failure), the Neutron node makes the corresponding record in the node message confirmation table, updates the resource ID and confirmation state in the node message confirmation table as "completed", and waits for the virtualization platform to confirm. After the virtualization platform receives the notification of the operation completion, the confirmation state in the platform message confirmation table is updated as "completed". The Neutron node is tried to be notified to update the node message confirmation state as "confirmed", to ensure the consistency of the data of both parties. Even if the notification fails to be successfully delivered, the business data has been synchronized. If the virtualization platform fails to receive the returned response due to network problems, the virtualization platform updates the confirmation state in the platform message confirmation table as "to be confirmed". When the Neutron node is online again, the virtualization platform scans the target request information of "to be confirmed" in the platform message confirmation table, compares the requestId with the node message confirmation table of the Neutron node, synchronizes the business data according to the comparison result, and after the update is completed, notifies the Neutron node to update the confirmation state in the node message confirmation table as "confirmed". Through the enhanced message confirmation mechanism and the provided data recovery method, the problem of data inconsistency and resource residue caused by communication problems is effectively solved.
[0116] Figure 4 is a framework schematic diagram of a service processing system provided by one embodiment of the present disclosure. As shown in Figure 4 , the system comprises:
[0117] a virtualization platform 301, which is deployed with a virtual machine, and the virtual machine communicates with a Neutron node multiple times when using an SDN function;
[0118] a Neutron node 302, configured to provide a service for implementing the SDN function to a virtual machine in the virtualization platform;
[0119] The virtualization platform performs the steps of the service data processing method; and the Neutron node performs the steps of the service data processing method.
[0120] A plurality of virtual machines (VMs) run on the virtualization platform 301, which host various applications and services. The virtual machines utilize SDN functions in network operations to flexibly manage network resources and optimize network traffic. When using SDN functions, the virtual machines need to frequently communicate with the Neutron node to implement network configuration and management operations. Such multiple communications ensure that the virtual machines can dynamically adjust network settings to adapt to different network requirements.
[0121] The Neutron node 302 is a network service component in OpenStack, which is responsible for providing specific implementation of SDN functions to virtual machines in the virtualization platform. The Neutron node receives resource operation requests of the virtual machines, performs corresponding resource operations (such as creating, deleting, or modifying network resources), and returns responses.
[0122] Those skilled in the art should understand that the embodiments of the present disclosure can be provided as methods and systems. Therefore, the embodiments of the present disclosure can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present disclosure can take the form of a computer program product implemented on one or more computer-readable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage, etc.) containing computer usable program code.
[0123] The embodiments of the present disclosure are described with reference to the flowcharts and / or block diagrams of the methods, systems according to the embodiments of the present disclosure. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, as well as combinations of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminals to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminals produce an apparatus for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions specified in a flow or multiple flows and / or blocks Figure 1 The functions specified in a flow or multiple flows and / or blocks These computer program instructions can also be stored in a computer-readable memory that can direct the computer or other programmable data processing terminals to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including instruction apparatuses that implement the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions specified in a flow or multiple flows and / or blocks Figure 1The computer program instructions can also be loaded onto a computer or other programmable data processing terminal device to cause a series of operational steps to be performed on the computer or other programmable terminal device to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal device provide steps for implementing the flow Figure 1 The computer program instructions can also be loaded onto a computer or other programmable data processing terminal device to cause a series of operational steps to be performed on the computer or other programmable terminal device to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal device provide steps for implementing the flow Figure 1 The computer program instructions can also be loaded onto a computer or other programmable data processing terminal device to cause a series of operational steps to be performed on the computer or other programmable terminal device to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal device provide steps for implementing the flow
[0124] Although the preferred embodiments of the disclosure have been described, those skilled in the art can make additional changes and modifications to these embodiments once they know the basic inventive concept. Therefore, the appended claims are intended to cover all changes and modifications falling within the scope of the preferred embodiments of the disclosure.
[0125] Finally, it should also be noted that, in this document, the terms such as first and second are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the term "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such a process, method, article or terminal device. Without more limitations, the elements defined by the statement "comprising" do not exclude the presence of additional identical elements in the process, method, article or terminal device including the elements. The above has described in detail a business data processing method and system provided by the disclosure, and the principles and implementation manners of the disclosure are described by applying specific examples in this document, and the above description of the embodiments is only used to help understand the method of the disclosure and its core idea; meanwhile, for those skilled in the art, according to the idea of the disclosure, the specific implementation manners and application ranges will be changed, and the above description of the content of the specification should not be understood as a limitation of the disclosure.
Claims
1. A service data processing method characterized by, The application is applied to a virtualization platform, a platform message confirmation table is configured in a local database of the virtualization platform; The method comprises: initiating a target request of a resource operation to a Neutron node; capturing a response returned by the Neutron node, the response being a result of the resource operation; waiting for the Neutron node to recover to an online state in a preset period of time, in a case where the response returned by the Neutron node is not captured; after detecting that the Neutron node recovers to the online state, synchronizing service data related to the resource operation between the virtualization platform and the Neutron node based on target request information in the platform message confirmation table and target request information in a node message confirmation table, the node message confirmation table being configured in a database of the Neutron node.
2. The method of claim 1, wherein, The method comprises: receiving a platform identifier allocated to the virtualization platform by the Neutron node; generating a target request identifier according to the platform identifier and a timestamp when the target request is initiated, and carrying the target request identifier into a data header of the target request; sending the target request to the Neutron node, and recording target request information of the target request in the platform message confirmation table, the target request information comprising a target request identifier, a resource ID and a confirmation state; setting the confirmation state of the target request information in the platform message confirmation table to be to-be-executed.
3. The method of claim 1, wherein, The method further comprises: in a case where the response returned by the Neutron node is captured in the preset period of time, updating the confirmation state of the target request information in the platform message confirmation table to be completed; sending a confirmation notification to the Neutron node, the confirmation notification being used to notify the Neutron node to update the confirmation state of the target request information in the node message confirmation table to be confirmed.
4. The method of claim 1, wherein, The method further comprises: in a case where the response returned by the Neutron node is not captured in the preset period of time, updating the confirmation state of the target request information in the platform message confirmation table to be to-be-confirmed; after detecting that the Neutron node recovers to the online state, synchronizing service data related to the resource operation between the virtualization platform and the Neutron node based on target request information in the platform message confirmation table and target request information in a node message confirmation table, the node message confirmation table being configured in a database of the Neutron node, comprises: after detecting that the Neutron node recovers to the online state, scanning the platform message confirmation table to determine target request information with a to-be-confirmed confirmation state; querying the node message confirmation table of the Neutron node according to a target request identifier of the target request information, and determining target request information corresponding to the target request identifier from the node message confirmation table; Synchronizing the service data related to the resource operation between the virtualization platform and the Neutron node according to the confirmation state of the target request information in the node message confirmation table.
5. The method of claim 4, wherein, Synchronizing the service data related to the resource operation between the virtualization platform and the Neutron node according to the confirmation state of the target request information in the node message confirmation table, comprising: When the confirmation state of the target request information in the node message confirmation table is to be executed, performing data rollback on the service data related to the resource operation in the database of the virtualization platform, restoring the service data to the version before the request is initiated, and updating the platform message confirmation table to be confirmed; When the confirmation state of the target request information in the node message confirmation table is completed, performing corresponding resource addition on the service data related to the resource operation in the database of the virtualization platform, and updating the platform message confirmation table to be confirmed; When the confirmation state of the target request information in the node message confirmation table is to be confirmed, updating the confirmation state in the platform message confirmation table to be confirmed.
6. The method of claim 1, wherein, The Neutron node is configured with a service state detection interface; the method further comprises: After successfully accessing the Neutron node, detecting the service state of the Neutron node by periodically calling the service state detection interface of the Neutron node, the service state including online state and offline state.
7. The method of claim 2, wherein, The virtualization platform is configured with a message recording interface; Before initiating a target request for resource operation to the Neutron node, the method further comprises: Defining a message recording aspect in the message recording interface based on SpringAOP technology; After initiating a target request for resource operation to the Neutron node, further comprising: Calling the message recording interface, intercepting the target request through the message recording aspect, and returning the interface parameters corresponding to the target request; Extracting the target request identifier, resource ID and confirmation state from the interface parameters, and writing the extracted target request identifier, resource ID and confirmation state into the target request information in the platform message confirmation table.
8. A service data processing method characterized by comprising: Applied to a Neutron node, the local database of the Neutron node is configured with a node message confirmation table, and the Neutron node is configured with a service state detection interface, which is configured to enable the virtualization platform to detect the service state of the Neutron node, the service state including online state and offline state; The method comprises: Receiving a target request for resource operation from a virtualization platform; Executing the resource operation indicated by the target request and returning the execution result to the virtualization platform; In the case that the communication exception causes the execution result to be unable to be successfully returned to the virtualization platform within a preset period of time, waiting for the communication exception to be repaired to restore the online state again; After detecting that the Neutron node is back online by the service state detection interface, the virtualization platform synchronizes the service data related to the resource operation between the virtualization platform and the Neutron node based on the target request information in the platform message confirmation table and the target request information in the node message confirmation table.
9. The method of claim 8, wherein, After receiving the target request of the resource operation from the virtualization platform, the method further comprises: obtaining the target request identification from the target request data header; recording the target request information of the target request into the node message confirmation table according to the target request identification, and setting the confirmation state of the target request information in the node message confirmation table as to-be-executed, wherein the target request information comprises the target request identification, the resource ID and the confirmation state; executing the resource operation indicated by the target request; obtaining the execution result of the resource operation and returning the execution result to the virtualization platform; in the case of obtaining the execution result of the resource operation, returning the response of the resource operation execution result to the virtualization platform and updating the confirmation state of the target request information in the node message confirmation table as completed.
10. A service processing system, characterized by The system comprises: a virtualization platform, which is deployed with a virtual machine, wherein the virtual machine communicates with a Neutron node for multiple times when using an SDN function; a Neutron node, which is used to provide a service for implementing the SDN function to the virtual machine in the virtualization platform; the virtualization platform executes the method according to any one of claims 1-7; the Neutron node executes the method according to any one of claims 8-9.
Citation Information
Patent Citations
Synchronous communication method and system for distributed cloud platform and Internet of Things intelligent terminal based on MQTT asynchronous communication scene
CN111580995A
Host resource synchronization method, system and device based on virtualization platform
CN113687987A