White box switch test instruction processing method, system, terminal and storage medium

CN116527552BActive Publication Date: 2026-10-09INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310369375.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-07
Publication Date
2026-10-09
Estimated Expiration
2043-04-07

AI Technical Summary

Technical Problem

[0003]但在实际测试过程中发现白盒交换机BIOS的快捷键键盘码因为串口格式空字符差异导致python的控制字符不识别,或部分不识别,这就导致测试指令无法执行,测试失败

Benefits of technology

[0046] The beneficial effects of this invention are that the white-box switch test instruction processing method, system, terminal, and storage medium provided by this invention intercept and convert signals encapsulated with test-related instructions sent to the white-box switch into signals adapted to the white-box switch. This avoids the problem of the white-box switch's BIOS failing to recognize key instructions in the signals, leading to test execution failure. This invention effectively ensures the smooth execution of white-box switch tests, avoids interruptions during testing, and improves testing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116527552B_ABST
    Figure CN116527552B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of server, and specifically provides a kind of white box switch test instruction processing method, system, terminal and storage medium, comprising: intermediate processor receives the first signal sent by first chip, and the first signal is encapsulated with white box switch test related instruction;The first signal is converted into second signal, and the second signal is sent to white box switch, and the communication protocol adopted by the second signal is adapted to white box switch.The present application can effectively ensure that the test of white box switch is successfully executed, avoids being interrupted in the middle of test, and improves test efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of server technology, specifically relating to a white-box switch test instruction processing method, system, terminal, and storage medium. Background Technology

[0002] Because data centers handle a massive amount of data forwarding, a single white-box switch may be responsible for forwarding data from dozens or even hundreds of servers. Furthermore, aside from periodic maintenance, white-box switches operate at full capacity almost constantly, making their stability crucial. Current stability tests often involve a serial server connected to the white-box switch sending a large amount of data to the switch, thus increasing its load and testing its operational stability under high pressure.

[0003] However, during actual testing, it was found that the shortcut key keyboard codes in the white-box switch BIOS were not recognized by Python, or were partially not recognized, due to differences in serial port format null characters. This caused test commands to fail and tests to fail. Since stability testing of white-box switches is a lengthy process, if test commands fail to execute midway, all previous work becomes ineffective, resulting in a significant waste of time and resources. Summary of the Invention

[0004] To address the aforementioned shortcomings of the prior art, this invention provides a white-box switch test instruction processing method, system, terminal, and storage medium to solve the above-mentioned technical problems.

[0005] In a first aspect, the present invention provides a method for processing test commands for a white-box switch, comprising:

[0006] The intermediate processor receives a first signal sent by the first chip, and the first signal encapsulates white-box switch test-related instructions.

[0007] The first signal is converted into a second signal and the second signal is sent to the white-box switch. The communication protocol used by the second signal is adapted to the white-box switch.

[0008] In an optional implementation, before the intermediate processor receives the first signal sent by the first chip, the method further includes:

[0009] The same communication protocol as the second signal is used to cyclically send presence identification requests to the white-box switch;

[0010] After receiving a response signal from the white-box switch based on the presence identification request, the procedure for sending the presence identification request is stopped and a prompt signal is sent to the first chip, which is used to instruct the first chip to start issuing test-related instructions.

[0011] In an optional implementation, the intermediate processor receives a first signal sent by the first chip, the first signal encapsulating white-box switch test-related instructions, including:

[0012] The original signal received from the first chip is screened using keyboard codes, and the original signal is a serial port signal;

[0013] If the original signal contains a keyboard code, then the original signal is determined to be the first signal that needs to be converted.

[0014] If the original signal does not contain a keyboard code, the original signal will be directly forwarded to the white-box switch.

[0015] In an optional implementation, if the original signal does not contain a keycode, the original signal is directly forwarded to the white-box switch, including:

[0016] The first interface is invoked to send the raw signal without keyboard code to the white-box switch. The first interface is connected to the configuration interface of the white-box switch via a serial cable.

[0017] In an optional implementation, the raw signal received from the first chip is subjected to keyboard code screening, wherein the raw signal is a serial port signal, including:

[0018] Based on the set serial port parameters, the original signal is parsed to extract data bits.

[0019] Use keyword search to find keyboard codes from the parsed content.

[0020] In an optional implementation, the first signal is converted into a second signal, and the second signal is sent to a white-box switch. The communication protocol used by the second signal is adapted to the white-box switch, including:

[0021] The second interface is invoked to send a second signal to the white-box switch. The second interface is connected to the white-box switch's universal serial bus interface via a universal serial bus.

[0022] In one alternative implementation, the intermediate processor is integrated on a first chip of the serial port server or on a microcontroller independent of the serial port server.

[0023] Secondly, the present invention provides a white-box switch test command processing system, comprising:

[0024] The signal receiving module is used by the intermediate processor to receive the first signal sent by the first chip. The first signal encapsulates white-box switch test-related instructions.

[0025] The signal processing module is used to convert the first signal into a second signal and send the second signal to the white-box switch. The communication protocol used by the second signal is adapted to the white-box switch.

[0026] In an optional implementation, before the intermediate processor receives the first signal sent by the first chip, the system further performs:

[0027] The same communication protocol as the second signal is used to cyclically send presence identification requests to the white-box switch;

[0028] After receiving a response signal from the white-box switch based on the presence identification request, the procedure for sending the presence identification request is stopped and a prompt signal is sent to the first chip, which is used to instruct the first chip to start issuing test-related instructions.

[0029] In an optional implementation, the intermediate processor receives a first signal sent by the first chip, the first signal encapsulating white-box switch test-related instructions, including:

[0030] The original signal received from the first chip is screened using keyboard codes, and the original signal is a serial port signal;

[0031] If the original signal contains a keyboard code, then the original signal is determined to be the first signal that needs to be converted.

[0032] If the original signal does not contain a keyboard code, the original signal will be directly forwarded to the white-box switch.

[0033] In an optional implementation, if the original signal does not contain a keycode, the original signal is directly forwarded to the white-box switch, including:

[0034] The first interface is invoked to send the raw signal without keyboard code to the white-box switch. The first interface is connected to the configuration interface of the white-box switch via a serial cable.

[0035] In an optional implementation, the raw signal received from the first chip is subjected to keyboard code screening, wherein the raw signal is a serial port signal, including:

[0036] Based on the set serial port parameters, the original signal is parsed to extract data bits.

[0037] Use keyword search to find keyboard codes from the parsed content.

[0038] In an optional implementation, the first signal is converted into a second signal, and the second signal is sent to a white-box switch. The communication protocol used by the second signal is adapted to the white-box switch, including:

[0039] The second interface is invoked to send a second signal to the white-box switch. The second interface is connected to the white-box switch's universal serial bus interface via a universal serial bus.

[0040] In one alternative implementation, the intermediate processor is integrated on a first chip of the serial port server or on a microcontroller independent of the serial port server.

[0041] Thirdly, a terminal is provided, including:

[0042] Processor, memory, among which,

[0043] This memory is used to store computer programs.

[0044] The processor is used to retrieve and run the computer program from memory, causing the terminal to perform the terminal method described above.

[0045] Fourthly, a computer storage medium is provided, wherein instructions are stored therein, which, when executed on a computer, cause the computer to perform the methods described in the above aspects.

[0046] The beneficial effects of this invention are that the white-box switch test instruction processing method, system, terminal, and storage medium provided by this invention intercept and convert signals encapsulated with test-related instructions sent to the white-box switch into signals adapted to the white-box switch. This avoids the problem of the white-box switch's BIOS failing to recognize key instructions in the signals, leading to test execution failure. This invention effectively ensures the smooth execution of white-box switch tests, avoids interruptions during testing, and improves testing efficiency.

[0047] Furthermore, the design principle of this invention is reliable, the structure is simple, and it has a very wide range of application prospects. Attached Figure Description

[0048] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0049] Figure 1 This is a schematic flowchart of a method according to an embodiment of the present invention.

[0050] Figure 2 This is a schematic diagram illustrating the principle of a method according to an embodiment of the present invention.

[0051] Figure 3 This is another schematic diagram of a method according to an embodiment of the present invention.

[0052] Figure 4 This is an execution system architecture for a method according to an embodiment of the present invention.

[0053] Figure 5 This is another execution system architecture for the method of one embodiment of the present invention.

[0054] Figure 6 This is a schematic block diagram of a system according to an embodiment of the present invention.

[0055] Figure 7 This is a schematic diagram of the structure of a terminal provided in an embodiment of the present invention. Detailed Implementation

[0056] To enable those skilled in the art to better understand the technical solutions of this invention, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this invention.

[0057] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.

[0058] The key terms used in this invention will be explained below.

[0059] BIOS is an abbreviation for "Basic Input Output System." On IBM PC-compatible systems, it's an industry-standard firmware interface. It's a set of programs embedded in a ROM chip on the computer's motherboard. It stores the computer's most important basic input / output programs, power-on self-test (POST) programs, and system boot programs. It can read and write specific system settings from the CMOS. Its main function is to provide the lowest-level, most direct hardware settings and control for the computer. In addition, the BIOS provides some system parameters to the operating system. Changes to system hardware are hidden by the BIOS; programs use BIOS functions rather than directly controlling the hardware. Modern operating systems often bypass the abstraction layer provided by the BIOS and directly control hardware components.

[0060] Serial communication transmits digital signals. Whether these signals are high-frequency or low-frequency is determined by the carrier signal used for modulation. Generally, signals with lower baud rates can be modulated using low-frequency signals. Signals with higher baud rates require high-frequency modulation. For example, a baud rate of 9700 can be modulated using a signal of tens of kHz, but serial communication baud rates can reach up to several hundred kHz, in which case a high-frequency signal of 10 MHz or higher is required for modulation.

[0061] A Universal Asynchronous Receiver / Transmitter (UART) is a serial communication logic circuit. This part can be a standalone chip or embedded as a module in other chips; microcontrollers, SoCs, and PCs all contain UART modules. A UART has four pins (VCC, GND, RX, TX). As an asynchronous serial communication protocol, UART transmits data character by character, one bit at a time. The meanings of each bit are as follows: Start bit: A logic "0" signal is sent first to indicate the start of the transmitted character. Data bits: Immediately following the start bit. The number of data bits can be 4, 5, 6, 7, 8, etc., forming a character. ASCII code is typically used. Transmission starts from the least significant bit and is timed by the clock. Parity bit: Adding this bit to the data bits ensures that the number of "1" bits is either even (even parity) or odd (odd parity), thus verifying the correctness of the data transmission. Stop bit: It marks the end of a character's data. The stop bit can be 1, 1.5, or 2 bits high. Since data is timed on the transmission line, and each device has its own clock, slight asynchrony may occur between two devices during communication. Therefore, the stop bit not only indicates the end of transmission but also provides an opportunity for the computer to correct clock synchronization. The more bits used for the stop bit, the greater the tolerance for different clock synchronizations, but the data transmission rate will also be slower. Idle bit: In a logic "1" state, indicating that there is currently no data being transmitted on the line.

[0062] The console interface is a typical configuration interface. It connects directly to the computer's serial port using a console cable, and allows you to configure the router locally using a terminal emulation program (usually Windows' built-in "HyperTerminal"). Router console interfaces are typically RJ-45 ports and are labeled "CONSOLE".

[0063] USB, short for Universal Serial Bus, is an external bus standard used to regulate the connection and communication between computers and external devices. It's an interface technology used in the PC field. USB offers advantages such as high transmission speed, ease of use, hot-swapping support, flexible connections, and independent power supply. It can connect various peripherals such as keyboards, mice, and large-capacity storage devices, and is also widely used in smartphones. The interaction of data between computers and other intelligent devices and the outside world primarily relies on networks and USB interfaces.

[0064] During white-box switch testing, to maximize automation, only automated testing software was used. Device control is typically achieved through machine codes for key presses. However, the BIOS of white-box switches exhibits some garbled character recognition issues with keyboard codes, and machine codes differ across platforms, posing challenges to the identification and execution of test commands.

[0065] The white-box switch test instruction processing method provided in this embodiment of the invention is executed by a computer device, and correspondingly, the white-box switch test instruction processing system runs in the computer device.

[0066] Figure 1 This is a schematic flowchart illustrating a method according to an embodiment of the present invention. Wherein, Figure 1 The executing entity can be a white-box switch test command processing system. Depending on different requirements, the order of the steps in this flowchart can be changed, and some can be omitted.

[0067] like Figure 1 As shown, the method includes:

[0068] Step 110: The intermediate processor receives a first signal sent by the first chip, the first signal encapsulating white-box switch test related instructions;

[0069] Step 120: Convert the first signal into a second signal and send the second signal to the white-box switch. The communication protocol used by the second signal is adapted to the white-box switch.

[0070] Please refer to Figure 2 The intermediate processor can be integrated on the microcontroller. The microcontroller's UART side receives serial port information sent by the serial port server, and sends the data to the switch side through the USB HID signal by parsing the relevant information. The USB HID actually realizes the function of a USB interface keyboard.

[0071] The UART signal does not require level conversion via RS232. RJ45 is used because serial servers commonly use RJ45 interfaces. When using a DB9 serial server, the UART interface should be replaced with a DB9 interface.

[0072] Microcontrollers such as the STM32 and MP430 with USB HID mode can be used, which are relatively inexpensive. Microcontrollers generally require a separate power supply or draw power from a USB interface.

[0073] To facilitate understanding of the present invention, the following description further illustrates the white-box switch test command processing method provided by the present invention, based on the principle of the white-box switch test command processing method and the process of processing white-box switch test commands in the embodiments.

[0074] Specifically, the white-box switch test command processing method includes:

[0075] S1. Using the same communication protocol as the second signal, continuously send presence identification requests to the white-box switch; after receiving a response signal from the white-box switch based on the presence identification request, stop sending presence identification requests and send a prompt signal to the first chip, the prompt signal being used to instruct the first chip to start issuing test-related instructions.

[0076] The intermediate processor integrated on the microcontroller monitors the status of the white-box switch and feeds back the status to the serial port server, thereby enabling the serial port server to confirm that the white-box switch has entered the test state and can execute the test.

[0077] S2. The intermediate processor receives a first signal sent by the first chip, and the first signal encapsulates white-box switch test-related instructions.

[0078] In one embodiment of the present invention, the intermediate processor can convert all serial port signals received from the serial port server into USB signals and then forward them to the white-box switch, such as... Figure 2 As shown in the diagram. This implementation method ensures that test commands are not unrecognized. However, the conversion workload is significant, which can reduce testing efficiency.

[0079] The original signal received from the first chip is screened for keyboard codes. The original signal is a serial port signal. If the original signal has keyboard codes, it is determined that the original signal is the first signal that needs to be converted. If the original signal does not have keyboard codes, the original signal is directly forwarded to the white-box switch.

[0080] Since only test commands with keystroke codes will fail to execute when sent from the serial server to the white-box switch, it's necessary to differentiate between signals received from the serial server. Signals without keystroke codes require no processing and can be directly forwarded to the white-box switch as serial signals.

[0081] Based on this, please refer to Figure 3In another preferred embodiment of the invention, the intermediate processor performs the following method:

[0082] (1) Keyboard code screening is performed on the raw signal received from the first chip, wherein the raw signal is a serial port signal. After receiving the raw signal sent by the first chip, the intermediate processor does not directly forward the raw signal but intercepts it and performs keyboard code screening on the intercepted signal. The specific screening method includes: parsing the content of the raw signal based on the set serial port parameters and extracting data bits from it; and using a keyword search method to search for keyboard codes from the parsed content. The keyboard code format can be entered in the keyword search tool, for example, the keyboard code for keyboard A is 65. The keyword search tool can cycle through different keyboard codes for searching.

[0083] (2) If the original signal has a keyboard code, then the original signal is determined to be the first signal that needs to be converted.

[0084] (3) If the original signal does not contain a keyboard code, the original signal is forwarded directly to the white-box switch.

[0085] After processing the original signal as described above, two results are obtained. One is a serial port signal that can be directly forwarded. For this type of signal, the first interface is used to send the original signal (without keyboard codes) to the white-box switch. The first interface is connected to the configuration interface of the white-box switch via a serial cable (the Console interface is a typical configuration interface. A Console cable is used to directly connect to the computer's serial port, and a terminal emulation program (usually Windows' built-in "HyperTerminal") is used to configure the router locally. The router's Console interface is mostly an RJ-45 interface, marked with the word "CONSOLE"). The other result is a second signal converted from the serial port signal. For this type of signal, the second interface is used to send the second signal to the white-box switch. The second interface is connected to the white-box switch's Universal Serial Bus (USB) interface via a USB-UART interface. Therefore, in this implementation, the intermediate processor provides both USB HID and Console interfaces, allowing control of the entire switch to be achieved using a single UART interface.

[0086] Furthermore, the above embodiments only describe the method for the intermediate processor to process and forward signals sent by the serial port server. In other embodiments of the present invention, the intermediate processor may also directly forward the serial port signals sent by the white-box switch via the serial cable to the serial port server, thereby realizing bidirectional forwarding of serial port signals.

[0087] In the above embodiments, the intermediate processor is a microcontroller. The microcontroller is a test fixture independent of the serial port server. In other embodiments of the present invention, the intermediate processor can also be integrated into the motherboard of the serial port server to directly process the output signals of the serial port server, such as... Figure 4 As shown. Furthermore, the intermediate processor can be set up on the HID server, such as... Figure 5 As shown, the HID server is connected to the white-box switch via a USB cable, and the serial port server is connected to the switch via a network cable. The HID server is responsible for sending test commands with keyboard codes.

[0088] In some embodiments, the white-box switch test instruction processing system 600 may include multiple functional modules composed of computer program segments. The computer programs for each program segment in the white-box switch test instruction processing system 600 may be stored in the memory of a computer device and executed by at least one processor to perform (see details). Figure 1 (Description) Functionality of white-box switch test command processing.

[0089] In this embodiment, the white-box switch test instruction processing system 600 can be divided into multiple functional modules according to the functions it performs, such as... Figure 6 As shown. The functional modules may include a signal receiving module 610 and a signal processing module 620. The module referred to in this invention is a series of computer program segments that can be executed by at least one processor and perform a fixed function, and which are stored in memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.

[0090] The signal receiving module 610 is used for the intermediate processor to receive the first signal sent by the first chip, and the first signal encapsulates white-box switch test related instructions.

[0091] The signal processing module 620 is used to convert the first signal into a second signal and send the second signal to the white-box switch. The communication protocol used by the second signal is adapted to the white-box switch.

[0092] Optionally, as an embodiment of the present invention, before the intermediate processor receives the first signal sent by the first chip, the system further performs:

[0093] The same communication protocol as the second signal is used to cyclically send presence identification requests to the white-box switch;

[0094] After receiving a response signal from the white-box switch based on the presence identification request, the procedure for sending the presence identification request is stopped and a prompt signal is sent to the first chip, which is used to instruct the first chip to start issuing test-related instructions.

[0095] Optionally, as an embodiment of the present invention, the intermediate processor receives a first signal sent by the first chip, the first signal encapsulating white-box switch test-related instructions, including:

[0096] The original signal received from the first chip is screened using keyboard codes, and the original signal is a serial port signal;

[0097] If the original signal contains a keyboard code, then the original signal is determined to be the first signal that needs to be converted.

[0098] If the original signal does not contain a keyboard code, the original signal will be directly forwarded to the white-box switch.

[0099] Optionally, as an embodiment of the present invention, if the original signal does not contain a keycode, the original signal is directly forwarded to a white-box switch, including:

[0100] The first interface is invoked to send the raw signal without keyboard code to the white-box switch. The first interface is connected to the configuration interface of the white-box switch via a serial cable.

[0101] Optionally, as an embodiment of the present invention, the original signal received from the first chip is subjected to keyboard code screening, wherein the original signal is a serial port signal, including:

[0102] Based on the set serial port parameters, the original signal is parsed to extract data bits.

[0103] Use keyword search to find keyboard codes from the parsed content.

[0104] Optionally, as an embodiment of the present invention, the first signal is converted into a second signal, and the second signal is sent to a white-box switch. The communication protocol used by the second signal is adapted to the white-box switch, including:

[0105] The second interface is invoked to send a second signal to the white-box switch. The second interface is connected to the white-box switch's universal serial bus interface via a universal serial bus.

[0106] Optionally, as an embodiment of the present invention, the intermediate processor is integrated on the first chip of the serial port server or on a microcontroller independent of the serial port server.

[0107] Figure 7 This is a schematic diagram of the structure of a terminal 700 provided in an embodiment of the present invention. The terminal 700 can be used to execute the white-box switch test instruction processing method provided in the embodiment of the present invention.

[0108] The terminal 700 may include a processor 710, a memory 720, and a communication module 730. These components communicate via one or more buses. Those skilled in the art will understand that the server structure shown in the figures does not constitute a limitation of the present invention. It may be a bus topology or a star topology, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0109] The memory 720 can be used to store execution instructions of the processor 710. The memory 720 can be implemented using any type of volatile or non-volatile storage terminal or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. When the execution instructions in the memory 720 are executed by the processor 710, the terminal 700 is able to perform some or all of the steps in the above method embodiments.

[0110] The processor 710 serves as the control center of the storage terminal, connecting various parts of the electronic terminal via various interfaces and lines. It executes software programs and / or modules stored in the memory 720, and calls data stored in the memory to perform various functions of the electronic terminal and / or process data. The processor can be composed of integrated circuits (ICs), such as a single packaged IC or multiple packaged ICs with the same or different functions connected together. For example, the processor 710 may only include a central processing unit (CPU). In this embodiment of the invention, the CPU may have a single processing core or include multiple processing cores.

[0111] The communication module 730 is used to establish a communication channel, enabling the storage terminal to communicate with other terminals. It receives user data sent by other terminals or sends user data to other terminals.

[0112] The present invention also provides a computer storage medium, wherein the computer storage medium may store a program, which, when executed, may include some or all of the steps provided in the embodiments of the present invention. The storage medium may be a magnetic disk, an optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0113] Therefore, this invention intercepts and converts signals containing test-related instructions sent to the white-box switch into signals compatible with the white-box switch, thereby avoiding the problem of the white-box switch's BIOS failing to recognize key instructions in the signals, leading to test execution failure. This invention effectively ensures the smooth execution of tests on the white-box switch, avoids interruptions during testing, and improves testing efficiency. The technical effects achieved by this embodiment can be found in the description above, and will not be repeated here.

[0114] Those skilled in the art will clearly understand that the techniques in the embodiments of the present invention can be implemented using software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solutions in the embodiments of the present invention, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, or any other medium capable of storing program code. It includes several instructions to cause a computer terminal (which may be a personal computer, a server, or a second terminal, a network terminal, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.

[0115] The same or similar parts between the various embodiments in this specification can be referred to mutually. In particular, the terminal embodiments are basically similar to the method embodiments, so the description is relatively simple, and the relevant parts can be referred to the description in the method embodiments.

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

[0117] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0118] In addition, the functional modules in the various embodiments of the present invention can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.

[0119] Although the present invention has been described in detail with reference to the accompanying drawings and preferred embodiments, the invention is not limited thereto. Various equivalent modifications or substitutions can be made to the embodiments of the invention by those skilled in the art without departing from the spirit and essence of the invention, and such modifications or substitutions should all be within the scope of the invention. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the invention should also be covered within the protection scope of the invention. Therefore, the protection scope of the invention should be determined by the scope of the claims.

Claims

1. A method for processing test commands for a white-box switch, characterized in that, include: The intermediate processor receives a first signal sent by the first chip, and the first signal encapsulates white-box switch test-related instructions; the first signal is a serial port signal. The first signal is converted into a second signal and the second signal is sent to the white-box switch. The communication protocol used by the second signal is adapted to the white-box switch. The intermediate processor receives a first signal sent by the first chip, and the first signal encapsulates white-box switch testing-related instructions, including: The original signal received from the first chip is intercepted, and the intercepted signal is screened by keyboard code. The original signal is a serial port signal. If the original signal contains a keyboard code, then the original signal is determined to be the first signal that needs to be converted. If the original signal does not contain a keyboard code, the original signal will be directly forwarded to the white-box switch via a serial cable. If the original signal does not contain a keyboard code, the original signal is directly forwarded to the white-box switch, including: calling the first interface to send the original signal without a keyboard code to the white-box switch, wherein the first interface is connected to the configuration interface of the white-box switch via a serial cable. The first signal is converted into a second signal and the second signal is sent to the white-box switch. The communication protocol used by the second signal is adapted to the white-box switch, including: calling a second interface to send the second signal to the white-box switch. The second interface is connected to the universal serial bus interface of the white-box switch through a universal serial bus.

2. The method according to claim 1, characterized in that, Before the intermediate processor receives the first signal sent by the first chip, the method further includes: The same communication protocol as the second signal is used to cyclically send presence identification requests to the white-box switch; After receiving a response signal from the white-box switch based on the presence identification request, the procedure for sending the presence identification request is stopped and a prompt signal is sent to the first chip, which is used to instruct the first chip to start issuing test-related instructions.

3. The method according to claim 1, characterized in that, The raw signal received from the first chip is subjected to keyboard code screening. The raw signal is a serial port signal, including: Based on the set serial port parameters, the original signal is parsed to extract data bits. Use keyword search to find keyboard codes from the parsed content.

4. The method according to claim 1, characterized in that, The intermediate processor is integrated on the first chip of the serial port server or on a microcontroller independent of the serial port server.

5. A white-box switch test instruction processing system for executing the method of any one of claims 1-4, characterized in that, include: The signal receiving module is used by the intermediate processor to receive the first signal sent by the first chip. The first signal encapsulates white-box switch test-related instructions. The signal processing module is used to convert the first signal into a second signal and send the second signal to the white-box switch. The communication protocol used by the second signal is adapted to the white-box switch.

6. A terminal, characterized in that, include: processor; Memory used to store the processor's execution instructions; The processor is configured to perform the method according to any one of claims 1-4.

7. A computer-readable storage medium storing a computer program, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-4.

Citation Information

Patent Citations

  • White-box testing method, device and system and storage medium

    CN108563579A