A window vision algorithm area coordinate positioning control system for battery protection board testing

By designing the window vision algorithm area coordinate positioning control system, the automatic simulation of manual operation and visual inspection is solved, and the troubles and errors of manual operation in battery protection board testing is achieved, achieving a convenient and efficient testing process.

CN114780427BActive Publication Date: 2024-12-03GUANG DONG GREENWAY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210484920.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-06
Publication Date
2024-12-03
Estimated Expiration
2042-05-06

AI Technical Summary

Technical Problem

The existing battery protection board test mainly relies on manual operation of the mouse and keyboard, which is troublesome and prone to errors, and lacks convenience and accuracy.

Method used

Design a window vision algorithm area coordinate positioning control system, including software positioning module, visual judgment module, mouse control module, keyboard control module, peripheral instrument control module and information integration module, simulate manual operation through automated operations, and use the Windows system API Control the mouse and keyboard, and combine visual inspection to determine the test results.

Benefits of technology

It realizes automatic operation of battery protection board testing, reduces manual intervention, improves the convenience and accuracy of testing, and can automatically judge and record test results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114780427B_ABST
    Figure CN114780427B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of automatic control technology, and discloses a window vision algorithm area coordinate positioning control system for battery protection board testing, including a battery tester, and the battery tester is mainly divided into six modules. The window vision algorithm area coordinate positioning control system for battery protection board testing calls the API of the Wi ndows system through software code, controls the mouse and keyboard, performs mouse and keyboard input operations in the third-party software interface, and then judges the operation result based on visual analysis. First, the software interface to be operated is maximized, and the input position (XY coordinates) and operation method (left and right key click or double-click, etc.) of the mouse are set by calling the Wi ndows system API, and then the keyboard and mouse related API is used to control the keyboard and mouse trajectory to realize the simulation of keyboard and mouse input information, and the color of a certain coordinate in the picture area is analyzed by taking a screenshot of the current window to judge the operation result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of automatic control technology, and in particular to a window vision algorithm regional coordinate positioning control system for battery protection board testing. Background Art

[0002] Battery protection board, as the name implies, lithium battery protection board is mainly an integrated circuit board that protects rechargeable (generally refers to lithium batteries). The reason why lithium batteries (rechargeable) need protection is determined by their own characteristics. Since the material of the lithium battery itself determines that it cannot be overcharged, over-discharged, over-current, short-circuited and charged and discharged at ultra-high temperatures, lithium battery components will always be accompanied by a protection board with a sampling resistor and a current fuse. The protection board usually includes a control IC, MOS switch, precision resistor and auxiliary devices NTC, ID memory, PCB, etc. Among them, the control IC controls the MOS switch to turn on when everything is normal, so that the battery cell communicates with the external circuit. When the battery cell voltage or loop current exceeds the specified value, it immediately (tens of milliseconds) controls the MOS switch to turn off to protect the safety of the battery cell.

[0003] At present, the battery protection board in the market has been widely used. The battery protection board tester is mainly used to test battery parameters and battery protection time, voltage protection: overcharge, over discharge, according to the different materials of the battery to change, but most of the battery protection board test is manual operation of the mouse, keyboard, the operation results need to be judged by manual visual, the operation is cumbersome and not convenient, and manual visual is prone to errors. Summary of the invention

[0004] 1. Technical issues to be resolved

[0005] In view of the shortcomings of the prior art, the present invention provides a window vision algorithm regional coordinate positioning control system for battery protection board testing, which has the advantage of automatic operation and solves the problem that most battery protection board tests are manually operated with mouse and keyboard, and the operation results need to be judged by manual visual inspection, which is cumbersome and inconvenient to operate, and manual visual inspection is prone to errors.

[0006] (II) Technical solution

[0007] In order to achieve the purpose of the above-mentioned automatic operation, the present invention provides the following technical solutions: a window vision algorithm area coordinate positioning control system for battery protection board testing, including a battery tester, the battery tester is mainly divided into six modules, and the six modules are respectively divided into: software positioning module, visual judgment module, mouse control module, keyboard control module, peripheral instrument control module and information integration module;

[0008] The software positioning module determines whether the software is open by checking whether the Battery Management Studio window handle exists. If the software is already open, it is placed on top. If not, Battery Management Studio is automatically called and opened, and the window is placed on top to fix the software interface coordinates.

[0009] The visual judgment module: by taking a screenshot of the current windows window, judging the current state according to the relevant attributes of the generated picture.

[0010] The mouse control module: controls the mouse to perform different operation methods at different coordinates, such as left and right click or double click, etc., by calling the Windows system mouse control API, to simulate the action of manual mouse operation.

[0011] The keyboard control module controls the keyboard key operation by calling the Windows system keyboard control API, replacing the manual keyboard operation.

[0012] The peripheral instrument control module cooperates to complete the test actions of each step through communication control with the peripheral instrument.

[0013] The information integration module is used to transmit test parameters, display test steps and test results, and save test records.

[0014] Preferably, the software positioning module is used to obtain the Windows handle of the Battery Management Studio software, determine the current state of the software, and whether it can enter the next step of testing;

[0015] a. If the handle is 0, it means that the software has not been opened. At this time, activate the product under test through the PLC control module, and open the Battery Management Studio software through the start cmd command.

[0016] Preferably, the Battery Management Studio handle is obtained;

[0017] a.1 If the handle is 0, the opening fails. After 3 retries, if the handle is still 0, this step determines that the communication has failed and the test ends.

[0018] a.2 If the acquired handle is a non-zero integer, the software is judged to be opened successfully, and a signal for initializing the test interface is given. The test interface is initialized through the mouse and keyboard control module, and the next step of the test is entered;

[0019] b. If the obtained handle is a non-zero integer, it is determined that the software has been opened and the initialization operation has been performed, then the next step of testing is entered.

[0020] Preferably, the visual judgment module takes a screenshot of the current windows active window;

[0021] a. Compare the size of the active window with the window size returned by the normal test;

[0022] b. Compare the active window image with the image returned by the normal test and determine the color of a specific coordinate.

[0023] Preferably, the mouse control module is used to call the windows system mouse related API to implement mouse left button, right button, single click, double click and other operation techniques, cooperate with the operation method required by each test step, and simulate manual operation of the mouse.

[0024] Preferably, the keyboard control module is used to call the windows system keyboard related API, control the pressing and releasing of each key on the keyboard, coordinate the actions required by each test step, and simulate manual keyboard operation.

[0025] Preferably, the peripheral instrument control module controls the peripheral instrument through a communication protocol, sets corresponding parameters in accordance with the test steps, and automatically retrieves test data.

[0026] Preferably, the information integration module displays the results of each test step, outputs the final test display results and saves the test records of the current test.

[0027] (III) Beneficial effects

[0028] Compared with the prior art, the present invention provides a window vision algorithm area coordinate positioning control system for battery protection board testing, which has the following beneficial effects:

[0029] 1. The window vision algorithm area coordinate positioning control system for battery protection board testing sets a visual judgment module, first starts the test button to trigger the start test signal, and automatically starts the software positioning module. The software positioning module obtains the Windows handle of the Battery Management Studio software to determine the current state of the software and whether it can enter the next step of the test. Then, the visual judgment module takes a screenshot of the current windows active window, and compares the size of the active window with the window size returned by the normal test. If they are consistent, it is determined that the step is completed normally and the next step can be entered. If they are inconsistent, it is determined that the step is not completed normally and the test of this step fails. Then, the active window image and the image returned by the normal test are judged at a certain specific coordinate. If they are consistent, it is determined that the step is completed normally and the next step can be entered. If they are inconsistent, it is determined that the step is not completed normally and the test of this step fails. Then, the mouse is controlled to The control module calls the Windows system mouse-related API to implement mouse left button, right button, single click, double click and other operation methods, cooperates with the operation methods required by each test step, simulates manual operation of the mouse, and then calls the Windows system keyboard-related API through the keyboard control module to control the pressing and popping of each key on the keyboard, cooperates with the actions required by each test step, simulates manual operation of the keyboard, and then controls the peripheral instrument through the communication protocol through the peripheral instrument control module, sets the corresponding parameters in accordance with the test steps, and automatically retrieves the test data, and then displays the results of each test step through the information integration module, summarizes and outputs the final test display results, and saves the test records of the current test.

[0030] 2. The window vision algorithm area coordinate positioning control system for battery protection board testing simulates the manual operation of the mouse and keyboard by controlling the input position and input information of the mouse and keyboard in the test interface, and then performs visual inspection according to the current window information of the operated software to judge the operation result, replacing manual visual inspection, thereby reducing manual intervention in the operation process and realizing automatic operation. Through software code, the Windows system API is called to control the mouse and keyboard, and the mouse and keyboard input operations are performed in the third-party software interface. Then, the operation result is judged based on visual analysis. First, the software interface to be operated is maximized, and the input position (XY coordinates) and operation method (left and right click or double-click, etc.) of the mouse are set by calling the windows system API. Then, the keyboard and mouse related API is used to control the keyboard and mouse trajectory to realize the simulation of keyboard and mouse input information. By taking a screenshot of the current window, the color of a certain coordinate in the image area is analyzed to judge the operation result. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1It is a schematic diagram of the software structure of the present invention;

[0032] Figure 2 It is a schematic diagram of the software positioning structure of the present invention;

[0033] Figure 3 It is a schematic diagram of the visual judgment structure of the present invention.

[0034] In the figure: 1 battery tester, 2 software positioning module, 3 visual judgment module, 4 mouse control module, 5 keyboard control module, 6 peripheral instrument control module, 7 information integration module. DETAILED DESCRIPTION

[0035] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0036] See also Figure 1-3 A window vision algorithm area coordinate positioning control system for battery protection board testing includes a battery tester 1, which is mainly divided into six modules: a software positioning module 2, a visual judgment module 3, a mouse control module 4, a keyboard control module 5, a peripheral instrument control module 6 and an information integration module 7;

[0037] Software positioning module 2: Determine whether the software is open by checking whether the Battery Management Studio window handle exists. If the handle is 0, it means that the software is not open. At this time, the product to be tested is activated through the PLC control module, and the start cmd command is used to open the Battery Management Studio software. Then the Battery Management Studio handle is obtained. If the handle is 0, the opening fails. After 3 retries, the handle is still 0. In this step, the communication fails and the test ends. If the obtained handle is a non-zero integer, the software is judged to be opened successfully. At the same time, an initialization test interface signal is given. The test interface is initialized through the mouse and keyboard control module 5, and the next step of the test is entered. If the obtained handle is a non-zero integer, it is judged that the software has been opened and the initialization operation has been performed, and the next step of the test is entered.

[0038] Visual judgment module 3: By taking a screenshot of the current windows window, the current state is judged according to the relevant attributes of the generated image, and the size of the active window is compared with the window size returned by the normal test. If they are consistent, it is determined that the step is completed normally and the next step can be performed. If they are inconsistent, it is determined that the step is not completed normally and the test of this step fails. Then the color of a certain specific coordinate of the active window image and the image returned by the normal test is judged. If they are consistent, it is determined that the step is completed normally and the next step can be performed. If they are inconsistent, it is determined that the step is not completed normally and the test of this step fails.

[0039] Mouse control module 4: By calling the Windows system mouse control API, the mouse is controlled to perform different operations at different coordinates, such as left and right clicks or double clicks, etc., to simulate the actions of manual mouse operation.

[0040] Keyboard control module 5: controls keyboard key operations by calling Windows system keyboard control API, replacing manual keyboard operations.

[0041] The peripheral instrument control module 6 cooperates to complete the test actions of each step through communication control with the peripheral instrument.

[0042] The information integration module 7 is used to transmit test parameters, display test steps and test results, and save test records.

[0043] The display in the hardware and software is Intel(R)Core(TM)i3-9100@3.6GHz 1600*900, EV2300 is the Battery Management Studio communication device, and Win10 is the operating system.

[0044] In summary, the window vision algorithm regional coordinate positioning control system for battery protection board testing, by setting the visual judgment module 3, first starts the test button to trigger the start test signal, and automatically starts the software positioning module 2. The software positioning module 2 obtains the Windows handle of the Battery Management Studio software to determine the current state of the software and whether it can enter the next step of the test. Then, the visual judgment module 3 takes a screenshot of the current windows active window, and compares the size of the active window with the window size returned by the normal test. If they are consistent, it is determined that the step is completed normally and the next step can be entered. If they are inconsistent, it is determined that the step is not completed normally and the test of this step fails. Then, the active window image and the image returned by the normal test are judged at a certain specific coordinate. If they are consistent, it is determined that the step is completed normally and the next step can be entered. If they are inconsistent, it is determined that the step is not completed normally and the test of this step fails. Then, the mouse control module is used to control the color of the active window image and the image returned by the normal test. Block 4, calls the Windows system mouse related API to implement the mouse left button, right button, single click, double click and other operating methods, cooperates with the operating methods required by each test step, simulates manual operation of the mouse, and then calls the Windows system keyboard related API through the keyboard control module 5 to control the pressing and popping of each key on the keyboard, cooperates with the actions required by each test step, simulates manual operation of the keyboard, and then controls the peripheral instrument through the communication protocol through the peripheral instrument control module 6, sets the corresponding parameters in accordance with the test steps, and automatically retrieves the test data, and then displays the results of each test step through the information integration module 7, summarizes and outputs the final test display results, and saves the test records of the current test.

[0045] In addition, by controlling the input position and input information of the mouse and keyboard in the test interface, the manual operation of the mouse and keyboard is simulated, and then visual inspection is performed according to the current window information of the operated software to determine the operation result, replacing manual visual inspection, thereby reducing manual intervention in the operation process and realizing automatic operation. Through software code, the Windows system API is called to control the mouse and keyboard, and mouse and keyboard input operations are performed in the third-party software interface. Then, the operation result is judged based on visual analysis. First, the software interface to be operated is maximized, and the mouse input position (XY coordinates) and operation method (left and right click or double-click, etc.) are set by calling the Windows system API. Then, the keyboard and mouse related APIs are used to control the keyboard and mouse trajectory to realize the simulation of keyboard and mouse input information. By taking a screenshot of the current window, the color of a certain coordinate in the image area is analyzed to determine the operation result.

[0046] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0047] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A window vision algorithm area coordinate positioning control system for battery protection board testing, comprising a battery tester (1), characterized in that: The battery tester (1) is mainly divided into six modules, which are: a software positioning module (2), a visual judgment module (3), a mouse control module (4), a keyboard control module (5), a peripheral instrument control module (6) and an information integration module (7); The software positioning module (2) determines whether the software is open by checking whether the Battery Management Studio window handle exists. If the software is already open, it is placed on top. If the software does not exist, it automatically calls Battery Management Studio and opens it, and places the window on top to fix the software interface coordinates. The visual judgment module (3) judges the current state by taking a screenshot of the current windows and based on the relevant attributes of the generated image; The mouse control module (4) controls the mouse to perform different operation methods at different coordinates by calling the Windows system mouse control API, such as left and right click or double click, to simulate the action of manually operating the mouse; The keyboard control module (5) controls the keyboard key operation by calling the Windows system keyboard control API, replacing the manual keyboard operation; The peripheral instrument control module (6) cooperates with the peripheral instrument to complete the test actions of each step through communication control; The information integration module (7) is used to transmit test parameters, display test steps and test results, and save test records.

2. According to claim 1, a window vision algorithm area coordinate positioning control system for battery protection board testing is characterized in that: The software positioning module (2) is used to obtain the Windows handle of the Battery Management Studio software, determine the current state of the software, and whether it can enter the next step of testing; a. If the handle is 0, it means that the software has not been opened. At this time, activate the product under test through the PLC control module, and open the Battery Management Studio software through the start cmd command.

3. According to claim 2, a window vision algorithm area coordinate positioning control system for battery protection board testing is characterized in that: The Battery Management Studio handle is obtained; a.1 If the handle is 0, the opening fails. After 3 retries, if the handle is still 0, this step determines that the communication has failed and the test ends. a.2 If the acquired handle is a non-zero integer, the software is judged to be opened successfully, and a signal for initializing the test interface is given. The test interface is initialized through the mouse control module (4) and the keyboard control module (5), and the next step of the test is entered; b. If the obtained handle is a non-zero integer, it is determined that the software has been opened and the initialization operation has been performed, then the next step of testing is entered.

4. According to claim 1, a window vision algorithm area coordinate positioning control system for battery protection board testing is characterized in that: The visual judgment module (3) takes a screenshot of the current active window; a. Compare the size of the active window with the window size returned by the normal test; b. Compare the active window image with the image returned by the normal test and determine the color of a specific coordinate.

5. According to claim 1, a window vision algorithm area coordinate positioning control system for battery protection board testing is characterized in that: The mouse control module (4) is used to call the Windows system mouse related API to implement the mouse left button, right button, single click and double click operation methods, and cooperate with the operation method required by each test step to simulate manual mouse operation.

6. A window vision algorithm area coordinate positioning control system for battery protection board testing according to claim 1, characterized in that: The keyboard control module (5) is used to call the Windows system keyboard related API, control the pressing and releasing operation of each key on the keyboard, cooperate with the actions required by each test step, and simulate manual keyboard operation.

7. The window vision algorithm area coordinate positioning control system for battery protection board testing according to claim 1, characterized in that: The peripheral instrument control module (6) controls the peripheral instrument through a communication protocol, sets corresponding parameters in accordance with the test steps, and automatically retrieves test data.

8. The window vision algorithm area coordinate positioning control system for battery protection board testing according to claim 1, characterized in that: The information integration module (7) displays the result of each test step, outputs the final test display result and saves the test record of the current test.