Universal electronic board card automatic commissioning and testing method based on windows environment
By combining software automation technology with configuration and recording, using unique identification and image recognition, the high degree of automation of electronic board adjustment is achieved, the difficulty of non-standard control recognition is solved, and the degree of automation and efficiency of industrial production is improved.
Patent Information
- Application Number
- CN202411966686.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-05-30
AI Technical Summary
In industrial production, especially in the military electronic board testing process, the degree of automation is low, the degree of manual participation is high, and the recognition of non-standard controls is difficult, resulting in narrow usage scenarios and insufficient processing of text information in image recognition, which limits the degree of automation of production.
The general electronic board automatic debugging method based on the Windows environment is adopted, combined with software automation technology based on configuration and recording, and the software recording operation is deployed and automated scripts are formed. Unique identification and image recognition technology are used to achieve collaborative operation of software controls and hardware, integrating delay function and power control interface, improving the reliability and applicability of automation.
It realizes high degree of automation electronic board testing, simple operation, high repeatability, wide range of applicable scenarios, can handle non-standard controls, and improves the automation rate and efficiency of industrial production.
Smart Images

Figure CN120066939A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of automatic debugging of electronic boards, and particularly relates to a method for automatically debugging a general electronic board based on the Windows environment. Background Art
[0002] With the continuous progress of software technology, software execution automation (RPA), or software execution robotics, has made remarkable development in recent years. Currently, two main technical methods are adopted in this field: First, customizing the automated execution process based on configuration (script language programming); Second, customizing the automated execution process based on control recognition (operation recording). Both of the above methods have their own characteristics: The first one based on configuration or script language programming has the advantage of strong certainty, but the disadvantages of complex use, time-consuming, and high usage threshold. The second one based on control recognition or operation recording has the advantages of simple use, easy to get started, and can be quickly applied, but the disadvantages are that various information and results cannot be processed flexibly, precisely, and comprehensively during the recording process, resulting in a narrow usage scenario. Moreover, both technologies have the problem that non-standard controls cannot be recognized, and image recognition needs to be used as a supplement. However, image recognition has inherent deficiencies in processing text information, resulting in limited usage scenarios in industrial production, especially in the debugging production of military electronic boards. The manual participation is high and the production software is limited. It is urgent to solve the problem of debugging automation in the production process. Summary of the Invention
[0003] The present invention aims to implement a method for software automation. This method includes two software, namely deployment software and execution software. Functionally, it combines two common software automation technologies based on configuration and recording. At the same time, for the industrial direction, especially in the production fields of electronic boards and electronic boards, a number of function adaptations are made. On the one hand, it reduces the usage scenario limitations of traditional software automation technologies, and on the other hand, it improves the reliability and maturity of software automation applications in the industrial field, providing a powerful tool for the industrial production direction, especially for the automation of electronic board debugging.
[0004] In view of this, according to one aspect of the embodiments of the present invention, a method for automatically debugging a general electronic board based on the Windows environment is provided. The automatic debugging method is implemented based on two functional software. The functional software includes deployment software for recording operations and execution software for reproducing operations. The deployment software is used for entering operation information, recording operations, and forming an automated script. The operation information entry is used to regard the same information that appears during the recording of electronic board information as a variable. During the process of executing the formed automated script on another electronic board, the latest physical information is used to replace the variable, so as to realize the universality of the script formed by the deployment software for different physical objects.
[0005] The operation recording is used to write the mouse and keyboard operation process of the software controls related to debugging into the automation script in the format of a unique identifier based on the automatic recognition method of software controls under Windows; after selecting the control by circle selection or taking a screenshot, click the keyboard key and a dialog box will pop up. Enter the expected result and the unexpected result in the dialog box, and write the operation into the automation script.
[0006] Optionally, the unique identifier is obtained based on the following method: when the mouse is placed above the software control related to debugging for a preset time, circle select the control, and use an algorithm to make a unique mark on the control. Then, the operation events of the mouse on the control are written into the automation script in the format of event name + control unique identifier.
[0007] Optionally, the unique identifier is also obtained based on the following method: for non-standard controls that cannot be recognized by circle selection, perform a partial screen capture operation by clicking a preset key on the keyboard. Then, the operation events of the mouse on the picture area are written into the automation script in the format of event name + picture name.
[0008] Optionally, the deployed software is set with an operation delay function to wait for the operation process of the electronic board at a specific time to achieve the timing matching of software and hardware; the delay function is recorded in the automation script.
[0009] Optionally, the deployed software is also set with a power control interface. By connecting to a DC programmable power supply, set the voltage and overcurrent of the DC programmable power supply in the power control window of the deployed software interface, and read the current voltage and current values of the DC programmable power supply; the operations on the DC programmable power supply are recorded in the automation script.
[0010] Optionally, the execution software reads the automation script generated by the deployed software and repeats the corresponding operations according to the automation script; for the controls in the software, the execution software identifies and executes the corresponding control events through the unique identifier of the controls in the script; for the pictures in the script, the execution software uses an image recognition and matching positioning algorithm to find the corresponding part of the picture in the software interface related to debugging, and then performs a click control operation on the software related to debugging.
[0011] Optionally, the execution software is configured with an information entry function, regards the same information that appears as a variable, and replaces the variable with the latest physical information when executing the formed automation script on another electronic board.
[0012] Optionally, the execution software realizes the coordinated and matching operation of software and hardware physical objects during the debugging process of the electronic board through the delay function, information prompt function, and programmable power supply control function.
[0013] Optionally, the recording and reproduction operation functions include opening and switching multiple software to be operated. When the mouse hovers over the controls in the software, it triggers the automatic selection of the operation object, and then records events such as the mouse clicks and scroll wheel operations on the operation object. It can also automatically record keyboard operations, including common combination key operations and hotkey operations.
[0014] Optionally, the configuration and control functions include the ability to input information about electronic boards in the deployed software, the running software, and other information required for debugging.
[0015] Advantages of the present invention:
[0016] 1. This method has a high degree of automation and is easy to operate. This method generally uses software automation technology based on recording, without the need for operators to learn the automation configuration process. The software automatically records the execution process of the operator and automatically calculates the operation interval time, ensuring a smooth and continuous operation recording script process, and an accurate reproduction process, consistent with manual operations. Thus, it truly realizes one-time recording and repeated utilization, with a low usage threshold.
[0017] 2. This method repeats the automation process with high reliability, accuracy, and a high script reuse rate. While based on recording operations, this method incorporates an information entry function based on the configuration concept. Through the processing of information, it realizes the reuse of the same type of automation process scripts and accurate result interpretation.
[0018] 3. This method has a wide range of application scenarios. Due to the integration of image recognition and positioning functions, this method is not restricted by controls. In principle, equivalent to the visual function of humans, this method can be used for the automation operation of any software.
[0019] 4. This method is particularly suitable for industrial production scenarios that combine software and hardware operations. Due to the integration of functions such as information prompts, accurate result value judgment, and programmable power supply control interfaces, the industrial scenarios that originally required the combination of software and hardware operations are connected in series by a single automated software main line, greatly improving the automation rate and efficiency. Brief Description of the Drawings
[0020] Figure 1 is a flowchart of the method adopted for the deployment function of the present invention;
[0021] Figure 2 is a flowchart of the method adopted for the execution function of the present invention. Detailed Description of the Invention
[0022] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0023] According to one aspect of the embodiments of the present invention, a general electronic board automatic debugging method based on the Windows environment is provided. The automatic debugging method is implemented based on two functional software, including a deployment software for recording operations and an execution software for reproducing operations; the deployment software is used for operation information entry, operation recording, and forming an automation script; the operation information entry is used to regard the same information that appears as a variable during the process of recording the electronic board information, and use the latest physical information to replace the variable during the process of executing the formed automation script on another electronic board, so as to realize the universality of the script formed by the deployment software for different physical objects.
[0024] The operation recording is used to write the mouse and keyboard operation process of the software controls related to debugging into the automation script in the format of a unique identifier based on the automatic recognition method of software controls under Windows; after selecting the control by circle selection or taking a screenshot, click the keyboard key and a dialog box will pop up, and enter the expected result and the unexpected result in the dialog box, and write the operation into the automation script.
[0025] Further, the unique identifier is obtained based on the following method: when the mouse is placed above the software control related to debugging for a preset time, circle select the control, and make a unique mark on the control through an algorithm, and then write the operation event of the mouse on the control into the automation script in the format of event name + control unique identifier.
[0026] Further, the unique identifier is also obtained based on the following method: for non-standard controls that cannot be recognized by circle selection, perform a partial screen capture operation by clicking a preset key on the keyboard, and then write the operation event of the mouse on the picture area into the automation script in the format of event name + picture name.
[0027] Further, an operation delay function is set in the deployment software, which is used to wait for the running process of the electronic board at a specific time to achieve the timing matching of software and hardware; the delay function is recorded in the automation script.
[0028] Furthermore, the deployment software is also provided with a power control interface. By connecting to a direct current programmable power supply, the voltage and overcurrent of the direct current programmable power supply are set in the power control window of the deployment software interface, and the current voltage and current values of the direct current programmable power supply are read. The operations on the direct current programmable power supply are recorded in the automation script.
[0029] Furthermore, the execution software reads the automation script generated by the deployment software and repeatedly executes the corresponding operations according to the automation script. For the controls in the software, the execution software identifies and executes the corresponding control events through the unique identifiers of the controls in the script. For the pictures in the script, the execution software uses an image recognition and matching localization algorithm to find the corresponding positions of the pictures in the software interface related to debugging, and then performs click control operations on the software related to debugging.
[0030] Furthermore, the execution software is configured with an information input function. The same information that appears is regarded as a variable, and during the process of executing the formed automation script on other electronic boards, the latest physical information is used to replace the variable.
[0031] Furthermore, the execution software realizes the coordinated and matching operation of the software and the physical hardware during the debugging process of the electronic board through the delay function, information prompt function, and programmable power supply control function.
[0032] Furthermore, the recording and reproduction operation function includes opening and switching multiple software to be operated. When the mouse hovers over the controls in the software, it triggers the automatic selection of the operation object, and then records the events such as the mouse clicking and scrolling on the operation object. It can also automatically record keyboard operations, including common combination key operations and hot key operations.
[0033] Furthermore, the configuration and control function includes being able to input information about the electronic board in the deployment software, the software to be run, and other information required for debugging, etc.
[0034] This method takes software automation as the main line function. By realizing functions such as automatic control of controls, automatic utilization of product information, automatic calculation of time sequences, and real-time display of practical operation information, it innovatively realizes the industrial production automation of electronic board debugging. This method includes two functional software. One is the deployment software used to record operations, and the other is the execution software used to reproduce operations. Compared with general automation software based on configuration operations, this method not only has the functions of recording and reproducing operations, but also can open and switch multiple software simultaneously. This method uses an image recognition algorithm. By integrating the function of image capture during the software operation process, it records the operations on the images, and solves the problem of inability to recognize non-standard controls in principle, so that it can record and reproduce the general operations on any local interface in the software. Compared with general automation software based on recorded operations, this method has a series of configuration and control functions, including automatic recording of information related to physical objects, automatic recognition of relevant information using algorithms, and corresponding operations, realizing the universality and flexibility of physical information configuration operations; in addition, the software can automatically identify the correctness of process data based on the obtained information; to ensure the applicability and universality of operations, the software automatically calculates the operation interval time and uses corresponding calculations and logics. This method has an operation time recording function. By using corresponding calculation logics, it realizes automatic addition of operation delays, making the software automation and the operation of physical objects match and combine in terms of time sequence; in addition, it also has the ability to insert operation prompts and the ability to automatically generate scripts in the background, enabling the connection between software automation and the operation of physical objects, replacing the previous production method of guiding operations through production processes; in addition, it also has functions such as DC power supply setting and automatic repeated execution. The above functions can be widely applied to electronic board debugging, especially providing an applicable, convenient and reliable automation means for electronic board debugging operations.
[0035] The functions of recording and reproducing operations include opening and switching multiple software to be operated. When the mouse stays on a control in the software for more than 3 seconds, it can trigger automatic selection of the operation object, and then record events such as mouse clicks and scroll wheel operations on the operation object. It can also automatically record keyboard operations, including common combination key operations and hot key operations. This method can recognize non-standard controls through image object recognition and automatically record the operation process. All operation records are saved as commands in a fixed format. The operations can be automatically reproduced through the execution software.
[0036] Configuration and control functions, including information that can be input into the electronic board in the deployed software; the running software and other information required for debugging, etc. This method can automatically record this information and automatically replace the information of the new electronic board during the execution process. This method supports the judgment of debugging results during the automation process, including multi-value judgment, interval range value judgment, and image-based judgment. To improve the robustness of the automation process, this method has a time management function, which can autonomously wait for the software control to be visible, automatically calculate the interval time of image click, image judgment, and value judgment operations, and insert a delay waiting. For the purpose of combining with the actual operation of electronic board debugging, this method has basic functions for setting the DC power supply voltage and current, power-on and power-off settings, and monitoring the voltage and current data. For the interaction during the operation of the software and the electronic module, this method can provide a real-time prompt function to maximize the connection of multiple originally independent automated operations. All the above configuration information, result judgment, insertion of delay, insertion of prompt, power supply operation, etc. are saved as fixed-format commands, and the operations can be automatically reproduced by executing the software.
[0037] Embodiment 1
[0038] The described general electronic board automatic debugging method based on the windows environment includes the following technical solutions:
[0039] The present invention provides a general electronic board automatic debugging method based on the windows environment. From the perspective of function differentiation, this method is divided into two software, namely deployment and execution.
[0040] 1. Deploy the software, which is used for operation information input and operation recording. The role of the input information is to regard the same information that appears during the recording operation as a variable, and replace the variable with the latest physical information during the repeated execution process. For operation recording, the software control automatic recognition technology under Windows is used. When the mouse is placed above the control for 3 seconds, the control is automatically selected and uniquely marked for the control through an algorithm. After that, the operation events of the mouse on the control are written into the script in the format of "event name + control unique identifier". For non-standard and unrecognizable controls, by clicking the prtsc key on the keyboard, the operation of taking a partial screen shot can be performed. After that, the operation events of the mouse on the picture area are written into the script in the format of "event name + picture name". All actions of the mouse and keyboard are monitored and recorded in real time and written into the script. During the automation process, the result judgment function is divided into picture result and text information result judgment. Among them, the picture result judgment is triggered by clicking the alt key on the keyboard after taking a partial screen shot. And the text information result judgment is triggered by directly clicking the left alt key on the keyboard after enclosing the control, triggering the result judgment interface, and entering multi-value or interval judgment conditions in it. The above result judgment operations are written into the script in the format of "judgment event name + judgment condition or judgment picture name". For the time management during the software usage process, it is mainly divided into the visibility waiting for the control and the delay for the result judgment. During the operation of the control, short-term waiting is continuously performed until the control is visible. For the result judgment, first record the operation time of the previous operation of the result, then record the operation time of the judgment result, and finally calculate the actual operation duration, and then write it into the script in the format of "delay command + delay time". During the recording operation process, for the steps that need to actively provide information to the observer, click the right alt key on the keyboard to trigger the prompt information input interface, enter the prompt information in it, and then write it into the script in the format of "prompt event + prompt content". The deployed software also has a power control interface. By connecting to a DC programmable power supply, the voltage and overcurrent of the power supply can be set in the power control window of the interface, and the current voltage and current value can be read.
[0041] 2. Execute the software, which is used to read the automation script generated by the deployed software and repeatedly execute the corresponding operations according to the script. For the controls in the software, the corresponding control events are identified and executed through the unique identifier of the control in the script. For the pictures in the script, through the image recognition and matching positioning algorithm, the corresponding part of the picture in the software interface is found, and then operations such as point selection control are performed on it. The execution software also has an information input function, aiming to replace the corresponding information during deployment with the latest information, realizing the real-time nature of key information.
[0042] Example 2
[0043] Taking the software automation of a typical electronic board production process as an example, the specific operation steps are as follows:
[0044] As Figure 1 shown, first open the deployment software in the present invention, then enter the product model in the software interface, and click to generate a script. Then fill in the serial number information in the corresponding product serial number information, fill in the software path required during the process in the software information to be operated, and then fill in the additional information required during the process in the user information. Click OK to open all the software to be used.
[0045] Then the recording of software operations is started. If it is necessary to click, for example, the project menu of the simulation software, the mouse can be placed on the simulation software button at the bottom of the desktop. Wait for three seconds, and a blue border will appear on the button. At this time, click the button, and the simulation software will switch to the top layer of the desktop and record this click operation into the script txt file. Similar operations can be performed by clicking the deployment software button to switch to the deployment software interface, then placing the mouse on the voltage setting text box on the interface. Wait until a blue border appears, then click the text box. At this time, type the value to be set on the keyboard, then circle and click the power-on button. At this time, the electronic board card will be powered by controlling the DC power supply, and the above series of operations will be recorded by the script. If it is necessary to open the "Waveform" control in the simulation software at this time, and this control is non-standard and cannot be recognized, then click the prtsc key on the keyboard. At this time, enter the screenshot mode. Move the mouse to the upper left corner of the "Waveform Control", wait for 3 seconds, and the mouse arrow will change into a cross shape. Then move the cross arrow to the lower right corner of the control, and wait for another 3 seconds. The mouse arrow will return to its original state, completing the selection of the screenshot area. If the screenshot is correct, place the mouse inside the area; if it is to be discarded, place the mouse outside the area. After all the screenshots are completed, the screenshot mode will be automatically exited, and then click the "Waveform Control" with the mouse again. The picture click command will be recorded in the script, and the screenshot will be saved in the corresponding file directory.
[0046] After a series of operations are completed, if it is necessary to read the software operation result, the mouse can be placed on the control for result display. If the value to be read is a text value, after the control is framed in blue, directly click the left alt key to pop up the result judgment interface. Enter the expected value or expected range of the result, as well as the error value and error range in the interface, and click OK to complete the result judgment of the text value. If it is necessary to read the result shown in the form of a picture, use the screenshot mode to obtain the picture of the correct result. After exiting the screenshot mode, click the left alt key on the keyboard to complete the result judgment of the picture.
[0047] Then, at the interruption of software execution, if it is necessary to manually operate the hardware board, click the right alt key on the keyboard, and an insertion prompt interface will pop up. Enter, for example: "Prompt: Please control the reset switch on the board, and then click the OK button" in the interface. In this way, during the repeated execution process, every time this step is executed, the prompt text will pop up.
[0048] If you want to enter the product number in the product number text box in the simulation software at this time, you can place the mouse on the text box. After the control is circled in blue, click on the text box with the mouse, and then directly enter the product number value on the keyboard. After completion, move the mouse again, and the just keyboard action will be recorded into the script command. If the product number entered here was previously entered in the deployment software interface, then when the software is executed, this keyboard input value will be replaced with the entered value of the product number during execution.
[0049] The above basically completes the recording of one operation. Then close the deployment software and other software, and then open the execution software. First, click the button to select the script command txt to be executed, and then enter the corresponding content entered in the deployment software that needs to be replaced in real time in the product number information and user information. Then click Run, and the execution software can repeat the recorded operation according to the script. If a prompt text appears, after performing the actual operation according to the text content, click OK, and the execution will continue. Until one reproduction ends. If the result judgment is unqualified during the process, the execution software will interrupt the automation program.
[0050] As described above, only the specific embodiments of the present invention are described in detail, and the unelaborated parts are conventional technologies. However, the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed by the present invention should be covered by the protection scope of the present invention. The protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A general electronic board automatic debugging method based on Windows environment, characterized in that: The automatic debugging method is implemented based on two functional software, which include deployment software for recording operations and execution software for reproducing operations; Deploy software for operation information entry, operation recording, and forming automated scripts; The operation information input is used to treat the same information that appears as a variable during the process of recording the electronic board information, and to replace the variable with the latest physical object information during the process of executing the formed automation script on another electronic board, so as to realize the universality of the script formed by the deployment software for different physical objects; The operation recording is used to write the mouse and keyboard operation process of debugging related software controls into the automation script based on the format of unique identification based on the automatic identification of software controls under Windows; After circling a control or taking a screenshot, click a keyboard button and a dialog box pops up, enter the expected result and the unexpected result in the dialog box, and write the operation into the automation script.
2. The method according to claim 1, characterized in that The unique identifier is obtained in the following manner: when the mouse is placed over a debugging-related software control for a preset time, the control is circled and uniquely marked through an algorithm, and then the mouse operation event on the control is written into the automation script using the format of event name + control unique identifier.
3. The method according to claim 1, characterized in that The unique identifier is also obtained based on the following method: for non-standard controls that cannot be circled and identified, a partial screenshot of the screen is taken by clicking a preset button on the keyboard, and then the mouse operation events on the image area are written into the automation script in the format of event name + image name.
4. The method according to claim 1, characterized in that: An operation delay function is provided in the deployment software, which is used to wait for the operation process of the electronic board at a specific time to achieve timing matching between software and hardware; the delay function is entered into the automation script.
5. The method according to claim 1, characterized in that The deployment software is also provided with a power control interface. By connecting a DC programmable power supply, the voltage and overcurrent of the DC programmable power supply are set in the power control window of the deployment software interface, and the current voltage and current values of the DC programmable power supply are read; the operation of the DC programmable power supply is entered into the automation script.
6. The method according to claim 1, characterized in that The execution software reads the automation script generated by the deployment software, and repeatedly executes corresponding operations according to the automation script; for the controls in the software, the execution software identifies and executes the corresponding control events through the unique identifier of the control in the script; for the pictures in the script, the execution software finds the corresponding part of the picture in the interface of the debugging-related software through the image recognition matching and positioning algorithm, and then performs point-selection control operations on the debugging-related software.
7. The method according to claim 1, characterized in that The execution software is configured with an information entry function, which regards the same information that appears as a variable, and replaces the variable with the latest physical information during the process of executing the formed automation script on another electronic board.
8. The method according to claim 1, characterized in that The execution software realizes the coordinated matching operation of software and hardware during the debugging process of the electronic board through the delay function, information prompt function and programmable power supply control function.
9. The method according to claim 1, characterized in that: The recording and reproducing operation functions include opening and switching multiple software that need to be operated. When the mouse stays on a control in the software, it triggers the automatic selection of the operation object, and then records the mouse clicks, scroll wheel and other events on the operation object. It can also automatically record keyboard operations, including commonly used combination key operations and hot key operations.
10. The method according to claim 1, characterized in that The configuration and control functions include the electronic board information that can be input into the deployment software; the running software and other information required for debugging, etc.