White box switch configuration management method and device, electronic equipment, medium and product

By using a key-value pair database monitoring mechanism to monitor the white-box switch configuration directory in real time, the problem of inconsistent white-box switch configurations was solved, enabling timely data updates and error correction, and improving data accuracy.

CN118869468BActive Publication Date: 2026-01-23CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410990276.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-23
Publication Date
2026-01-23
Estimated Expiration
2044-07-23

AI Technical Summary

Technical Problem

In existing technologies, when the connection between the monitoring terminal and the switch of a white-box switch is abnormal, the files saved on the monitoring terminal and the configuration saved on the switch become inconsistent, resulting in low data accuracy.

Method used

By using a key-value pair database monitoring mechanism, the configuration directory is monitored in real time, and business configuration data is updated to ensure timely updates and corrections of business data and maintain data consistency.

Benefits of technology

It improves the accuracy of target service data of white-box switches, avoids configuration inconsistencies caused by abnormal interruptions such as system crashes, and enables timely data updates and error correction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118869468B_ABST
    Figure CN118869468B_ABST
Patent Text Reader

Abstract

The present disclosure provides a white box switch configuration management method, device, electronic equipment, medium and product, relating to the technical field of cloud computing, which comprises: obtaining service configuration data and target service data of a white box switch through a key-value pair database; synchronizing the service configuration data and the target service data; monitoring the configuration directory of the white box switch; updating the service configuration data of the key-value pair database based on the monitoring result to send the updated target service data to the white box switch. The method of the present disclosure synchronizes the service configuration data and the target service data, ensures the consistency of the service configuration data and the target service data, avoids the inconsistency between the configuration data and the actual configuration of the white box switch caused by abnormal interruption such as downtime, and through monitoring the configuration directory, timely updating and error correction of the white box target service data can be realized, improving the accuracy of the target service data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer information technology, and in particular to a white-box switch configuration management method, device, electronic device, medium and product. Background Technology

[0002] A switch is a network device used for forwarding electrical (optical) signals, providing a dedicated electrical signal path for any two network nodes connected to the switch. A white-box switch is an open network device with decoupled hardware and software, characterized by flexibility, efficiency, and programmability, and can significantly reduce network deployment costs. A white-box switch consists of two parts: hardware and software. Hardware generally includes switching chips, CPU chips, network interface cards (NICs), storage, and peripheral hardware devices; software refers to the network operating system (NOS) and its network applications, serving as the platform for configuring and controlling the white-box switch network.

[0003] Currently, some existing technologies typically store the monitoring files for the white box at the monitoring terminal. When a connection failure occurs between the monitoring terminal and the white box switch, the files saved at the monitoring terminal and the configuration saved by the white box switch will be inconsistent. If the white box switch recovers its configuration at this time, the stored configuration file at the monitoring terminal is unreliable, resulting in low accuracy of the data sent to the white box. Summary of the Invention

[0004] This disclosure provides a white-box switch configuration management method, device, electronic device, medium, and product to solve problems in related technologies. By utilizing a key-value pair database monitoring mechanism, the configuration directory is monitored in real time to update the service configuration data in the key-value pair database, enabling timely updates and error correction of white-box target service data, thereby improving the accuracy of target service data.

[0005] The first aspect of this disclosure provides a white-box switch configuration management method, which includes: obtaining service configuration data and target service data of the white-box switch through a key-value pair database; synchronizing the service configuration data and target service data; monitoring the configuration directory of the white-box switch, wherein the configuration directory includes at least a unique identifier for the service configuration data; and updating the service configuration data in the key-value pair database based on the monitoring results to send the updated target service data to the white-box switch.

[0006] In some embodiments of this disclosure, before obtaining the service configuration data and target service data of the white-box switch through the key-value pair database, the method further includes: determining a unique identifier for the service configuration data; storing the unique identifier and the corresponding service configuration data in the key-value pair database; performing a first processing on the service configuration data to determine the target service data; and storing the target service data in the key-value pair database.

[0007] In some embodiments of this disclosure, the first process includes at least one of the following: filtering process, aggregation process, and business scenario conversion process.

[0008] In some embodiments of this disclosure, obtaining service configuration data and target service data of a white-box switch through a key-value pair database includes: obtaining the latest version number of the key-value pair database; and obtaining service configuration data and target service data based on the latest version number.

[0009] In some embodiments of this disclosure, synchronizing service configuration data and target service data includes: comparing service configuration data and target service data; and performing a second process based on the comparison result to synchronize service configuration data and target service data, wherein the second process includes at least one of the following: deleting redundant data in the target service data based on the service configuration data; adding missing data in the target service data based on the service configuration data; and updating mismatched data in the target service data based on the service configuration data.

[0010] In some embodiments of this disclosure, updating the service configuration data of the key-value pair database to send updated target service data to the white-box switch includes: when the configuration directory changes, determining the version number of the key-value pair database after the configuration directory change; updating the service configuration data of the key-value pair database based on the changed version number; updating the target service data of the key-value pair database based on the updated service configuration data; and sending the changed target service data to the white-box switch.

[0011] A second aspect of this disclosure provides a white-box switch configuration management device, comprising: an acquisition unit for acquiring service configuration data and target service data of the white-box switch through a key-value pair database; a synchronization unit for synchronizing the service configuration data and target service data; a monitoring unit for monitoring the configuration directory of the white-box switch, wherein the configuration directory includes at least a unique identifier for the service configuration data; and an update unit for updating the service configuration data in the key-value pair database based on the monitoring results, so as to send the updated target service data to the white-box switch.

[0012] A third aspect of this disclosure provides an electronic device including: a processor and a memory for storing a computer program capable of running on the processor, wherein the processor, when running the computer program, performs the method described in the first aspect of this disclosure.

[0013] A fourth aspect of this disclosure provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to perform the methods described in the first aspect of this disclosure.

[0014] A fifth aspect of this disclosure provides a computer program product including a computer program that, when executed by a processor, implements the methods described in the first aspect of this disclosure.

[0015] In summary, the white-box switch configuration management method proposed in this disclosure includes: obtaining service configuration data and target service data of the white-box switch through a key-value pair database; synchronizing the service configuration data and target service data; monitoring the configuration directory of the white-box switch; and updating the service configuration data in the key-value pair database based on the monitoring results to send the updated target service data to the white-box switch. This method ensures the consistency of service configuration data and target service data by synchronizing them, avoiding inconsistencies between the distributed configuration data and the actual configuration of the white-box switch caused by abnormal interruptions such as system crashes. Furthermore, by monitoring the configuration directory, it enables timely updates and corrections of the target service data, improving the accuracy of the target service data. It should be understood that the above general description and the following detailed description are exemplary and explanatory only and do not limit this disclosure. Attached Figure Description

[0016] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.

[0017] Figure 1 A flowchart illustrating a white-box switch configuration management method provided in this embodiment of the disclosure;

[0018] Figure 2 A flowchart illustrating another white-box switch configuration management method provided in this disclosure embodiment;

[0019] Figure 3 This is an example diagram of a white-box switch configuration management model provided in an embodiment of the present disclosure;

[0020] Figure 4 An example diagram illustrating a white-box switch configuration management method provided in this embodiment of the disclosure;

[0021] Figure 5 This is an example diagram of the deployment architecture of a white-box switch configuration management model provided in an embodiment of the present disclosure;

[0022] Figure 6 An example diagram of a white-box switch configuration management state transition machine provided in this embodiment of the disclosure;

[0023] Figure 7 Example diagram of another white-box switch configuration management application model provided in the embodiments of this disclosure;

[0024] Figure 8 This is a schematic diagram of the structure of a white-box switch configuration management device provided in an embodiment of the present disclosure;

[0025] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0026] Embodiments of this disclosure are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments are described below with reference to the accompanying drawings.

[0027] A switch is a network device used for forwarding electrical (optical) signals, providing a dedicated electrical signal path for any two network nodes connected to the switch. A white-box switch is an open network device with decoupled hardware and software, characterized by flexibility, efficiency, and programmability, and can significantly reduce network deployment costs. A white-box switch consists of two parts: hardware and software. Hardware generally includes switching chips, CPU chips, network interface cards (NICs), storage, and peripheral hardware devices; software refers to the network operating system (NOS) and its network applications, serving as the platform for configuring and controlling the white-box switch network.

[0028] Currently, some existing technologies typically store the monitoring files for the white box at the monitoring terminal. When a connection failure occurs between the monitoring terminal and the white box switch, the files saved at the monitoring terminal and the configuration saved by the white box switch will be inconsistent. If the white box switch recovers its configuration at this time, the stored configuration file at the monitoring terminal is unreliable, resulting in low accuracy of the data sent to the white box.

[0029] The method proposed in this disclosure utilizes a key-value pair database monitoring mechanism to monitor the configuration directory in real time, thereby updating the business configuration data in the key-value pair database. This enables timely updates and corrections of white-box target business data, improving the accuracy of the target business data.

[0030] The configuration and management method for white-box switches provided in this application will be described in detail below with reference to the accompanying drawings.

[0031] Figure 1 This is a flowchart illustrating a white-box switch configuration management method provided in an embodiment of this disclosure. Figure 1 As shown, the white-box switch configuration management method includes steps 101-104.

[0032] Step 101: Obtain the service configuration data and target service data of the white-box switch through the key-value database.

[0033] In some embodiments, service configuration data and target service data are pre-stored in a key-value (KV) database so that the service configuration data and target service data of the white-box switch can be retrieved subsequently through the key-value database. For specific storage methods, please refer to [link to documentation]. Figure 2 Example shown.

[0034] In some embodiments, the business configuration data can be configuration data sent from the upper layer (e.g., cloud data platform) to the white box.

[0035] In some embodiments, the target service data is the actual data configured on the white-box switch obtained by processing service configuration data.

[0036] Step 102: Synchronize the business configuration data and the target business data.

[0037] In some embodiments, service configuration data and target service data are synchronized to avoid situations where service configuration data fails to be accurately delivered due to white-box or upper-layer device failures (i.e., the configuration data and target service data are inconsistent).

[0038] For example, taking a state transition machine as the execution entity of the method disclosed herein, the cloud service platform sends service configuration data to the state transition machine, and the state transition machine determines and sends target service data to the white-box switch based on the service configuration data. When the cloud service platform sends service configuration data to the state transition machine, the sending program is abnormally interrupted. At this time, service configuration data is still being sent, but because the program has been interrupted, it cannot process the logic (i.e., it cannot determine the target service data from the service configuration data). This will cause inconsistency between the service configuration data and the target service data. When the program restarts, the state transition machine can perform service synchronization between the service configuration data and the target service data to handle and correct the above inconsistency, so as to determine the correct target service data.

[0039] Specifically, synchronizing business configuration data and target business data may include the following steps: comparing business configuration data and target business data; and performing a second process based on the comparison results to synchronize business configuration data and target business data, wherein the second process includes at least one of the following: deleting redundant data in the target business data based on the business configuration data; adding missing data in the target business data based on the business configuration data; and updating mismatched data in the target business data based on the business configuration data.

[0040] Step 103: Monitor the configuration directory of the white-box switch.

[0041] In some embodiments, the configuration directory includes at least a unique identifier for the business configuration data.

[0042] In other words, monitoring the configuration directory of the white-box switch involves monitoring the unique identifiers of the service configuration data stored in the key-value pair database.

[0043] Step 104: Based on the monitoring results, update the business configuration data in the key-value pair database to send the updated target business data to the white-box switch.

[0044] In some embodiments, when a change is detected in the configuration directory of the white-box switch, i.e., a change is detected in the unique identifier stored in the key-value pair database, the updated service configuration data is determined based on the changed unique identifier, and then the updated target service data is determined based on the updated service configuration data.

[0045] The update process can be as follows:

[0046] When the configuration directory changes, the version number of the key-value pair database after the configuration directory change is determined; based on the changed version number, the business configuration data of the key-value pair database is updated; based on the updated business configuration data, the target business data of the key-value pair database is updated; and the changed target business data is sent to the white-box switch, thereby realizing the real-time update of the target business data of the white-box switch.

[0047] In summary, the white-box switch configuration management method proposed in this disclosure includes: obtaining service configuration data and target service data of the white-box switch through a key-value pair database; synchronizing the service configuration data and target service data; monitoring the configuration directory of the white-box switch; and updating the service configuration data in the key-value pair database based on the monitoring results to send the updated target service data to the white-box switch. This method ensures the consistency of service configuration data and target service data by synchronizing them, avoiding inconsistencies between the distributed configuration data and the actual configuration of the white-box switch caused by abnormal interruptions such as system crashes. Furthermore, by monitoring the configuration directory, it enables timely updates and corrections of the target service data, improving the accuracy of the target service data.

[0048] Figure 2 A flowchart of a white-box switch configuration management method proposed in this disclosure is further shown. Figure 1 The following explanation is based on the illustrated embodiment. Figure 2 As shown, the method includes the following steps:

[0049] Step 201: Determine the unique identifier for the business configuration data.

[0050] In some embodiments, the unique identifier can be a preset string, for example, the unique identifier of BGP data in the service configuration data can be determined as "BGP_NEIGHBOR". This disclosure does not limit the setting of the unique identifier.

[0051] In some embodiments, the specific data for service configuration is not limited, and may include, for example, PORT, VLAN, ACL, BGP, etc.

[0052] Step 202: Store the unique identifier and its corresponding business configuration data in a key-value pair database.

[0053] In some embodiments, unique identifiers and their corresponding business configuration data can be stored in a key-value database in pairs to facilitate subsequent data synchronization and updates.

[0054] In other words, business configuration data corresponds uniquely to unique identifiers. When the unique identifier in the key-value pair database changes, it means that the business configuration data stored in the key-value pair database has also changed.

[0055] Step 203: Perform the first processing on the business configuration data to determine the target business data.

[0056] In some embodiments, the first process includes at least one of the following: filtering process, aggregation process, and business scenario conversion process.

[0057] In some embodiments, since the service configuration data sent from the upper layer (e.g., cloud service platform) to the white box is not fully adapted to the white box switch, the service configuration data needs to be processed first to transform the sent service configuration data into target service data adapted to the white box switch.

[0058] Step 204: Store the target business data in a key-value database.

[0059] In some embodiments, the target service data is stored in a key-value database to store the service configuration data of the white-box switch and the target service data accordingly, which facilitates data synchronization and data updates.

[0060] Step 205: Obtain the latest version number of the key-value pair database.

[0061] In some embodiments, the version number of the key-value database changes every time the data in the key-value database changes. Therefore, when synchronizing business configuration data and target business data, it is necessary to obtain the current version number of the key-value database, that is, the latest version number of the key-value database.

[0062] In some embodiments, the latest version number can be obtained by directly accessing the key-value pair database, or by accessing upper-layer devices such as cloud data platforms; this disclosure does not limit this.

[0063] Step 206: Based on the latest version number, obtain the business configuration data and target business data.

[0064] In some embodiments, by using the determined latest version number, the business configuration data and target business data under that version number are searched in the key-value pair database to determine the data that needs to be synchronized.

[0065] Step 207: Compare the business configuration data with the target business data.

[0066] In some embodiments, by comparing business configuration data and target business data, it can be determined whether the target business data has problems such as missing data, redundancy, or incompatibility.

[0067] Step 208: Based on the comparison results, perform the second process to synchronize the business configuration data and the target business data.

[0068] In some embodiments, the second process includes at least one of the following: deleting redundant data from the target business data based on business configuration data; adding missing data to the target business data based on business configuration data; and updating mismatched data in the target business data based on business configuration data.

[0069] In other words, when redundant data (i.e. target service data that is not generated from service configuration data) is found to exist in the target service data after comparison, this redundant data is deleted; when target service data that is not generated from service configuration data is found to be missing, this missing data is added; when target service data is found to be incompatible with the white-box switch, this target service data is updated to make the target service data compatible with the white-box switch.

[0070] Step 209: Monitor the configuration directory of the white-box switch.

[0071] In some embodiments, step 209 is based on the same principle as step 103. Please refer to the relevant embodiments and descriptions of step 103, which will not be repeated here.

[0072] Step 210: When the configuration directory changes, determine the version number of the key-value pair database after the configuration directory change.

[0073] In some embodiments, when the configuration directory changes, it indicates that the target service data required by the white-box switch has changed. At this time, the updated service configuration data and target service data of the white-box switch can be obtained by determining the version number of the key-value pair database after the configuration directory change.

[0074] Step 211: Update the business configuration data in the key-value pair database based on the changed version number.

[0075] In some embodiments, a unique identifier under the changed version number can be determined based on the changed version number, and then the corresponding business configuration data can be determined based on the unique identifier, thereby realizing the update of business configuration data in the key-value pair database.

[0076] Step 212: Based on the updated business configuration data, update the target business data in the key-value pair database.

[0077] In some embodiments, the updated target business data in the key-value pair database is determined by performing a first processing on the business configuration data.

[0078] In some implementations, the principle of step 212 is the same as that of step 203. Please refer to the relevant embodiments and descriptions of step 203, which will not be repeated here.

[0079] Step 213: Send the modified target service data to the white-box switch.

[0080] In some embodiments, the modified target service data is sent to the white-box switch to achieve automatic data updates on the white-box switch.

[0081] In summary, the white-box switch configuration management method disclosed herein includes: determining a unique identifier for service configuration data; storing the unique identifier and the corresponding service configuration data in a key-value pair database; performing a first processing on the service configuration data to determine target service data; storing the target service data in the key-value pair database; obtaining the latest version number of the key-value pair database; obtaining the service configuration data and the target service data based on the latest version number; comparing the service configuration data and the target service data; performing a second processing based on the comparison result to synchronize the service configuration data and the target service data; monitoring the configuration directory of the white-box switch; determining the version number of the key-value pair database after the configuration directory change when the configuration directory changes; updating the service configuration data in the key-value pair database based on the changed version number; updating the white-box configuration data in the key-value pair database based on the updated service configuration data; and sending the changed target service data to the white-box switch. The method disclosed herein synchronizes service configuration data and target service data to ensure consistency between the white-box switch configuration data issued by the upper-layer device and the actual configuration data of the white-box switch. This avoids inconsistencies between the issued configuration data and the actual configuration of the white-box switch caused by abnormal interruptions such as system crashes. Furthermore, by monitoring the configuration directory, this method can promptly update and correct the white-box target service data when the configuration directory changes, thereby improving the accuracy of the target service data.

[0082] The following is an exemplary description of the method disclosed herein, using the example of applying the method to high-availability software installed on a first node.

[0083] like Figure 3 As shown, a configuration management model that can execute the method disclosed herein is proposed. First, a third-party component, a KV database (taking ETCD as an example), is introduced as the core of configuration storage to store the service configuration data issued from the upper layer and the white-box configuration data to be passed to the lower layer of the white-box switch (i.e., the aforementioned target service data). Second, a management (Controller) module is designed as the core of configuration monitoring storage to monitor (watch) changes in service configuration data and update (write) white-box configuration data according to the changes in service configuration data.

[0084] The specific business operation process is as follows: Figure 4 The description is as follows:

[0085] Step 1. Configure the source service data to be monitored and assign a unique identifier key to the source service data. First, design the corresponding key based on the network services supported by the white-box switch. Second, store the key and its corresponding value (service data) in a KV database.

[0086] Step 2. Monitor changes in source service configuration data. Monitor changes in the corresponding value (service data sent from the upper layer) of the unique identifier key (including all supported network services on the switch, such as ACLs). This process is completed by the Controller module described below.

[0087] Step 3. Process business configuration data. Once a change in business configuration data is detected, the received business configuration data is filtered, aggregated, and transformed for specific business scenarios, ultimately converting it into specific business white-box configuration data.

[0088] Step 4. Distribute white-box configuration data. Distribute the processed white-box configuration data to the white-box switch.

[0089] The specific implementation details are as follows:

[0090] Example 1: A complete deployment architecture for configuration management based on a KV database:

[0091] The deployment architecture of the above configuration management model is as follows: Figure 5 As shown, it mainly includes a storage module (KV database, taking ETCD as an example), a business processing module (Controller), and the relationships between the modules.

[0092] The storage module is implemented as a KV data (such as ETCD) cluster to achieve high availability of storage.

[0093] The business processing and transformation module is represented by a Controller cluster. The Controller module is the core module of this model. It mainly implements the functions of listening to business configuration data and updating white-box configuration data. During deployment, a leader election operation is required to achieve high service availability.

[0094] The relationship between the storage module and the business processing module is as follows: the business processing module listens for changes in the configuration data in the storage module, gets the data in the storage module, and modifies the data in the storage module.

[0095] Example 2: A state transition machine that integrates business data state transition logic:

[0096] This state machine can perform the following data management functions: first, it can monitor changes in business data in real time; second, it can perform data processing operations such as filtering, aggregating, and transforming business data for specific business scenarios; and third, it can automatically correct data configuration errors and ensure the consistency of distributed configuration data. The design model of this state transition machine is as follows: Figure 6 As shown, it specifically includes the preparation status, data comparison status, and data synchronization status.

[0097] The state transition machine may include the following states:

[0098] 1) Ready state

[0099] This state is the initial state at startup. The specific implementation process is as follows: initialize the client, connect to the KV database (taking ETCD as an example), call the Campaign method of the Election API to initiate an election, and enter the data comparison state when the election is successful. If it fails to become the leader, it stays in this state.

[0100] 2) Data comparison status

[0101] This core functionality implements automatic error correction. When the business processing module (here, the Controller module) experiences an abnormal restart, it can reread the source and target business data from the storage structure. Through a full comparison and analysis of the two sets of data, it achieves automatic comparison and error correction between business configuration data and white-box data, ultimately ensuring logical consistency between the two. Specifically, it includes the following steps:

[0102] Step 1: Obtain the current ETCD version number, curRevision;

[0103] Step 2: Using the version number curRevision as the maximum version number, read the business configuration data (source data) and white-box configuration data (target business data);

[0104] Step 3: Perform a full comparison between the business configuration data and the white-box configuration data, delete redundant configurations, add missing configurations, update mismatched configuration data, and complete the full synchronization of the target business data with the source data.

[0105] In this state, if an unrecoverable problem is encountered, such as no longer being the leader or a network anomaly, the system will switch back to the initial state; if the configuration data correction is completed, the system will switch back to the data synchronization state.

[0106] 3) Data synchronization status

[0107] This is the normal operating state. During normal system operation, it monitors for changes in the source data. Once a change occurs, it only incrementally synchronizes the change to the target business data. This mainly includes the following steps:

[0108] Step 1: Monitor the business configuration directory. The version number being monitored is the version number obtained from the data comparison status plus 1 (thisRevesion = curRevision + 1). This allows the full data of the curRevision version to be used as the baseline data, and incremental updates to changes are made on this basis, ensuring data consistency.

[0109] Step 2: When changes are detected in the business configuration directory, process the business configuration data incrementally in sequence and synchronously modify the data in the white-box configuration directory of the KV database.

[0110] Step 3: Once the white-box configuration data has been modified, it can be sent to the underlying layer of the white-box switch.

[0111] If an error occurs in this state, such as a program error or a network exception, it will revert to the initial state.

[0112] Example 3: An application model based on a white-box switch NOS:

[0113] Based on the above deployment architecture and state transition machine theory, combined with the white-box switch model, this method can also be applied to the following application models based on white-box switch NOS systems. For example... Figure 7 As shown, a white-box switch includes a user space, a kernel space (including ASIC drivers for hardware switching chips), and a hardware layer (including ASIC drivers for hardware switching chips). In this proposal model, the user space NOS is located. The SDN controller sends service configuration data (source data) to the KV database (such as ETCD) via RestAPI. The controller module monitors changes in the service configuration data in the KV database (such as ETCD) in real time, performs filtering, aggregation, and other processing on the service configuration data, writes it into the white-box configuration data (target service data), and simultaneously synchronizes the latest white-box configuration data to the hardware layer ASIC.

[0114] In summary, this disclosure has the following effects:

[0115] The method disclosed herein synchronizes service configuration data and target service data to ensure consistency between the white-box switch configuration data issued by the upper-layer device and the actual configuration data of the white-box switch. This avoids inconsistencies between the issued configuration data and the actual configuration of the white-box switch caused by abnormal interruptions such as system crashes. Furthermore, by monitoring the configuration directory, this method can promptly update and correct the white-box target service data when the configuration directory changes, thereby improving the accuracy of the target service data.

[0116] Corresponding to the methods provided in the above embodiments, this disclosure also provides a white-box switch configuration management device. Since the device provided in this disclosure corresponds to the methods provided in the above embodiments, the implementation of the methods is also applicable to the device provided in this embodiment, and will not be described in detail in this embodiment.

[0117] Figure 8 This is a schematic diagram of the structure of a white-box switch configuration management device 800 provided in an embodiment of this disclosure. Figure 8 As shown, the white-box switch configuration management device includes:

[0118] The acquisition unit 810 is used to acquire the service configuration data and target service data of the white-box switch through a key-value pair database.

[0119] Synchronization unit 820 is used to synchronize business configuration data and target business data.

[0120] The monitoring unit 830 is used to monitor the configuration directory of the white-box switch. The configuration directory must include at least a unique identifier for the service configuration data.

[0121] The update unit 840 is used to update the service configuration data in the key-value pair database based on monitoring results, so as to send the updated target service data to the white-box switch.

[0122] In some embodiments, the acquisition unit 810 is further configured to: determine a unique identifier for the service configuration data; store the unique identifier and the corresponding service configuration data in a key-value pair database; perform a first processing on the service configuration data to determine target service data; and store the target service data in a key-value pair database.

[0123] In some embodiments, the first process includes at least one of the following: filtering process, aggregation process, and business scenario conversion process.

[0124] In some embodiments, the synchronization unit 820 is further configured to obtain the latest version number of the key-value pair database; and based on the latest version number, obtain business configuration data and target business data.

[0125] In some embodiments, the synchronization unit 820 is further configured to compare the service configuration data and the target service data; and, based on the comparison result, perform a second process to synchronize the service configuration data and the target service data, wherein the second process includes at least one of the following: deleting redundant data in the target service data based on the service configuration data; adding missing data in the target service data based on the service configuration data; and updating mismatched data in the target service data based on the service configuration data.

[0126] In some embodiments, the update unit 840 is further configured to: when the configuration directory changes, determine the version number of the key-value pair database after the configuration directory change; update the service configuration data of the key-value pair database based on the changed version number; update the target service data of the key-value pair database based on the updated service configuration data; and send the changed target service data to the white-box switch.

[0127] In summary, the white-box switch configuration management device includes an acquisition unit for acquiring service configuration data and target service data of the white-box switch through a key-value pair database; a synchronization unit for synchronizing the service configuration data and target service data; a monitoring unit for monitoring the configuration directory of the white-box switch, which includes at least a unique identifier for the service configuration data; and an update unit for updating the service configuration data in the key-value pair database based on the monitoring results, so as to send the updated target service data to the white-box switch. The device proposed in this disclosure ensures the consistency of service configuration data and target service data by synchronizing them, avoiding inconsistencies between the distributed configuration data and the actual configuration of the white-box switch caused by abnormal interruptions such as system crashes. Furthermore, by monitoring the configuration directory, it enables timely updates and corrections of the target service data, improving the accuracy of the target service data.

[0128] The methods and apparatus provided in the embodiments of this application have been described above. To implement the functions of the methods provided in the embodiments of this application, the electronic device may include a hardware structure and software modules, and may implement the above functions in the form of a hardware structure, software modules, or a hardware structure plus software modules. One of the above functions may be executed in the form of a hardware structure, software modules, or a hardware structure plus software modules.

[0129] Figure 9 This is a block diagram illustrating an electronic device 900 for implementing the above-described white-box switch configuration management method, according to an exemplary embodiment. For example, the electronic device 900 may be a mobile phone, computer, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.

[0130] Reference Figure 9 The electronic device 900 may include a communication interface 901, capable of interacting with other devices; a processor 902, connected to the communication interface 901 to interact with other devices, used to execute the methods provided by one or more of the above-described technical solutions when running a computer program; and a memory 903, on which the computer program is stored. Specifically, the specific processing procedure of the processor 902 can refer to the white-box switch configuration management method described in the above embodiments of this disclosure.

[0131] Of course, in practical applications, the various components in electronic device 900 are coupled together through bus system 909. It can be understood that bus system 909 is used to realize the connection and communication between these components. In addition to a data bus, bus system 909 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, in... Figure 9 The general labeled all buses as Bus System 909.

[0132] The memory 903 in this embodiment is used to store various types of data to support the operation of the electronic device 900. Examples of such data include any computer program used to operate on the electronic device 900.

[0133] The methods disclosed in the embodiments of this application can be applied to processor 902, or implemented by processor 902. Processor 902 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in processor 902 or by instructions in the form of software. The processor 902 may be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Processor 902 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the methods disclosed in the embodiments of this application can be directly manifested as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium, which is located in memory 903. Processor 902 reads the information in memory 903 and combines its hardware to complete the steps of the aforementioned method.

[0134] In an exemplary embodiment, the electronic device 900 may be implemented by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers (MCUs), microprocessors, or other electronic components to perform the aforementioned method.

[0135] Embodiments of this disclosure also propose a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the white-box switch configuration management method described in the above embodiments of this disclosure.

[0136] Embodiments of this disclosure also provide a computer program product, including a computer program that is executed by a processor using the white-box switch configuration management method described in the above embodiments of this disclosure.

[0137] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0138] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with an embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0139] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of the invention pertain.

[0140] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processing module, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (control method), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic device, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which programs can be printed, because programs can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.

[0141] It should be understood that various parts of the embodiments of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0142] Those skilled in the art will understand that all or part of the steps of the methods described in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

[0143] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc.

[0144] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.

Claims

1. A white-box switch configuration management method, characterized in that, The method includes: Retrieve service configuration data and target service data of white-box switches from a key-value database; Perform business synchronization between the business configuration data and the target business data; Monitor the configuration directory of the white-box switch, wherein the configuration directory includes at least a unique identifier for the service configuration data; Based on the monitoring results, update the service configuration data in the key-value pair database to send the updated target service data to the white-box switch; Before obtaining the service configuration data and target service data of the white-box switch through the key-value pair database, the method further includes: Determine a unique identifier for the service configuration data; The unique identifier and the corresponding business configuration data are stored in the key-value pair database; The service configuration data is first processed to determine the target service data; The target business data is stored in the key-value pair database; The first processing includes at least one of the following: filtering processing, aggregation processing, and business scenario conversion processing.

2. The method according to claim 1, characterized in that, The process of obtaining the service configuration data and target service data of the white-box switch through a key-value database includes: Obtain the latest version number of the key-value pair in the database; Based on the latest version number, obtain the business configuration data and the target business data.

3. The method according to claim 1, characterized in that, The process of synchronizing the service configuration data and the target service data includes: Compare the service configuration data with the target service data; Based on the comparison result, a second process is performed to synchronize the service configuration data and the target service data, wherein the second process includes at least one of the following: Based on the aforementioned business configuration data, redundant data in the target business data is deleted; Based on the aforementioned business configuration data, add the missing data to the target business data; Based on the business configuration data, update any mismatched data in the target business data.

4. The method according to claim 1, characterized in that, The step of updating the service configuration data in the key-value pair database based on monitoring results, and then sending the updated target service data to the white-box switch, includes: When the configuration directory changes, determine the version number of the key-value pair database after the configuration directory change; Update the business configuration data of the key-value pair database based on the changed version number; Based on the updated business configuration data, update the target business data in the key-value pair database; The modified target business data is sent to the white-box switch.

5. A white-box switch configuration management device, characterized in that, The device includes: The acquisition unit is used to retrieve the service configuration data and target service data of the white-box switch through a key-value pair database. Before obtaining the service configuration data and target service data of the white-box switch through the key-value pair database, the following steps are also included: Determine a unique identifier for the service configuration data; The unique identifier and the corresponding business configuration data are stored in the key-value pair database; The service configuration data is first processed to determine the target service data; The target business data is stored in the key-value pair database; The first processing includes at least one of the following: filtering processing, aggregation processing, and business scenario conversion processing; A synchronization unit is used to synchronize the service configuration data and the target service data. A monitoring unit is used to monitor the configuration directory of the white-box switch, wherein the configuration directory includes at least a unique identifier for the service configuration data; The update unit is used to update the service configuration data of the key-value pair database based on the monitoring results, so as to send the updated target service data to the white-box switch.

6. An electronic device, characterized in that, include: The processor and the memory used to store computer programs that can run on the processor. When the processor is used to run the computer program, it performs the method according to any one of claims 1-4.

7. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-4.

8. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method according to any one of claims 1-4.

Citation Information

Patent Citations

  • Automatic configuration method and device for switcher, switcher, and storage medium

    CN109245920A

  • Business service configuration method, related device, equipment and storage medium

    CN118264524A