A data processing method and apparatus, electronic device, and computer program product
Patent Information
- Application Number
- CN202611165816.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-03
- Publication Date
- 2026-10-30
AI Technical Summary
[0002]相关技术中,通常根据网络设备发送的日志信息来获取各网络设备的在线状态,判断所述网络设备发送的日志信息与网络设备的在线状态是否匹配;若不匹配,则发出网络设备异常的告警信息,但无法获取网络设备的底层表项容量数据,在底层表项容量数据异常的情况下,导致网络设备进行业务数据转发时出现异常
通过GRPC第一网络设备包含的底层芯片对应的第一表项容量数据,能够有效获取网络设备的底层芯片对应的表项容量数据;获取底层芯片对应的表项容量告警数据,在根据第一表项容量数据和表项容量告警数据确定需要发出告警信息的情况下,确定第一网络设备中需要迁移的第一业务数据,将第一业务数据发送至第二网络设备进行数据处理,并删除第一网络设备中的第一业务数据,能够及时进行告警,以进行业务数据迁移,降低网络设备进行业务转发时出现异常的概率。
Smart Images

Figure CN123020315A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a data processing method, apparatus, electronic device, and computer program product. Background Technology
[0002] In related technologies, the online status of each network device is usually obtained based on the log information sent by the network device. It is then determined whether the log information sent by the network device matches the online status of the network device. If they do not match, an alarm message indicating network device abnormality is issued. However, the underlying table entry capacity data of the network device cannot be obtained. In the case of abnormal underlying table entry capacity data, anomalies occur when the network device forwards service data. Summary of the Invention
[0003] This application provides a data processing method, apparatus, electronic device, and computer program product that can effectively obtain the table capacity data corresponding to the underlying chip of the network device and issue timely alarms to migrate service data and reduce the probability of anomalies when the network device forwards services.
[0004] The technical solution of this application embodiment is implemented as follows: This application provides a data processing method, the method comprising: The capacity data of the first table entry corresponding to the underlying chip contained in the first network device is obtained through Google Remote Procedure Call (GRPC), and the capacity alarm data of the table entry corresponding to the underlying chip is also obtained. If it is determined that an alarm message needs to be issued based on the first table entry capacity data and the table entry capacity alarm data, the first service data that needs to be migrated in the first network device is determined. The first service data is sent to the second network device for data processing, and the first service data in the first network device is deleted.
[0005] This application provides a data processing apparatus, including: The acquisition unit is used to acquire the first table entry capacity data corresponding to the underlying chip included in the first network device through GPRC, and to acquire the table entry capacity alarm data corresponding to the underlying chip. The determining unit is configured to determine the first service data that needs to be migrated in the first network device when it is determined that an alarm message needs to be issued based on the first table entry capacity data and the table entry capacity alarm data. The data processing unit sends the first service data to the second network device for data processing and deletes the first service data from the first network device.
[0006] This application provides an electronic device, including: a processor and a memory for storing a computer program that can run on the processor, wherein the processor, when running the computer program, implements the data processing method provided in this application.
[0007] This application provides a computer program product, including a computer program or computer executable instructions. When the computer program or computer executable instructions are executed by a processor, they implement the data processing method provided in this application.
[0008] The embodiments of this application have the following beneficial effects: By using the capacity data of the first table entry corresponding to the underlying chip contained in the first network device of GRPC, the capacity data of the table entry corresponding to the underlying chip of the network device can be effectively obtained; the alarm data of the table entry corresponding to the underlying chip can be obtained, and if it is determined that an alarm message needs to be issued based on the first table entry capacity data and the table entry capacity alarm data, the first service data that needs to be migrated in the first network device can be determined, the first service data can be sent to the second network device for data processing, and the first service data in the first network device can be deleted. This can promptly issue an alarm to migrate the service data and reduce the probability of anomalies when the network device forwards services. Attached Figure Description
[0009] Figure 1 A flowchart illustrating a data processing method provided in an embodiment of this application; Figure 2 A schematic diagram of an exemplary overall system architecture provided for embodiments of this application; Figure 3 A flowchart illustrating an exemplary method for collecting table entry capacity based on GRPC streaming communication, provided for an embodiment of this application; Figure 4 A flowchart illustrating the classification and handling measures for capacity alarm levels in the underlying table of an exemplary white-box switch, provided for an embodiment of this application. Figure 5 This is a schematic diagram of the structure of a data processing device according to an embodiment of this application; Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0010] 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 described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0011] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0012] In the following description, references to "some embodiments" refer to a subset of all possible embodiments. It is understood that "some embodiments" may be the same or different subsets of all possible embodiments and may be combined with each other without conflict. It should also be noted that the terms "first," "second," etc., used in the embodiments of this application are merely for distinguishing similar objects and do not represent a specific ordering of objects. It is understood that "first," "second," etc., may be interchanged in a specific order or sequence where permissible, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0013] In related technologies, network devices cannot directly obtain the usage status of underlying table entries at the control plane. This makes it difficult to monitor the utilization of underlying table entries in a timely and effective manner, hindering timely and effective capacity warnings and the prevention of table entry capacity exceeding limits. Furthermore, maintenance personnel cannot obtain abnormal warning information from network devices in a timely manner. In the underlying network, the Border Gateway Protocol (BGP) routing is massive and complex. Network devices in related technologies often acquire a large number of redundant and invalid BGP routes during route learning, often reaching tens of thousands. This not only consumes underlying routing table entry capacity but also increases the risk of capacity exceeding limits and the possibility of attackers exploiting the learned large number of invalid BGP routes for attacks.
[0014] Based on this, embodiments of this application provide a data processing method. Figure 1 This is a flowchart illustrating a data processing method provided in an embodiment of this application; as shown below. Figure 1 As shown, the method includes: S101. Obtain the capacity data of the first table entry corresponding to the underlying chip contained in the first network device through GRPC, and obtain the capacity alarm data of the table entry corresponding to the underlying chip.
[0015] It should be noted that the data processing method is applied to the control system, which can be understood as a management and control platform; in practical applications, the management and control platform can be called a remote management and control platform relative to the first network device.
[0016] It should be noted that the first network device can be any network device containing an underlying chip that needs to obtain the table entry capacity of the underlying chip; there is no limitation here. As an example, the first network device can be understood as a white-box switch. The underlying chip can be understood as the underlying chip contained in the white-box switch; the specific content of the chip can be determined according to the actual situation and is not limited here. The first table entry capacity data can be understood as the table entry capacity data (or table entry capacity information) contained (or used) in the underlying chip. The table entry capacity alarm data can be understood as the pre-set capacity alarm data of the underlying chip; specifically, it can be determined according to the maximum capacity data that the table entry of the underlying chip can hold, and is not limited here. As an example, the table entry capacity alarm data can be understood as 80% of the maximum capacity data that the table entry of the underlying chip can hold.
[0017] In this embodiment of the application, the process of obtaining the capacity data of the first table entry corresponding to the underlying chip included in the first network device through GRPC specifically includes: configuring a timed data acquisition task on the first network device so that when the timed data acquisition task is enabled, the GRPC process in the first network device triggers the interface of the underlying chip to obtain the capacity data of the first table entry.
[0018] It should be noted that configuring a timed data acquisition task on the first network device can be understood as the management platform configuring a timed data acquisition task on the white-box switch. The timed data acquisition task can be understood as a scheduled task to obtain the capacity of the underlying table entries. The timing of the task can be determined based on actual conditions and is not limited here. The interface of the underlying chip can be understood as the switch API interface of the underlying chip. Configure a timed data acquisition task on the first network device. When the timed data acquisition task is enabled, the GRPC process in the first network device will call the interface of the underlying chip to obtain the capacity data of the first table entry. For example, the management platform configures a timed task on the white-box switch to obtain the capacity of the underlying table entry. The timed task on the white-box switch writes the corresponding P4 capacity configuration table name (P4_USAGE_TABLE, P4_USAGE_TABLE) data to the configuration database (CONFIG_DB) of the remote dictionary service (Redis) at set time intervals. This will trigger the GRPC process to call the SwitchAPI interface of the underlying chip to obtain the corresponding table entry capacity usage and write the obtained capacity data back to the application database (APPL_DB). The white-box switch periodically pushes the collected table entry capacity data (first table entry capacity data) to the remote management platform.
[0019] The solution in this application embodiment, through flexible configuration of the scheduled task time, enables the periodic collection and monitoring of capacity data in the white-box switch device table. This effectively avoids the problem of missed capacity threshold warnings due to failure to obtain device table capacity information in a timely manner, improving the efficiency of white-box switch device capacity management and the timeliness and accuracy of capacity warning information. It also effectively avoids the problem of the scheduled task continuously calling the gRPC process, which would block the delivery of other service data.
[0020] S102. If it is determined that an alarm message needs to be issued based on the first table entry capacity data and the table entry capacity alarm data, determine the first service data that needs to be migrated in the first network device.
[0021] It should be noted that alarm information can be understood as information that requires an alarm to be issued. Alarm information includes at least three levels: Level 1, Level 2, and Level 3; Level 1 alarm information is less severe than Level 2 alarm information, and Level 2 alarm information is less severe than Level 3 alarm information. In practical applications, Level 1 alarm information can be understood as an alert level alarm; Level 2 alarm information can be understood as an important level alarm; and Level 3 alarm information can be understood as an urgent level alarm.
[0022] In this embodiment of the application, the method further includes: determining a ratio of the first entry capacity data to the entry capacity alarm data; if the ratio is greater than or equal to a first value and less than a second value, determining the alarm information as a first-level alarm information; if the ratio is greater than or equal to a second value and less than a third value, determining the alarm information as a second-level alarm information; if the ratio is greater than or equal to a third value, determining the alarm information as a third-level alarm information; the first-level alarm information is less than the second-level alarm information; the second-level alarm information is less than the third-level alarm information.
[0023] It should be noted that determining the ratio of the first table entry capacity data to the table entry capacity alarm data can be understood as determining the ratio of the first table entry capacity data to the table entry capacity alarm data. The first, second, and third values can be determined according to the actual situation and are not limited here. As an example, the first value can be 50%, the second value can be 80%, and the third value can be 90%. When the ratio is greater than or equal to the first value and less than the second value, the alarm information is determined to be a first-level alarm information; when the ratio is greater than or equal to the second value and less than the third value, the alarm information is determined to be a second-level alarm information; when the ratio is greater than or equal to the third value, the alarm information is determined to be a third-level alarm information. For example, when the ratio is greater than or equal to 50% and less than 80%, the alarm information is determined to be a warning level alarm information; when the ratio is greater than or equal to 80% and less than 90%, the alarm information is determined to be a critical level alarm information; and when the ratio is greater than or equal to 90%, the alarm information is determined to be an emergency level alarm information.
[0024] In this embodiment of the application, the method further includes: determining the ratio of the first entry capacity data to the entry capacity alarm data; and not issuing an alarm message if the ratio is less than the first value.
[0025] It should be noted that determining the ratio of the first entry capacity data to the entry capacity alarm data can be understood as determining the ratio of the first entry capacity data to the entry capacity alarm data. The first value can be determined according to the actual situation and is not limited here. As an example, the first value can be 50%. If the ratio is less than the first value, no alarm message will be issued. For example, if the ratio is less than 50%, no alarm message will be issued.
[0026] In this embodiment of the application, the alarm information includes at least the third-level alarm information; when it is determined that alarm information needs to be issued based on the first table entry capacity data and the table entry capacity alarm data, the process of determining the first service data that needs to be migrated in the first network device specifically includes: when it is determined that the alarm information is the third-level alarm information based on the first table entry capacity data and the table entry capacity alarm data, determining the first service data that needs to be migrated in the first network device.
[0027] It should be noted that the first service data can be understood as the service data that needs to be migrated from the first network device. When the alarm information is determined to be a Level 3 alarm based on the first table entry capacity data and table entry capacity alarm data, the first service data to be migrated from the first network device can be understood as the service data that needs to be migrated out of the first network device when the alarm information is determined to be an emergency alarm based on the first table entry capacity data and table entry capacity alarm data. The method for determining the first service data to be migrated from the first network device can be understood as depending on the actual situation and is not limited here. As an example, if the service data in the first network device includes both large and small amounts of service data, the first service data can be selected from the large amount of service data; or, if the service data in the first network device includes service data corresponding to multiple users, the service data corresponding to the same user can be selected as the first service data.
[0028] S103. Send the first service data to the second network device for data processing, and delete the first service data in the first network device.
[0029] It should be noted that the second network device can be understood as a newly added cluster device, or as a newly added pair of cluster gateways; the second network device can also be a white-box switch.
[0030] In this embodiment of the application, the process of sending the first service data to the second network device for data processing specifically includes: when the second network device has completed network access and BGP only publishes the VXLAN tunnel endpoint (VTEP) route of the second network device, the first service data is sent to the second network device for data processing.
[0031] It should be noted that the completion of network access by the second network device can be understood as the completion of the device access network link and its pre-configuration on the newly added cluster device. When the second network device has completed network access and BGP only publishes the VXLAN Tunnel Endpoint (VTEP) route of the second network device, the first service data is sent to the second network device for data processing. This can be illustrated by completing the device access network link and its pre-configuration on the newly added cluster device, ensuring that BGP can only publish the local VTEP route at this time, and other routes cannot be published, before sending the first service data to the second network device for data processing.
[0032] It should be noted that the management platform will send the first business data that needs to be migrated to the second network device (the newly added cluster device). After confirming that the first business data has been sent to the new cluster device, the management platform will publish the business routing information on the device to the uplink aggregation device to ensure that the inbound traffic on the new cluster device can be forwarded to the cloud normally. The management platform will delete the first business data that needs to be migrated from the first network device and delete the corresponding business route from the virtual machine to the first network device.
[0033] The solution in this application embodiment can smoothly expand the capacity of new cluster devices and migrate business data without the user's awareness or the impact on business forwarding.
[0034] In this embodiment of the application, the method further includes: sending the configured BGP dynamic routing policy to the first network device, so that the first network device writes the BGP dynamic routing policy into the configuration database of the first network device.
[0035] It's important to note that sending the configured BGP dynamic routing policy to the first network device can be understood as the management platform distributing the configured (and required) BGP dynamic routing policy configuration to the first network device (white-box switch). Sending the configured BGP dynamic routing policy to the first network device allows the first network device to write the BGP dynamic routing policy into its configuration database. For example, the management platform can configure the current service-related BGP route Internet Protocol prefix (IP prefix) policy, specifying the network segment and plane information of the current route IP. This allows for flexible configuration based on the BGP routing information that the current resource pool network needs to learn. Then, the agent process on the white-box switch listens for the service data sent from the management platform, converts the BGP route IP prefix policy service data into corresponding Redis data, and writes it into CONFIG_DB.
[0036] It should be noted that the Fast Reroute (FFR) component in the first network device filters and controls the learned routes according to the issued IP prefix policy configuration.
[0037] The solution in this embodiment distributes the required BGP dynamic routing policy configuration to the white-box switch, effectively avoiding the learning of redundant routes while ensuring the normal learning and transmission of the BGP dynamic routes required by the service. Simultaneously, it reduces the size of the BGP routes from tens of thousands to hundreds. This strategy reduces the risk of exceeding the capacity of the underlying routing table entries and being attacked by learning a large number of invalid BGP routes, while also ensuring the normal forwarding of service traffic and the stable operation of the network.
[0038] For ease of understanding, the above method is illustrated with an example. In practical applications, the above data processing method can be exemplified as a method for preventing and alarming overcapacity of white-box switch entries. The specific steps are as follows.
[0039] First, GPRC streaming communication is used to collect table capacity information from the underlying chips, and a scheduled task is set to periodically monitor the table capacity utilization of the underlying chips. This effectively solves the problem that current white-box switches cannot promptly grasp the underlying table capacity usage and provide early warnings to prevent table capacity overruns. It also avoids situations where maintenance personnel cannot obtain early warning information from white-box switches in a timely manner, leading to increased network failure duration or network link paralysis.
[0040] Secondly, based on the analysis of the collected capacity data of the underlying chip entries, corresponding capacity warning measures are taken according to different usage scenarios. In addition, when the capacity limit is exceeded, a multi-cluster smooth expansion and user-unnoticed service migration scheme is adopted to ensure the normal forwarding of new service traffic, thereby avoiding the problem of new services being unable to operate due to capacity exceeding the limit.
[0041] Finally, by managing the configuration method using BGP dynamic routing policies, the system ensured that the BGP dynamic routes required by the business could be learned and transmitted normally, effectively avoiding the learning of redundant routes. At the same time, the size of the BGP routes was reduced from tens of thousands to hundreds. This solved the problems of a large number of redundant and invalid BGP routes occupying the capacity of the underlying routing table entries in the underlay network, and the potential attack risks caused by learning a large number of invalid BGP routes.
[0042] For ease of understanding, Figure 2 An exemplary overall system architecture diagram is provided for embodiments of this application, such as... Figure 2As shown, the management and control platform includes a configuration platform and a monitoring platform. The configuration platform includes capacity baseline configuration, performance baseline configuration, routing control BGPIN configuration, routing control BGPOUT configuration, timing policy configuration, and alarm configuration. The monitoring platform includes device system management and monitoring, configuration file management and monitoring, indicator item management and monitoring, and log management and monitoring. At the white-box switch level, it includes data acquisition, containers, a central processing unit (CPU), a driver layer, and programmable chips. Data acquisition includes capacity baseline acquisition, log data, and device indicator acquisition. Capacity baseline acquisition includes detailed routes, network segment routes, Virtual Routing and Forwarding (VRF), GroupEni, Virtual eXtensible Local Area Network (VxLAN) tunnels, VTEP, Overlay Network (overlay) neighbors, and Virtual Local Area Network (VLAN). Log acquisition includes system logs (Syslog), Agent logs, and Software for Open Networking (Software for Open Networking in the cloud). Cloud (SONiC) logs and P4 logs; device metrics collected include BGP status, power status, management port status, interface status, CPU status, fan information, device temperature, and container status; containers include Simple Network Management Protocol (SNMP), FFR, GRPC, Process Monitor (Pmon), Lidp, and Management (Mgmt).
[0043] 1. A method for collecting table entry capacity based on GRPC streaming communication.
[0044] This application proposes a method for acquiring table entry capacity based on gRPC streaming communication, which obtains and writes the table entry capacity information of the underlying chip into the control plane database. Simultaneously, a scheduled task is set to periodically collect and monitor the table entry capacity data of the underlying chip. This not only enables timely and effective acquisition of the usage status of table entry resources on white-box switches, but also supports the analysis of table entry capacity data for capacity overrun warnings. Furthermore, when overruns occur, measures such as smooth multi-cluster expansion and seamless service migration for users are implemented to ensure stable network operation.
[0045] Specifically, a scheduled task needs to be configured on the white-box switch to retrieve the capacity of the underlying table entries. The timing of this scheduled task can be flexibly configured, enabling regular collection and monitoring of the white-box switch's device table entry capacity data. This effectively avoids the problem of missed capacity threshold warnings due to failure to obtain device table entry capacity information in a timely manner, improving the efficiency of white-box switch device capacity management and the timeliness and accuracy of capacity warning information.
[0046] The scheduled task on the white-box switch writes the corresponding P4_USAGE_TABLE data to the CONFIG_DB database of Redis at set time intervals. This triggers the GRPC process to call the SwitchAPI interface of the underlying chip to obtain the capacity usage of the corresponding table entries and write the obtained capacity data back to the APPL_DB database. This effectively avoids the problem of the scheduled task continuously calling the GRPC process and blocking the delivery of other business data. Figure 3 A flowchart illustrating an exemplary method for collecting table entry capacity based on GPRC streaming communication, provided in this application embodiment; as follows: Figure 3 As shown, the specific steps are as follows.
[0047] 1. Configure scheduled tasks.
[0048] 2. CONFIG_DB is written to the P4_USAGE_TABLE table entry.
[0049] 3. GRPC.
[0050] 4. SwitchAPI.
[0051] It should be noted that GPRC calls the SwitchAPI, and the SwitchAPI returns the table entry capacity data to GPRC.
[0052] 5. Write the table entry capacity data into the P4_USAGE_TABLE table of APPL_DB.
[0053] The white-box switch periodically pushes the collected table capacity data to the remote management platform. The management platform analyzes the uploaded table capacity data and classifies the capacity warning level. If the table capacity threshold (i.e., the ratio of the first table capacity data to the table capacity alarm data) is less than 50%, no capacity alarm will be generated. If the table capacity threshold is greater than (or greater than or equal to) 50% and less than 80%, the alarm level will be classified as "notice," and an alert-level alarm message will be pushed to the administrator, who needs to monitor it regularly. If the table capacity threshold is greater than (or greater than or equal to) 80% and less than 90%, the alarm level will be classified as "important," and an important-level alarm message will be pushed to the administrator. At this time, it is necessary to consider adding cluster devices and performing service migration operations. If the table capacity threshold is greater than (or greater than or equal to) 90%, the alarm level will be classified as "urgent," and an urgent-level alarm message will be pushed to the administrator. It is necessary to report to the management platform to stop issuing new service configurations and to perform service migration operations.
[0054] Figure 4 This application provides a flowchart illustrating the classification and handling measures for capacity alarm levels in the underlying table of an exemplary white-box switch, as shown in the embodiments of this application. Figure 4 As shown, the specific steps are as follows.
[0055] 1. Configure the upload of underlying table entry capacity data to the management platform.
[0056] 2. The management and control platform classifies capacity data by level.
[0057] 3. Determine if the alarm information threshold is less than 50%.
[0058] It should be noted that the alarm information can be understood as the ratio of the first table entry capacity data to the table entry capacity alarm data. If it is less than 50%, proceed to step 4; otherwise, proceed to step 5.
[0059] 4. Under normal circumstances, alarm processing will not be triggered.
[0060] 5. Determine if the alarm information threshold is less than 80%.
[0061] It should be noted that the alarm information can be understood as the ratio of the first table entry capacity data to the table entry capacity alarm data. If it is less than 80%, proceed to step 6; otherwise, proceed to step 7.
[0062] 6. Issue warnings at different levels and monitor them regularly.
[0063] 7. Determine if the alarm information threshold is less than 90%.
[0064] It should be noted that the alarm information can be understood as the ratio of the first table entry capacity data to the table entry capacity alarm data. If it is less than 90%, proceed to step 8; otherwise, proceed to step 9.
[0065] 8. If a critical alarm is triggered, consider adding new cluster devices and performing service migration operations.
[0066] 9. Emergency level alarms are reported to the control plane, and the control plane will no longer issue business configurations.
[0067] When the service data carried by the white-box switch reaches the capacity limit, it is necessary to consider adding a pair of cluster gateways to load some of the user service data, thereby reducing the amount of service data carried by the original cluster devices. This solution implements a smooth multi-cluster expansion and user-unnoticed service migration solution, which can complete the smooth expansion of new clusters and the migration of service data without the user's awareness or impact on service forwarding. The specific operation process is as follows: (1) Complete the device access network link and its pre-configuration on the newly added cluster device, and ensure that BGP can only publish local VTEP routes at this time, and other routes cannot be published; (2) Based on the business situation, determine the business data that needs to be migrated, and the management and control level will distribute the business data that needs to be migrated to the new cluster device; (3) After confirming that all business data has been sent to the new cluster device, publish the business routing information on the device to the uplink aggregation device to ensure that the inbound traffic on the new cluster device can be forwarded to the cloud normally; (4) At this time, the inbound traffic of the business data that needs to be migrated may go to the old cluster device or to the new cluster device. (5) The management and control level issues the configuration of the business data that needs to be migrated to the cloud to ensure that the cloud has a business route to the new cluster device at this time; (6) At this time, the outbound traffic within the cloud will go through the equipment of the new cluster, and the inbound traffic outside the cloud will form a load balancer, going through the two pairs of old and new cluster equipment. (7) Cancel the business routing publication on the old cluster devices to ensure that inbound traffic will not go to the old cluster devices; (8) At the management level, delete the business data that needs to be migrated on the old cluster device and delete the corresponding business route from the virtual machine to the old cluster device.
[0068] 2. BGP routing policy management and configuration methods.
[0069] To mitigate the risk of capacity overruns due to learning a large number of redundant and invalid BGP routes, and the potential for attacks through the broadcasting of numerous BGP routes, this application proposes a BGP dynamic routing policy management and configuration method for white-box switches. By distributing the required BGP dynamic routing policy configurations to the white-box switches at the management layer, this effectively avoids the learning of redundant routes while ensuring the normal learning and transmission of the BGP dynamic routes required by services. Simultaneously, it reduces the size of BGP routes from tens of thousands to hundreds. This strategy reduces the risk of capacity overruns in the underlying routing table and attacks through the learning of numerous invalid BGP routes, while also ensuring the normal forwarding of service traffic and the stable operation of the network.
[0070] Specifically, firstly, the BGP route IP prefix policy related to the current service needs to be configured on the management platform, and the network segment information and plane information of the current route IP can be specified. This allows for flexible configuration based on the BGP routing information that the current resource pool network needs to learn.
[0071] Then, the agent process on the white-box switch listens for service data sent from the management platform, converts the BGP routing ipprefix policy service data into corresponding Redis data, and writes it to the CONFIG_DB database. This ensures that the device can asynchronously pull BGP routing IP prefix policy configurations from the management platform, avoiding the loss of ipprefix policy configurations due to device failure.
[0072] Finally, the FRR component filters and controls the learned routes according to the issued IP prefix policy configuration. This effectively avoids learning redundant routes while ensuring the normal learning and transmission of BGP dynamic routes required by the business.
[0073] The solution in this application acquires and writes the table capacity information of the underlying chip into the control plane database. Simultaneously, a scheduled task is set to periodically collect and monitor the table capacity data of the underlying chip. This not only enables timely and effective acquisition of the white-box switch's table resource usage but also supports capacity overrun warnings through table capacity data analysis. This allows network operations personnel to receive white-box switch warnings immediately and to take measures such as smooth multi-cluster expansion and seamless service migration when capacity exceeds limits, ensuring normal forwarding of service traffic. This not only improves the efficiency of white-box switch device capacity management but also reduces the probability of abnormal service data forwarding caused by white-box switch device capacity overruns in network links.
[0074] The solution in this application acquires and writes the table capacity information of the underlying chip into the control plane database. Simultaneously, a scheduled task is set to periodically collect and monitor the table capacity data of the underlying chip. This not only enables timely and effective acquisition of the white-box switch's table resource usage but also supports capacity overrun warnings through table capacity data analysis. This allows network operations personnel to receive white-box switch warnings immediately and to take measures such as smooth multi-cluster expansion and seamless service migration when capacity exceeds limits, ensuring normal forwarding of service traffic. This not only improves the efficiency of white-box switch device capacity management but also reduces the probability of abnormal service data forwarding caused by white-box switch device capacity overruns in network links.
[0075] This application also provides a data processing apparatus. Figure 5 This is a schematic diagram of the structure of a data processing device according to an embodiment of this application; as shown Figure 5 As shown, the data processing apparatus 500 includes: The acquisition unit 501 is used to acquire the first table entry capacity data corresponding to the underlying chip included in the first network device through GRPC, and to acquire the table entry capacity alarm data corresponding to the underlying chip. The determining unit 502 is used to determine the first service data that needs to be migrated in the first network device when it is determined that an alarm message needs to be issued based on the first table entry capacity data and the table entry capacity alarm data. The data processing unit 503 sends the first service data to the second network device for data processing and deletes the first service data from the first network device.
[0076] In one embodiment, the data processing device 500 further includes a sending unit for sending the configured BGP dynamic routing policy to the first network device, so that the first network device writes the BGP dynamic routing policy into the configuration database of the first network device.
[0077] In one embodiment, the determining unit 502 is further configured to determine a ratio of the first table entry capacity data to the table entry capacity alarm data; if the ratio is greater than or equal to a first value and less than a second value, determine the alarm information as a first-level alarm information; if the ratio is greater than or equal to the second value and less than a third value, determine the alarm information as a second-level alarm information; if the ratio is greater than or equal to the third value, determine the alarm information as a third-level alarm information; the first-level alarm information is less than the second-level alarm information; the second-level alarm information is less than the third-level alarm information.
[0078] In one embodiment, the determining unit 502 is further configured to determine the ratio of the first table entry capacity data to the table entry capacity alarm data; if the ratio is less than a first value, no alarm information is issued.
[0079] In one embodiment, the alarm information includes at least third-level alarm information; the determining unit 502 is further configured to determine the first service data that needs to be migrated in the first network device when the alarm information is determined to be the third-level alarm information based on the first table entry capacity data and the table entry capacity alarm data.
[0080] In one embodiment, the acquisition unit 501 is further configured to configure a timed data acquisition task on the first network device, so that when the timed data acquisition task is enabled, the first network device triggers the Google Remote Procedure Call (GRPC) process in the first network device to call the interface of the underlying chip to acquire the first table entry capacity data.
[0081] In one embodiment, the data processing unit 503 is further configured to send the first service data to the second network device for data processing when the second network device completes network access and BGP only publishes the VTEP route of the second network device.
[0082] This application also provides an electronic device. Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application; as shown below. Figure 6 As shown, the electronic device 600 includes a processor 601 and a memory 603. Optionally, the electronic device 600 may also include a communication bus 602.
[0083] In specific embodiments, the processor 601 described above can be at least one of the following: Application Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), CPU, controller, microcontroller, and microprocessor. It is understood that for different devices, the electronic device used to implement the above processor function can also be other types, and this embodiment does not specifically limit it.
[0084] In this embodiment, the communication bus 602 is used to establish communication between the processor 601 and the memory 603; when the processor 601 executes the running program stored in the memory 603, it implements the following data processing method: The first table entry capacity data corresponding to the underlying chip included in the first network device is obtained through GRPC, and the table entry capacity alarm data corresponding to the underlying chip is also obtained. If it is determined that an alarm message needs to be issued based on the first table entry capacity data and the table entry capacity alarm data, the first service data that needs to be migrated in the first network device is determined. The first service data is sent to the second network device for data processing, and the first service data in the first network device is deleted.
[0085] Furthermore, the processor 601 is also configured to send the configured Border Gateway Protocol (BGP) dynamic routing policy to the first network device, so that the first network device writes the BGP dynamic routing policy into the configuration database of the first network device.
[0086] Furthermore, the processor 601 is also used to determine the ratio data between the first entry capacity data and the entry capacity alarm data; If the ratio is greater than or equal to a first value and less than a second value, the alarm information is determined to be a first-level alarm information; if the ratio is greater than or equal to the second value and less than a third value, the alarm information is determined to be a second-level alarm information; if the ratio is greater than or equal to the third value, the alarm information is determined to be a third-level alarm information; the first-level alarm information is less than the second-level alarm information; the second-level alarm information is less than the third-level alarm information.
[0087] Furthermore, the processor 601 is also used to determine the ratio of the first entry capacity data to the entry capacity alarm data; if the ratio is less than a first value, no alarm information is issued.
[0088] Furthermore, the processor 601 described above, wherein the alarm information includes at least third-level alarm information; is also used to determine the first service data that needs to be migrated in the first network device when the alarm information is determined to be the third-level alarm information based on the first table entry capacity data and the table entry capacity alarm data.
[0089] Furthermore, the processor 601 is also configured to configure a timed data acquisition task on the first network device, so that when the timed data acquisition task is enabled, the first network device triggers the Google Remote Procedure Call (GRPC) process in the first network device to call the interface of the underlying chip to obtain the first table entry capacity data.
[0090] Furthermore, the processor 601 is also configured to send the first service data to the second network device for data processing when the second network device completes network access and BGP only publishes the VXLAN tunnel endpoint VTEP route of the second network device.
[0091] This application provides a storage medium storing a computer program thereon. The computer-readable storage medium stores one or more programs, which can be executed by one or more processors. The computer program implements the data processing method described above.
[0092] Based on the above embodiments, this application provides a computer program product, including a computer program that can be executed by one or more processors, and the computer program implements the data processing method described above.
[0093] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0094] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the related technology, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause an image display device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this disclosure.
[0095] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.
Claims
1. A data processing method, characterized in that, The method includes: The capacity data of the first table entry corresponding to the underlying chip contained in the first network device is obtained through Google Remote Procedure Call (GRPC), and the capacity alarm data of the table entry corresponding to the underlying chip is also obtained. If it is determined that an alarm message needs to be issued based on the first table entry capacity data and the table entry capacity alarm data, the first service data that needs to be migrated in the first network device is determined. The first service data is sent to the second network device for data processing, and the first service data in the first network device is deleted.
2. The method according to claim 1, characterized in that, The method further includes: The configured Border Gateway Protocol (BGP) dynamic routing policy is sent to the first network device so that the first network device writes the BGP dynamic routing policy into the configuration database of the first network device.
3. The method according to claim 1, characterized in that, The method further includes: Determine the ratio of the first table entry capacity data to the table entry capacity alarm data; If the ratio is greater than or equal to the first value and less than the second value, the alarm information is determined to be a first-level alarm information; If the ratio is greater than or equal to the second value and less than the third value, the alarm information is determined to be a second-level alarm information; If the ratio is greater than or equal to the third value, the alarm information is determined to be a third-level alarm information; The alarm information at the first level is less than the alarm information at the second level; the alarm information at the second level is less than the alarm information at the third level.
4. The method according to claim 1, characterized in that, The method further includes: Determine the ratio of the first table entry capacity data to the table entry capacity alarm data; No alarm message will be issued if the ratio is less than the first value.
5. The method according to claim 1, characterized in that, The alarm information includes at least level 3 alarm information; the step of determining the first service data that needs to be migrated in the first network device when it is determined that alarm information needs to be issued based on the first table entry capacity data and the table entry capacity alarm data includes: If the alarm information is determined to be the third level alarm information based on the first table entry capacity data and the table entry capacity alarm data, the first service data that needs to be migrated in the first network device is determined.
6. The method according to claim 1, characterized in that, The step of obtaining the capacity data of the first table entry corresponding to the underlying chip contained in the first network device via Google Remote Procedure Call (GRPC) includes: Configure a timed data acquisition task on the first network device so that when the timed data acquisition task is enabled, the first network device triggers the Google Remote Procedure Call (GRPC) process in the first network device to call the interface of the underlying chip to obtain the capacity data of the first table entry.
7. The method according to claim 1, characterized in that, The step of sending the first service data to the second network device for data processing includes: When the second network device completes network access and BGP only publishes the VXLAN tunnel endpoint VTEP route of the second network device, the first service data is sent to the second network device for data processing.
8. A data processing apparatus, characterized in that, The device includes: The acquisition unit is used to acquire the first table entry capacity data corresponding to the underlying chip contained in the first network device through Google Remote Procedure Call (GRPC), and to acquire the table entry capacity alarm data corresponding to the underlying chip. The determining unit is configured to determine the first service data that needs to be migrated in the first network device when it is determined that an alarm message needs to be issued based on the first table entry capacity data and the table entry capacity alarm data. The data processing unit sends the first service data to the second network device for data processing and deletes the first service data from the first network device.
9. 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 steps of the method according to any one of claims 1 to 7.
10. A computer program product comprising a computer program or computer-executable instructions, characterized in that, When the computer program or computer-executable instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 7.
