A network service processing method, apparatus, electronic device, and storage medium
By introducing a coordinator into the SDN controller to record and coordinate the pre-commit operations of the network service processor and configuration manager, the problem of inconsistent network service processing is solved, and high reliability and stability of network service activation are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-24
- Publication Date
- 2026-03-10
AI Technical Summary
During the network service activation process, inconsistencies in the writing of service data to the database or network element devices by various functional modules can lead to inconsistent network service processing, affecting user experience and network stability.
A coordinator is introduced into the SDN controller to receive distributed transaction registration requests from network service processors and configuration managers, record their respective pre-commit operation records, and drive each module to perform commit or rollback operations after confirming the success of the operation, so as to ensure the consistency of data processing.
Through the unified coordination and management of the coordinator, the consistency of data processing during the network service activation process is ensured, network service failures are avoided, and the reliability and stability of network services are improved.
Smart Images

Figure CN118555181B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of network communication technology, and in particular to a network service processing method, apparatus, electronic device and storage medium. Background Technology
[0002] Software-defined networking (SDN) is a novel network architecture and a method of network virtualization. The SDN controller is responsible for flow control in SDN to ensure the proper functioning of the intelligent network. Based on southbound interface protocols such as OpenFlow and Netconf, the SDN controller enables unified management of all network devices, thereby achieving rapid deployment, resource integration, unified planning, and on-demand deployment.
[0003] Currently, the overall architecture of an SDN controller mainly includes the device layer (also known as the data plane), the platform layer (also known as the control plane), and the application layer (also known as the application plane), as detailed below. Figure 1 As shown in the diagram. The data plane consists of network elements such as switches and routers. These network elements are connected via SDN data paths formed by different rules. It can receive routing configurations from the control plane and configurations executed directly by users through the command-line interface (CLI). The control plane holds global network information, provides basic network services for applications, and is responsible for controlling various forwarding rules. It may include general capabilities such as device management, topology management, and configuration management. The application plane contains various SDN-based network applications, such as providing functions like Virtual Private Network (VPN) activation, Quality of Service (QoS) policy configuration, and network diagnostics. Specific service activation relies on software platforms, the control plane, and network elements.
[0004] Based on the above Figure 1The architecture diagram shown illustrates that network service activation mainly includes the following processes: A user sends a VPN service request to the VPN processor via the Web; upon receiving the request, the VPN processor performs corresponding VPN service processing based on the service data in the request and sends the service data to the functional modules related to the VPN service request (e.g., routing processor, configuration manager, etc.) for further VPN service processing. If, during this VPN service processing, the service data generated by the configuration manager is successfully distributed to the designated network element device via the Netconf protocol or other protocols; and if the service data generated by the VPN processor and routing processor are successfully stored in the database, then the network service activation is successful.
[0005] However, during network service activation, each functional module needs to write its own modified service data to the database or network element devices. If any one of these processes fails (for example, failing to write the modified service data to the database), it will lead to inconsistencies in the entire VPN service processing. This means that the entire network service activation is not atomic, i.e., not entirely successful. Inconsistent data processing will cause network service activation to fail, affecting subsequent operations and even causing network outages, thus impacting user experience.
[0006] Therefore, ensuring data processing consistency when activating network services is an urgent problem that needs to be solved. Summary of the Invention
[0007] This application provides a network service processing method to solve the problem of inconsistent data processing.
[0008] Firstly, a network service processing method is provided, applied in an SDN controller, wherein the SDN controller includes a coordinator, a network service processor, and a configuration manager, and the method includes:
[0009] The coordinator receives a distributed transaction registration request initiated by the network service processor and performs distributed transaction registration based on the distributed transaction registration request; wherein, the distributed transaction registration request is generated by the network service processor based on a service request initiated by a user terminal device; the coordinator registers pre-commit operation records initiated by the network service processor and the configuration manager in the distributed transaction; wherein, each of the pre-commit operation records is generated by the network service processor and the configuration manager based on the service data in the service request; if the coordinator determines that the results of the pre-commit operations performed by the network service processor and the configuration manager are both successful, then, based on their respective pre-commit operation records, the coordinator drives the network service processor and the configuration manager to perform their respective commit operations.
[0010] In one possible implementation, the pre-commit operation record of the network service processor carries a first data identifier of the first service data generated by the network service processor based on the service data; the pre-commit operation record of the configuration manager carries a second data identifier of the second service data generated by the configuration manager based on the service data; the step of driving the network service processor and the configuration manager to execute their respective commit operations based on the respective pre-commit operation records includes:
[0011] Based on the second data identifier, the configuration manager is driven to perform its own commit operation to make the second service data effective; based on the first data identifier, the network service processor is driven to perform its own commit operation to make the first service data effective.
[0012] In one possible implementation, the pre-commit operation of the network service processor is that the network service processor pre-writes the first service data generated by the network service processor to the database; the pre-commit operation of the configuration manager is that the configuration manager pre-configures and sends the second service data generated by the configuration manager to the network element device.
[0013] In one possible implementation, the method further includes:
[0014] If the coordinator determines that at least one of the pre-commit operations performed by the network service processor and the configuration manager has failed, it drives the network service processor and the configuration manager to perform their respective rollback operations based on their respective pre-commit operation records.
[0015] Secondly, a network service processing method is provided, applied in an SDN controller, wherein the SDN controller includes a coordinator, a network service processor, and a configuration manager, and the method includes:
[0016] The network service processor sends a distributed transaction registration request to the coordinator based on a service request initiated by a user terminal device. The network service processor then initiates its own pre-commit operation record to the coordinator based on the service data in the service request, and sends the service data to the configuration manager. This allows the configuration manager to initiate its own pre-commit operation record to the coordinator based on the service data, and then execute its own pre-commit operation. The network service processor executes its own pre-commit operation and sends the results of its pre-commit operation and the configuration manager's pre-commit operation to the coordinator. If the coordinator determines that the pre-commit operations of both the network service processor and the configuration manager are successful, it then drives the network service processor and the configuration manager to execute their respective commit operations based on their respective pre-commit operation records.
[0017] In one possible implementation, the network service processor initiates its own pre-commit operation record to the coordinator based on the service data in the service request, including:
[0018] The network service processor processes the service data to generate first service data; it then initiates its own pre-commit operation record to the coordinator based on the first service data; correspondingly, the network service processor performs its own pre-commit operation, including:
[0019] The network service processor prewrites the first service data into the database.
[0020] In one possible implementation, the network service processor initiates its own pre-commit operation record to the coordinator based on the service data in the service request, and sends the service data to the configuration manager, so that after the configuration manager initiates its own pre-commit operation record to the coordinator based on the service data, it executes its own pre-commit operation, including:
[0021] The network service processor initiates its own pre-commit operation record to the coordinator. The pre-commit operation record of the network service processor carries a first data identifier of the first service data, enabling the coordinator to drive the network service processor to perform its own commit operation or rollback operation based on the first data identifier. The commit operation of the network service processor is used to make the first service data effective. The network service processor sends the service data to the configuration manager, enabling the configuration manager to generate second service data based on the service data, and after initiating its own pre-commit operation record to the coordinator based on the second service data, executes its own pre-commit operation. The pre-commit operation of the configuration manager carries a second data identifier of the second service data. The second data identifier is used by the coordinator to drive the configuration manager to perform its own commit operation or rollback operation based on the second data identifier. The commit operation of the configuration manager is used to make the second service data effective.
[0022] In one possible implementation, the pre-commit operation of the configuration manager involves the configuration manager pre-configuring and sending the second service data to the network element device.
[0023] Thirdly, a coordinator is provided, applied in an SDN controller, wherein the SDN controller includes the coordinator, a network service processor, and a configuration manager, and the coordinator includes:
[0024] A registration module is configured to receive a distributed transaction registration request initiated by the network service processor and perform distributed transaction registration based on the distributed transaction registration request; wherein the distributed transaction registration request is generated by the network service processor based on a service request initiated by a user terminal device; and to register pre-commit operation records initiated by the network service processor and the configuration manager respectively in the distributed transaction; wherein the pre-commit operation records initiated by each are generated by the network service processor and the configuration manager respectively based on the service data in the service request; a driving module is configured to drive the network service processor and the configuration manager to perform their respective commit operations according to the respective pre-commit operation records if the coordinator determines that the results of the pre-commit operations performed by the network service processor and the configuration manager are both successful.
[0025] Fourthly, a network service processor is provided, applied in an SDN controller, wherein the SDN controller includes a coordinator, the network service processor, and a configuration manager, and the network service processor includes:
[0026] The sending module is configured to send a distributed transaction registration request to the coordinator based on a service request initiated by a user terminal device; and to initiate its own pre-commit operation record to the coordinator based on the service data in the service request, and to send the service data to the configuration manager, so that the configuration manager executes its own pre-commit operation after initiating its own pre-commit operation record to the coordinator based on the service data.
[0027] The execution module is used to perform its own pre-commit operation and send the results of its own pre-commit operation and the results of the pre-commit operation performed by the configuration manager to the coordinator. If the coordinator determines that the results of the pre-commit operations performed by the network service processor and the configuration manager are both successful, it will drive the network service processor and the configuration manager to perform their respective commit operations based on their respective pre-commit operation records.
[0028] Fifthly, an SDN controller is provided, the SDN controller including a coordinator, a network service processor, and a configuration manager; wherein the coordinator is connected to the network service processor and the configuration manager respectively, and the network service processor calls the configuration manager;
[0029] The coordinator is configured to receive a distributed transaction registration request initiated by the network service processor, and perform distributed transaction registration based on the distributed transaction registration request; wherein the distributed transaction registration request is generated by the network service processor based on a service request initiated by a user terminal device; and to register pre-commit operation records initiated by the network service processor and the configuration manager respectively in the distributed transaction; wherein the pre-commit operation records are generated by the network service processor and the configuration manager respectively based on service data in the service request; and to drive the network service processor and the configuration manager to execute their respective commit operations based on their respective pre-commit operation records if it is determined that the results of the pre-commit operations performed by the network service processor and the configuration manager are both successful.
[0030] The network service processor is configured to send a distributed transaction registration request to the coordinator based on a service request initiated by a user terminal device; to initiate its own pre-commit operation record to the coordinator based on the service data in the service request, and to send the service data to the configuration manager to execute its own pre-commit operation; and to send the result of its own pre-commit operation and the result of the pre-commit operation executed by the configuration manager to the coordinator.
[0031] The configuration manager is used to initiate its own pre-commit operation record to the coordinator based on the service data sent by the network service processor, execute its own pre-commit operation, and send the result of its pre-commit operation to the network service processor.
[0032] Sixthly, an electronic device is provided, comprising:
[0033] A memory for storing computer programs; a processor for executing the computer programs stored in the memory to implement the method steps described in any one of the first aspects.
[0034] In a seventh aspect, a computer-readable storage medium is provided, wherein a computer program is stored therein, and when executed by a processor, the computer program implements the method steps described in any one of the first aspects.
[0035] In this embodiment, a coordinator is added to the SDN controller architecture to receive distributed transaction registration requests initiated by network service processors and perform distributed transaction registration based on these requests. This facilitates the subsequent recording of the entire service data processing process. The coordinator registers the pre-commit operation records initiated by the network service processor and configuration manager in the distributed transaction, which is used as a basis to determine which operation each module should perform, thereby ensuring high reliability of network service activation. If the coordinator determines that the pre-commit operations of the network service processor and the configuration manager are both successful, it drives the network service processor and the configuration manager to perform their respective commit operations based on their pre-commit operation records. Therefore, the newly added coordinator can uniformly coordinate and manage the modules in the SDN controller, dividing the network service activation process into two parts: a data pre-commit stage and a stage where, based on the results of the first part, the coordinator drives each module to perform either a commit operation or a rollback operation. This ensures that data processing remains consistent throughout the entire network service activation process. Furthermore, during the rollback operation, duplicate or abnormal data can be specifically eliminated without affecting other network service requests (e.g., device CLI operations).
[0036] For the various aspects of the second to sixth aspects mentioned above, and the technical effects that each aspect may achieve, please refer to the above description of the technical effects that can be achieved for the first aspect or the various possible solutions in the first aspect, which will not be repeated here. Attached Figure Description
[0037] Figure 1 This is a schematic diagram of the architecture of a currently available SDN controller;
[0038] Figure 2This is a logical diagram illustrating the current implementation of distributed transactions based on the two-phase protocol.
[0039] Figure 3 This is a schematic diagram illustrating an application scenario applicable to an embodiment of this application;
[0040] Figure 4 A schematic diagram of the internal architecture of an SDN controller provided in an embodiment of this application;
[0041] Figure 5 A flowchart of a network service processing method based on the coordinator side is provided in this application embodiment;
[0042] Figure 6 A flowchart illustrating a network service processing method based on a network service processor side, as provided in this application embodiment;
[0043] Figure 7 This application provides an example of an interactive diagram of network service processing.
[0044] Figure 8 A schematic diagram of the structure of a coordinator provided in an embodiment of this application;
[0045] Figure 9 This is a schematic diagram of the structure of a network service processor provided in an embodiment of this application;
[0046] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0047] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The specific operational methods in the method embodiments can also be applied to the device embodiments or system embodiments. It should be noted that in the description of this application, "multiple" is understood as "at least two". "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. A connected to B can represent: A and B directly connected, and A and B connected through C. Furthermore, in the description of this application, terms such as "first" and "second" are used only for distinguishing the purpose of description and should not be construed as indicating or implying relative importance or order.
[0048] To better understand the embodiments of this application, the technical terms involved in the embodiments of this application will be explained below.
[0049] (1) QoS, or Quality of Service. In network services, QoS includes transmission bandwidth, transmission latency, and data packet loss rate. In a network, QoS can be improved by ensuring transmission bandwidth, reducing transmission latency, reducing data packet loss rate, and mitigating latency jitter.
[0050] (2) Software platform: Provides standard, flexible and reusable technical components and services for applications, supports application development, delivery and stable and reliable operation, and can also store various data generated in the database.
[0051] (3) Distributed transactions refer to transactions (businesses) where the participants, the servers supporting the transactions, the resource manager, and the transaction manager are located on different nodes of different distributed systems.
[0052] (4) The Two-Phase Commit Protocol (2PC) guarantees strong data consistency and is used by many distributed relational data management systems to complete distributed transactions. In this protocol, a Transaction Manager (TM), corresponding to the coordinator below, coordinates one or more Resource Managers (RM), corresponding to the processors and configuration managers below, to complete business processing. The Two-Phase Commit Protocol mainly implements distributed transactions through two phases, thereby ensuring the atomicity of business operations across multiple modules and data consistency, such as... Figure 2 As shown:
[0053] In the first phase, the transaction initiator initiates a transaction (or business) to the transaction manager. The transaction manager sends a transaction preparation request to all transaction participants (resource manager A, resource manager B). After receiving the transaction preparation request, each resource manager executes its local transaction, completes the preparation of the data to be committed, and reports its own preparation status to the transaction manager.
[0054] In the second phase, the transaction manager drives each resource manager to perform a commit transaction operation or a rollback transaction operation based on their reported readiness status. Specifically, if each resource manager reports that it has completed preparation, the transaction manager sends a commit transaction request to each resource manager. After receiving the request, each resource manager executes the commit transaction operation for its local transaction. If a resource manager reports that it has not completed preparation (for example, resource manager B), the transaction manager sends a rollback transaction request to resource managers A and B. After receiving the request, resource managers A and B each execute the rollback transaction operation for their local transaction.
[0055] (5) The Candidate protocol is a type of Netconf protocol, which may include capability exchange, writable execution capability, candidate configuration capability, acknowledgment commit capability, rollback error capability, verification capability, unique startup capability, Uniform Resource Locator (URL) capability, etc. Among them, the candidate configuration capability indicates that the device supports candidate configuration data storage, which is used to save configuration data that can be operated without affecting the current configuration of the device. The acknowledgment commit capability refers to submitting the above candidate configuration, and the rollback error capability refers to rolling back the above candidate configuration, thereby enabling the device configuration to have the ability to pre-commit, commit, or rollback.
[0056] The following is a brief introduction to the application scenarios to which the technical solutions of the embodiments of this application are applicable. It should be noted that the application scenarios described below are only for illustrating the embodiments of this application and are not intended to limit the scope. In specific implementation, the technical solutions provided by the embodiments of this application can be flexibly applied according to actual needs.
[0057] Figure 3 This is a schematic diagram illustrating an application scenario applicable to the embodiments of this application. The scenario mainly includes a user terminal device 30 and an SDN controller 31; wherein, the user terminal device 30 and the SDN controller 31 can interact via a communication network, and the communication network can employ wireless communication or wired communication methods.
[0058] For example, the user terminal device 30 can access the network and communicate with the SDN controller 31 through cellular mobile communication technology, which may include 5th generation mobile network (5G) technology.
[0059] For example, the user terminal device 30 can access the network and communicate with the SDN controller 31 via short-range wireless communication, which may include Wireless Fidelity (Wi-Fi) technology.
[0060] This application embodiment does not impose any limitation on the number of the above-mentioned devices, such as Figure 3 As shown, only the user terminal device 30 and SDN controller 31 are described as examples. The following is a brief introduction to each of the above devices and their respective functions.
[0061] User terminal device 30 is a device that can provide voice and / or data connectivity to users, including: handheld terminal devices with wireless connectivity, vehicle-mounted terminal devices, etc.
[0062] For example, the user terminal device 30 includes, but is not limited to: mobile phones, tablets, laptops, handheld computers, mobile internet devices (MID), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminal devices in industrial control, wireless terminal devices in autonomous driving, wireless terminal devices in smart grids, wireless terminal devices in transportation safety, wireless terminal devices in smart cities, or wireless terminal devices in smart homes, etc.
[0063] Furthermore, the user terminal device 30 may have a client related to network service processing installed. This client may be software (e.g., an app, a browser, etc.), or a webpage, a mini-program, etc. In this embodiment, the user terminal device 30 can use the aforementioned client related to network service processing and can interact with the SDN controller 31 to exchange information related to network service scenarios. For example, the user terminal device 30 may send a service request carrying service data to the SDN controller 31.
[0064] SDN controller 31 can be used to process network services (e.g., activate VPN services) in response to service requests from user terminal device 30. SDN controller 31 can be equipped with a network service processing system corresponding to the aforementioned client to handle various network services. Furthermore, SDN controller 31 can combine two-phase distributed transaction protocols, Candidate protocols, etc., to build a logical framework that enables data consistency and isolation of multiple inputs (e.g., isolation of database operations by different modules) during network service processing, thereby supporting cross-device network configuration distribution and strong data storage consistency. It can also combine open-source application frameworks (e.g., Spring Boot framework) and Java annotations to provide a complete programming model that guarantees the atomicity of network service activation, supporting rapid development and deployment of network services while ensuring code quality and reducing network service implementation costs.
[0065] like Figure 4 As shown, an exemplary schematic diagram illustrates the internal structure of an SDN controller provided in an embodiment of this application. Figure 4 As shown, the SDN controller 400 mainly includes an application layer, a platform layer, and a device layer. The application layer primarily includes a network service processor; the platform layer may include a software platform and a network controller platform, the software platform including a coordinator and a database, and the network controller platform including a configuration manager; the device layer mainly consists of network element devices (e.g., switches).
[0066] In the SDN controller, the coordinator can connect to the network service processor and the configuration manager respectively, and can exchange information. The network service processor can call the configuration manager to exchange information. The above modules will be described one by one below.
[0067] For example, a network service processor can be used based on user terminal equipment (such as...) Figure 3 The user terminal device 30) shown in the diagram initiates a service request and sends a distributed transaction registration request to the coordinator. It can also be used to initiate its own pre-commit operation record to the coordinator based on the service data in the service request, and to send the service data to the configuration manager to execute its own pre-commit operation. Furthermore, it can send the results of its own pre-commit operation and the results of the configuration manager's pre-commit operation to the coordinator. Further, when the network service processor receives a driving instruction initiated by the coordinator based on the results of its respective pre-commit operations, it can execute its own commit operation or rollback operation according to the driving instruction.
[0068] For example, there may be more than one network service processor, which can be allocated according to the actual service request. This application embodiment does not impose any restrictions here. For example, when the service request is used to request the activation of VPN service, the network service processor may specifically include a VPN processor and a routing processor. The VPN processor is a processor allocated based on the type of service request, and the routing processor is a processor allocated to participate in the service request and can be called by the VPN processor.
[0069] For example, the configuration manager, based on the service data sent by the network service processor, initiates its own pre-commit operation record to the coordinator, executes its own pre-commit operation, and sends the result of its pre-commit operation to the network service processor. During this process, the configuration manager can also combine with the device manager, topology manager, etc., in the platform layer to parse and process the service data from the network service processor. Furthermore, when the configuration manager receives a drive instruction from the coordinator based on the results of its respective pre-commit operations, it can execute its own commit operation or rollback operation according to the drive instruction.
[0070] For example, the coordinator is used to receive a distributed transaction registration request initiated by the network service processor, and to perform distributed transaction registration based on the distributed transaction registration request; wherein the distributed transaction registration request is generated by the network service processor based on the service request initiated by the user terminal device; it is used to register the pre-commit operation records initiated by the network service processor and the configuration manager in the distributed transaction; wherein the pre-commit operation records initiated by each are generated by the network service processor and the configuration manager based on the service data in the service request; and, if it is determined that the results of the pre-commit operations performed by the network service processor and the configuration manager are both successful, it drives the network service processor and the configuration manager to perform their respective commit operations according to their respective pre-commit operation records.
[0071] In this embodiment, a coordinator is added to the software platform of the SDN controller to coordinate and manage the network service processor and configuration manager, thereby ensuring the consistency of data processing during the network service activation process.
[0072] To further illustrate the technical solutions provided in the embodiments of this application, a detailed description is provided below in conjunction with the accompanying drawings and specific implementation methods. Although the embodiments of this application provide method operation steps as shown in the following embodiments or drawings, the method may include more or fewer operation steps based on conventional or non-inventive methods. In steps where there is no logically necessary causal relationship, the execution order of these steps is not limited to the execution order provided in the embodiments of this application. In actual processing or when the device executes the method, it may be executed in the order shown in the embodiments or drawings, or in combination.
[0073] Figure 5 This flowchart illustrates a network service processing method based on the coordinator side, provided as an embodiment of this application, to ensure data processing consistency. Figure 5 As shown, the process includes the following steps:
[0074] In this embodiment of the application, the method is applied to an SDN controller (such as...). Figure 4 The SDN controller 400 shown includes a coordinator, a network service processor, and a configuration manager.
[0075] 501: The coordinator receives a distributed transaction registration request initiated by the network service processor and performs distributed transaction registration based on the distributed transaction registration request.
[0076] For example, the distributed transaction registration request is generated by the network service processor based on a service request initiated by the user terminal device. This service request carries service data to be processed, which may include the user terminal device (e.g., ...). Figure 3The user terminal device 30 shown has the following information: identification, service type, service name, etc.
[0077] The interaction process in this step can be as follows: the user terminal device sends a service request to the network service processor. After receiving the service request, the network service processor sends a distributed transaction registration request to the coordinator based on the service request. After receiving the distributed transaction request, the coordinator performs distributed transaction registration, so that the subsequent processing process of the service data by the network service processor and the configuration manager can be recorded in real time.
[0078] 502: The coordinator registers the pre-commit operation records initiated by the network service processor and configuration manager in the distributed transaction.
[0079] For example, the pre-commit operation records initiated by each are generated by the network service processor and the configuration manager based on the service data in the service request.
[0080] For example, the pre-submission operation record of the network service processor carries a first data identifier of the first service data generated by the network service processor based on the service data; the pre-submission operation record of the configuration manager carries a second data identifier of the second service data generated by the configuration manager based on the service data.
[0081] In other embodiments, the respective pre-commit operation records may also carry a detailed description of the respective pre-commit operation performed.
[0082] For example, the pre-commit operation performed by the network service processor is to pre-write the first service data generated by the network service processor to the database.
[0083] For example, the pre-commit operation performed by the configuration manager is to pre-configure and send the second service data generated by the configuration manager to the network element device. For instance, the configuration manager pre-configures and sends the second service data to the network element device based on the candidate protocol or other protocols.
[0084] In some embodiments, the coordinator registers the pre-commit operation records initiated by the network service processor and configuration manager in the distributed transaction. These records can be in the form of a distributed transaction record table or in other forms; this application embodiment does not impose any limitations on this. Table 1 illustrates an example of a distributed transaction record table.
[0085] Table 1: Distributed Transaction Record Table
[0086]
[0087]
[0088] For example, during the process of the coordinator registering the pre-commit operation records initiated by the network service processor and the configuration manager in a distributed transaction, the following interaction process may be included: The coordinator completes the above-mentioned distributed transaction registration; the network service processor processes the service data to obtain first service data; based on the first service data, it initiates its own pre-commit operation record to the coordinator and sends the service data to the configuration manager; the configuration manager processes the service data to obtain second service data; based on the second service data, it initiates its own pre-commit operation record to the coordinator; when the coordinator receives the respective pre-commit operation records, it can register them (as shown in Table 1 above), so that the coordinator can use this as a basis to drive the network service processor and the configuration manager to perform commit operations or rollback operations accordingly, thereby ensuring the consistency of data processing throughout the entire network service activation process.
[0089] For example, after the network service processor initiates its own pre-submission operation record to the coordinator based on the first service data, it can perform its own pre-submission operation based on the first service data.
[0090] For example, after the configuration manager initiates its own pre-commit operation record to the coordinator based on the second business data, it can perform its own pre-commit operation based on the second business data.
[0091] It should be noted that there is no order in which the configuration manager and the network service processor complete their respective pre-commit operations. The configuration manager can complete its own pre-commit operation first, the network service processor can complete its own pre-commit operation first, or the configuration manager and the network service processor can complete their respective pre-commit operations simultaneously.
[0092] Through the above steps, the coordinator can record the processing of service data by the network service processors and configuration managers in the SDN controller, and manage the changes to service data in a unified manner. This allows the coordinator to use this as a basis to drive each processor to perform commit or rollback operations accordingly, ensuring the consistency of data processing throughout the entire network service activation process.
[0093] 503: The coordinator determines whether the pre-commit operations performed by the network service processor and configuration manager were successful. If successful, it proceeds to 504; otherwise, it proceeds to 505.
[0094] For example, after the configuration manager completes its own pre-commit operation, the result can first be fed back to the network service processor, and then sent to the coordinator via the network service processor. The network service processor then integrates the results of each pre-commit operation.
[0095] For example, a 504 error can be initiated under the following conditions: if the coordinator determines that the pre-commit operations performed by the network service processor and the configuration manager are both successful, then a 504 error will be initiated.
[0096] For example, a 505 redirect can be made if the coordinator determines that at least one of the pre-commit operations performed by the network service processing and configuration manager has failed.
[0097] 504: Based on the respective pre-commit operation records mentioned above, the network service processor and configuration manager will execute their respective commit operations.
[0098] For example, the network service processor and the configuration manager can each perform their respective commit operations, which may include: according to the second data identifier (such as data 2 in Table 1), the configuration manager performs its own commit operation to make the second service data effective; and according to the first data identifier (such as data 1 in Table 1), the network service processor performs its own commit operation to make the first service data effective.
[0099] For example, the driver configuration manager can perform its own commit operation. Specifically, the coordinator can send a driver instruction to the configuration manager based on the second data identifier to instruct the configuration manager to perform its own commit operation. When the configuration manager receives the driver instruction, it can perform its own commit operation.
[0100] For example, driving a network service processor to perform its own commit operation can be achieved by the coordinator sending a driving instruction to the network service processor based on the first data identifier, instructing the network service processor to perform its own commit operation; when the network service processor receives the driving instruction, it can perform its own commit operation.
[0101] 505: Based on the respective pre-commit operation records mentioned above, the network service processor and configuration manager will execute their respective rollback operations.
[0102] For example, the network service processor and the configuration manager can each perform their own rollback operations, which may include: according to the second data identifier (such as data 2 in Table 1), the configuration manager performs its own rollback operation to roll back the second service data; and according to the first data identifier (such as data 1 in Table 1), the network service processor performs its own commit operation to roll back the first service data.
[0103] For example, the configuration manager can perform its own rollback operation by having the coordinator send a driver instruction to the configuration manager based on the second data identifier, instructing the configuration manager to perform its own rollback operation. When the configuration manager receives the driver instruction, it can perform its own rollback operation.
[0104] For example, driving the network service processor to perform its own commit operation can be achieved by the coordinator initiating a driving instruction to the network service processor based on the first data identifier, instructing the network service processor to perform its own rollback operation; when the network service processor receives the driving instruction, it can perform its own rollback operation.
[0105] In some embodiments, after the network service activation process is completed, a network service activation message can be sent to the user terminal device through the network service processor. This network service activation message is used to notify the user whether the requested network service has been successfully activated, so that the user can perform subsequent operations accordingly.
[0106] In this embodiment, a coordinator is added to the SDN controller architecture to receive distributed transaction registration requests initiated by network service processors and perform distributed transaction registration based on these requests. This facilitates the subsequent recording of the entire service data processing process. The coordinator registers the pre-commit operation records initiated by the network service processor and configuration manager in the distributed transaction, which is used as a basis to determine which operation each module should perform, thereby ensuring high reliability of network service activation. If the coordinator determines that the pre-commit operations of the network service processor and configuration manager are both successful, it drives the network service processor and configuration manager to perform their respective commit operations based on their pre-commit operation records. Therefore, the newly added coordinator can uniformly coordinate and manage the modules in the SDN controller, dividing the network service activation process into two parts: a data pre-commit phase and a phase where the coordinator drives each module to perform either a commit operation or a rollback operation based on the results of the first phase. This ensures data processing consistency throughout the entire network service activation process. Furthermore, during the rollback operation, duplicate or abnormal data can be specifically eliminated without affecting other network service requests (e.g., device CLI operations).
[0107] Figure 6 A flowchart of a network service processing method based on the network service processor side is provided for embodiments of this application. For example... Figure 6 As shown, the process includes the following steps:
[0108] In this embodiment of the application, the method is applied to an SDN controller (such as...). Figure 4 The SDN controller 400 shown includes a coordinator, a network service processor, and a configuration manager.
[0109] 601: The network service processor sends a distributed transaction registration request to the coordinator based on the service request initiated by the user terminal device.
[0110] Specifically, this step may involve the network service processor receiving a service request from a user terminal device, generating a distributed transaction request based on the service request, and sending the distributed transaction request to the coordinator so that the coordinator can register a distributed transaction based on the distributed transaction request, facilitating real-time recording of subsequent processing.
[0111] 602: The network service processor initiates its own pre-commit operation record to the coordinator based on the service data in the service request, and sends the service data to the configuration manager, so that the configuration manager initiates its own pre-commit operation record to the coordinator based on the service data, and then executes its own pre-commit operation.
[0112] Specifically, this step can involve: the network service processor initiating its own pre-commit operation record to the coordinator. This pre-commit operation record carries a first data identifier of the first service data, enabling the coordinator to drive the network service processor to perform its own commit operation or rollback operation based on the first data identifier. The network service processor's commit operation is used to make the first service data effective. The network service processor then sends the service data to the configuration manager, causing the configuration manager to generate second service data based on the service data. After initiating its own pre-commit operation record to the coordinator based on the second service data, the configuration manager performs its own pre-commit operation. This pre-commit operation carries a second data identifier of the second service data. This second data identifier is used by the coordinator to drive the configuration manager to perform its own commit operation or rollback operation based on the second data identifier. The configuration manager's commit operation is used to make the second service data effective.
[0113] For example, the network service processor initiates its own pre-commit operation record to the coordinator based on the service data in the service request. Specifically, this may include: the network service processor processing the service data to generate first service data; and initiating its own pre-commit operation record to the coordinator based on the first service data.
[0114] For example, the configuration manager's pre-commit operation can specifically be: the configuration manager pre-configures and sends the second service data to the network element device.
[0115] 603: The network service processor performs its own pre-commit operation and sends the results of its own pre-commit operation and the results of the configuration manager's pre-commit operation to the coordinator. If the coordinator determines that the results of the pre-commit operations performed by the network service processor and the configuration manager are both successful, it will drive the network service processor and the configuration manager to perform their respective commit operations based on their respective pre-commit operation records.
[0116] For example, the network service processor performs its own pre-commit operation, which may specifically involve the network service processor pre-writing the first service data to the database.
[0117] The above steps allow the network service processor to integrate the results of its pre-committed operations and feed them back to the coordinator. This enables the coordinator to determine which operation each of the network service processors and the configuration manager should perform based on the results, thereby improving processing efficiency.
[0118] If the coordinator determines that the pre-commit operations of both the network service processor and the configuration manager have been successful, then based on their respective pre-commit operation records, a detailed description of how the coordinator drives the network service processor and the configuration manager to perform their respective commit operations can be found in [reference needed]. Figure 5 The components 503 to 505 will not be described again here.
[0119] Figure 7 This is a schematic diagram illustrating the interaction of network service processing according to an embodiment of this application. Taking VPN activation as an example, the SDN controller includes a coordinator, a configuration manager, and a network service processor, which specifically includes a VPN processor and a routing processor. Figure 7 As shown, the steps may include the following:
[0120] 701: The user terminal device sends a service request carrying service data to the VPN processor.
[0121] The user terminal device can specifically be Figure 3 The user terminal device 30 shown is shown.
[0122] 702: The VPN processor sends a distributed transaction request to the coordinator based on this service request.
[0123] 703: After receiving the distributed transaction request, the coordinator performs distributed transaction registration based on the distributed transaction request.
[0124] 704: The VPN processor processes the service data to obtain service data A, and sends a pre-commit operation record about service data A to the coordinator, so that the coordinator records the relevant information of the VPN processor performing the pre-commit operation.
[0125] The pre-submission operation record carries the data identifier of business data A, for example, data 1. Business data A is newly generated based on business data.
[0126] It should be noted that the 704 error does not have a specific order requirement. For example, the 704 error can occur after 702 or at the same time as 702.
[0127] 705: The VPN processor performs its own pre-commit operation based on the service data A and obtains the result of the pre-commit operation.
[0128] 706: The VPN processor calls the routing processor to send the above service data to the routing processor.
[0129] In some embodiments, business data A and business data can be sent together to the routing processor.
[0130] It should be noted that there is no specific order requirement for 706. For example, 706 can occur at the same time as 705, or it can occur before 705.
[0131] 707: After receiving the above service data, the route processor creates a route for the service data, obtains service data B, and sends the pre-commit operation record related to service data B to the coordinator, so that the coordinator records the relevant information of the route processor performing the pre-commit operation.
[0132] The pre-submission operation record carries the data identifier of business data B, for example, data 3. Business data B can be generated based on business data, or it can be generated based on business data A and business data.
[0133] 708: The routing processor performs its own pre-commit operation based on the service data B and feeds back the result of the pre-commit operation to the VPN processor.
[0134] 709: The routing processor calls the configuration manager to forward the aforementioned service data to the configuration manager. Specifically, the configuration manager can be... Figure 4 The configuration manager in the SDN controller 400 shown. In some embodiments, service data B and service data can also be sent to the configuration manager.
[0135] It should be noted that there is no specific order requirement for 709. For example, 709 can occur at the same time as 708, or it can occur before 708.
[0136] 710: After receiving the above business data, the configuration manager performs configuration processing on the business data to obtain business data C, and sends the pre-commit operation record related to business data C to the coordinator, so that the coordinator records the relevant information of the configuration manager performing the pre-commit operation.
[0137] In some embodiments, the pre-submission operation record carries a data identifier for business data C, such as data 2. The business data C may be generated based on business data, or it may be generated based on business data B and business data.
[0138] 711: The configuration manager performs its own pre-commit operation based on the target business data C, and sends the result of the pre-commit operation to the VPN processor via the routing processor.
[0139] 712: The VPN processor sends the results of the pre-commit operations performed by 705, 708, and 711 above to the coordinator.
[0140] 713: The coordinator determines whether the results of the pre-commit operations performed by each of the above are successful. If yes, proceed to 714; otherwise, proceed to 715.
[0141] 714: The coordinator determines which VPN processor, route processor, and configuration manager will execute their respective commit operations based on their respective pre-commit operation records.
[0142] 715: The coordinator determines which VPN processor, routing processor, and configuration manager will execute their respective rollback operations based on their respective pre-commit operation records.
[0143] Based on the same technical concept, this application embodiment also provides a coordinator, which is applied in an SDN controller and can implement the network service processing method described above in this application embodiment.
[0144] Figure 8 This is a schematic diagram of a coordinator provided in an embodiment of this application. The coordinator is applied in an SDN controller, which includes a network service processor, the coordinator, and a configuration manager. Figure 8 As shown, the coordinator includes: a registration module 801 and a driver module 802.
[0145] The registration module 801 is configured to receive a distributed transaction registration request initiated by the network service processor, and perform distributed transaction registration based on the distributed transaction registration request; wherein the distributed transaction registration request is generated by the network service processor based on a service request initiated by a user terminal device; and to register pre-commit operation records initiated by the network service processor and the configuration manager respectively in the distributed transaction; wherein the pre-commit operation records initiated by each are generated by the network service processor and the configuration manager respectively based on the service data in the service request.
[0146] The driver module 703 is configured to drive the network service processor and the configuration manager to perform their respective commit operations based on their respective pre-commit operation records if the coordinator determines that the pre-commit operations performed by the network service processor and the configuration manager are both successful.
[0147] For example, the pre-submission operation record of the network service processor carries a first data identifier of the first service data generated by the network service processor based on the service data; the pre-submission operation record of the configuration manager carries a second data identifier of the second service data generated by the configuration manager based on the service data; the driver module 703 is specifically used for:
[0148] Based on the second data identifier, the configuration manager is driven to perform its own commit operation to make the second service data effective; based on the first data identifier, the network service processor is driven to perform its own commit operation to make the first service data effective.
[0149] For example, the drive module 703 is further configured to:
[0150] If the coordinator determines that at least one of the pre-commit operations performed by the network service processor and the configuration manager has failed, it drives the network service processor and the configuration manager to perform their respective rollback operations based on their respective pre-commit operation records.
[0151] It should be noted that the coordinator provided in this application embodiment can implement all the method steps in the above network service processing method embodiment and achieve the same technical effect. Here, the parts and beneficial effects that are the same as those in the method embodiment will not be described in detail.
[0152] Based on the same technical concept, this application embodiment also provides a network service data unit, which is applied in an SDN controller to implement the process of the network service processing method described above in this application embodiment.
[0153] Figure 9 This is a schematic diagram of the structure of a network service processor provided in an embodiment of this application. The network service processor is applied in an SDN controller, which includes the network service processor, a coordinator, and a configuration manager. Figure 9 As shown, the network service processor includes: a sending module 901 and an execution module 902.
[0154] The sending module 901 is configured to send a distributed transaction registration request to the coordinator based on a service request initiated by a user terminal device; and to initiate its own pre-commit operation record to the coordinator based on the service data in the service request, and to send the service data to the configuration manager, so that the configuration manager, after initiating its own pre-commit operation record to the coordinator based on the service data, executes its own pre-commit operation.
[0155] The execution module 902 is used to perform its own pre-commit operation and send the results of its own pre-commit operation and the results of the pre-commit operation performed by the configuration manager to the coordinator, so that if the coordinator determines that the results of the pre-commit operations performed by the network service processor and the configuration manager are both successful, then according to the respective pre-commit operation records, it drives the network service processor and the configuration manager to perform their respective commit operations.
[0156] For example, the execution module 902 is specifically used for: the network service processor processing the service data to generate first service data; initiating its own pre-commit operation record to the coordinator based on the first service data; correspondingly, the execution module 902 is specifically used for: pre-writing the first service data into the database.
[0157] For example, the execution module is specifically configured to: initiate its own pre-commit operation record to the coordinator, the pre-commit operation record carrying a first data identifier of the first service data, so that the coordinator drives the network service processor to perform its own commit operation or rollback operation based on the first data identifier, the commit operation of the network service processor being used to make the first service data effective; send the service data to the configuration manager, so that after the configuration manager initiates its own pre-commit operation record to the coordinator based on the service data, carrying a second data identifier of the second service data generated by the configuration manager based on the service data, the configuration manager performs its own pre-commit operation based on the second service data, the second data identifier being used by the coordinator to drive the configuration manager to perform its own commit operation or rollback operation based on the second data identifier, the commit operation of the configuration manager being used to make the second service data effective.
[0158] It should be noted that the network service processor provided in this application embodiment can implement all the method steps in the above network service processing method embodiment and can achieve the same technical effect. Therefore, the parts and beneficial effects that are the same as those in the method embodiment will not be described in detail here.
[0159] Based on the same technical concept, this application also provides an electronic device that can realize the functions of the aforementioned network service processing device.
[0160] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0161] At least one processor 1001 and a memory 1002 connected to at least one processor 1001. In this embodiment, the specific connection medium between the processor 1001 and the memory 1002 is not limited. Figure 10 The example shown is the connection between processor 1001 and memory 1002 via bus 1000. Bus 1000 is... Figure 10 The connections between other components are indicated by thick lines and are for illustrative purposes only, not as limiting information. The Bus 1000 can be divided into address bus, data bus, control bus, etc., for ease of representation. Figure 10 The term 1001 is represented by a single thick line, but this does not imply that there is only one bus or one type of bus. Alternatively, the processor 1001 can also be called a controller; there are no restrictions on the name.
[0162] In this embodiment, the memory 1002 stores instructions executable by at least one processor 1001. By executing the instructions stored in the memory 1002, the at least one processor 1001 can perform a network service processing method described above. The processor 1001 can implement... Figure 8 or Figure 9 The structure shown illustrates the functions of each module.
[0163] The processor 1001 is the control center of the device. It can connect to various parts of the control device through various interfaces and lines. By running or executing instructions stored in memory 1002 and calling data stored in memory 1002, the processor can perform various functions and process data, thereby monitoring the device as a whole.
[0164] In one possible design, processor 1001 may include one or more processing units. Processor 1001 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may also not be integrated into processor 1001. In some embodiments, processor 1001 and memory 1002 may be implemented on the same chip; in some embodiments, they may also be implemented on separate chips.
[0165] The processor 1001 can be a general-purpose processor, such as a central processing unit (CPU), digital signal processor, application-specific integrated circuit, field-programmable gate array or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of a network service processing method disclosed in the embodiments of this application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.
[0166] Memory 1002, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. Memory 1002 may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic storage, magnetic disk, optical disk, etc. Memory 402 can be any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but is not limited thereto. Memory 402 in the embodiments of this application may also be a circuit or any other device capable of implementing storage functions for storing program instructions and / or data.
[0167] By designing and programming the processor 1001, the code corresponding to a network service processing method described in the foregoing embodiments can be embedded into the chip, enabling the chip to execute the code during runtime. Figure 5 or Figure 6 or Figure 7 The illustrated embodiment presents a network service processing method. How to design and program the processor 1001 is a technique well-known to those skilled in the art and will not be described further here.
[0168] It should be noted that the electronic device provided in this application embodiment can implement all the method steps implemented in the above method embodiment and can achieve the same technical effect. Here, the parts that are the same as those in the method embodiment and the beneficial effects will not be described in detail.
[0169] This application also provides a computer-readable storage medium storing computer-executable instructions for causing a computer to perform a network service processing method described in the above embodiments.
[0170] This application also provides a computer program product, which, when invoked by a computer, causes the computer to execute a network service processing method described in the above embodiments.
[0171] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0172] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations 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, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0173] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0174] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0175] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A network service processing method, applied in a software-defined network (SDN) controller, characterized in that, The SDN controller comprises a coordinator, a network service processor and a configuration manager, and the method comprises: The coordinator receives a distributed transaction registration request initiated by the network service processor, and performs distributed transaction registration based on the distributed transaction registration request; wherein the distributed transaction registration request is generated by the network service processor based on a service request initiated by a user terminal device; The coordinator registers pre-commit operation records respectively initiated by the network service processor and the configuration manager in the distributed transaction; wherein the respective pre-commit operation records are generated by the network service processor and the configuration manager based on service data in the service request; If the coordinator determines that the results of the pre-commit operations performed by the network service processor and the configuration manager are both successful, the coordinator drives the network service processor and the configuration manager to perform respective commit operations according to the respective pre-commit operation records. The method further comprises: If the coordinator determines that at least one of the results of the pre-commit operations performed by the network service processor and the configuration manager is unsuccessful, the coordinator drives the network service processor and the configuration manager to perform respective rollback operations according to the respective pre-commit operation records.
2. The method of claim 1, wherein, The pre-commit operation record of the network service processor carries a first data identifier of first service data generated by the network service processor based on the service data; and the pre-commit operation record of the configuration manager carries a second data identifier of second service data generated by the configuration manager based on the service data. Driving the network service processor and the configuration manager to perform respective commit operations according to the respective pre-commit operation records comprises: Driving the configuration manager to perform its own commit operation according to the second data identifier, so as to validate the second service data; Driving the network service processor to perform its own commit operation according to the first data identifier, so as to validate the first service data.
3. The method of claim 1, wherein, The pre-commit operation of the network service processor is that the network service processor pre-writes first service data generated by the network service processor into a database; The pre-commit operation of the configuration manager is that the configuration manager pre-configures second service data generated by the configuration manager and issues the second service data to a network element device.
4. A network service processing method applied to a software defined network (SDN) controller, comprising: The SDN controller comprises a coordinator, a network service processor and a configuration manager, and the method comprises: The network service processor sends a distributed transaction registration request to the coordinator based on a service request initiated by a user terminal device; The network service processor initiates a pre-commit operation record of itself based on service data in the service request and sends the service data to the configuration manager, so that the configuration manager initiates a pre-commit operation record of itself based on the service data and performs a pre-commit operation of itself after the initiation. The network service processor performs a pre-commit operation by itself, and sends a result of the pre-commit operation performed by itself and a result of the pre-commit operation performed by the configuration manager to the coordinator, so that the coordinator drives the network service processor and the configuration manager to perform a commit operation or a rollback operation according to the respective pre-commit operation records if the coordinator determines that the results of the respective pre-commit operations performed by the network service processor and the configuration manager are both successful, or if the coordinator determines that at least one of the results of the respective pre-commit operations performed by the network service processor and the configuration manager is unsuccessful.
5. The method of claim 4, wherein, The network service processor initiates a pre-commit operation record of itself to the coordinator based on service data in the service request, including: The network service processor processes the service data to generate first service data; The network service processor initiates a pre-commit operation record of itself to the coordinator based on the first service data; Correspondingly, the network service processor performs a pre-commit operation by itself, including: The network service processor pre-writes the first service data into a database.
6. The method of claim 4, wherein, The network service processor initiates a pre-commit operation record of itself to the coordinator based on service data in the service request, and sends the service data to the configuration manager, so that the configuration manager initiates a pre-commit operation record of itself to the coordinator based on the service data, and performs a pre-commit operation by itself, including: The network service processor initiates a pre-commit operation record of itself to the coordinator, and the pre-commit operation record of the network service processor carries a first data identifier of the first service data, so that the coordinator drives the network service processor to perform a commit operation or a rollback operation based on the first data identifier, and the commit operation of the network service processor is used to validate the first service data; The network service processor sends the service data to the configuration manager, so that the configuration manager generates second service data based on the service data, and initiates a pre-commit operation record of itself to the coordinator based on the second service data, and performs a pre-commit operation by itself; wherein the pre-commit operation of the configuration manager carries a second data identifier of the second service data, and the second data identifier is used by the coordinator to drive the configuration manager to perform a commit operation or a rollback operation based on the second data identifier, and the commit operation of the configuration manager is used to validate the second service data.
7. A coordinator applied in a software defined network (SDN) controller, wherein the SDN controller comprises the coordinator, a network traffic processor, a configuration manager, and the coordinator is characterized in that, The coordinator, including: The registration module is configured to receive a distributed transaction registration request initiated by the network service processor, and perform distributed transaction registration based on the distributed transaction registration request; wherein the distributed transaction registration request is generated by the network service processor based on a service request initiated by a user terminal device; and the registration module is further configured to register, in the distributed transaction, pre-commit operation records respectively initiated by the network service processor and the configuration manager; wherein the pre-commit operation records respectively initiated by the network service processor and the configuration manager are respectively generated by the network service processor and the configuration manager based on service data in the service request. The driving module is configured to drive the network service processor and the configuration manager to perform respective commit operations according to the respective pre-commit operation records, if the coordinator determines that the results of the respective pre-commit operations performed by the network service processor and the configuration manager are both successful. The driving module is further configured to drive the network service processor and the configuration manager to perform respective rollback operations according to the respective pre-commit operation records, if the coordinator determines that at least one of the results of the respective pre-commit operations performed by the network service processor and the configuration manager is unsuccessful. 8.A network service processor applied in a software defined network (SDN) controller, the SDN controller comprising a coordinator, the network service processor, and a configuration manager, characterized in that, The network service processor comprises: The sending module is configured to send a distributed transaction registration request to the coordinator based on a service request initiated by a user terminal device, and initiate a pre-commit operation record of itself to the coordinator based on service data in the service request, and send the service data to the configuration manager, so that the configuration manager initiates a pre-commit operation record of itself to the coordinator based on the service data, and then performs a pre-commit operation of itself. The execution module is configured to perform a pre-commit operation of itself, and send a result of the pre-commit operation of itself and a result of a pre-commit operation performed by the configuration manager to the coordinator, so that the coordinator drives the network service processor and the configuration manager to perform respective commit operations according to the respective pre-commit operation records, if the coordinator determines that the results of the respective pre-commit operations performed by the network service processor and the configuration manager are both successful, or drives the network service processor and the configuration manager to perform respective rollback operations according to the respective pre-commit operation records, if the coordinator determines that at least one of the results of the respective pre-commit operations performed by the network service processor and the configuration manager is unsuccessful. 9.A software defined network (SDN) controller, characterized in that, The coordinator, the network service processor, and the configuration manager are connected to each other, and the network service processor calls the configuration manager. The coordinator is configured to receive a distributed transaction registration request initiated by the network service processor, and perform distributed transaction registration based on the distributed transaction registration request; wherein the distributed transaction registration request is generated by the network service processor based on a service request initiated by a user terminal device; to register pre-commit operation records respectively initiated by the network service processor and the configuration manager in the distributed transaction; wherein the respective pre-commit operation records are generated by the network service processor and the configuration manager based on service data in the service request; and to drive the network service processor and the configuration manager to perform respective commit operations according to the respective pre-commit operation records if it is determined that the results of the respective pre-commit operations performed by the network service processor and the configuration manager are both successful, or to drive the network service processor and the configuration manager to perform respective rollback operations according to the respective pre-commit operation records if it is determined that at least one of the results of the respective pre-commit operations performed by the network service processor and the configuration manager is unsuccessful. The network service processor is configured to send a distributed transaction registration request to the coordinator based on a service request initiated by a user terminal device; to initiate a pre-commit operation record of itself to the coordinator based on service data in the service request, and send the service data to the configuration manager to perform a pre-commit operation of itself; and to send a result of the pre-commit operation of itself and a result of a pre-commit operation performed by the configuration manager to the coordinator. The configuration manager is configured to perform a pre-commit operation of itself after initiating a pre-commit operation record of itself to the coordinator based on service data sent by the network service processor, and send a result of the pre-commit operation of itself to the network service processor.
10. An electronic device, comprising: The computer program is stored in the computer readable storage medium and is executed by the processor to implement the method of any one of claims 1-3, or the method of any one of claims 4-6. The computer program is stored in the computer readable storage medium and is executed by the processor to implement the method of any one of claims 1-3, or the method of any one of claims 4-6. 11. A computer readable storage medium, characterized in that,
Citation Information
Patent Citations
Affairs coordinator, resource using end, service end and distribution affairs process method
CN101046815A
A distributed transaction processing method and a related product
CN109819023A