Soft failure protection method and device for switch chip, equipment and storage medium

By periodically comparing the register resource information in network equipment and issuing repair data, the business function damage caused by soft failure of the switching chip is solved, and rapid repair and normal business operation is achieved.

CN119544646APending Publication Date: 2025-02-28ZHEJIANG UNIVIEW TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311094987.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-28
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

When the switching chips in network equipment fail softly, it will cause damage to the business functions, and the existing technology lacks effective rapid repair measures.

Method used

By monitoring soft failure events, the first register resource information in the network device is periodically obtained and compared with the second register resource information of the switching chip. When the two are inconsistent, the first register resource information is sent to the switching chip to repair the second register resource information.

Benefits of technology

It realizes rapid detection and repair of soft failure of switching chips, ensures the normal operation of network equipment services, and avoids business damage caused by soft failure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119544646A_ABST
    Figure CN119544646A_ABST
Patent Text Reader

Abstract

The invention discloses a soft failure protection method and device for a switch chip, equipment and a storage medium. The method is applied to the network equipment, the network equipment comprises a switching chip, and the method comprises the following steps: in response to the triggering of a soft failure monitoring event, obtaining first register resource information stored in the network equipment according to a preset period; reading second register resource information of the switching chip; and when the second register resource information is inconsistent with the first register resource information, issuing the first register resource information to the switching chip so as to repair the second register resource information based on the first register resource information. According to the technical scheme provided by the embodiment of the invention, when the soft failure of the switch chip occurs, the second register resource information in the switch chip is repaired based on the first register resource information stored in the network equipment, so that the normal operation of the service of the network equipment can be ensured, and the service damage caused by the soft failure of the switch chip is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a soft failure protection method, device, equipment and storage medium for a switching chip. Background Art

[0002] With the widespread adoption and application of the internet, various network devices (such as routers, switches, firewalls, and video security access devices) have played a significant role in people's lives and work. However, due to various reasons, network devices often fail, especially network security devices such as firewalls and access devices. Network devices have multiple service functions and complex modules, and configuration errors and other reasons often lead to network device failures, impacting user services. For example, soft failures such as cosmic rays, Boron fission, alpha radiation, system noise, and electromagnetic interference can cause network device failures.

[0003] When network equipment is located between a large number of devices or in a complex electromagnetic environment, its working status cannot be guaranteed to be 100% stable. Hardware forwarding modules such as switching chips that receive messages are prone to soft failures such as register momentary abnormalities and loss of register hardware entries, resulting in abnormal network equipment services and causing significant losses.

[0004] To address soft failures in current network equipment, the industry's typical approach is to improve electromagnetic noise tolerance by resetting boards and improving processes. However, there are no effective measures to proactively and quickly repair detected soft failures, which results in damage to the service functions of network equipment. Summary of the Invention

[0005] The present invention provides a soft failure protection method, device, equipment and storage medium for a switching chip, so as to solve the technical problem that the service function of a network device is damaged when a soft failure occurs in a switching chip.

[0006] According to one aspect of the present invention, a soft failure protection method for a switching chip is provided, which is applied to a network device, wherein the network device includes a switching chip. The method includes:

[0007] In response to a soft failure monitoring event being triggered, obtaining first register resource information stored in the network device according to a preset period;

[0008] Reading the second register resource information of the switching chip;

[0009] When the second register resource information is inconsistent with the first register resource information, the first register resource information is sent to the switching chip, so as to repair the second register resource information based on the first register resource information.

[0010] According to another aspect of the present invention, a soft failure protection device for a switching chip is provided, which is applied to a network device, wherein the network device includes a switching chip, and the device includes:

[0011] A first resource information acquisition module is configured to acquire first register resource information stored in the network device according to a preset period in response to a soft failure monitoring event being triggered;

[0012] A second resource information reading module, configured to read the second register resource information of the switching chip;

[0013] The resource information sending module is used to send the first register resource information to the switching chip when the second register resource information is inconsistent with the first register resource information, so as to repair the second register resource information based on the first register resource information.

[0014] According to another aspect of the present invention, a network device is provided, comprising:

[0015] a switch chip and at least one processor; and

[0016] a memory communicatively connected to the at least one processor; wherein,

[0017] The memory stores a computer program executable by the at least one processor. The computer program is executed by the at least one processor so that the at least one processor can execute the soft failure protection method for a switching chip according to any embodiment of the present invention.

[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the soft failure protection method for a switching chip according to any embodiment of the present invention when executed.

[0019] The soft failure protection scheme of the technical switching chip of the embodiment of the present invention is applied to a network device, wherein the network device includes a switching chip, and the method includes: in response to a soft failure monitoring event being triggered, obtaining the first register resource information stored in the network device according to a preset period; reading the second register resource information of the switching chip; when the second register resource information is inconsistent with the first register resource information, sending the first register resource information to the switching chip to repair the second register resource information based on the first register resource information. Through the technical scheme provided by the embodiment of the present invention, the first register resource information stored in the network device is compared with the second register resource information read from the switching chip in real time. When the two are inconsistent, it is determined that a soft failure has occurred in the switching chip. At this time, the first register resource information is quickly sent to the switching chip to repair the second register resource information, thereby ensuring the normal operation of the network device's services and avoiding service damage caused by the soft failure of the switching chip.

[0020] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0022] Figure 1 This is a flow chart of a soft failure protection method for a switching chip provided in Embodiment 1 of the present invention;

[0023] Figure 2 This is a flow chart of a soft failure protection method for a switching chip provided in Embodiment 2 of the present invention;

[0024] Figure 3 This is a flow chart of a soft failure protection method for a switching chip provided in accordance with a third embodiment of the present invention;

[0025] Figure 4 2 is a schematic structural diagram of a soft failure protection device for a switching chip according to a fourth embodiment of the present invention;

[0026] Figure 5 The present invention is a schematic diagram of the structure of a network device that implements the soft failure protection method for a switching chip according to an embodiment of the present invention. DETAILED DESCRIPTION

[0027] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0028] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0029] In related technology, when high-energy subatomic particles travel through the silicon in ultra-large-scale circuit memory cells (flip-flops, registers, or RAM cells), they generate free charges. These charges accumulate in circuit nodes within a very short time interval (approximately 15 ps). When the charge accumulation exceeds a certain level, the stored data changes, causing system errors. Because the damage to the circuit is not permanent, this phenomenon is called a soft failure.

[0030] Example 1

[0031] Figure 1 A flowchart of a soft failure protection method for a switching chip is provided for the first embodiment of the present invention. This embodiment is applicable to the case of protecting the soft failure of a switching chip. The method can be executed by a soft failure protection device of the switching chip. The soft failure protection device of the switching chip can be implemented in the form of hardware and / or software. The soft failure protection device of the switching chip can be configured in a network device, wherein the network device includes a switching chip. Figure 1 As shown, the method includes:

[0032] S110 : In response to a soft failure monitoring event being triggered, obtain first register resource information stored in the network device according to a preset period.

[0033] Network equipment is specialized hardware used to interconnect various servers, PCs, application terminals, and other nodes to form information and communication networks. Network equipment can include switches, routers, firewalls, bridges, hubs, gateways, VPN servers, network interface cards, wireless access points, modems, 5G base stations, optical terminals, fiber optic transceivers, and optical cables.

[0034] In an embodiment of the present invention, a network device includes a processor and a switching chip, and the switching chip includes one or more registers. For example, the processor may be a CN9130 processor, and the switching chip may be a 98DX336S switching chip. It should be noted that the embodiment of the present invention does not limit the models of the processor and switching chip in the network device.

[0035] Exemplarily, when a soft failure monitoring instruction input by a user is received, a soft failure monitoring event is triggered; or, when it is determined that the network device meets a preset condition, a soft failure monitoring event is triggered. It should be noted that the embodiment of the present invention does not limit the triggering conditions of the soft failure monitoring event. When the soft failure monitoring event is triggered, the first register resource information stored in the network device is obtained according to a preset period. For example, the first register resource information stored in the network device can be obtained by setting a timer task. Optionally, the first register resource information can be status information of a register in a switching chip pre-stored in the network device, or it can be service table item data dynamically stored in the network device.

[0036] S120: Read the second register resource information of the switch chip in the network device.

[0037] In an embodiment of the present invention, second register resource information of a switching chip is read from a switching chip of a network device, where the second register resource information and the first register resource information are of the same type. For example, if the first register resource information is status information of a register in the switching chip pre-stored in the network device, then the second register resource information is status information of the register in the switching chip read in real time from the switching chip. For another example, if the first register resource information is service table entry data dynamically stored in the network device, then the second register resource information is service table entry data in the switching chip read in real time from the switching chip.

[0038] S130: When the second register resource information is inconsistent with the first register resource information, send the first register resource information to the switching chip to repair the second register resource information based on the first register resource information.

[0039] In an embodiment of the present invention, the second register resource information is compared with the first register resource information to determine whether the two are consistent. If so, it indicates that the switching chip of the network device has not experienced a soft failure due to external reasons, and the network device can perform corresponding service processing based on the second register resource information. If the second register resource information is inconsistent with the first register resource information, it indicates that the switching chip in the network device has experienced a soft failure. In this case, the first register resource information is sent to the switching chip to repair the second register resource information in the switching chip based on the first register resource information, thereby ensuring that the network device performs corresponding service processing based on the correct register resource information.

[0040] The soft failure protection method for a technical switching chip according to an embodiment of the present invention is applied to a network device, wherein the network device includes a switching chip. The method includes: in response to a soft failure monitoring event being triggered, obtaining first register resource information stored in the network device according to a preset period; reading second register resource information of the switching chip; and when the second register resource information is inconsistent with the first register resource information, sending the first register resource information to the switching chip. Through the technical solution provided by the embodiment of the present invention, by comparing the first register resource information stored in the network device with the second register resource information read from the switching chip in real time, when the two are inconsistent, it is determined that a soft failure has occurred in the switching chip. At this time, the first register resource information is quickly sent to the switching chip to repair the second register resource information, thereby ensuring the normal operation of the network device's services and avoiding service damage caused by the soft failure of the switching chip.

[0041] In some embodiments, the first register resource information includes a first register status value; obtaining the first register resource information stored in the network device includes: obtaining a register status configuration file pre-stored in the network device; and reading the first register status value of each register in the switching chip from the register status configuration file.

[0042] In an embodiment of the present invention, a switching chip of a network device may include one or more registers. Before the network device is put into use, register state values ​​of each register in the switching chip of the network device are set according to the application scenario of the network device, and the register state values ​​are stored in the network device in the form of a configuration file. Therefore, in response to a soft failure detection event being triggered, a register state configuration file pre-stored in the network device is obtained and parsed, and the register state values ​​of each register in the switching chip of the network device are read from the register state configuration file. The register state value read from the register state configuration file is referred to as the first register state value.

[0043] In some embodiments, the second register resource information includes the second register status value of each register in the switching chip; when the second register resource information is inconsistent with the first register resource information, the first register resource information is sent to the switching chip, including: polling each register, and when the second register status value corresponding to the current register is inconsistent with the first register status value, sending the first register status value to the switching chip to update the second register status value of the current register in the switching chip based on the first register status value.

[0044] In an embodiment of the present invention, when the first register resource information is the first register status value of each register in the switching chip, the second register resource information is the second register status value of each register in the switching chip read in real time from the switching chip. Each register is polled to determine whether the second register status value corresponding to the current register is consistent with the first register status value. If not, it indicates that a soft failure has occurred in the current register in the switching chip, resulting in an abnormal second register status value corresponding to the current register. At this time, the first register status value is sent to the switching chip to update the second register status value of the current register in the switching chip based on the first register status value. It can be understood that when the second register status value of the register read from the switching chip is inconsistent with the first register status value of the register pre-stored in the network device (which can also be understood as a processor), it indicates that a soft failure has occurred in the register in the switching chip. In order to avoid the impact of the soft failure on the service function of the network device, the first register status value is sent to the switching chip so that the register in the switching chip performs corresponding service processing based on the correct first register status value.

[0045] In some embodiments, the first register resource information includes first business table item data, and the second register resource information includes second business table item data; obtaining the first register resource information stored in the network device includes: reading the corresponding first business table item data dynamically stored in the network device according to the business type; reading the second register resource information of the switching chip includes: reading the second business table item data corresponding to the business type in the switching chip; when the second register resource information is inconsistent with the first register resource information, sending the first register resource information to the switching chip, including: polling each first business table item data, and when there is no second business table item data consistent with the current first business table item data in the second business table item data, sending the current first business table item data to the switching chip.

[0046] In an embodiment of the present invention, different register hardware resources in a switching chip correspond to different service types and service functions, wherein different service types correspond to different service table item data. The same service type corresponds to one or more service table item data. For example, service types may include ACL services, security policy services, blacklist services, and whitelist services. In response to a soft failure monitoring event being triggered, first service table item data corresponding to the service type dynamically stored in the memory of the network device is read according to the service type at a preset period. Second service table item data corresponding to the service type in the switching chip is then read through a query interface of the switching chip. Each first service table item data is polled to determine whether all read second service table item data contain second service table item data that is consistent with the current first service table item data. If not, this indicates that the second service table item data in the switching chip may be corrupted due to a soft failure of a register resource in the switching chip. In this case, the current first service table item data is sent to the switching chip to repair the second service table item data in the switching chip based on the first service table item data dynamically stored in the memory of the network device.

[0047] In some embodiments, the first register resource information further includes a total number of first service items, and the second register resource information further includes a total number of second service items. When polling each first service item data, if no second service item data consistent with the current first service item data exists in each second service item data, before delivering the current first service item data to the switch chip, the method further includes: determining whether the total number of the second service items is the same as the total number of the first service items. Polling each first service item data, if no second service item data consistent with the current first service item data exists in each second service item data, delivering the current first service item data to the switch chip, including: when the total number of the second service items is different from the total number of the first service items, polling each first service item data, if no second service item data consistent with the current first service item data exists in each second service item data, delivering the current first service item data to the switch chip.

[0048] Optionally, when the total number of the second business table items is the same as the total number of the first business table items, N target business table item data are extracted from all the first business table item data; the N target business table item data are polled, and when there is no second business table item data consistent with the current target business table item data among the second business table item data, the current target business table item data is sent to the switching chip.

[0049] In an embodiment of the present invention, the corresponding first service table item data and the total number of first service table items dynamically stored in the network device memory are read based on the service type. Furthermore, the corresponding second service table item data and the total number of second service table items in the switching chip are read. A determination is made as to whether the total number of first service table items and the total number of second service table items are the same. If not, this indicates that a soft failure of register resources in the switching chip may have caused a corruption in the second service table item data in the switching chip. Therefore, all first service table item data and second service table item data are directly verified. Specifically, each first service table item data is polled to determine whether any second service table item data matches the current first service table item data. If not, the current first service table item data is delivered to the switching chip. If the total number of first service table items and the total number of second service table items are the same, to further determine whether a soft failure has occurred in the switching chip and improve the efficiency of soft failure detection, N pieces of first service table item data are extracted from all first service table item data and used as the target service table item data. Optionally, N pieces of target service table item data may be randomly extracted from all first service table item data, or N pieces of target service table item data may be extracted from all first service table item data according to a preset rule. N is an integer greater than or equal to 1. The N pieces of target service table item data are polled to determine whether any second service table item data consistent with the current target service table item data exists among all second service table item data. If not, it indicates that a soft failure may have occurred in the switching chip. In this case, the current target service table item data is sent to the switching chip, so that the second service table item data in the switching chip can be repaired based on the target service table item data.

[0050] In some embodiments, after sending the first register resource information to the switching chip, it also includes: recording the number of times the first register resource information is sent, and judging whether the first register resource information is successfully sent to the switching chip. If not, returning to execute sending the first register resource information to the switching chip after the target time interval, and increasing the number of sends by 1, until the number of sends is less than the preset number threshold, the first register resource information is successfully sent to the switching chip; wherein, the target time increases with the increase of the number of sends.

[0051] For example, when sending the first register resource information to the switching chip, the target interface for receiving the first register resource information may experience a soft failure, resulting in a failure to send the first register resource information. That is, the switching chip cannot receive the first register resource information. Therefore, after sending the first register resource information to the switching chip, the number of times the first register resource information was sent is recorded, and a determination is made as to whether the first register resource information was successfully sent to the switching chip. If not, the process returns to sending the first register resource information to the switching chip after a target interval, i.e., the first register resource information is sent to the switching chip again, and the number of times the first register resource information was sent is increased by 1. A determination is made as to whether the first register resource information was successfully sent to the switching chip within a preset number threshold. If not, it indicates that the failure to send the first register resource information was not caused by a soft failure of the target interface, but rather by damage to the switching chip. In this case, a switching chip damage alarm is issued. When the first register resource information is successfully sent to the switching chip within the preset number threshold, the number of times the information was sent is reset to 0.

[0052] Because soft failures are temporary, in order to reduce the number of times the first register resource information is sent, the target duration increases as the number of times the first register resource information is sent increases. For example, after the first register resource information fails to be sent for the first time, the first register resource information is sent to the switching chip again after a first duration. If the first register resource information fails to be sent for the second time, the first register resource information is sent to the switching chip again after a second duration, where the second duration is greater than the first duration, such as the second duration is twice the first duration, and so on, until the first register resource information is successfully sent to the switching chip within the predicted number threshold. For example, the preset number threshold can be 3.

[0053] Example 2

[0054] Figure 2 This is a flow chart of a soft failure protection method for a switching chip provided in the second embodiment of the present invention, such as Figure 2 As shown, the method includes:

[0055] S210 : In response to a soft failure monitoring event being triggered, obtaining a register status configuration file pre-stored in the network device according to a preset period.

[0056] S220: Read a first register state value of each register in the switch chip from the register state configuration file.

[0057] S230: Read the second register status value of each register in the switching chip.

[0058] S240, poll each register to determine whether the second register state value corresponding to the current register is consistent with the first register state value. If so, execute S2110, otherwise execute S250.

[0059] S250: Send the first register state value corresponding to the current register to the switching chip, and record the number of times the first register state value corresponding to the current register is sent.

[0060] S260: Determine whether the first register status value corresponding to the current register is successfully sent to the switching chip. If so, execute S2100; otherwise, execute S270.

[0061] S270: Determine whether the number of times the data is sent is less than a preset threshold. If so, execute S280; otherwise, execute S290.

[0062] S280: Return to S250 after the target duration.

[0063] S290: Determine that the switch chip is damaged, and issue a switch chip damage alarm.

[0064] S2100 , updating a second register state value of a current register in the switching chip based on the first register state value, and returning to execute S210 .

[0065] S2110 , determining whether all registers have been polled; if so, returning to executing S210 ; otherwise, returning to executing S240 .

[0066] The soft failure protection method for a switching chip provided in an embodiment of the present invention compares a first register status value pre-stored in a network device with a second register status value read in real time from the switching chip. When the two are inconsistent, it is determined that a soft failure has occurred in the switching chip. At this time, the first register status value is quickly sent to the switching chip to update the second register status value of the register in the switching chip based on the first register status value, thereby ensuring the normal operation of the network device's business and avoiding business damage caused by the soft failure of the switching chip.

[0067] Example 3

[0068] Figure 3 This is a flow chart of a soft failure protection method for a switching chip provided in the second embodiment of the present invention, such as Figure 3 As shown, the method includes:

[0069] S310 : In response to a soft failure monitoring event being triggered, read the corresponding first service table item data and the total number of first service table items dynamically stored in the network device according to the service type at a preset period.

[0070] S320: Read the second service entry data corresponding to the service type and the total number of second service entries in the switching chip.

[0071] S330 , determine whether the total number of the second service entries is the same as the total number of the first service entries; if so, execute S3120 ; otherwise, execute S340 .

[0072] S340, polling each first service item data, determining whether there is second service item data that is consistent with the current first service item data in all second service item data, if so, executing S3110, otherwise executing S350,

[0073] S350: Send the current first service entry data to the switch chip, and record the number of times the current first service entry data is sent.

[0074] S360: Determine whether the current first service entry data is successfully sent to the switching chip. If so, execute S3100; otherwise, execute S370.

[0075] S370: Determine whether the number of times the current first service entry data is sent is less than a preset number threshold. If so, execute S380; otherwise, execute S390.

[0076] S380: Return to S350 after the target duration.

[0077] S390: Determine that the switch chip is damaged, and issue a switch chip damage alarm.

[0078] S3100: Repair the second service entry data in the switch chip based on the current first service entry data, and return to S310.

[0079] S3110 , determining whether all first service table item data have been polled; if so, returning to S310 ; otherwise, returning to S340 .

[0080] S3120: Extract N pieces of target service table entry data from all first service table entry data.

[0081] S3130 : Poll N pieces of target service table item data. When there is no second service table item data consistent with the current target service table item data in each piece of second service table item data, send the current target service table item data to the switching chip.

[0082] The soft failure protection method for a switching chip provided in an embodiment of the present invention compares first service table item data dynamically stored in a network device with second service table item data read in real time from the switching chip. When the two are inconsistent, it is determined that a soft failure has occurred in the switching chip. At this time, the first service table item data is quickly sent to the switching chip to repair the second service table item data in the switching chip based on the first service table item data, thereby ensuring the normal operation of the network device's services and avoiding service damage caused by the soft failure of the switching chip.

[0083] Example 4

[0084] Figure 4 This is a schematic diagram of the structure of a soft failure protection device for a switching chip provided by the fourth embodiment of the present invention. The device is applied to a network device, which includes a switching chip, such as Figure 4 As shown, the device includes:

[0085] A first resource information acquisition module 410 is configured to acquire first register resource information stored in the network device according to a preset period in response to a soft failure monitoring event being triggered;

[0086] A second resource information reading module 420 is configured to read the second register resource information of the switching chip;

[0087] The resource information sending module 430 is configured to send the first register resource information to the switching chip when the second register resource information is inconsistent with the first register resource information, so as to repair the second register resource information based on the first register resource information.

[0088] Optionally, the first register resource information includes a first register state value;

[0089] The first resource information acquisition module is used to:

[0090] Obtaining a register status configuration file pre-stored in the network device;

[0091] The first register state value of each register in the switching chip is read from the register state configuration file.

[0092] Optionally, the second register resource information includes a second register state value of each register in the switching chip;

[0093] The resource information issuing module is used to:

[0094] Poll each register, and when the second register status value corresponding to the current register is inconsistent with the first register status value, send the first register status value to the switching chip to update the second register status value of the current register in the switching chip based on the first register status value.

[0095] Optionally, the first register resource information includes first service table entry data, and the second register resource information includes second service table entry data;

[0096] The first resource information acquisition module is used to:

[0097] Reading the corresponding first service table item data dynamically stored in the network device according to the service type;

[0098] The second resource information reading module is used to:

[0099] Reading each second service table item data corresponding to the service type in the switching chip;

[0100] The resource information issuing module includes:

[0101] The first service table item data sending module is configured to poll each first service table item data, and when there is no second service table item data consistent with the current first service table item data among the second service table item data, send the current first service table item data to the switching chip.

[0102] Optionally, the first register resource information further includes the total number of first service entries, and the second register resource information further includes the total number of second service entries;

[0103] a service item total number determination module, configured to, when polling each first service item data, determine whether the total number of the second service items is the same as the total number of the first service items before delivering the current first service item data to the switching chip if no second service item data consistent with the current first service item data exists among the second service item data;

[0104] The first service entry data delivery module is configured to:

[0105] When the total number of the second service items is different from the total number of the first service items, each first service item data is polled; when there is no second service item data consistent with the current first service item data among the second service item data, the current first service item data is sent to the switching chip.

[0106] Optionally, the device further includes:

[0107] a service table item data extraction module, configured to extract N pieces of target service table item data from all the first service table item data when the total number of the second service table items is the same as the total number of the first service table items;

[0108] The target service table item data sending module is used to poll N target service table item data, and when there is no second service table item data consistent with the current target service table item data among the second service table item data, send the current target service table item data to the switching chip.

[0109] Optionally, also include:

[0110] The number of sending recording modules is used to record the number of sending of the first register resource information after sending the first register resource information to the switching chip, and to determine whether the first register resource information is successfully sent to the switching chip. If not, the module returns to execute sending of the first register resource information to the switching chip after a target time interval, and increases the number of sending by 1 until the number of sending is less than a preset number threshold, and the first register resource information is successfully sent to the switching chip; wherein, the target time increases with the increase of the number of sending.

[0111] Optionally, the device further includes:

[0112] The alarm module is configured to determine that the switching chip is damaged and issue a switching chip damage alarm if the first register resource information is not successfully delivered to the switching chip when the delivery number is less than the preset number threshold.

[0113] The soft failure protection device for a switching chip provided in an embodiment of the present invention can execute the soft failure protection method for a switching chip provided in any embodiment of the present invention, and has corresponding functional modules and beneficial effects of the execution method.

[0114] Example 5

[0115] Figure 5 A schematic diagram of the structure of a network device 10 that can be used to implement an embodiment of the present invention is shown. The network device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The network device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0116] like Figure 5 As shown, network device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 and a random access memory (RAM) 13, communicatively connected to at least one processor 11. The memory stores a computer program executable by the at least one processor, and processor 11 can perform various appropriate actions and processes based on the computer program stored in ROM 12 or loaded from storage unit 18 into RAM 13. RAM 13 can also store various programs and data required for the operation of network device 10. Processor 11, ROM 12, and RAM 13 are interconnected via bus 14. An input / output (I / O) interface 15 is also connected to bus 14.

[0117] Multiple components in network device 10 are connected to I / O interface 15, including: an input unit 16, such as a keyboard, mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, optical disk, etc.; and a communication unit 19, such as a network card, modem, wireless communication transceiver, etc. Communication unit 19 allows network device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0118] Processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any other suitable processor, controller, microcontroller, etc. Processor 11 executes the various methods and processes described above, such as the soft failsafe method for the switch chip.

[0119] In some embodiments, the soft failsafe method for a switch chip can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on network device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the soft failsafe method for a switch chip described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to execute the soft failsafe method for a switch chip in any other appropriate manner (e.g., via firmware).

[0120] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0121] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0122] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0123] To provide interaction with a user, the systems and techniques described herein can be implemented on a network device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the network device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0124] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0125] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.

[0126] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.

[0127] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.

Claims

1. A soft failure protection method for a switching chip, characterized in that: Applied to a network device, the network device includes a switching chip, and the method includes: In response to a soft failure monitoring event being triggered, obtaining first register resource information stored in the network device according to a preset period; Reading the second register resource information of the switching chip; When the second register resource information is inconsistent with the first register resource information, the first register resource information is sent to the switching chip to repair the second register resource information based on the first register resource information.

2. The method according to claim 1, characterized in that The first register resource information includes a first register state value; Acquiring first register resource information stored in the network device, including: Obtaining a register status configuration file pre-stored in the network device; The first register state value of each register in the switching chip is read from the register state configuration file.

3. The method according to claim 2, characterized in that The second register resource information includes a second register state value of each register in the switching chip; When the second register resource information is inconsistent with the first register resource information, sending the first register resource information to the switching chip includes: Poll each register, and when the second register state value corresponding to the current register is inconsistent with the first register state value, send the first register state value to the switching chip to update the second register state value of the current register in the switching chip based on the first register state value.

4. The method according to claim 1, characterized in that: The first register resource information includes first service table item data, and the second register resource information includes second service table item data; Acquiring first register resource information stored in the network device, including: Reading the first service table item data corresponding to each dynamically stored in the network device according to the service type; Reading the second register resource information of the switching chip includes: Reading each second service table item data corresponding to the service type in the switching chip; When the second register resource information is inconsistent with the first register resource information, sending the first register resource information to the switching chip includes: Polling each first service item data, when there is no second service item data consistent with the current first service item data among the second service item data, sending the current first service item data to the switching chip.

5. The method according to claim 4, characterized in that The first register resource information also includes the total number of first service table items, and the second register resource information also includes the total number of second service table items; When polling each first service item data, when there is no second service item data consistent with the current first service item data among the second service item data, before sending the current first service item data to the switching chip, the method further includes: Determining whether the total number of the second service table items is the same as the total number of the first service table items; Polling each first service item data, when there is no second service item data consistent with the current first service item data among the second service item data, sending the current first service item data to the switching chip, including: When the total number of the second service items is different from the total number of the first service items, each first service item data is polled, and when there is no second service item data consistent with the current first service item data among the second service item data, the current first service item data is sent to the switching chip.

6. The method according to claim 5, characterized in that Also includes: When the total number of the second service items is the same as the total number of the first service items, extracting N pieces of target service item data from all the first service item data; Polling N pieces of target service table item data, when there is no second service table item data consistent with the current target service table item data among the second service table item data, sending the current target service table item data to the switching chip.

7. The method according to claim 1, characterized in that After sending the first register resource information to the switching chip, the method further includes: Record the number of times the first register resource information is sent down, and determine whether the first register resource information is successfully sent down to the switching chip. If not, return to execute sending the first register resource information to the switching chip after a target duration, and increase the number of times sent down by 1 until the number of times sent down is less than a preset threshold, and the first register resource information is successfully sent down to the switching chip; wherein the target duration increases with the increase in the number of times sent down.

8. A soft failure protection device for a switching chip, characterized in that: Applied to a network device, the network device includes a switching chip, and the device includes: A first resource information acquisition module, configured to acquire first register resource information stored in the network device according to a preset period in response to a soft failure monitoring event being triggered; A second resource information reading module, used to read the second register resource information of the switching chip; The resource information sending module is used to send the first register resource information to the switching chip when the second register resource information is inconsistent with the first register resource information, so as to repair the second register resource information based on the first register resource information.

9. A network device, characterized in that: The network equipment includes: a switch chip and at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the soft failure protection method for the switching chip according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the soft failure protection method for a switching chip according to any one of claims 1 to 7 when executed.