WO2023185266A1 - Automatic detection method, single board, electronic device and storage medium - Google Patents

Automatic detection method, single board, electronic device and storage medium Download PDF

Info

Publication number
WO2023185266A1
WO2023185266A1 PCT/CN2023/075287 CN2023075287W WO2023185266A1 WO 2023185266 A1 WO2023185266 A1 WO 2023185266A1 CN 2023075287 W CN2023075287 W CN 2023075287W WO 2023185266 A1 WO2023185266 A1 WO 2023185266A1
Authority
WO
WIPO (PCT)
Prior art keywords
test
self
hardware
board
main control
Prior art date
Application number
PCT/CN2023/075287
Other languages
French (fr)
Chinese (zh)
Inventor
张二芬
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2023185266A1 publication Critical patent/WO2023185266A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/60Router architectures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/24Arrangements for testing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q1/00Details of selecting apparatus or arrangements
    • H04Q1/02Constructional details
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q1/00Details of selecting apparatus or arrangements
    • H04Q1/18Electrical details
    • H04Q1/20Testing circuits or apparatus; Circuits or apparatus for detecting, indicating, or signalling faults or troubles
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q1/00Details of selecting apparatus or arrangements
    • H04Q1/18Electrical details
    • H04Q1/20Testing circuits or apparatus; Circuits or apparatus for detecting, indicating, or signalling faults or troubles
    • H04Q1/22Automatic arrangements

Definitions

  • the implementation of this application relates to the field of communication technology, and in particular to an automated detection method, single board, electronic equipment and storage medium.
  • Scenario 1 Adding new equipment: After adding new equipment, it is required to perform self-test on the entire hardware system, including main control/line card/switching/interface sub-card / Backplane, covering control plane channels and forwarding plane channels;
  • Scenario 2 Single board expansion of existing network equipment: Perform hardware self-test of new expansion single boards on existing network equipment, including line cards/interface cards, and hardware self-test of expansion single boards.
  • Scenario 3 A suspected hardware failure occurs on the existing network equipment single board: Without any physical operation on the on-site environment, Perform hardware self-check on the faulty board.
  • a commonly used method is to use an independent version to perform self-test. After the user issues a self-test command, all the tested boards will perform self-test together. However, after the test starts, newly inserted The single board can only wait for the current round of self-test to be completed, and then perform self-test together with each tested single board. In the case of single board expansion of the existing network equipment or the need for faulty single board self-test, the self-test can be performed on-site unconditionally. Independent version self-test requires sending the board out and back, which is time-consuming and labor-intensive.
  • Another way is to run the commercial version of the control self-test script on the main control board, run the self-test version of the training tool on the self-test board, and let the main control board control one or several devices on the existing network.
  • the self-test of the single board is used to implement the hardware self-test of the single board.
  • the self-test mode in this method is fixed and has poor pertinence.
  • due to the long release cycle of commercial versions and strict release processes, etc. therefore, when the single board occurs In the case of capacity expansion, it is difficult to be compatible with the hardware self-test of the expansion board, and its practicality is poor.
  • the purpose of the embodiments of the present application is to solve the above problems and provide an automated detection method, a single board, an electronic device and a storage medium, by encapsulating the self-test script in a tooling self-test patch package that is pre-stored locally on the single board to make the self-test script independent Release and maintenance to realize the decoupling of the self-test version and the commercial version of the main control board, thereby achieving single-board granular hardware self-test simply and efficiently.
  • an automated detection method which includes: receiving a hardware self-test instruction issued by a main control board; loading a pre-cached tooling self-test patch package according to the hardware self-test instruction; Wherein, the tooling self-test patch package includes a pre-packaged hardware self-test script; restart the tooling self-test mode according to the preset program, perform hardware self-test according to the hardware self-test script, and report to the main control unit The board feeds back the self-test results.
  • an embodiment of the present application also provides a single board, including: an acquisition module for receiving the main control unit Hardware self-test instructions issued by the board;
  • a loading module configured to load a pre-cached tooling self-checking patch package according to the hardware self-checking instructions; wherein the tooling self-checking patch package includes a prepackaged hardware self-checking script;
  • the self-test module is used to reboot into the tooling self-test mode according to the preset program, perform hardware self-test according to the hardware self-test script, and feed back the self-test results to the main control board.
  • embodiments of the present application further provide an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor. , the instructions are executed by at least one processor, so that at least one processor can execute the automated detection method as described above.
  • embodiments of the present application also provide a computer-readable storage medium that stores a computer program.
  • the computer program is executed by a processor, the automated detection method as described above is implemented.
  • the single board after receiving the hardware self-test instruction from the main control board, the single board loads the pre-cached local tooling self-test patch package according to the hardware self-test instruction.
  • the tooling self-test patch package Contains prepackaged hardware self-test scripts. Then enter the tooling self-test mode by restarting, perform hardware self-test according to the hardware self-test script in the tooling self-test patch package, and feed back the self-test results to the main control board.
  • the tooling self-test mode version file containing the packaged hardware self-test script By pre-stored on the board in the form of a patch package, the tooling self-test mode version file containing the packaged hardware self-test script enables the tooling self-test mode version file to be independently released and maintained, realizing self-test version and Decoupling of the commercial version of the main control single board; and after receiving the hardware self-test command of the main control single board, the single board completes the switch from the live network mode to the hardware self-test mode according to the tooling self-test patch package, and according to the hardware
  • the self-test script automatically completes the hardware self-test and reports the self-test results. It can implement board-granular hardware self-test simply and efficiently without the need for the main control board to perform self-test control.
  • Figure 1 is a flow chart of the automated detection method in the embodiment of the present application.
  • Figure 2 is a schematic diagram of hardware self-test interaction in an embodiment of the present application
  • Figure 3 is a schematic structural diagram of a single board in another embodiment of the present application.
  • Figure 4 is a schematic structural diagram of an electronic device in another embodiment of the present application.
  • an automated detection method which includes: receiving a hardware self-test instruction issued by a main control board; loading a pre-cached tooling self-test patch package according to the hardware self-test instruction; wherein , the tooling self-test patch package includes a pre-packaged hardware self-test script; restart according to the preset program to enter the tooling self-test mode, perform hardware self-test according to the hardware self-test script, and feed back the self-test results to the main control board.
  • the single board after receiving the hardware self-test instruction from the main control board, the single board loads the pre-cached local tooling self-test patch package according to the hardware self-test instruction.
  • the tooling self-test patch package Contains prepackaged hardware self-test scripts. Then enter the tooling self-test mode by restarting, perform hardware self-test according to the hardware self-test script in the tooling self-test patch package, and feed back the self-test results to the main control board.
  • the tooling self-checking mode version file containing the packaged hardware self-checking script enables the tooling self-checking mode version file to be independently released and maintained, realizing the integration of the self-checking version with the main
  • the commercial version of the control single board is decoupled; and after receiving the hardware self-test command of the main control single board, the single board completes the switch from the live network mode to the hardware self-test mode according to the tooling self-test patch package, and performs the hardware self-test according to the hardware self-test.
  • the inspection script automatically completes the hardware self-inspection and reports the self-inspection results. Without the need for the main control board to perform self-inspection control, it is simple and efficient to implement board-granular hardware self-inspection.
  • the first aspect of the embodiments of the present application provides an automated detection method.
  • the automated detection method includes the following steps:
  • Step 101 Receive the hardware self-test command issued by the main control board.
  • the operation and maintenance personnel When a new board is added to the existing network equipment, the capacity of the existing network equipment board is expanded, or a suspected hardware failure occurs on the existing network equipment board, the operation and maintenance personnel will use the user terminal or the background control terminal to report to the main controller of the existing network equipment.
  • the board sends specific board operation instructions to instruct the existing network equipment to perform board hardware self-test.
  • the main control board After receiving the board operation instructions, the main control board will issue hardware self-test instructions to the boards that need to perform hardware self-test according to the board operation instructions.
  • the single board receives the instructions from the main control board and obtains the main control board. The hardware self-test command issued by the control board.
  • Step 102 Load the pre-cached tooling self-test patch package according to the hardware self-test instruction.
  • the single board After receiving the hardware self-test command from the main control board, the single board reads and detects the tooling self-test patch package in the local storage space, and then uses the files in the tooling self-test patch package as the preset program. Installation files are loaded, in which the tooling self-test patch package includes pre-packaged hardware self-test scripts.
  • the board By locally pre-saving the tooling self-checking patch package containing the hardware self-checking script, the board can complete the file loading in time and improve the efficiency of board mode change; the hardware self-checking script is stored in the tooling self-checking patch package in the form of a patch package.
  • the hardware self-test script of the single board can be independently generated and maintained, and the self-test version on the single board is decoupled from the commercial version on the main control board, so that the subsequent hardware self-test process does not require the control of the main control board. Simplify the self-test process.
  • the tooling self-test patch package not only contains the hardware self-test scripts pre-generated based on the board information, but also includes Field Programmable Gate Array (FPGA) files used by the tooling process and library files of related modules, such as , library files of self-test modules, extensible markup language (XML) files, etc.
  • FPGA Field Programmable Gate Array
  • the encapsulation method of the tooling self-test patch package can directly use the existing patch package production method to package each included file to generate the tooling self-test patch package. This embodiment does not place any restrictions on the specific files included in the tooling self-test patch package and the packaging method of the files.
  • loading a pre-cached tooling self-test patch package according to the hardware self-test instructions includes: according to the hardware The self-test command changes the file calling path of the board from the installation file storage path of the currently running live network mode to the installation file storage path of the tooling self-test mode.
  • the single board In the process of reading and loading the pre-cached tooling self-test patch package according to the hardware self-test instruction of the main control single board, the single board will determine the software version of the single board according to the version switching instruction in the main control single board hardware self-test instruction.
  • the management module modifies the file calling path of the single board, and changes the installation file calling path of the single board from the installation file storage path of the currently running live network mode to the installation file storage path of the tooling self-test mode, that is, the single board installation file
  • the calling path is adjusted to the tooling self-test patch package in local memory.
  • the hardware self-test script can be generated in the following manner: obtain the board type of the board; determine the standard test items of the board based on the correspondence between the board type and the test items; Test items and generate hardware self-test scripts.
  • the hardware self-test script of a single board In the process of generating the hardware self-test script of a single board, first classify the type of the single board according to the classification standard of the single board or the hardware information of the single board. For example, according to the number of specified hardware contained in the single board, the hardware information of the single board. The working parameters and other information are used to classify the type of the board. After obtaining the board type of the board based on the hardware information of the current board, determine all the standard test items corresponding to the current board based on the pre-set correspondence between the board type and the test items. For example, pre-set the Type A unit The board corresponds to 200 test items, and the B-type single board corresponds to 150 test items.
  • the classification standard it is determined that the current single board is a type A single board, and the 200 test items corresponding to the type A single board in the preset relationship are As a standard test item for the current single board.
  • the items to be tested during the single board hardware detection process may be set according to the specific functions of the single board or the standard working parameters of the hardware in the single board. Then, based on all standard test items corresponding to the current board, the hardware self-test script that needs to be used in the hardware self-test process is generated for the board.
  • the standard test items based on the board type are determined when generating the hardware self-test script, and the hardware self-test script is generated to ensure that the generated hardware self-test script is correct for the board. It has good pertinence and ensures the effect of hardware detection.
  • the board type can also be expanded based on the hardware data of the board, and then based on the correspondence between the hardware and the hardware test items, Combined with several pieces of hardware included in the single board, obtain the hardware test items corresponding to each hardware one by one, deduplicate the obtained set of hardware test items, and use the deduplicated set of hardware test items as the standard set of test items for the single board, and then Design hardware self-test scripts for new types of boards based on a set of standard test items.
  • a hardware self-test script is generated based on the standard test items of the single board, including: obtaining the current hardware potential fault to be detected; obtaining the target test items related to the hardware potential fault according to the hardware potential fault; item to generate a hardware self-test script.
  • the hardware self-test script In the process of designing and generating a hardware self-test script for a single board, all possible hardware faults of the single board can be directly detected. At this time, the hardware self-test script needs to be able to test all standard test items of the single board. to avoid missed detection of hardware faults.
  • the hardware fault that needs to be detected can be regarded as a potential hardware fault in advance, and then there is a correlation with the potential hardware fault, which can reflect the potential hardware fault of the single board.
  • the faulty standard test item is used as the target test item, and a hardware self-test script that can test all target test items is generated for the board to use during the hardware self-test process.
  • a hardware self-test script is generated, so that the detection range of the hardware self-test script loaded on the board can be flexibly adjusted, and the hardware can be tested through customized scripts.
  • Self-test enables operation and maintenance personnel to quickly analyze specific faults and fault causes based on test results, improving fault detection and analysis efficiency.
  • the current board is a type A board.
  • Type A board has 200 standard test items.
  • the current hardware fault to be detected is a hardware latent fault T.
  • the test items included in the hardware self-test script are set to 20 standard test items related to the hardware potential fault T, and the generation of the hardware self-test script is completed.
  • the designed hardware self-test script can test all standard test items related to potential hardware faults. This implementation The example does not impose any restrictions on the specific generation of hardware self-test scripts.
  • a secondary detection of a specific hardware fault is required, According to the specific hardware fault to be detected, select some target test items from all standard test items, then generate a new hardware self-test script, and package the new hardware self-test script into the tool self-test through patching
  • the single board is used to detect specific hardware faults based on the new hardware self-test script.
  • a hardware self-test script based on the standard test items of the single board, including: obtaining the preset test duration of the single board; determining the hardware self-test based on the preset test duration and the total number of test items included in the hardware self-test script The number of test items that the script detects in a single time; set the test parallelism of the hardware self-test script based on the number of test items that are detected in a single time.
  • test parallelism of the hardware self-test script In order to ensure the efficiency of hardware self-test, during the process of generating the hardware self-test script, it is also necessary to set the test parallelism of the hardware self-test script. After obtaining the preset test duration set for the single board, obtain the hardware self-test script. The total number of test items covered by the test script, combined with the time required for each test item, the total number of test items and the preset test time expected to complete the hardware self-test, determine the parallelism of each round of testing in the hardware self-test script. The number of tested items to be detected, and based on the determined number of tested items to be detected in parallel, set the test parallelism in the hardware self-test script.
  • the hardware self-test script covers 100 test items, the average test time of each test item is 6S, and the preset test time is 5 minutes, then two or more test items can be tested at the same time each time to be able to test within 5 seconds.
  • the test is completed within minutes, so set the test parallelism of the hardware self-test script to an integer greater than or equal to 2.
  • the hardware self-test time can be compressed, ensuring the accuracy of the hardware self-test while improving the efficiency of the hardware self-test.
  • the test parallelism of the hardware self-test script can be re-determined based on the changed expected completion time, and a new hardware self-test script can be generated. Then, the new hardware self-test script is packaged into the tooling self-test patch package through patching, so that the single board can perform parallel detection of the items to be tested with the new test parallelism based on the new hardware self-test script.
  • the patching method of the self-test patch package simply and efficiently implements the change of test parallelism during the single-board hardware self-test, making the hardware self-test more flexible.
  • the hardware self-test script in the tooling self-test patch package can also be updated through patching, so that the test items in the hardware self-test script can complete the arrangement of group tests, further improving the personalization of hardware self-test.
  • Step 103 Restart according to the preset program to enter the tooling self-test mode, perform hardware self-test according to the hardware self-test script, and feed back the self-test results to the main control board.
  • the board After the board completes loading of the pre-cached tooling self-test patch package, it restarts according to the preset mode switching procedure and uses the files in the tooling self-test patch package as installation files, and switches the current live network mode to tooling self-test. mode, and then the board uses the hardware self-test script to perform hardware self-test based on its own hardware data, and feeds back the self-test results to the main control board.
  • hardware self-test is performed according to the hardware self-test script, and the self-test results are fed back to the main control board, including: obtaining the current test status and/or self-test results of the single board, and based on the current test status and/or self-test results.
  • the self-test results generate a test result file; the test result file is fed back to the main control board for the main control board to parse the test result file and echo the test results.
  • the board uses the hardware self-test script to perform hardware self-test, it obtains the hardware data that needs to be used in the test process according to the detection sequence of the items to be tested in the hardware script, tests each item to be tested, and records the completed results.
  • the demerits of the items to be tested are marked as success, failure, timeout, etc., and the test duration, test rounds and other information of the completed items to be tested are counted.
  • the current hardware self-test results of the single board are generated, and the current hardware self-test results of the single board are generated based on the completed items to be tested, unfinished items to be tested, and ongoing items to be tested. Check test status.
  • test status and/or hardware self-test results are arranged and packaged, the current test result file of the board is generated, and the test result file is fed back to the main control board for the main control board to parse the test result file and analyze the test results.
  • the echo is used to facilitate operation and maintenance personnel to accurately obtain the hardware self-test results of the board.
  • the main control board can accurately echo the results of the single-board hardware self-test, which facilitates operation and maintenance personnel to accurately monitor the hardware self-test. and analysis of test results.
  • the test status can include: board status, that is, the running status of the single board, which can be used to distinguish whether the single board is currently in idle mode or test mode; task status, that is, the execution status of the test items of the single board that performs hardware self-test, and has been tested and untested items; test results: that is, the execution results of the test items of the single board undergoing hardware self-test, test pass and failed items, etc.
  • feeding back the test result file to the main control board includes: feeding back the test result file to the main control board according to the query instruction of the main control board, or periodically generating and feeding back the test result file to the main control board according to a preset program. document.
  • the main control board can issue a query command to the board. After receiving the query command, the board will perform the hardware self-check according to the current test status of the board and the hardware self-check results. Generate a test result file and feed the test result file back to the main control board.
  • a preset test result feedback program can also be packaged in the tooling self-test patch package. The board will feedback the test result according to the program at a certain time interval, for example, 10S, 20S or 30S, etc., periodically update the generated test result file, and feed the updated test result file back to the main control board. Improve the timeliness of test result feedback by providing test result file feedback based on query instructions or preset cycles.
  • the main control board can also issue test commands such as pause self-test instructions, resume self-test instructions, start self-test instructions, and terminate self-test instructions to the single board according to the received instructions, to interfere with the hardware self-test process of the single board. , to further improve the flexibility of single-board hardware self-test.
  • the Product Management Configuration (PMCFG) module of the main control board sends hardware self-test instructions to the device through the Product Communication Process (PTCP).
  • the board switches the mode from live network mode to Work equipment self-test mode. After the tooling version is run, the board will shake hands with the PTCP process of the main control board to establish a link.
  • the board and the main control board will synchronize board information, time information, and request File Transfer Protocol. FTP) server user name and password information.
  • FTP File Transfer Protocol
  • the board directly conducts keep-alive communication with the main control board once every 10 seconds through the agreed message number.
  • the communication between the main control single board and one single board is used as an example. In practical applications, one main control single board can communicate with multiple single boards. In this embodiment, the main control single board communicates with the main control single board. There is no limit on the number of boards.
  • the PTCP process issues corresponding hardware instructions to the board according to the received instructions, and feeds back the information fed back by the board to the PMCFG module.
  • the command received by the PTCP process is a query command, it will immediately reply the test result data uploaded by the single board to the PMCFG module; if the command received is a test command (including start self-test command, pause self-test command, resume self-test command Inspection instructions, etc.), which are parsed by PTCP and sent to the self-inspection line of the board. process processing.
  • the board When the PTCP process issues a test command to the board, after receiving the test command, the board will detect whether it is currently in the hardware self-check state. If it is currently in the hardware self-check state, it will directly perform the test according to the currently recorded test state. And/or the test result file generated by the hardware test result is fed back to the PTCP process, so that PMCFG can update the current test status of the board based on the test result file fed back by the PTCP process. At this time, the user can stop the test through the main control board. command, the self-test module in the board will terminate the test suite after processing the issued test items, and update the database. PMCFG will refresh the test status and display it back to the user.
  • the self-check module parses and delivers the hardware self-check script to the board.
  • the hardware self-check script is set In group mode, the items to be tested are executed according to the group. If the script sets the serial mode, the items to be tested are executed according to the serial rules.
  • the self-test module executes the delivery and operation of the test items according to the rules set by the hardware self-test script. Maintenance The test sequence is scheduled and the test result file feedback is performed according to the received instructions or the preset time interval until the single board completes the hardware self-test.
  • the tooling process can use FTP transmission technology to transfer the processed test result file and other logs used for fault location. It is sent to the main control board regularly.
  • the self-test log is stored according to the address of the board and is used for research and development to locate faults.
  • the main control directly parses the test result file and echoes the test results.
  • After performing hardware self-test according to the hardware self-test script it also includes: receiving the live network mode switching command of the main control board; restarting according to the live network mode switching command, and restoring to the live network mode before entering the tooling self-checking mode.
  • the main control board After the main control board detects that the board has completed the hardware self-test, it will find the network mode switching command to the board according to the received instructions or preset program, so that the board will switch its own mode and perform the hardware self-check. live network mode.
  • the single board After receiving the live network mode switching command from the main control board, the single board deactivates the loading and activation of the tooling self-test patch package, changes the calling path of the installation file to the file storage address of the live network mode, and then loads and activates the live network mode by restarting. Install the installation file corresponding to the network mode, switch back to the live network mode before the hardware self-test, and resume the original business operation.
  • the hardware self-test can be avoided from having an excessive impact on the services running on the single board.
  • FIG. 3 Another aspect of the embodiment of the present application relates to a single board. Referring to Figure 3, it includes:
  • the acquisition module 301 is used to receive hardware self-test instructions issued by the main control board.
  • the loading module 302 is configured to load a pre-cached tooling self-checking patch package according to the hardware self-checking instructions; wherein the tooling self-checking patch package includes a prepackaged hardware self-checking script.
  • the self-test module 303 is used to reboot into the tooling self-test mode according to the preset program, perform hardware self-test according to the hardware self-test script, and feed back the self-test results to the main control board.
  • This embodiment is a device embodiment corresponding to the method embodiment, and this embodiment can be implemented in cooperation with the method embodiment.
  • the relevant technical details mentioned in the method embodiment are still valid in this embodiment. In order to reduce duplication, they will not be described again here. Correspondingly, the relevant technical details mentioned in this embodiment can also be applied to the method embodiment.
  • Each module involved in this embodiment is a logic module.
  • a logic unit can be a A physical unit can also be a part of a physical unit, or can be implemented as a combination of multiple physical units.
  • units that are not closely related to solving the technical problems raised in this application are not introduced in this embodiment, but this does not mean that other units do not exist in this embodiment.
  • FIG. 4 Another aspect of the embodiment of the present application also provides an electronic device. Referring to Figure 4, it includes: at least one processor 401; and a memory 402 communicatively connected to the at least one processor 401; wherein the memory 402 stores data that can be Instructions executed by at least one processor 401, the instructions are executed by at least one processor 401, so that at least one processor 401 can execute the automated detection method described in any of the above method embodiments.
  • the memory 402 and the processor 401 are connected using a bus.
  • the bus may include any number of interconnected buses and bridges.
  • the bus connects various circuits of one or more processors 401 and the memory 402 together.
  • the bus may also connect various other circuits together such as peripherals, voltage regulators, and power management circuits, which are all well known in the art and therefore will not be described further herein.
  • the bus interface provides the interface between the bus and the transceiver.
  • a transceiver may be one element or may be multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium.
  • the data processed by the processor 401 is transmitted on the wireless medium through the antenna. Furthermore, the antenna also receives the data and transmits the data to the processor 401.
  • Processor 401 is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions.
  • the memory 402 may be used to store data used by the processor 401 when performing operations.
  • Another aspect of the embodiments of the present application also provides a computer-readable storage medium storing a computer program.
  • the above method embodiments are implemented when the computer program is executed by the processor.
  • the program is stored in a storage medium and includes several instructions to cause a device ( It may be a microcontroller, a chip, etc.) or a processor (processor) that executes all or part of the steps of the methods described in various embodiments of this application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program code. .

Abstract

Disclosed in the present application are an automatic detection method, a single board, an electronic device and a storage medium. The method comprises: receiving a hardware self-checking instruction issued by a master single board; loading a pre-cached tool self-checking patch package according to the hardware automatic detection instruction, the tool self-checking patch package comprising a pre-packaged hardware self-checking script; restarting to enter a tool self-checking mode according to a preset program, carrying out hardware self-checking according to the hardware self-checking script, and feeding back a self-checking result to the master single board.

Description

自动化检测方法、单板、电子设备及存储介质Automated detection methods, single boards, electronic equipment and storage media
相关申请Related applications
本申请要求于2022年3月30日申请的、申请号为202210356511.1的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to the Chinese patent application with application number 202210356511.1 filed on March 30, 2022, the entire content of which is incorporated into this application by reference.
技术领域Technical field
本申请实施涉及通信技术领域,特别涉及一种自动化检测方法、单板、电子设备及存储介质。The implementation of this application relates to the field of communication technology, and in particular to an automated detection method, single board, electronic equipment and storage medium.
背景技术Background technique
随着路由器设备高度现代化,对设备的硬件自检,要求也越来越高,路由器设备从生产到发货的实施过程中,需要拦截在焊接过程中出现的短路、断路、器件漏焊等各种焊接故障,还需要排除单板运输过程中的磕碰等情况,需要对设备硬件系统做全面的自检,确保业务运行前设备状态正常,防范业务故障触发,阻止后续风险。As router equipment is highly modernized, the requirements for hardware self-test of the equipment are getting higher and higher. During the implementation process of router equipment from production to delivery, it is necessary to intercept various short circuits, open circuits, device leaks, etc. that occur during the welding process. Welding faults need to be eliminated, and bumps during board transportation need to be eliminated. A comprehensive self-check of the equipment hardware system is required to ensure that the equipment is in normal condition before business operation, to prevent business failures from being triggered and to prevent subsequent risks.
外场工程实施时对设备做硬件自检,需要考虑如下场景:场景1:新增设备:在进行新增设备后要求对整个硬件系统做自检,包括主控/线卡/交换/接口子卡/背板,涵盖控制面通道和转发面通道;场景2:现网设备单板扩容:在现网设备上做新扩容单板的硬件自检,包括线卡/接口卡,扩容单板硬件自检时需跟现网承载业务的单板隔离,不能对现网业务造成过大的影响;场景3:现网设备单板出现疑似硬件故障:在对现场环境不做任何物理操作的情况下,对故障单板做硬件自检。When performing hardware self-test on equipment during the implementation of field projects, the following scenarios need to be considered: Scenario 1: Adding new equipment: After adding new equipment, it is required to perform self-test on the entire hardware system, including main control/line card/switching/interface sub-card / Backplane, covering control plane channels and forwarding plane channels; Scenario 2: Single board expansion of existing network equipment: Perform hardware self-test of new expansion single boards on existing network equipment, including line cards/interface cards, and hardware self-test of expansion single boards. During the inspection, it needs to be isolated from the single board that carries the service on the existing network, and it cannot have an excessive impact on the existing network business; Scenario 3: A suspected hardware failure occurs on the existing network equipment single board: Without any physical operation on the on-site environment, Perform hardware self-check on the faulty board.
为了解决上述场景中的硬件自检问题,当前常用的一种方式是使用独立版本进行自检,用户下发一次自检命令后,所有被测单板一同进行自检,但是检测开始后新插入的单板只能等当前轮次自检结束后,重新和各被测单板一同进行自检,并且在发生现网设备单板扩容或需要进行故障单板自检的情况下,现场无条件进行独立版本自检,需要将单板拨出送回,费时费力。另一种方式是通过在主控单板上运行控制自检脚本的商用版本,在自检单板上运训工装自检版本,由主控单板控制现网设备上某个或某几个单板的自检,以此实现单板的硬件自检,但是这种方式下的自检模式固定,针对性差,并且由于商用版本发布周期长、发布流程严格等现状,因此,在发生单板扩容的情况下难以兼容扩容单板的硬件自检,实用性较差。In order to solve the hardware self-test problem in the above scenario, a commonly used method is to use an independent version to perform self-test. After the user issues a self-test command, all the tested boards will perform self-test together. However, after the test starts, newly inserted The single board can only wait for the current round of self-test to be completed, and then perform self-test together with each tested single board. In the case of single board expansion of the existing network equipment or the need for faulty single board self-test, the self-test can be performed on-site unconditionally. Independent version self-test requires sending the board out and back, which is time-consuming and labor-intensive. Another way is to run the commercial version of the control self-test script on the main control board, run the self-test version of the training tool on the self-test board, and let the main control board control one or several devices on the existing network. The self-test of the single board is used to implement the hardware self-test of the single board. However, the self-test mode in this method is fixed and has poor pertinence. Moreover, due to the long release cycle of commercial versions and strict release processes, etc., therefore, when the single board occurs In the case of capacity expansion, it is difficult to be compatible with the hardware self-test of the expansion board, and its practicality is poor.
发明内容Contents of the invention
本申请实施例的目的在于解决上述问题,提供一种自动化检测方法、单板、电子设备及存储介质,通过将自检脚本封装在单板本地预存的工装自检补丁包中对自检脚本独立发布维护,实现自检版本和主控单板商用版本的解耦,进而简单高效的实现单板粒度的硬件自检。The purpose of the embodiments of the present application is to solve the above problems and provide an automated detection method, a single board, an electronic device and a storage medium, by encapsulating the self-test script in a tooling self-test patch package that is pre-stored locally on the single board to make the self-test script independent Release and maintenance to realize the decoupling of the self-test version and the commercial version of the main control board, thereby achieving single-board granular hardware self-test simply and efficiently.
为实现上述目的,本申请实施例提供了一种自动化检测方法,包括:接收主控单板下发的硬件自检指令;根据所述硬件自检指令,加载预先缓存的工装自检补丁包;其中,所述工装自检补丁包中包括预先打包的硬件自检脚本;根据预设程序进行重启进入工装自检模式,根据所述硬件自检脚本进行硬件自检,并向所述主控单板反馈自检结果。In order to achieve the above purpose, embodiments of the present application provide an automated detection method, which includes: receiving a hardware self-test instruction issued by a main control board; loading a pre-cached tooling self-test patch package according to the hardware self-test instruction; Wherein, the tooling self-test patch package includes a pre-packaged hardware self-test script; restart the tooling self-test mode according to the preset program, perform hardware self-test according to the hardware self-test script, and report to the main control unit The board feeds back the self-test results.
为实现上述目的,本申请实施例还提供了一种单板,包括:获取模块,用于接收主控单 板下发的硬件自检指令;In order to achieve the above purpose, an embodiment of the present application also provides a single board, including: an acquisition module for receiving the main control unit Hardware self-test instructions issued by the board;
加载模块,用于根据所述硬件自检指令,加载预先缓存的工装自检补丁包;其中,所述工装自检补丁包中包括预先打包的硬件自检脚本;A loading module, configured to load a pre-cached tooling self-checking patch package according to the hardware self-checking instructions; wherein the tooling self-checking patch package includes a prepackaged hardware self-checking script;
自检模块,用于根据预设程序进行重启进入工装自检模式,根据所述硬件自检脚本进行硬件自检,并向所述主控单板反馈自检结果。The self-test module is used to reboot into the tooling self-test mode according to the preset program, perform hardware self-test according to the hardware self-test script, and feed back the self-test results to the main control board.
为实现上述目的,本申请实施例还提供了一种电子设备,包括:至少一个处理器;以及,与至少一个处理器通信连接的存储器;其中,存储器存储有可被至少一个处理器执行的指令,指令被至少一个处理器执行,以使至少一个处理器能够执行如上所述的自动化检测方法。To achieve the above object, embodiments of the present application further provide an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor. , the instructions are executed by at least one processor, so that at least one processor can execute the automated detection method as described above.
为实现上述目的,本申请实施例还提供了一种计算机可读存储介质,存储有计算机程序,计算机程序被处理器执行时实现如上所述的自动化检测方法。In order to achieve the above object, embodiments of the present application also provide a computer-readable storage medium that stores a computer program. When the computer program is executed by a processor, the automated detection method as described above is implemented.
本申请实施例提供的自动化检测方法,单板在接收到主控单板的硬件自检指令后,根据硬件自检指令,加载预先缓存在本地的工装自检补丁包,工装自检补丁包中包含预先打包的硬件自检脚本。然后通过重启的方式进入工装自检模式,根据工装自检补丁包中的硬件自检脚本进行硬件自检,并向主控单板反馈自检结果。通过预先将包含打包好的硬件自检脚本的工装自检模式的版本文件,以补丁包的形式存储在单板上,使得工装自检模式的版本文件能够独立发布和维护,实现自检版本与主控单板的商用本版的解耦;并在接收到主控单板的硬件自检指令后,单板根据工装自检补丁包完成现网模式到硬件自检模式的切换,并根据硬件自检脚本自行完成硬件自检和自检结果上报,在无需主控单板进行自检控制的情况下,简单高效的实现单板粒度的硬件自检。In the automated detection method provided by the embodiment of this application, after receiving the hardware self-test instruction from the main control board, the single board loads the pre-cached local tooling self-test patch package according to the hardware self-test instruction. The tooling self-test patch package Contains prepackaged hardware self-test scripts. Then enter the tooling self-test mode by restarting, perform hardware self-test according to the hardware self-test script in the tooling self-test patch package, and feed back the self-test results to the main control board. By pre-stored on the board in the form of a patch package, the tooling self-test mode version file containing the packaged hardware self-test script enables the tooling self-test mode version file to be independently released and maintained, realizing self-test version and Decoupling of the commercial version of the main control single board; and after receiving the hardware self-test command of the main control single board, the single board completes the switch from the live network mode to the hardware self-test mode according to the tooling self-test patch package, and according to the hardware The self-test script automatically completes the hardware self-test and reports the self-test results. It can implement board-granular hardware self-test simply and efficiently without the need for the main control board to perform self-test control.
附图说明Description of drawings
一个或多个实施例通过与之对应的附图中的图片进行示例性说明,这些示例性说明并不构成对实施例的限定,附图中具有相同参考数字标号的元件表示为类似的元件,除非有特别申明,附图中的图不构成比例限制。One or more embodiments are exemplified by the pictures in the corresponding drawings. These illustrative illustrations do not constitute limitations to the embodiments. Elements with the same reference numerals in the drawings are represented as similar elements. Unless otherwise stated, the figures in the drawings are not intended to be limited to scale.
图1是本申请实施例中的自动化检测方法流程图;Figure 1 is a flow chart of the automated detection method in the embodiment of the present application;
图2是本申请实施例中的一种硬件自检交互示意图;Figure 2 is a schematic diagram of hardware self-test interaction in an embodiment of the present application;
图3是本申请另一实施例中的单板的结构示意图;Figure 3 is a schematic structural diagram of a single board in another embodiment of the present application;
图4是本申请另一实施例中的电子设备的结构示意图。Figure 4 is a schematic structural diagram of an electronic device in another embodiment of the present application.
具体实施方式Detailed ways
由背景技术可知,在当下较为常用的自动化检测方法中,使用独立版本进行硬件自检的方式无法实现单板粒度的硬件自检以及针对故障单板的针对性硬件自检,使用利用主控单板控制硬件自检以实现单板粒度自检的方式自检的针对性差,并且无法对新类型单板及时适配,可行性差。因此,如何简单高效的完成单板粒度的硬件自检,以提高硬件自检和故障分析的效率和效果是一个迫切需要得到解决的问题。It can be seen from the background technology that among the currently more commonly used automated detection methods, using an independent version for hardware self-test cannot achieve single-board granular hardware self-test and targeted hardware self-test for faulty boards. Using the main control unit The board control hardware self-test that implements single board granular self-test has poor pertinence and cannot be adapted to new types of boards in a timely manner, resulting in poor feasibility. Therefore, how to complete single-board granular hardware self-test simply and efficiently to improve the efficiency and effectiveness of hardware self-test and fault analysis is an urgent problem that needs to be solved.
为了解决上述问题,本申请的实施例提供了一种自动化检测方法,包括:接收主控单板下发的硬件自检指令;根据硬件自检指令,加载预先缓存的工装自检补丁包;其中,工装自检补丁包中包括预先打包的硬件自检脚本;根据预设程序进行重启进入工装自检模式,根据硬件自检脚本进行硬件自检,并向主控单板反馈自检结果。 In order to solve the above problems, embodiments of the present application provide an automated detection method, which includes: receiving a hardware self-test instruction issued by a main control board; loading a pre-cached tooling self-test patch package according to the hardware self-test instruction; wherein , the tooling self-test patch package includes a pre-packaged hardware self-test script; restart according to the preset program to enter the tooling self-test mode, perform hardware self-test according to the hardware self-test script, and feed back the self-test results to the main control board.
本申请实施例提供的自动化检测方法,单板在接收到主控单板的硬件自检指令后,根据硬件自检指令,加载预先缓存在本地的工装自检补丁包,工装自检补丁包中包含预先打包的硬件自检脚本。然后通过重启的方式进入工装自检模式,根据工装自检补丁包中的硬件自检脚本进行硬件自检,并向主控单板反馈自检结果。通过预先将包含打包好的硬件自检脚本的工装自检模式的版本文件以补丁包的形式存储在单板上,使得工装自检模式的版本文件能够独立发布和维护,实现自检版本与主控单板的商用本版的解耦;并在接收到主控单板的硬件自检指令后,单板根据工装自检补丁包完成现网模式到硬件自检模式的切换,并根据硬件自检脚本自行完成硬件自检和自检结果上报,在无需主控单板进行自检控制的情况下,简单高效的实现单板粒度的硬件自检。In the automated detection method provided by the embodiment of this application, after receiving the hardware self-test instruction from the main control board, the single board loads the pre-cached local tooling self-test patch package according to the hardware self-test instruction. The tooling self-test patch package Contains prepackaged hardware self-test scripts. Then enter the tooling self-test mode by restarting, perform hardware self-test according to the hardware self-test script in the tooling self-test patch package, and feed back the self-test results to the main control board. By pre-stored on the board in the form of a patch package, the tooling self-checking mode version file containing the packaged hardware self-checking script enables the tooling self-checking mode version file to be independently released and maintained, realizing the integration of the self-checking version with the main The commercial version of the control single board is decoupled; and after receiving the hardware self-test command of the main control single board, the single board completes the switch from the live network mode to the hardware self-test mode according to the tooling self-test patch package, and performs the hardware self-test according to the hardware self-test. The inspection script automatically completes the hardware self-inspection and reports the self-inspection results. Without the need for the main control board to perform self-inspection control, it is simple and efficient to implement board-granular hardware self-inspection.
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合附图对本申请的各实施例进行详细的阐述。然而,本领域的普通技术人员可以理解,在本申请各实施例中,为了使读者更好地理解本申请而提出了许多技术细节。但是,即使没有这些技术细节和基于以下各实施例的种种变化和修改,也可以实现本申请所要求保护的技术方案。以下各个实施例的划分是为了描述方便,不应对本申请的具体实现方式构成任何限定,各个实施例在不矛盾的前提下可以相互结合相互引用。In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, each embodiment of the present application will be described in detail below with reference to the accompanying drawings. However, those of ordinary skill in the art can understand that in each embodiment of the present application, many technical details are provided to enable readers to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical solution claimed in this application can also be implemented. The division of the following embodiments is for the convenience of description and should not constitute any limitation on the specific implementation of the present application. The various embodiments can be combined with each other and referenced with each other on the premise that there is no contradiction.
下面将结合具体的实施例的对本申请记载的自动化检测方法的实现细节进行具体的说明,以下内容仅为方便理解提供的实现细节,并非实施本方案的必须。The implementation details of the automated detection method recorded in this application will be described in detail below with reference to specific embodiments. The following content is only implementation details provided for ease of understanding and is not necessary for implementation of this solution.
本申请实施例的第一方面提供了一种自动化检测方法,自动化检测方法的流程参考图1,在一些实施例中,自动化检测方法包括以下步骤:The first aspect of the embodiments of the present application provides an automated detection method. For the flow of the automated detection method, refer to Figure 1. In some embodiments, the automated detection method includes the following steps:
步骤101,接收主控单板下发的硬件自检指令。Step 101: Receive the hardware self-test command issued by the main control board.
在现网设备中发生新增单板、现网设备单板扩容或者现网设备单板出现疑似硬件故障等场景下,运维人员会通过用户终端或者后台控制终端,向现网设备的主控单板发送特定的单板操作指令,指示现网设备进行单板硬件自检。主控单板在接收到单板操作指令后,会根据单板操作指令,向需要进行硬件自检的单板下发硬件自检指令,单板对主控单板的指令进行接收,获取主控单板下发的硬件自检指令。When a new board is added to the existing network equipment, the capacity of the existing network equipment board is expanded, or a suspected hardware failure occurs on the existing network equipment board, the operation and maintenance personnel will use the user terminal or the background control terminal to report to the main controller of the existing network equipment. The board sends specific board operation instructions to instruct the existing network equipment to perform board hardware self-test. After receiving the board operation instructions, the main control board will issue hardware self-test instructions to the boards that need to perform hardware self-test according to the board operation instructions. The single board receives the instructions from the main control board and obtains the main control board. The hardware self-test command issued by the control board.
步骤102,根据硬件自检指令,加载预先缓存的工装自检补丁包。Step 102: Load the pre-cached tooling self-test patch package according to the hardware self-test instruction.
单板在接收到主控单板的硬件自检指令后,在本地存储空间中进行工装自检补丁包的读取和检测等,然后根据预设程序,将工装自检补丁包中的文件作为安装文件进行加载,其中,工装自检补丁包中包括预先打包的硬件自检脚本。通过本地预存包含硬件自检脚本的工装自检补丁包,使得单板能够及时完成文件的加载,提高单板模式变更效率;将硬件自检脚本以打补丁包的方式存储在工装自检补丁包中,使得单板的硬件自检脚本能够独立生成和维护,实现单板上的自检版本与主控单板上的商用版本的解耦,使得后续硬件自检过程无需主控单板控制,简化自检过程。After receiving the hardware self-test command from the main control board, the single board reads and detects the tooling self-test patch package in the local storage space, and then uses the files in the tooling self-test patch package as the preset program. Installation files are loaded, in which the tooling self-test patch package includes pre-packaged hardware self-test scripts. By locally pre-saving the tooling self-checking patch package containing the hardware self-checking script, the board can complete the file loading in time and improve the efficiency of board mode change; the hardware self-checking script is stored in the tooling self-checking patch package in the form of a patch package. In this way, the hardware self-test script of the single board can be independently generated and maintained, and the self-test version on the single board is decoupled from the commercial version on the main control board, so that the subsequent hardware self-test process does not require the control of the main control board. Simplify the self-test process.
工装自检补丁包中不仅包含根据单板信息预先生成的硬件自检脚本,还可以包含工装进程使用的现场可编辑逻辑门阵列(Field Programmable Gate Array,FPGA)文件,相关模块的库文件,例如,自检模块的库文件,可拓展标记语言(XML)文件等。工装自检补丁包的封装方式可以直接采用现有补丁包制作方式,对包含的各文件进行打包,生成工装自检补丁包。本实施例对工装自检补丁包中具体包含的文件以及文件的打包方式不做限制。The tooling self-test patch package not only contains the hardware self-test scripts pre-generated based on the board information, but also includes Field Programmable Gate Array (FPGA) files used by the tooling process and library files of related modules, such as , library files of self-test modules, extensible markup language (XML) files, etc. The encapsulation method of the tooling self-test patch package can directly use the existing patch package production method to package each included file to generate the tooling self-test patch package. This embodiment does not place any restrictions on the specific files included in the tooling self-test patch package and the packaging method of the files.
在一个例子中,根据硬件自检指令,加载预先缓存的工装自检补丁包,包括:根据硬件 自检指令,将单板的文件调用路径从当前运行的现网模式的安装文件存储路径,修改为工装自检模式的安装文件存储路径。In one example, loading a pre-cached tooling self-test patch package according to the hardware self-test instructions includes: according to the hardware The self-test command changes the file calling path of the board from the installation file storage path of the currently running live network mode to the installation file storage path of the tooling self-test mode.
单板在根据主控单板的硬件自检指令,读取并加载预先缓存的工装自检补丁包的过程中,根据主控单板硬件自检指令中的版本切换指令,单板的软件版本管理模块对单板的文件调用路径进行修改,将单板的安装文件调用路径从当前运行的现网模式的安装文件存储路径,修改为工装自检模式的安装文件存储路径,即将单板安装文件调用路径调整为本地内存中的工装自检补丁包。通过对单板安装文件调用路径进行修改,使得单板能够准确加载需要的安装文件,进而在重启后能够准确进入工装自检模式,并根据自检脚本完成自检。In the process of reading and loading the pre-cached tooling self-test patch package according to the hardware self-test instruction of the main control single board, the single board will determine the software version of the single board according to the version switching instruction in the main control single board hardware self-test instruction. The management module modifies the file calling path of the single board, and changes the installation file calling path of the single board from the installation file storage path of the currently running live network mode to the installation file storage path of the tooling self-test mode, that is, the single board installation file The calling path is adjusted to the tooling self-test patch package in local memory. By modifying the board installation file calling path, the board can accurately load the required installation files, and then accurately enter the tooling self-test mode after restarting, and complete the self-test according to the self-test script.
在另一个例子中,硬件自检脚本可以根据以下方式生成:获取单板的单板类型;根据单板类型与检测项目的对应关系,确定单板的标准待测项;根据单板的标准待测项,生成硬件自检脚本。In another example, the hardware self-test script can be generated in the following manner: obtain the board type of the board; determine the standard test items of the board based on the correspondence between the board type and the test items; Test items and generate hardware self-test scripts.
在进行单板的硬件自检脚本生成的过程中,先根据单板的分类标准或者单板的硬件信息,对单板所属的类型进行分类,例如,根据单板包含的指定硬件的数量、硬件的工作参数等信息对单板所属类型进行分类。根据当前单板的硬件信息获取单板的单板类型后,根据预先设置好的单板类型与检测项目的对应关系,确定当前单板对应的所有标准待测项,例如,预先设置A型单板对应200个待测项,B型单板对应150个待测项,根据分类标准确定出当前单板为A型单板,则将预设关系中A型单板对应的200个待测项作为当前单板的标准待测项。其中,单板硬件检测过程中的待测项可以是根据单板的具体功能或者单板中硬件的标准工作参数设置的。然后基于当前单板对应的所有标准待测项,为单板生成硬件自检过程中需要使用的硬件自检脚本。通过预先为不同类型的单板设置对应的待测项,根据单板类型确定生成硬件自检脚本时依据的标准待测项,并生成硬件自检脚本,保证生成的硬件自检脚本对单板具有良好的针对性,保证硬件检测的效果。In the process of generating the hardware self-test script of a single board, first classify the type of the single board according to the classification standard of the single board or the hardware information of the single board. For example, according to the number of specified hardware contained in the single board, the hardware information of the single board. The working parameters and other information are used to classify the type of the board. After obtaining the board type of the board based on the hardware information of the current board, determine all the standard test items corresponding to the current board based on the pre-set correspondence between the board type and the test items. For example, pre-set the Type A unit The board corresponds to 200 test items, and the B-type single board corresponds to 150 test items. According to the classification standard, it is determined that the current single board is a type A single board, and the 200 test items corresponding to the type A single board in the preset relationship are As a standard test item for the current single board. Among them, the items to be tested during the single board hardware detection process may be set according to the specific functions of the single board or the standard working parameters of the hardware in the single board. Then, based on all standard test items corresponding to the current board, the hardware self-test script that needs to be used in the hardware self-test process is generated for the board. By setting corresponding test items for different types of boards in advance, the standard test items based on the board type are determined when generating the hardware self-test script, and the hardware self-test script is generated to ensure that the generated hardware self-test script is correct for the board. It has good pertinence and ensures the effect of hardware detection.
另外,在需要生成硬件自检脚本的单板不属于任何已有单板类型的情况下,还可以根据单板的硬件数据对单板类型进行扩充,然后基于硬件与硬件测试项的对应关系,结合单板包含的若干个硬件,逐一获取各硬件对应的硬件测试项,对得到的硬件测试项集合进行去重,将去重后的硬件测试项集合作为单板的标准待测项集合,然后基于标准待测项集合为新增类型的单板进行硬件自检脚本的设计。In addition, when the board for which a hardware self-test script needs to be generated does not belong to any existing board type, the board type can also be expanded based on the hardware data of the board, and then based on the correspondence between the hardware and the hardware test items, Combined with several pieces of hardware included in the single board, obtain the hardware test items corresponding to each hardware one by one, deduplicate the obtained set of hardware test items, and use the deduplicated set of hardware test items as the standard set of test items for the single board, and then Design hardware self-test scripts for new types of boards based on a set of standard test items.
进一步地,根据单板的标准待测项,生成硬件自检脚本,包括:获取当前待检测的硬件潜在故障;根据硬件潜在故障,获取与硬件潜在故障相关的目标待测项;根据目标待测项,生成硬件自检脚本。Further, a hardware self-test script is generated based on the standard test items of the single board, including: obtaining the current hardware potential fault to be detected; obtaining the target test items related to the hardware potential fault according to the hardware potential fault; item to generate a hardware self-test script.
在为单板设计并生成硬件自检脚本的过程中,可以直接对单板所有可能的硬件故障进行检测,此时,硬件自检脚本设计时需要能够对单板所有的标准待测项进行测试,以避免对硬件故障的漏检测。此外,在硬件故障检测存在明确的目标的情况下,为了提高自检效率,可以预先将需要检测的硬件故障作为硬件潜在故障,然后将与硬件潜在故障存在相关性,能够反映单板发生硬件潜在故障的标准待测项作为目标待测项,并生成一个可以对所有目标待测项进行测试的硬件自检脚本供单板在硬件自检过程中使用。通过根据当前需要检测的潜在故障选取部分或所有标准待测项作为目标待测项生成硬件自检脚本,使得单板加载的硬件自检脚本的检测范围能够灵活调整,并且通过定制化脚本进行硬件自检,使得运维人员能够根据检测结果迅速分析出具体故障及故障原因,提高故障检测和分析效率。 In the process of designing and generating a hardware self-test script for a single board, all possible hardware faults of the single board can be directly detected. At this time, the hardware self-test script needs to be able to test all standard test items of the single board. to avoid missed detection of hardware faults. In addition, when there is a clear target for hardware fault detection, in order to improve the efficiency of self-test, the hardware fault that needs to be detected can be regarded as a potential hardware fault in advance, and then there is a correlation with the potential hardware fault, which can reflect the potential hardware fault of the single board. The faulty standard test item is used as the target test item, and a hardware self-test script that can test all target test items is generated for the board to use during the hardware self-test process. By selecting some or all standard test items as target test items according to the potential faults that currently need to be detected, a hardware self-test script is generated, so that the detection range of the hardware self-test script loaded on the board can be flexibly adjusted, and the hardware can be tested through customized scripts. Self-test enables operation and maintenance personnel to quickly analyze specific faults and fault causes based on test results, improving fault detection and analysis efficiency.
例如,当前单板为A类型的单板,A类型单板具有200个标准待测项,当前待检测的硬件故障为硬件潜在故障T,与硬件潜在故障T相关的标准待测项有20个,那么,在进行硬件自检脚本生成的过程中,将硬件自检脚本中包含的待测项设置为与硬件潜在故障T相关的20个标准待测项,并完成硬件自检脚本的生成。在具体的应用中,单次硬件自检中的硬件潜在故障可以为一个或多个,设计出的硬件自检脚本能够实现对所有硬件潜在故障相关的标准待测项的测试即可,本实施例对硬件自检脚本的具体生成不做限制。For example, the current board is a type A board. Type A board has 200 standard test items. The current hardware fault to be detected is a hardware latent fault T. There are 20 standard test items related to the hardware latent fault T. , then, in the process of generating the hardware self-test script, the test items included in the hardware self-test script are set to 20 standard test items related to the hardware potential fault T, and the generation of the hardware self-test script is completed. In a specific application, there can be one or more potential hardware faults in a single hardware self-test. The designed hardware self-test script can test all standard test items related to potential hardware faults. This implementation The example does not impose any restrictions on the specific generation of hardware self-test scripts.
另外,为了避免硬件故障的漏检测,还可以先根据单板所有标准待测项生成硬件自检脚本并发布给单板进行存储和使用,在需要对特定的硬件故障进行二次检测的时候,根据待检测的特定硬件故障,在所有标准待测项中选取部分目标待测项,然后生成一个新的硬件自检脚本,并通过打补丁的方式将新的硬件自检脚本打包到工装自检补丁包中,供单板根据新的硬件自检脚本对特定硬件故障进行检测,通过对工装自检补丁包进行打补丁的方式,简单高效的实现单板硬件自检过程中的硬件测试范围的调整。In addition, in order to avoid missed detection of hardware faults, you can also generate a hardware self-test script based on all standard test items of the board and publish it to the board for storage and use. When a secondary detection of a specific hardware fault is required, According to the specific hardware fault to be detected, select some target test items from all standard test items, then generate a new hardware self-test script, and package the new hardware self-test script into the tool self-test through patching In the patch package, the single board is used to detect specific hardware faults based on the new hardware self-test script. By patching the tooling self-test patch package, the hardware test scope in the single-board hardware self-test process can be realized simply and efficiently. Adjustment.
进一步地,根据单板的标准待测项,生成硬件自检脚本,包括:获取单板的预设测试时长;根据预设测试时长及硬件自检脚本包含的待测项总数,确定硬件自检脚本单次检测的待测项数量;根据单次检测的待测项数量,对硬件自检脚本进行测试并行度设置。Further, generate a hardware self-test script based on the standard test items of the single board, including: obtaining the preset test duration of the single board; determining the hardware self-test based on the preset test duration and the total number of test items included in the hardware self-test script The number of test items that the script detects in a single time; set the test parallelism of the hardware self-test script based on the number of test items that are detected in a single time.
为了保证硬件自检的效率,在进行硬件自检脚本生成过程中,还需要对硬件自检脚本的测试并行度进行设置,在获取到的为单板设置的预设测试时长后,获取硬件自检脚本覆盖的待测项的总数,结合每个待测项所需的时长、待测项的总数及完成硬件自检期望的预设测试时长,确定硬件自检脚本中每轮检测过程中并行检测的待测项数量,并根据确定出的并行检测的待测项数量,对硬件自检脚本中的测试并行度进行设置。例如,硬件自检脚本覆盖100个测试项,每个测试项的平均测试时长为6S,预设测试时长为5分钟,则每次同时进行两个及其以上测试项的测试,才能够在5分钟内完成测试,因此,将硬件自检脚本的测试并行度设置为大于等于2的整数。通过为硬件自检脚本准确的设置测试并行度,实现对硬件自检时长的压缩,保证硬件自检准确性的同时,提高硬件自检效率。In order to ensure the efficiency of hardware self-test, during the process of generating the hardware self-test script, it is also necessary to set the test parallelism of the hardware self-test script. After obtaining the preset test duration set for the single board, obtain the hardware self-test script. The total number of test items covered by the test script, combined with the time required for each test item, the total number of test items and the preset test time expected to complete the hardware self-test, determine the parallelism of each round of testing in the hardware self-test script. The number of tested items to be detected, and based on the determined number of tested items to be detected in parallel, set the test parallelism in the hardware self-test script. For example, if the hardware self-test script covers 100 test items, the average test time of each test item is 6S, and the preset test time is 5 minutes, then two or more test items can be tested at the same time each time to be able to test within 5 seconds. The test is completed within minutes, so set the test parallelism of the hardware self-test script to an integer greater than or equal to 2. By accurately setting the test parallelism for the hardware self-test script, the hardware self-test time can be compressed, ensuring the accuracy of the hardware self-test while improving the efficiency of the hardware self-test.
另外,在硬件自检的期望完成时间发生变更的情况下,还可以根据变更后的期望完成时间重新确定硬件自检脚本的测试并行度,生成一个新的硬件自检脚本。然后通过打补丁的方式将新的硬件自检脚本打包到工装自检补丁包中,供单板根据新的硬件自检脚本,以新的测试并行度进行待测项的并行检测,通过对工装自检补丁包进行打补丁的方式,简单高效的实现单板硬件自检过程中测试并行度的变更,使得硬件自检更加灵活。In addition, when the expected completion time of the hardware self-test changes, the test parallelism of the hardware self-test script can be re-determined based on the changed expected completion time, and a new hardware self-test script can be generated. Then, the new hardware self-test script is packaged into the tooling self-test patch package through patching, so that the single board can perform parallel detection of the items to be tested with the new test parallelism based on the new hardware self-test script. The patching method of the self-test patch package simply and efficiently implements the change of test parallelism during the single-board hardware self-test, making the hardware self-test more flexible.
此外,还可以通过打补丁的方式对工装自检补丁包中的硬件自检脚本进行更新,使得硬件自检脚本中的待测项能够完成分组测试的编排,进一步提升硬件自检的个性化。In addition, the hardware self-test script in the tooling self-test patch package can also be updated through patching, so that the test items in the hardware self-test script can complete the arrangement of group tests, further improving the personalization of hardware self-test.
步骤103,根据预设程序进行重启进入工装自检模式,根据硬件自检脚本进行硬件自检,并向主控单板反馈自检结果。Step 103: Restart according to the preset program to enter the tooling self-test mode, perform hardware self-test according to the hardware self-test script, and feed back the self-test results to the main control board.
单板在完成对预先缓存的工装自检补丁包的加载后,按照预设的模式切换程序将工装自检补丁包中的文件作为安装文件进行重启,将当前的现网模式切换为工装自检模式,然后单板利用硬件自检脚本基于自身的硬件数据进行硬件自检,并向主控单板反馈自检结果。After the board completes loading of the pre-cached tooling self-test patch package, it restarts according to the preset mode switching procedure and uses the files in the tooling self-test patch package as installation files, and switches the current live network mode to tooling self-test. mode, and then the board uses the hardware self-test script to perform hardware self-test based on its own hardware data, and feeds back the self-test results to the main control board.
在一个例子中,根据硬件自检脚本进行硬件自检,并向主控单板反馈自检结果,包括:获取单板当前的测试状态和/或自检结果,并根据当前的测试状态和/或自检结果生成测试结果文件;向主控单板反馈测试结果文件,供主控单板解析测试结果文件进行测试结果的回显。 In one example, hardware self-test is performed according to the hardware self-test script, and the self-test results are fed back to the main control board, including: obtaining the current test status and/or self-test results of the single board, and based on the current test status and/or self-test results. Or the self-test results generate a test result file; the test result file is fed back to the main control board for the main control board to parse the test result file and echo the test results.
单板在利用硬件自检脚本进行硬件自检的过程中,根据硬件脚本中的待测项检测顺序,获取测试过程中需要使用的硬件数据,并对各待测项进行测试,记录已完成的待测项的记过,标记为成功、失败、超时等,统计已完成的待测项的测试时长,测试轮次等消息。然后根据已完成的待测项的测试结果,生成单板当前的硬件自检结果,根据已完成的待测项、未完成的待测项和进行中的待测项生成单板当前的硬件自检测试状态。然后将测试状态和/或硬件自检结果进行编排和打包,生成单板当前的测试结果文件,并将测试结果文件反馈给主控单板,供主控单板解析测试结果文件进行测试结果的回显,便于运维人员准确获取单板的硬件自检结果。通过根据当前测试状态和/或硬件自检结果进行测试结果文件生成,使主控单板能够准确的对单板硬件自检的结果进行回显,便于运维人员对硬件自检进行准确的监控和测试结果分析。When the board uses the hardware self-test script to perform hardware self-test, it obtains the hardware data that needs to be used in the test process according to the detection sequence of the items to be tested in the hardware script, tests each item to be tested, and records the completed results. The demerits of the items to be tested are marked as success, failure, timeout, etc., and the test duration, test rounds and other information of the completed items to be tested are counted. Then, based on the test results of the completed items to be tested, the current hardware self-test results of the single board are generated, and the current hardware self-test results of the single board are generated based on the completed items to be tested, unfinished items to be tested, and ongoing items to be tested. Check test status. Then the test status and/or hardware self-test results are arranged and packaged, the current test result file of the board is generated, and the test result file is fed back to the main control board for the main control board to parse the test result file and analyze the test results. The echo is used to facilitate operation and maintenance personnel to accurately obtain the hardware self-test results of the board. By generating test result files based on the current test status and/or hardware self-test results, the main control board can accurately echo the results of the single-board hardware self-test, which facilitates operation and maintenance personnel to accurately monitor the hardware self-test. and analysis of test results.
测试状态可以包括:板卡状态,即单板的运行状态,可用于区分单板当前处于空闲模式还是测试模式;任务状态,即进行硬件自检的单板的待测项的执行情况,已测试和未测试条目;测试结果:即进行硬件自检的单板的待测项执行结果,测试通过和失败条目等。The test status can include: board status, that is, the running status of the single board, which can be used to distinguish whether the single board is currently in idle mode or test mode; task status, that is, the execution status of the test items of the single board that performs hardware self-test, and has been tested and untested items; test results: that is, the execution results of the test items of the single board undergoing hardware self-test, test pass and failed items, etc.
进一步地,向主控单板反馈测试结果文件,包括:根据主控单板的查询指令向主控单板反馈测试结果文件,或根据预设程序周期性生成并向主控单板反馈测试结果文件。Further, feeding back the test result file to the main control board includes: feeding back the test result file to the main control board according to the query instruction of the main control board, or periodically generating and feeding back the test result file to the main control board according to a preset program. document.
在单板根据硬件自检脚本进行硬件自检的过程中,主控单板可以向单板下发查询指令,单板在接收到查询指令后,根据单板当前的测试状态和硬件自检结果生成一份测试结果文件,并将测试结果文件反馈给主控单板。为了保证测试结果反馈的时效性和稳定性,还可以在工装自检补丁包中打包预设的测试结果反馈程序,单板根据测试结果反馈程序,按照一定的时间间隔,例如,10S、20S或30S等,对生成的测试结果文件进行周期性的更新,并将更新后的测试结果文件反馈给主控单板。通过根据查询指令或者预设周期进行测试结果文件反馈,提高测试结果反馈的时效性。During the process of the board performing hardware self-test according to the hardware self-test script, the main control board can issue a query command to the board. After receiving the query command, the board will perform the hardware self-check according to the current test status of the board and the hardware self-check results. Generate a test result file and feed the test result file back to the main control board. In order to ensure the timeliness and stability of the test result feedback, a preset test result feedback program can also be packaged in the tooling self-test patch package. The board will feedback the test result according to the program at a certain time interval, for example, 10S, 20S or 30S, etc., periodically update the generated test result file, and feed the updated test result file back to the main control board. Improve the timeliness of test result feedback by providing test result file feedback based on query instructions or preset cycles.
主控单板还可以根据接收到的指令,向单板下发暂停自检指令、恢复自检指令、开始自检指令和终止自检指令等测试命令,对单板的硬件自检进程进行干涉,以进一步提升单板硬件自检的灵活性。The main control board can also issue test commands such as pause self-test instructions, resume self-test instructions, start self-test instructions, and terminate self-test instructions to the single board according to the received instructions, to interfere with the hardware self-test process of the single board. , to further improve the flexibility of single-board hardware self-test.
综上,单板根据硬件自检脚本进行硬件自检的过程中,单板与主控单板交互的流程可以参考图2:To sum up, during the process of the board performing hardware self-test according to the hardware self-test script, the interaction process between the board and the main control board can be referred to Figure 2:
主控单板的产品管理配置(Product Management Configuration,PMCFG)模块通过工装通信进程(Product Communication Process,PTCP)向下发硬件自检指令,单板根据硬件自检指令将模式从现网模式切换为工装自检模式。工装版本运行起来后,单板会与主控单板的PTCP进程进行握手建链,单板与主控单板之间进行单板信息同步、时间信息同步、请求文件传输协议(File Transfer Protocol,FTP)服务器的用户名及密码信息,同时单板通过约定消息号与主控单板直接进行10s一次的保活通信。本实施例中以主控单板与一个单板进行通信为例进行说明,在实际应用中,一个主控单板可以与多个单板进行通信,本实施例对与主控单板进行通信的单板的数量不做限制。The Product Management Configuration (PMCFG) module of the main control board sends hardware self-test instructions to the device through the Product Communication Process (PTCP). The board switches the mode from live network mode to Work equipment self-test mode. After the tooling version is run, the board will shake hands with the PTCP process of the main control board to establish a link. The board and the main control board will synchronize board information, time information, and request File Transfer Protocol. FTP) server user name and password information. At the same time, the board directly conducts keep-alive communication with the main control board once every 10 seconds through the agreed message number. In this embodiment, the communication between the main control single board and one single board is used as an example. In practical applications, one main control single board can communicate with multiple single boards. In this embodiment, the main control single board communicates with the main control single board. There is no limit on the number of boards.
在单板进行硬件自检过程中,PTCP进程根据接收到的指令向单板下发硬件相应的指令,并将单板反馈的信息反馈给PMCFG模块。其中,PTCP进程接收到的指令如果是查询指令,则立即将单板上传的测试结果数据回复给PMCFG模块;接收到的指令如果是测试命令(包括开始自检指令、暂停自检指令、恢复自检指令等),由PTCP解析后下发给单板的自检线 程处理。During the hardware self-test of the board, the PTCP process issues corresponding hardware instructions to the board according to the received instructions, and feeds back the information fed back by the board to the PMCFG module. Among them, if the command received by the PTCP process is a query command, it will immediately reply the test result data uploaded by the single board to the PMCFG module; if the command received is a test command (including start self-test command, pause self-test command, resume self-test command Inspection instructions, etc.), which are parsed by PTCP and sent to the self-inspection line of the board. process processing.
PTCP进程向单板下发测试指令的时候,单板在接收到测试指令后,对自身当前是否处于硬件自检状态进行检测,若当前处于硬件自检状态,则直接将根据当前记录的测试状态和/或硬件测试结果生成的测试结果文件反馈到PTCP进程,供PMCFG根据PTCP进程反馈的测试结果文件对单板当前的测试状态进行更新,此时,用户可以通过主控单板下发停止测试命令,单板中的自检模块会处理完已经下发的测试项后终止测试套件,并更新数据库,PMCFG刷新测试状态并回显给用户。When the PTCP process issues a test command to the board, after receiving the test command, the board will detect whether it is currently in the hardware self-check state. If it is currently in the hardware self-check state, it will directly perform the test according to the currently recorded test state. And/or the test result file generated by the hardware test result is fed back to the PTCP process, so that PMCFG can update the current test status of the board based on the test result file fed back by the PTCP process. At this time, the user can stop the test through the main control board. command, the self-test module in the board will terminate the test suite after processing the issued test items, and update the database. PMCFG will refresh the test status and display it back to the user.
单板检测到自身还未处理硬件自检状态的情况下,启动工装版本的自检模块,由该自检模块解析并下发硬件自检脚本到单板上,比如硬件自检脚本设定了分组模式则按分组执行待测项,若脚本设置了串行模式则按照串行规则执行待测项,期间自检模块按照硬件自检脚本设定的规则执行测试项的下发和运行,维护测试序列调度,并根据接收到的指令或者预设时间间隔进行测试结果文件反馈,直至单板完成硬件自检。When the board detects that it has not processed the hardware self-check status, it starts the tooling version of the self-check module. The self-check module parses and delivers the hardware self-check script to the board. For example, the hardware self-check script is set In group mode, the items to be tested are executed according to the group. If the script sets the serial mode, the items to be tested are executed according to the serial rules. During the period, the self-test module executes the delivery and operation of the test items according to the rules set by the hardware self-test script. Maintenance The test sequence is scheduled and the test result file feedback is performed according to the received instructions or the preset time interval until the single board completes the hardware self-test.
在进行测试结果文件上传的过程中,由于单板已经向主控请求到FTP服务器的用户名及密码信息,工装进程可以将处理好的测试结果文件以及故障定位所用的其他日志,使用FTP传输技术定时上送到主控单板,自检日志根据单板的地址进行存储,用于研发定位故障使用,在接收到查询指令时,主控直接解析测试结果文件进行测试结果回显。During the process of uploading the test result file, since the board has requested the user name and password information of the FTP server from the main control, the tooling process can use FTP transmission technology to transfer the processed test result file and other logs used for fault location. It is sent to the main control board regularly. The self-test log is stored according to the address of the board and is used for research and development to locate faults. When receiving the query command, the main control directly parses the test result file and echoes the test results.
在根据硬件自检脚本进行硬件自检后,还包括:接收主控单板的现网模式切换指令;根据现网模式切换指令进行重启,重新恢复到进入工装自检模式前的现网模式。After performing hardware self-test according to the hardware self-test script, it also includes: receiving the live network mode switching command of the main control board; restarting according to the live network mode switching command, and restoring to the live network mode before entering the tooling self-checking mode.
主控单板在检测到单板完成硬件自检后,会根据接收到的指令或者预设程序,向单板下发现网模式切换指令,使单板将自身的模式切换会进行硬件自检前的现网模式。单板接收到主控单板的现网模式切换指令后,解除工装自检补丁包的加载激活,将安装文件的调用路径修改为现网模式的文件存储地址,然后通过重启的方式加载激活现网模式对应的安装文件,切换回硬件自检前的现网模式,并恢复原有业务的运行。通过在硬件自检完毕后及时切换回硬件自检前的现网模式,并恢复原有业务的运行,避免硬件自检对单板运行的业务造成过大的影响。After the main control board detects that the board has completed the hardware self-test, it will find the network mode switching command to the board according to the received instructions or preset program, so that the board will switch its own mode and perform the hardware self-check. live network mode. After receiving the live network mode switching command from the main control board, the single board deactivates the loading and activation of the tooling self-test patch package, changes the calling path of the installation file to the file storage address of the live network mode, and then loads and activates the live network mode by restarting. Install the installation file corresponding to the network mode, switch back to the live network mode before the hardware self-test, and resume the original business operation. By promptly switching back to the live network mode before the hardware self-test after the hardware self-test is completed, and restoring the original business operation, the hardware self-test can be avoided from having an excessive impact on the services running on the single board.
此外,上面各种方法的步骤划分,只是为了描述清楚,实现时可以合并为一个步骤或者对某些步骤进行拆分,分解为多个步骤,只要包括相同的逻辑关系,都在本专利的保护范围内;对算法中或者流程中添加无关紧要的修改或者引入无关紧要的设计,但不改变其算法和流程的核心设计都在该专利的保护范围内。In addition, the steps of the various methods above are divided just for the purpose of clear description. During implementation, they can be combined into one step or some steps can be split into multiple steps. As long as they include the same logical relationship, they are all protected by this patent. Within the scope; adding insignificant modifications or introducing insignificant designs to the algorithm or process, but not changing the core design of the algorithm and process are within the scope of protection of this patent.
本申请实施例的另一方面涉及一种单板,参考图3,包括:Another aspect of the embodiment of the present application relates to a single board. Referring to Figure 3, it includes:
获取模块301,用于接收主控单板下发的硬件自检指令。The acquisition module 301 is used to receive hardware self-test instructions issued by the main control board.
加载模块302,用于根据硬件自检指令,加载预先缓存的工装自检补丁包;其中,工装自检补丁包中包括预先打包的硬件自检脚本。The loading module 302 is configured to load a pre-cached tooling self-checking patch package according to the hardware self-checking instructions; wherein the tooling self-checking patch package includes a prepackaged hardware self-checking script.
自检模块303,用于根据预设程序进行重启进入工装自检模式,根据硬件自检脚本进行硬件自检,并向主控单板反馈自检结果。The self-test module 303 is used to reboot into the tooling self-test mode according to the preset program, perform hardware self-test according to the hardware self-test script, and feed back the self-test results to the main control board.
本实施例为与方法实施例相对应的装置实施例,本实施例可与方法实施例互相配合实施。方法实施例中提到的相关技术细节在本实施例中依然有效,为了减少重复,这里不再赘述。相应地,本实施例中提到的相关技术细节也可应用在方法实施例中。This embodiment is a device embodiment corresponding to the method embodiment, and this embodiment can be implemented in cooperation with the method embodiment. The relevant technical details mentioned in the method embodiment are still valid in this embodiment. In order to reduce duplication, they will not be described again here. Correspondingly, the relevant technical details mentioned in this embodiment can also be applied to the method embodiment.
本实施例中所涉及到的各模块均为逻辑模块,在实际应用中,一个逻辑单元可以是一个 物理单元,也可以是一个物理单元的一部分,还可以以多个物理单元的组合实现。此外,为了突出本申请的创新部分,本实施例中并没有将与解决本申请所提出的技术问题关系不太密切的单元引入,但这并不表明本实施例中不存在其它的单元。Each module involved in this embodiment is a logic module. In practical applications, a logic unit can be a A physical unit can also be a part of a physical unit, or can be implemented as a combination of multiple physical units. In addition, in order to highlight the innovative part of this application, units that are not closely related to solving the technical problems raised in this application are not introduced in this embodiment, but this does not mean that other units do not exist in this embodiment.
本申请实施例的另一方面还提供了一种电子设备,参考图4,包括:包括至少一个处理器401;以及,与至少一个处理器401通信连接的存储器402;其中,存储器402存储有可被至少一个处理器401执行的指令,指令被至少一个处理器401执行,以使至少一个处理器401能够执行上述任一方法实施例所描述的自动化检测方法。Another aspect of the embodiment of the present application also provides an electronic device. Referring to Figure 4, it includes: at least one processor 401; and a memory 402 communicatively connected to the at least one processor 401; wherein the memory 402 stores data that can be Instructions executed by at least one processor 401, the instructions are executed by at least one processor 401, so that at least one processor 401 can execute the automated detection method described in any of the above method embodiments.
其中,存储器402和处理器401采用总线方式连接,总线可以包括任意数量的互联的总线和桥,总线将一个或多个处理器401和存储器402的各种电路连接在一起。总线还可以将诸如外围设备、稳压器和功率管理电路等之类的各种其他电路连接在一起,这些都是本领域所公知的,因此,本文不再对其进行进一步描述。总线接口在总线和收发机之间提供接口。收发机可以是一个元件,也可以是多个元件,比如多个接收器和发送器,提供用于在传输介质上与各种其他装置通信的单元。经处理器401处理的数据通过天线在无线介质上进行传输,进一步,天线还接收数据并将数据传输给处理器401。The memory 402 and the processor 401 are connected using a bus. The bus may include any number of interconnected buses and bridges. The bus connects various circuits of one or more processors 401 and the memory 402 together. The bus may also connect various other circuits together such as peripherals, voltage regulators, and power management circuits, which are all well known in the art and therefore will not be described further herein. The bus interface provides the interface between the bus and the transceiver. A transceiver may be one element or may be multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. The data processed by the processor 401 is transmitted on the wireless medium through the antenna. Furthermore, the antenna also receives the data and transmits the data to the processor 401.
处理器401负责管理总线和通常的处理,还可以提供各种功能,包括定时,外围接口,电压调节、电源管理以及其他控制功能。而存储器402可以被用于存储处理器401在执行操作时所使用的数据。Processor 401 is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. The memory 402 may be used to store data used by the processor 401 when performing operations.
本申请实施例的另一方面还提供了一种计算机可读存储介质,存储有计算机程序。计算机程序被处理器执行时实现上述方法实施例。Another aspect of the embodiments of the present application also provides a computer-readable storage medium storing a computer program. The above method embodiments are implemented when the computer program is executed by the processor.
即,本领域技术人员可以理解,实现上述实施例方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。That is, those skilled in the art can understand that all or part of the steps in the methods of the above embodiments can be completed by instructing relevant hardware through a program. The program is stored in a storage medium and includes several instructions to cause a device ( It may be a microcontroller, a chip, etc.) or a processor (processor) that executes all or part of the steps of the methods described in various embodiments of this application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program code. .
本领域的普通技术人员可以理解,上述各实施例是实现本申请的具体实施例,而在实际应用中,可以在形式上和细节上对其作各种改变,而不偏离本申请的范围。 Those of ordinary skill in the art can understand that the above-mentioned embodiments are specific embodiments for implementing the present application, and in actual applications, various changes can be made in form and details without departing from the scope of the present application.

Claims (11)

  1. 一种自动化检测方法,包括:An automated detection method including:
    接收主控单板下发的硬件自检指令;Receive hardware self-test instructions issued by the main control board;
    根据所述硬件自检指令,加载预先缓存的工装自检补丁包;其中,所述工装自检补丁包中包括预先打包的硬件自检脚本;Load a pre-cached tooling self-checking patch package according to the hardware self-checking instructions; wherein the tooling self-checking patch package includes a prepackaged hardware self-checking script;
    根据预设程序进行重启进入工装自检模式,根据所述硬件自检脚本进行硬件自检,并向所述主控单板反馈自检结果。Restart according to the preset program to enter the tooling self-test mode, perform hardware self-test according to the hardware self-test script, and feed back the self-test results to the main control board.
  2. 根据权利要求1所述的自动化检测方法,其中,所述硬件自检脚本可以根据以下方式生成:The automated detection method according to claim 1, wherein the hardware self-test script can be generated in the following manner:
    获取单板的单板类型;Get the board type of the board;
    根据单板类型与检测项目的对应关系,确定所述单板的标准待测项;Determine the standard test items of the single board according to the corresponding relationship between the single board type and the test items;
    根据所述单板的标准待测项,生成所述硬件自检脚本。The hardware self-test script is generated according to the standard test items of the single board.
  3. 根据权利要求2所述的自动化检测方法,其中,所述根据所述单板的标准待测项,生成所述硬件自检脚本,包括:The automated detection method according to claim 2, wherein generating the hardware self-test script according to the standard test items of the single board includes:
    获取当前待检测的硬件潜在故障;Obtain the potential hardware fault currently to be detected;
    根据所述硬件潜在故障,获取与所述硬件潜在故障相关的目标待测项;According to the potential hardware failure, obtain target test items related to the potential hardware failure;
    根据所述目标待测项,生成所述硬件自检脚本。The hardware self-test script is generated according to the target item to be tested.
  4. 根据权利要求2所述的自动化检测方法,其中,所述根据所述单板的标准待测项,生成所述硬件自检脚本,包括:The automated detection method according to claim 2, wherein generating the hardware self-test script according to the standard test items of the single board includes:
    获取所述单板的预设测试时长;Obtain the preset test duration of the single board;
    根据所述预设测试时长及所述硬件自检脚本包含的待测项总数,确定所述硬件自检脚本单次检测的待测项数量;According to the preset test duration and the total number of items to be tested included in the hardware self-test script, determine the number of items to be tested in a single test by the hardware self-test script;
    根据所述单次检测的待测项数量,对所述硬件自检脚本进行测试并行度设置。According to the number of items to be tested in a single detection, test parallelism is set for the hardware self-test script.
  5. 根据权利要求1所述的自动化检测方法,其中,所述根据所述硬件自检指令,加载预先缓存的工装自检补丁包,包括:The automated detection method according to claim 1, wherein said loading a pre-cached tooling self-test patch package according to the hardware self-test instruction includes:
    根据所述硬件自检指令,将单板的文件调用路径从当前运行的现网模式的安装文件存储路径,修改为所述工装自检模式的安装文件存储路径。According to the hardware self-test instruction, the file calling path of the single board is modified from the installation file storage path of the currently running live network mode to the installation file storage path of the tooling self-test mode.
  6. 根据权利要求1所述的自动化检测方法,其中,所述根据所述硬件自检脚本进行硬件自检,并向所述主控单板反馈自检结果,包括:The automated detection method according to claim 1, wherein the step of performing hardware self-test according to the hardware self-test script and feeding back the self-test results to the main control board includes:
    获取单板当前的测试状态和/或自检结果,并根据所述当前的测试状态和/或自检结果生成测试结果文件;Obtain the current test status and/or self-test results of the single board, and generate a test result file based on the current test status and/or self-test results;
    向所述主控单板反馈所述测试结果文件,供所述主控单板解析所述测试结果文件进行测试结果的回显。The test result file is fed back to the main control board, so that the main control board can parse the test result file and echo the test results.
  7. 根据权利要求6中所述的自动化检测方法,其中,所述向所述主控单板反馈所述测试结果文件,包括:The automated detection method according to claim 6, wherein the feedback of the test result file to the main control board includes:
    根据所述主控单板的查询指令向所述主控单板反馈所述测试结果文件,或根据预设程序周期性生成并向所述主控单板反馈所述测试结果文件。The test result file is fed back to the main control board according to the query instruction of the main control board, or the test result file is periodically generated and fed back to the main control board according to a preset program.
  8. 根据权利要求1至7中任一项所述的自动化检测方法,其中,在所述根据所述硬件自检脚本进行硬件自检后,还包括: The automated detection method according to any one of claims 1 to 7, wherein after the hardware self-test is performed according to the hardware self-test script, it further includes:
    接收所述主控单板的现网模式切换指令;Receive the live network mode switching instruction of the main control board;
    根据所述现网模式切换指令进行重启,重新恢复到进入所述工装自检模式前的现网模式。Restart according to the current network mode switching instruction and restore to the current network mode before entering the tooling self-test mode.
  9. 一种单板,包括:A single board, including:
    获取模块,设置为接收主控单板下发的硬件自检指令;The acquisition module is set to receive the hardware self-test instructions issued by the main control board;
    加载模块,设置为根据所述硬件自检指令,加载预先缓存的工装自检补丁包;其中,所述工装自检补丁包中包括预先打包的硬件自检脚本;A loading module configured to load a pre-cached tooling self-checking patch package according to the hardware self-checking instructions; wherein the tooling self-checking patch package includes a prepackaged hardware self-checking script;
    自检模块,设置为根据预设程序进行重启进入工装自检模式,根据所述硬件自检脚本进行硬件自检,并向所述主控单板反馈自检结果。The self-test module is configured to reboot into the tooling self-test mode according to a preset program, perform hardware self-test according to the hardware self-test script, and feed back the self-test results to the main control board.
  10. 一种电子设备,包括:An electronic device including:
    至少一个处理器;以及,at least one processor; and,
    与所述至少一个处理器通信连接的存储器;其中,a memory communicatively connected to the at least one processor; wherein,
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如权利要求1至8中任一项所述的自动化检测方法。The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor, so that the at least one processor can perform as claimed in any one of claims 1 to 8 The automated detection method described above.
  11. 一种计算机可读存储介质,存储有计算机程序,其中,所述计算机程序被处理器执行时实现权利要求1至8中任一项所述的自动化检测方法。 A computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the automated detection method according to any one of claims 1 to 8 is implemented.
PCT/CN2023/075287 2022-03-30 2023-02-09 Automatic detection method, single board, electronic device and storage medium WO2023185266A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210356511.1A CN116938779A (en) 2022-03-30 2022-03-30 Automatic detection method, single board, electronic device and storage medium
CN202210356511.1 2022-03-30

Publications (1)

Publication Number Publication Date
WO2023185266A1 true WO2023185266A1 (en) 2023-10-05

Family

ID=88199102

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/075287 WO2023185266A1 (en) 2022-03-30 2023-02-09 Automatic detection method, single board, electronic device and storage medium

Country Status (2)

Country Link
CN (1) CN116938779A (en)
WO (1) WO2023185266A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117453472A (en) * 2023-12-22 2024-01-26 荣耀终端有限公司 Single board testing method, single board testing cabinet and computer readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1737773A (en) * 2004-08-16 2006-02-22 上海华为技术有限公司 Method and system for monitoring embedded system on line
US9183071B1 (en) * 2013-12-02 2015-11-10 Leidos, Inc. System and method for automated hardware compatibility testing
CN112817801A (en) * 2019-11-15 2021-05-18 中兴通讯股份有限公司 Single board detection method, computer equipment and computer readable medium
CN113176971A (en) * 2021-03-11 2021-07-27 新华三信息安全技术有限公司 Single board self-checking method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1737773A (en) * 2004-08-16 2006-02-22 上海华为技术有限公司 Method and system for monitoring embedded system on line
US9183071B1 (en) * 2013-12-02 2015-11-10 Leidos, Inc. System and method for automated hardware compatibility testing
CN112817801A (en) * 2019-11-15 2021-05-18 中兴通讯股份有限公司 Single board detection method, computer equipment and computer readable medium
CN113176971A (en) * 2021-03-11 2021-07-27 新华三信息安全技术有限公司 Single board self-checking method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117453472A (en) * 2023-12-22 2024-01-26 荣耀终端有限公司 Single board testing method, single board testing cabinet and computer readable storage medium

Also Published As

Publication number Publication date
CN116938779A (en) 2023-10-24

Similar Documents

Publication Publication Date Title
CN102609281B (en) Distributed software patch update method and system
CN111881014B (en) System test method, device, storage medium and electronic equipment
CN109508295B (en) Block chain consensus algorithm testing method and device, calculating device and storage medium
US7337361B2 (en) Test harness for enterprise application integration environment
CN102799519A (en) Automatic test method for cluster file system
WO2023185266A1 (en) Automatic detection method, single board, electronic device and storage medium
CN102035896A (en) TTCN-3-based distributed testing framework applicable to software system
EP4030728A1 (en) Software defined networking control plane resiliency testing
CN110502428A (en) Code test method, device, computer equipment and storage medium
WO2020253045A1 (en) Configured supplementary processing method and device for data of which forwarding has abnormality, and readable storage medium
KR102141287B1 (en) Fault injection test method and system for vehicle software based on autosar
CN113094238A (en) Method and device for monitoring abnormity of business system
CN110990289B (en) Method and device for automatically submitting bug, electronic equipment and storage medium
US9354962B1 (en) Memory dump file collection and analysis using analysis server and cloud knowledge base
CN117041111A (en) Vehicle cloud function test method and device, electronic equipment and storage medium
CN111124724A (en) Node fault testing method and device of distributed block storage system
CN110750453A (en) HTML 5-based intelligent mobile terminal testing method, system, server and storage medium
Lovrek et al. Improving software maintenance by using agent-based remote maintenance shell
CN115080507A (en) Vehicle fault snapshot data storage method, system, equipment and storage medium
CN110266762B (en) Data uploading method, system, device and storage medium
CN109086200B (en) Effective test framework based on android virtual machine modification
CN115543491A (en) Microservice processing method and device
CN110908918A (en) Unit testing method and device for multiple interdependent node
JP2012181737A (en) Computer system
CN105320512A (en) Method and device for distributing trunk permission

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23777645

Country of ref document: EP

Kind code of ref document: A1