Packet exception analysis method and device and storage medium

CN119232596BActive Publication Date: 2026-10-23CHINA UNITED NETWORK COMM GRP CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310789111.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-29
Publication Date
2026-10-23
Estimated Expiration
2043-06-29

AI Technical Summary

Technical Problem

[0003]但是,在报文转发的过程中,可能存在各种异常情况(如报文丢包、报文转发异常等),导致报文转发失败,进而影响业务的办理情况

Benefits of technology

[0021]上述方案中,报文异常的解析装置、计算机设备、计算机存储介质或者芯片所能解决的技术问题以及实现的技术效果可以参见上述第一方面所解决的技术问题以及技术效果,在此不再赘述。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119232596B_ABST
    Figure CN119232596B_ABST
Patent Text Reader

Abstract

The application provides a message exception analysis method and device and a storage medium, relates to the technical field of communication, and can analyze the cause of message exception. The method comprises the following steps: an electronic device receives a first message from a target device, wherein the first message comprises an exception message. The electronic device inputs the exception message into a target emulator to obtain an original forwarding path of the exception message and exception message information, wherein the exception message information is information about the exception of the exception message, the original forwarding path is a forwarding path of the message in the case where no exception occurs, and the target emulator is any emulator in at least one emulator. The electronic device displays the original forwarding path of the exception message and the exception message information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communications, and in particular to a method, apparatus and storage medium for parsing message anomalies. Background Technology

[0002] With the increasing popularity of broadband applications, users have higher and higher demands for broadband networks, and the number of network devices introduced into broadband networks (either replacements or new additions) is also increasing. During the service processing of network devices, multiple packets can be forwarded and processed to handle various services.

[0003] However, various anomalies may occur during message forwarding (such as packet loss, message forwarding errors, etc.), leading to message forwarding failure and thus affecting business processing. Therefore, how to analyze the causes of message anomalies has become an urgent problem to be solved. Summary of the Invention

[0004] This application provides a method, apparatus, and storage medium for parsing message anomalies, which can analyze the reasons for message anomalies.

[0005] To achieve the above objectives, this application adopts the following technical solution:

[0006] Firstly, this application provides a method for parsing message anomalies, applied to an electronic device. The electronic device is equipped with at least one emulator, which simulates the forwarding path of messages. In this method, a first message is received from a target device, the first message including an abnormal message. The abnormal message is input into the target emulator to obtain the original forwarding path and abnormal message information. The abnormal message information indicates that the abnormal message has encountered an anomaly, and the original forwarding path is the forwarding path of the message if no anomaly has occurred. The target emulator is any one of at least one emulator. The original forwarding path and abnormal message information of the abnormal message are then displayed.

[0007] Based on the above technical solution, the electronic device receives a first message from the target device, which includes an abnormal message. The electronic device then inputs the abnormal message into the target emulator to obtain the original forwarding path and abnormal message information. The abnormal message information indicates that the abnormal message has encountered an error, the original forwarding path is the forwarding path if the message had not encountered an error, and the target emulator is any one of at least one emulator. The electronic device can then display the original forwarding path and abnormal message information. In this way, after receiving an abnormal message, the electronic device can obtain and display the original forwarding path and abnormal message information through the target emulator, achieving white-box analysis of the abnormal message. Furthermore, white-box analysis of the abnormal message through the emulator improves the efficiency of parsing the abnormal message. This facilitates maintenance personnel in managing abnormal messages using the original forwarding path and abnormal message information, thereby reducing the probability of failure.

[0008] In one possible design, it is determined whether configuration information exists in the first message, and this configuration information is used to configure the simulator. If configuration information exists in the first message, the target simulator is updated based on the configuration information.

[0009] In one possible design, the first message includes: an identifier of the target device, wherein the electronic device stores a correspondence between the device identifier and at least one emulator. Based on the identifier of the target device, a target emulator is determined from the at least one emulator, wherein the identifier of the target device corresponds to the target emulator.

[0010] In one possible design, the configuration information includes: a routing table and register information, with the register information used to indicate whether the target route is enabled.

[0011] In one possible design, the abnormal message includes at least one of the following: a message discarded by the target device and a message for an abnormal service, the abnormal service being configured by the user.

[0012] Secondly, this application provides a message anomaly parsing apparatus, which includes a receiving unit, a processing unit, and a display unit.

[0013] A receiving unit is used to receive a first message from the target device, the first message including an abnormal message. A processing unit is used to input the abnormal message into the target emulator to obtain the original forwarding path and abnormal message information. The abnormal message information indicates that the abnormal message has encountered an error, and the original forwarding path is the forwarding path of the message if no error has occurred. The target emulator is any one of at least one emulator. A display unit is used to display the original forwarding path and abnormal message information of the abnormal message.

[0014] In one possible design, the processing unit is further configured to determine whether configuration information exists in the first message, the configuration information being used to configure the simulator. The processing unit is also configured to update the target simulator based on the configuration information if it exists in the first message.

[0015] In one possible design, the first message includes: an identifier of the target device, wherein the electronic device stores a correspondence between the device identifier and at least one emulator. The processing unit is further configured to determine a target emulator from the at least one emulator based on the identifier of the target device, wherein the identifier of the target device corresponds to the target emulator.

[0016] In one possible design, the configuration information includes: a routing table and register information, with the register information used to indicate whether the target route is enabled.

[0017] In one possible design, the abnormal message includes at least one of the following: a message discarded by the target device and a message for an abnormal service, the abnormal service being configured by the user.

[0018] Thirdly, this application provides a message anomaly parsing apparatus, the apparatus comprising: a processor and a memory; the processor and the memory being coupled; the memory being used to store one or more programs, the one or more programs including computer-executable instructions, wherein when the message anomaly parsing apparatus is running, the processor executes the computer-executable instructions stored in the memory to implement the message anomaly parsing method as described in the first aspect and any possible implementation thereof.

[0019] Fourthly, this application provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the message exception parsing method described in the first aspect and any possible implementation thereof.

[0020] Fifthly, this application provides a chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run computer programs or instructions to implement the message exception parsing method as described in the first aspect and any possible implementation of the first aspect.

[0021] The technical problems that can be solved and the technical effects that can be achieved by the message parsing device, computer equipment, computer storage medium or chip in the above solution can be referred to the technical problems and technical effects solved in the first aspect above, and will not be repeated here. Attached Figure Description

[0022] Figure 1 A system architecture diagram of a communication system provided in this application embodiment;

[0023] Figure 2 A flowchart illustrating a message anomaly parsing method provided in this application embodiment;

[0024] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;

[0025] Figure 4 A flowchart illustrating another method for parsing message anomalies provided in this application embodiment;

[0026] Figure 5 A flowchart illustrating another method for parsing message anomalies provided in this application embodiment;

[0027] Figure 6 A flowchart illustrating another method for parsing message anomalies provided in this application embodiment;

[0028] Figure 7 A flowchart illustrating another method for parsing message anomalies provided in this application embodiment;

[0029] Figure 8 A schematic diagram of the structure of a message anomaly parsing device provided in an embodiment of this application;

[0030] Figure 9 A schematic diagram of another message anomaly parsing device provided in an embodiment of this application;

[0031] Figure 10 A conceptual partial view of a computer program product provided for an embodiment of this application. Detailed Implementation

[0032] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0033] In this article, the character " / " generally indicates that the objects before and after it are in an "or" relationship. For example, A / B can be understood as A or B.

[0034] The terms “first” and “second” in the specification and claims of this application are used to distinguish different objects, rather than to describe a specific order of objects.

[0035] Furthermore, the terms "comprising" and "having," and any variations thereof, used in the description of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or modules is not limited to the steps or modules listed, but may optionally include other steps or modules not listed, or may optionally include other steps or modules inherent to such process, method, product, or device.

[0036] Furthermore, in the embodiments of this application, the words "exemplary" or "for example" are used to indicate that they are examples, illustrations, or descriptions. Any embodiment or design that is described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design options. Specifically, the use of the words "exemplary" or "for example" is intended to present concepts in a concrete manner.

[0037] With the increasing popularity of broadband applications, users have higher and higher demands for broadband networks, and the number of network devices introduced into broadband networks (either replacements or new additions) is also increasing. During the service processing of network devices, multiple packets can be forwarded and processed to handle various services.

[0038] However, various anomalies may occur during message forwarding (such as packet loss, message forwarding errors, etc.), leading to message forwarding failure and thus affecting business processing. Therefore, how to analyze the causes of message anomalies has become an urgent problem to be solved.

[0039] Currently, network device diagnostic tools and information gathering tools can be used to diagnose the causes of packet anomalies. However, these tools are time-consuming and operate as black-box diagnostics, making it difficult to accurately diagnose complex forwarding anomalies or occasional packet loss issues. Alternatively, manual analysis of collected information can be used, but this method is less efficient for fault diagnosis.

[0040] To address the aforementioned problems, this application provides a method for parsing message anomalies. An electronic device receives a first message from a target device, the first message including an anomaly message. The electronic device then inputs the anomaly message into a target emulator to obtain the original forwarding path and anomaly message information. The anomaly message information indicates that the anomaly occurred, the original forwarding path is the forwarding path of the message if no anomaly had occurred, and the target emulator is any one of at least one emulator. The electronic device can then display the original forwarding path and anomaly message information of the anomaly message.

[0041] In this way, after receiving an abnormal message, the electronic device can obtain the original forwarding path and abnormal message information through the target emulator, and display the original forwarding path and abnormal message information, thus achieving white-box analysis of abnormal messages. Furthermore, white-box analysis of abnormal messages through the emulator improves the efficiency of abnormal message parsing. This allows maintenance personnel to manage abnormal messages more easily using the original forwarding path and abnormal message information, thereby reducing the probability of failure.

[0042] The implementation environment of the embodiments of this application is described below.

[0043] like Figure 1 As shown, a communication system provided in an embodiment of this application is provided. The communication system includes a network device 101 (e.g., a base station) and an electronic device 102 (e.g., a terminal or a server).

[0044] Base stations can include various forms, such as macro base stations, micro base stations (also known as small stations), relay stations, and access points. Specifically, they can be: access points (APs) in Wireless Local Area Networks (WLANs), base stations (BTSs) in Global System for Mobile Communications (GSM) or Code Division Multiple Access (CDMA), base stations (NodeBs, NBs) in Wideband Code Division Multiple Access (WCDMA), evolved Node Bs (eNBs or eNodeBs) in LTE, relay stations or access points, or base stations in vehicle-mounted equipment, wearable devices, and future 5G networks' next-generation Node Bs (gNBs) or future evolved Public Land Mobile Networks (PLMNs).

[0045] A terminal can be a device with transceiver capabilities. Terminals can be deployed on land, including indoors or outdoors, handheld or vehicle-mounted; they can also be deployed on water (such as on ships); and they can be deployed in the air (e.g., on airplanes, balloons, and satellites). Terminals include handheld devices, vehicle-mounted devices, wearable devices, or computing devices with wireless communication capabilities. For example, a terminal can be a mobile phone, a tablet computer, or a computer with wireless transceiver capabilities. Terminal devices can also be virtual reality (VR) terminal devices, augmented reality (AR) terminal devices, wireless terminals in industrial control, wireless terminals in autonomous driving, wireless terminals in telemedicine, wireless terminals in smart grids, wireless terminals in smart cities, wireless terminals in smart homes, etc.

[0046] It should be noted that the server can be a single physical server, or a server cluster consisting of multiple servers. Alternatively, the server cluster can be a distributed cluster. Alternatively, the server can be a cloud server. This application does not limit the specific implementation of the server.

[0047] In this embodiment of the application, network device 101 can obtain abnormal messages and transmit them to electronic device 102, which then parses the abnormal messages to obtain the cause of the abnormality.

[0048] The embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0049] like Figure 2 As shown, this application provides a method for parsing message anomalies, the method comprising:

[0050] S201, The electronic device receives the first message from the target device.

[0051] The first message includes: abnormal messages. Abnormal messages include at least one of the following: messages discarded by the target device and messages related to abnormal services, where the abnormal services are configured by the user.

[0052] It should be noted that the target device can be any of the aforementioned network devices, such as base stations and network elements. Users (such as maintenance personnel) can configure certain services on the target device as abnormal services based on service usage data.

[0053] Optionally, abnormal messages may also include messages that differ from the original forwarding path.

[0054] In one possible implementation, the target device may include a forwarding chip, a central processing unit (CPU), and storage (RAM or flash memory). The forwarding chip can be configured with forwarding behavior via its microcode; dropped packets are forwarded to the CPU by default, and packets from abnormal services can also be mirrored to the CPU. The CPU can receive abnormal packets transmitted by the forwarding chip and store them in RAM or flash memory. Then, the target device can periodically send abnormal packets to electronic devices (also known as network management or monitoring devices).

[0055] For example, such as Figure 3 As shown, the target device includes: a forwarding chip 301, a CPU 302, and a storage device 303. The forwarding chip and the CPU can be connected via a bus, and the CPU and the storage device can be connected via a bus. The forwarding chip may include multiple network ports (such as port a, port b), which can be used to acquire abnormal messages. The CPU may include a management network port (such as network port 1), through which the CPU can send abnormal messages to the electronic device.

[0056] S202. The electronic device inputs the abnormal message into the target simulator to obtain the original forwarding path and abnormal message information of the abnormal message.

[0057] Among them, abnormal message information refers to information about the abnormal message that occurred, and the original forwarding path refers to the forwarding path of the message when no abnormality occurred.

[0058] It should be noted that the embodiments of this application do not limit the abnormal message information. For example, abnormal message information may include the node that dropped the message. As another example, abnormal message information may include the abnormal forwarding path of the message (i.e., a path different from the original forwarding path).

[0059] In this embodiment of the application, at least one emulator is deployed in the electronic device. The emulator is used to simulate the forwarding path of a message, and the target emulator is any one of the at least one emulators.

[0060] In one possible design, the target emulator is configured with initial information. This initial information may include: a routing table to indicate the forwarding path of packets, and register information to indicate whether target routing is enabled.

[0061] For example, the destination route can be an Internet Protocol version 4 (IPv4) route or an IPv6 route. If the register information is 1, the destination route is an IPv4 route, meaning IPv4 routing is used. If the register information is 0, the destination route is an IPv6 route, meaning IPv6 routing is used.

[0062] In one possible implementation, the electronic device can simulate the forwarding path of the abnormal message using a target simulator to obtain the original forwarding path and the actual forwarding path of the abnormal message. Then, the electronic device can obtain the abnormal message information based on the original and actual forwarding paths of the abnormal message.

[0063] In some embodiments, the first message further includes: an identifier of the target device, wherein the electronic device stores a correspondence between device identifiers and at least one emulator. The electronic device can determine the target emulator from at least one emulator based on the identifier of the target device, wherein the identifier of the target device corresponds to the target emulator.

[0064] For example, suppose an electronic device has emulators a, b, and c deployed in it. Device identifier 01 corresponds to emulator a, device identifier 02 corresponds to emulator b, and device identifier 03 corresponds to emulator c. If the first message includes device identifier 02, then the target emulator is emulator b.

[0065] Optionally, the electronic device may include multiple forwarding chips, with one forwarding chip corresponding to one emulator.

[0066] For example, for a programmable chip, one microcode corresponds to one emulator, and for an application-specific integrated circuit (ASIC) chip, one chip type corresponds to one emulator.

[0067] S203. The electronic device displays the original forwarding path and abnormal message information of the abnormal message.

[0068] Based on the above technical solution, the electronic device receives a first message from the target device, which includes an abnormal message. The electronic device then inputs the abnormal message into the target emulator to obtain the original forwarding path and abnormal message information. The abnormal message information indicates that the abnormal message has encountered an error, the original forwarding path is the forwarding path if the message had not encountered an error, and the target emulator is any one of at least one emulator. The electronic device can then display the original forwarding path and abnormal message information. In this way, after receiving an abnormal message, the electronic device can obtain and display the original forwarding path and abnormal message information through the target emulator, achieving white-box analysis of the abnormal message. Furthermore, white-box analysis of the abnormal message through the emulator improves the efficiency of parsing the abnormal message. This facilitates maintenance personnel in managing abnormal messages using the original forwarding path and abnormal message information, thereby reducing the probability of failure.

[0069] like Figure 4 As shown, this application provides a model training method, which includes:

[0070] S401, The electronic device determines whether configuration information exists in the first message.

[0071] The configuration information is used to configure the simulator. This configuration information includes routing tables and register information, with the register information indicating whether the target route is enabled.

[0072] In this embodiment of the application, after the electronic device receives the first message from the target device, the electronic device can determine whether there is configuration information in the first message.

[0073] It should be noted that, in combination Figure 3 It is known that the target device includes a CPU, which can collect data from the underlying interfaces provided by the network device chip manufacturer, collect changes in the chip's initial information (such as routing tables and register information), update the chip configuration file (i.e., configuration information) in real time, and periodically send it to the electronic device. Abnormal packets stored in memory or flash memory can form a packet file, and the stored configuration information can form a chip config difference file.

[0074] Optionally, the configuration information may include information that differs from the initial information, i.e., information that has changed from the initial information.

[0075] Understandably, the large amount of full register information and routing table data would consume significant storage space and network bandwidth. Recording only changed configurations can save resources.

[0076] In some embodiments, if configuration information is present in the first message, the electronic device executes S402. If configuration information is not present in the first message, the electronic device executes S202.

[0077] S402, Electronic devices update the target simulator based on configuration information.

[0078] In one possible implementation, if configuration information is present in the first message, the electronic device can update the routing table and register information.

[0079] In this way, the simulator can be updated by combining the real-time data of the target device, thereby improving the realism of the simulator's simulated forwarding path and thus improving the accuracy of the obtained abnormal packet information and the original forwarding path.

[0080] In this embodiment of the application, after the electronic device updates the target emulator, the electronic device can input the abnormal message into the target emulator (i.e. the updated target emulator) to obtain the original forwarding path and abnormal message information of the abnormal message.

[0081] For example, an electronic device can obtain packet files and config difference files periodically uploaded by the target device, determine the target emulator based on the target device, and update the routing table and register information by loading the config difference file. Then, for the packets in the packet file, the electronic device can perform white-box software emulation of the microcodes, and can provide full white-box forwarding behavior and abnormal packet information for each packet. For example, abnormal packet information includes: the packet identifier (such as name) of the dropped packet, the reason for the packet dropping, and the target microcode that caused the abnormal forwarding behavior (e.g., forwarding microcodes include: microcode a, microcode b, and microcode c, where microcode b's forwarding is abnormal).

[0082] In other words, in this embodiment of the application, if configuration information exists in the first Western European computer, the electronic device first executes S402 and then executes S202.

[0083] Understandably, the electronic device determines whether configuration information exists in the first message. This configuration information is used to configure the emulator. If configuration information exists in the first message, the electronic device updates the target emulator based on this information. In this way, the emulator can be updated by combining real-time data from the target device, improving the realism of the emulator's simulated forwarding path, and thus improving the accuracy of the obtained abnormal packet information and the original forwarding path.

[0084] It should be noted that the electronic device in this application embodiment may deploy a network device packet forwarding white-box analysis subsystem, which can execute the steps performed by the electronic device. The target device may deploy a network device packet collection subsystem, which can execute the steps performed by the target device. This application embodiment does not limit this aspect.

[0085] The embodiments of this application are described below with reference to specific examples. For example... Figure 5 As shown, this illustrates the process by which a network device receives abnormal packets and forwards them to an electronic device. The user configures the network device to drop or forward abnormal packets to the local CPU forwarding chip. The microcode, based on the user configuration, sends relevant packets received on the physical port that meet the requirements to the CPU for processing. The CPU receives the relevant packets via the internal bus, processes them, stores them in a packetfile file in memory or flash memory, and periodically sends them to the electronic device for analysis.

[0086] like Figure 6The diagram illustrates the process of updating a network device emulator. Configuration updates to the network device's forwarding chip can be triggered by preset network protocols (such as those running on switches and routers) or user commands. A software development kit (SDK) running on the CPU monitors changes in the routing table and register information (i.e., configuration information). The CPU can then store this configuration information as a file and periodically send it to the electronic device.

[0087] like Figure 7 The diagram illustrates the process of an electronic device parsing abnormal packets. Step one: The electronic device obtains the packet file and config difference file uploaded by the network device and periodically starts a packet diagnostic analysis program. Step two: The electronic device checks if configuration information exists in the config difference file. If configuration information exists, the electronic device controls the emulator to load and update the configuration file, synchronizing the routing table and register information. If no configuration information exists, the electronic device proceeds to step three. Step three: The electronic device checks if new abnormal packets exist in the packet file. If new abnormal packets exist, the electronic device parses the abnormal packets based on the emulator. For example, each packet requiring analysis is analyzed individually to determine its cause, reproducing the complete microcode forwarding path of dropped or forwarded abnormal packets, resulting in a completely white-box analysis of the fault causes.

[0088] The foregoing mainly describes the solutions provided by the embodiments of this application from a methodological perspective. It is understood that, in order to achieve the above functions, the message anomaly parsing device or electronic device includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should readily recognize that, based on the message anomaly parsing method steps described in conjunction with the embodiments disclosed in this application, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0089] This application also provides a device for parsing message anomalies. This device can be a computer device, the CPU of the aforementioned computer device, a parsing module within the aforementioned computer device for parsing message anomalies, or a client within the aforementioned computer device for parsing message anomalies.

[0090] This application embodiment can divide the parsing of message anomalies into functional modules or functional units based on the above method example. For example, each function can be divided into its own functional modules or functional units, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module or functional unit. The module or unit division in this application embodiment is illustrative and represents only one logical functional division; other division methods may be used in actual implementation.

[0091] like Figure 8 The diagram shown is a structural schematic of a message anomaly parsing device provided in an embodiment of this application. The message anomaly parsing device is used to perform... Figure 2 or Figure 4 The method for parsing message anomalies is shown. The message anomaly parsing device may include: a receiving unit 801, a processing unit 802, and a display unit 803.

[0092] The receiving unit 801 is used to receive a first message from the target device, the first message including an abnormal message. The processing unit 802 is used to input the abnormal message into the target emulator to obtain the original forwarding path and abnormal message information of the abnormal message. The abnormal message information indicates that the abnormal message has encountered an error, and the original forwarding path is the forwarding path of the message if no error has occurred. The target emulator is any one of at least one emulator. The display unit 803 is used to display the original forwarding path and abnormal message information of the abnormal message.

[0093] In one possible design, processing unit 802 is further configured to determine whether configuration information exists in the first message, the configuration information being used to configure the simulator. Processing unit 802 is also configured to update the target simulator based on the configuration information if the first message contains configuration information.

[0094] In one possible design, the first message includes: an identifier of the target device, wherein the electronic device stores a correspondence between the device identifier and at least one emulator. The processing unit 802 is further configured to determine a target emulator from the at least one emulator based on the identifier of the target device, wherein the identifier of the target device corresponds to the target emulator.

[0095] In one possible design, the configuration information includes: a routing table and register information, with the register information used to indicate whether the target route is enabled.

[0096] In one possible design, the abnormal message includes at least one of the following: a message discarded by the target device and a message for an abnormal service, the abnormal service being configured by the user.

[0097] Figure 9This is a schematic diagram of the hardware structure of a message exception parsing device according to an exemplary embodiment. The message exception parsing device may include a processor 902, which executes application code to implement the message exception parsing method of this application.

[0098] The processor 902 may be a CPU, a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits used to control the execution of the program of the present application.

[0099] like Figure 9 As shown, the message parsing device may further include a memory 903. The memory 903 stores the application code that executes the scheme of this application, and its execution is controlled by the processor 902.

[0100] Memory 903 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital versatile optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. Memory 903 may exist independently and be connected to processor 902 via bus 904. Memory 903 may also be integrated with processor 902.

[0101] like Figure 9 As shown, the message anomaly parsing device may further include a communication interface 901, wherein the communication interface 901, processor 902, and memory 903 may be coupled to each other, for example, through a bus 904. The communication interface 901 is used for information exchange with other devices, for example, supporting information exchange between the message anomaly parsing device and other devices.

[0102] It should be pointed out that, Figure 9 The device structure shown does not constitute a limitation on the parsing device for this message anomaly, except... Figure 9In addition to the components shown, the parsing device for this message anomaly may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0103] In actual implementation, the functions implemented by the processing unit 802 can be derived by... Figure 9 The processor 902 shown calls the program code in memory 903 to implement this.

[0104] This application also provides a computer-readable storage medium storing instructions that, when executed by a processor of a computer device, enable the computer to perform the message exception parsing method provided in the embodiments described above. For example, the computer-readable storage medium may be a memory 903 including instructions, which may be executed by a processor 902 of a computer device to complete the method. Optionally, the computer-readable storage medium may be a non-transitory computer-readable storage medium, such as a ROM, RAM, CD-ROM, magnetic tape, floppy disk, or optical data storage device.

[0105] Figure 10 A conceptual partial view of a computer program product provided in an embodiment of this application is shown schematically. The computer program product includes a computer program for executing computer processes on a computing device.

[0106] In one embodiment, a computer program product is provided using a signal bearer medium 1000. The signal bearer medium 1000 may include one or more program instructions that, when executed by one or more processors, can provide the above-mentioned... Figure 2 , Figure 4 The described function or part of the function. Therefore, for example, refer to... Figure 2 In the embodiment shown, one or more features of S201 to S203 can be fulfilled by one or more instructions associated with the signal carrying medium 1000. Furthermore, Figure 10 The program instructions in the document also describe example instructions.

[0107] In some examples, the signal carrying medium 1000 may include a computer-readable medium 1001, such as, but not limited to, a hard disk drive, a compact disc (CD), a digital video disc (DVD), a digital magnetic tape, a memory, a read-only memory (ROM), or a random access memory (RAM), etc.

[0108] In some implementations, the signal carrying medium 1000 may include a computer recordable medium 1002, such as, but not limited to, a memory, a read / write (R / W) CD, a R / W DVD, and so on.

[0109] In some implementations, the signal carrying medium 1000 may include a communication medium 1003, such as, but not limited to, digital and / or analog communication media (e.g., fiber optic cables, waveguides, wired communication links, wireless communication links, etc.).

[0110] The signal-bearing medium 1000 can be transmitted by a wireless communication medium 1003. One or more program instructions may be, for example, computer-executable instructions or logical implementation instructions.

[0111] In some examples, such as targeting Figure 8 The parsing device for the described message anomaly can be configured to provide various operations, functions, or actions in response to one or more program instructions in a computer-readable medium 1001, a computer-recordable medium 1002, and / or a communication medium 1003.

[0112] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0113] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another apparatus, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0114] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the constituent units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0115] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0116] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiments of this application, essentially, or the part that contributes to the prior art, or a complete or partial classification of the technical solution, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.

[0117] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for parsing message anomalies, characterized in that, The method is applied to an electronic device, wherein the electronic device is equipped with at least one emulator for simulating packet forwarding paths; the method includes: Receive a first message from the target device, the first message including: an error message, the identifier of the target device, and the electronic device storing a correspondence between the device identifier and the at least one emulator; Based on the identifier of the target device, a target simulator is determined from the at least one simulator, wherein the identifier of the target device corresponds to the target simulator; Determine whether there is configuration information in the first message, the configuration information being used to configure the simulator; the configuration information includes information that has changed in the initial information, routing table and register information, the register information being used to indicate target route enable; If the configuration information exists in the first message, then the target simulator is updated based on the configuration information; The abnormal message is input into the target simulator to obtain the original forwarding path and the real forwarding path of the abnormal message. Based on the original forwarding path and the real forwarding path of the abnormal message, abnormal message information is obtained. The abnormal message information is the information that the abnormal message has an anomaly. The original forwarding path is the forwarding path of the message when no anomaly has occurred. The target simulator is any one of the at least one simulator. Display the original forwarding path of the abnormal message and the abnormal message information.

2. The method according to claim 1, characterized in that, The abnormal message includes at least one of the following: a message discarded by the target device and a message of an abnormal service, wherein the abnormal service is configured by the user.

3. A device for parsing message anomalies, characterized in that, An apparatus for use in electronic devices, wherein the electronic devices are equipped with at least one emulator for simulating packet forwarding paths, the apparatus comprising: A receiving unit is configured to receive a first message from a target device, the first message including: an error message and the identifier of the target device, wherein the electronic device stores a correspondence between the device identifier and the at least one emulator; The processing unit is further configured to determine a target simulator from the at least one simulator based on the identifier of the target device, wherein the identifier of the target device corresponds to the target simulator; The processing unit is configured to determine whether there is configuration information in the first message, the configuration information being used to configure the simulator; the configuration information includes information that has changed in the initial information, a routing table, and register information, the register information being used to indicate target route enable; The processing unit is further configured to update the target simulator based on the configuration information if the configuration information exists in the first message; The processing unit is further configured to input the abnormal message into the target simulator to obtain the original forwarding path and the real forwarding path of the abnormal message, and based on the original forwarding path and the real forwarding path of the abnormal message, obtain abnormal message information, wherein the abnormal message information is information indicating that the abnormal message has an abnormality, the original forwarding path is the forwarding path of the message when no abnormality has occurred, and the target simulator is any one of the at least one simulator. The display unit is used to display the original forwarding path of the abnormal message and the abnormal message information.

4. The apparatus according to claim 3, characterized in that, The abnormal message includes at least one of the following: a message discarded by the target device and a message of an abnormal service, wherein the abnormal service is configured by the user.

5. A message parsing device, characterized in that, include: Processor and memory; The processor and the memory are coupled; The memory is used to store one or more programs, which include computer-executable instructions. When the message anomaly parsing device is running, the processor executes the computer-executable instructions stored in the memory to cause the message anomaly parsing device to perform the method as described in any one of claims 1-2.

6. A computer-readable storage medium storing instructions, characterized in that, When the computer executes the instruction, the computer performs the method as described in any one of claims 1-2.

Citation Information

Patent Citations

  • Automatic diagnosis method of Ethernet router / switch packet loss fault

    CN104917628A

  • Packet loss processing method and packet loss processing device

    CN110324198A

  • Method and device for message forwarding simulation in SDN network environment

    CN113114509A