Password automatic input method and device, electronic equipment and computer program product
By using RPA robots to recognize and simulate mouse clicks, the problem of password controls in online banking systems being unable to operate automatically has been solved, achieving efficient automatic login.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA UNIONPAY MERCHANT SERVICES CO LTD
- Filing Date
- 2026-04-16
- Publication Date
- 2026-07-10
AI Technical Summary
Existing technology cannot automate the operation of password controls in online banking systems, resulting in low efficiency for manual input.
The password text is obtained by an RPA robot, segmented into characters, and the key images of the password control are identified. The password input is then simulated by mouse clicks, bypassing the restrictions of web page elements.
It enables automated password input in password control scenarios, improving login efficiency and reducing labor costs.
Smart Images

Figure CN122365474A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of online banking system automation technology, and in particular to an automatic password entry method, device, electronic device, and computer program product. Background Technology
[0002] In typical web login scenarios, RPA robots can directly locate the username and password input fields using techniques such as identifying web element IDs, names, and XPath (XML Path Language), and then send the password text to these fields to complete the input. However, in many current online banking systems, to enhance security, password input fields that can be recognized and manipulated using conventional methods are not available. Instead, password controls are installed. These password controls are non-standard web components and cannot be automated using techniques such as identifying web element IDs, names, and XPath. Currently, manual input is still required, resulting in low efficiency. Summary of the Invention
[0003] This application provides a method, apparatus, electronic device, and computer program product for automatic password entry, which can automate password input in password control login scenarios.
[0004] This application provides an automatic password input method, which includes performing the following operations via an RPA robot: acquiring password text and segmenting the password text into multiple first characters; acquiring an image of the currently displayed password control, and obtaining multiple key images and multiple second characters corresponding to the key images based on the image; traversing the multiple first characters included in the password text, and searching for a second character that matches the current first character from the multiple second characters as the target character; determining the target key image corresponding to the target character from the multiple key images; finding the first target position of the target key image in the password control, and simulating a mouse to perform a preset action on the first target position; and ending the traversal after detecting that the input of the multiple first characters included in the password text has been completed.
[0005] According to the automatic password entry method provided in the embodiments of this application, obtaining password text includes: obtaining startup parameters, the startup parameters including ciphertext of the password text; and decrypting the ciphertext based on a pre-configured decryption algorithm to obtain plaintext of the password text.
[0006] According to the automatic password input method provided in the embodiments of this application, the multiple key images include the key image corresponding to the determination command; after the multiple first characters of the password text are entered, the method further includes: finding the second target position of the key image corresponding to the determination command in the password control; and simulating the mouse to perform a preset action on the second target position.
[0007] According to the automatic password entry method provided in the embodiments of this application, the password control is a plugin for RPA robots that does not expose web page element interfaces.
[0008] According to the password automatic entry method provided in the embodiments of this application, the preset action is one of the following: a click action, a long press action, or a double-click action.
[0009] This application embodiment also provides an automatic password input device, which includes an RPA robot; the RPA robot includes: an acquisition and segmentation module, used to acquire password text and segment the password text into multiple first characters; an identification module, used to acquire multiple key images included in the currently displayed password control and identify the second character corresponding to each key image in the multiple key images; a traversal module, used to traverse the multiple first characters included in the password text and find the second character that matches the current first character from the multiple second characters as the target character; a determination module, used to determine the target key image corresponding to the target character from the multiple key images; a search module, used to find the first target position of the target key image in the password control and simulate the mouse to perform a preset action on the first target position; the traversal module is also used to detect that the input of the multiple first characters included in the password text is completed and end the traversal.
[0010] According to the automatic password input device provided in the embodiments of this application, the acquisition and segmentation module is specifically used for: acquiring startup parameters, the startup parameters including the ciphertext of the password text; and decrypting the ciphertext based on a pre-configured decryption algorithm to obtain the plaintext of the password text.
[0011] According to the automatic password input device provided in the embodiments of this application, the multiple key images include the key image corresponding to the confirmation command; the search module is further used to: search for the key image corresponding to the confirmation command at a second target position in the password control; and simulate a mouse to perform a preset action on the second target position.
[0012] This application also provides an electronic device, including a processor and a memory storing a computer program, wherein the processor executes the program to implement the automatic password entry method as described above.
[0013] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the automatic password entry method as described above.
[0014] This application also provides a computer program product, including a computer program that, when executed by a processor, implements an automatic password entry method as described above.
[0015] The password automatic entry method, apparatus, electronic device, and computer program product provided in this application acquire the currently displayed password virtual control and identify the second character corresponding to the key image. This transforms the non-programmable graphical control into processable image data and identifies the character meaning of each key image (e.g., representing numbers 1-9 or "OK") through OCR or image matching, bypassing the limitation of not being able to obtain webpage elements (XPath / DOM). Furthermore, by traversing the password characters and searching for matching key images, a mapping relationship is established from logical password text to physical screen position (e.g., coordinates). Even if the position of the numbers or other characters displayed by the password control is different each time, the button that needs to be clicked can be dynamically found. By finding the position of the target key image in the control and simulating mouse clicks, the underlying behavior of human operation is directly simulated. That is, based on visual positioning + mouse events, the password control response can be triggered by mouse coordinate clicks at the operating system level without relying on any input box interface. Thus, the solution proposed in this application combines image recognition (understanding the interface) with mouse simulation (performing operations) to build a vision-driven automation solution that does not rely on underlying technology. This achieves the technical effect of automatically logging in to password controls where conventional RPA methods fail, thereby improving the efficiency of users logging into major online banking systems or other systems. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is an example diagram of a password control in one embodiment of the automatic password entry method provided in this application; Figure 2 This is a flowchart illustrating the automatic password entry method provided in the embodiments of this application; Figure 3 This is a flowchart illustrating a specific embodiment of the automatic password entry method provided in this application. Figure 4 This is a schematic diagram of the software module structure of the automatic password entry device provided in this application embodiment; Figure 5 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0019] In the embodiments of this application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone, where A and B can be singular or plural. In the textual description of this application, the character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0020] RPA stands for Robotic Process Automation. An RPA robot is not a physical robot, but rather a software program or script whose core function is to simulate human operations on a computer, automatically performing repetitive and routine transactional tasks.
[0021] In standard web login scenarios, RPA robots can directly locate the username and password input fields using standard techniques (such as locating web element IDs, names, and XPath) and send the password text to complete the input. However, in some specialized online banking systems, password input fields that can be recognized and manipulated using conventional methods do not exist.
[0022] In RPA automation, the conventional approach refers to the identification and manipulation of DOM (Document Object Model) elements on a webpage. For example, RPA tools analyze the HTML (HyperText Markup Language) code of a webpage to find... <input type="password"> This tag, through its ID="password" or name="pwd" attributes, locates the password input box. Then, the RPA directly invokes a simulated keyboard input operation to fill the password string into the input box. Many online banking systems, for security reasons, do not use conventional HTML password input boxes, but instead employ unconventional password controls, such as ActiveX plugins, Flash, or custom-drawn windows. An example of a password control is shown below. Figure 1As shown, this type of password control lacks an input box; that is, there is no visible blinking cursor or box for typing characters on the webpage. Furthermore, the password control is not a webpage element; it is invisible in the webpage's DOM tree or is encapsulated as a black-box plugin. Therefore, RPA cannot find the password control using conventional methods, nor can it lock it using focus methods. Users can only complete password input by clicking the graphical buttons such as "1", "2", "3", ... "OK" displayed on the password control.
[0023] Therefore, conventional methods based on web page elements are completely ineffective in the above-mentioned password control login scenario.
[0024] Major online banking systems require automated reconciliation, and the password input process necessitates the installation of corresponding password plugins (i.e., password controls) to allow users to enter passwords and complete the login process. Staff need to log into numerous online banking systems, but password controls are unconventional web components that cannot be automated through standard procedures. The aforementioned conventional methods are completely ineffective in password control login scenarios, forcing staff to manually click... Figure 1 The password input is achieved by using numbers or characters on the password control shown. Manual input is inefficient and has high labor costs.
[0025] Therefore, there is a need for an intelligent solution that can automatically input passwords and other information in password control login scenarios, thereby enabling automatic login to online banking systems or other systems and achieving full-process automation.
[0026] In view of this, to solve the above problems, this application proposes an automatic password input method, device, electronic device, and computer program product. Through an RPA robot, it automatically simulates manual input of characters from a virtual keyboard displayed on a password control, thus automating online banking system login. The RPA robot takes partial screenshots of the numbers on the password control and saves them separately, such as images of the numbers 0-9 and the "OK" button. Then, it takes a screenshot of the entire password control and saves it. Using OCR image search technology, it locates the target button control image within the overall password control, moves the mouse to the corresponding location, and clicks it. This process is repeated sequentially according to the password text to be entered, completing the recognition and clicking operations to achieve automatic password input.
[0027] Specifically, such as Figure 2 As shown, the automatic password entry method proposed in this application embodiment may include the following process via an RPA robot: Step 101: Obtain the password text and split it into multiple first characters.
[0028] The password text can be obtained actively by the RPA robot or received passively. In some embodiments, the password text is passed to the RPA robot as a parameter during startup. When the RPA robot begins executing an automated task (startup), the password text is passed to the robot as a parameter by an external source (such as a higher-level scheduling system). For example, when starting the RPA robot, a command-line parameter or configuration file is generated, such as the command line `RPA_Robot.exe -password "123456"`. The RPA robot only obtains this password at startup and then uses it to perform the login operation. This separates the password from the robot script code, preventing the password from being hard-coded into the RPA process script, facilitating unified management and replacement.
[0029] It should be noted that the password passed in as a startup parameter is not the plaintext "123456", but rather ciphertext processed by a certain encryption algorithm. For example, the encrypted ciphertext would be: U2FsdGVkX1+... The encryption algorithm can be AES (Advanced Encryption Standard) or RSA (Rivest-Shamir-Adleman) encryption algorithm.
[0030] After the RPA robot obtains the ciphertext of the password, it uses a built-in or configured key to decrypt it, restoring the plaintext password. This prevents the password from being easily leaked during parameter passing, logging, memory access, and other processes.
[0031] In step 101, the password text is divided into multiple first characters, specifically by dividing the plaintext of the password into individual characters.
[0032] Step 102: Obtain the image of the currently displayed password control, and based on the image, obtain multiple button images and multiple second characters corresponding to the multiple button images.
[0033] In this embodiment, the password control refers to a virtual keyboard interface (or secure input component) in an online banking system or other system that requires a plugin to function properly and is used for entering passwords. The password control is not a regular web page input box (such as...). <input type="password">Instead of a physical keyboard, the password control is a graphical interface generated by a plugin, typically displaying numbers 0-9, letters, or a "Confirm" button. Users cannot directly input the password via the keyboard; they must click these buttons with a mouse to complete the password entry. The password control is an unconventional web component; for example, it might be an ActiveX control, a Flash object, or another browser plugin. It does not expose standard web element interfaces (such as ID, Name, XPath) to prevent malicious programs from automatically obtaining or brute-forcing the password. Therefore, the conventional method of gaining focus and simulating keyboard input used by RPA robots will be blocked or ineffective. In this embodiment, the RPA robot does not need to directly "input" text; instead, the password control is treated as an image. By capturing the entire image of the control, partially recognizing the number buttons, calculating coordinates, and simulating mouse clicks, the limitations of the plugin are bypassed, achieving automated login.
[0034] In short, a password control is a virtual keyboard on an online banking login page that allows users to click on numbers and letters without directly entering text. In essence, a password control is a plugin for RPA robots that doesn't expose webpage element interfaces.
[0035] Specifically, step 102 can be implemented in the following way: First, the RPA robot captures an image of the entire password control on the current screen. The captured image undergoes preprocessing, including grayscale conversion, binarization, and noise reduction, to make the text clearer. Next, OCR (Optical Character Recognition) technology is used. An OCR engine identifies each key area in the image and the characters on it. These characters can be numbers, letters, Chinese characters, or special characters. For example, it identifies numbers or text in each key area, such as "1", "2", ... "OK". The OCR engine can be Tesseract or PaddleOCR. The OCR engine returns not only the text but also the position of each character in the image (boundary box coordinates). Then, based on the bounding box coordinates of each key area, a small image of each key is dynamically cropped from the overall image of the password control screenshot, resulting in multiple key images. The corresponding character (second character) for each key is also obtained, and the key images and their corresponding second characters are temporarily saved according to a one-to-one mapping relationship.
[0036] Step 103: Traverse the multiple first characters included in the password text, and find the second character that matches the current first character from the multiple second characters as the target character.
[0037] The multiple first characters obtained from the segmentation of the password text can be added to the traversal sequence in the order they appear in the password text. For example, assuming the plaintext of the password text is "123456", then when traversing this character sequence, for the current character (first character), a character that is identical to the current first character is determined from multiple second characters and taken as the target character. For example, if the current first character is "3", then the digit "3" is searched for from the multiple second characters recognized by OCR and taken as the target character.
[0038] Step 104: Determine the target key image corresponding to the target character from multiple key images.
[0039] In step 102, the correspondence between each key image and the second character is saved. Therefore, after determining the target character, the key image corresponding to the target character can be determined and used as the target key image.
[0040] Step 105: Locate the first target position of the target key image in the password control, and simulate the mouse to perform a preset action on the first target position.
[0041] Specifically, image template matching technology can be used to find the position of the most similar target key image (template) in the large image of the password control. For example, the specific implementation is as follows: In some embodiments, a template matching method based on OpenCV can be used. The RPA robot calls a computer vision library (such as OpenCV) to perform image template matching. First, a screenshot of the entire password control is obtained as the large image (search image). In step 102, the RPA robot has already captured the image of the entire password control on the current screen, obtaining a complete large image. The RPA robot reads the target button image (template small image) determined in step 104. Next, the matching operation is performed: the RPA calls the matchTemplate function to slide the template small image on the control large image from left to right and from top to bottom, calculating the similarity between the two images at each position; the region with the highest similarity (e.g., similarity reaching 98%) is found as the target region, and the best matching coordinates are obtained based on the target region. The best matching coordinates of the target region can be represented by a rectangle: (x, y, width, height), where (x, y) are the coordinates of the top left or bottom right corner of the target button image in the control large image. Then, the click center point is calculated. In order to simulate a mouse click, the center coordinates of the target region need to be calculated based on the best matching coordinates of the target region. Center point X = Top left corner X + Target button image width / 2; Center point Y = top left corner Y + target button image height / 2.
[0042] After determining the center coordinates, simulate the mouse to perform a preset action on the center coordinates. The preset action is one of the following: click, long press, or double click. For example, if the preset action is click, simulate the mouse to click on the center coordinates to automatically input the first character of a password text. This process is repeated until multiple first characters of the password text are entered.
[0043] The first target location can be either the target area or the center coordinates of the target area.
[0044] Step 106: The input of multiple first characters in the password text has been completed, and the traversal ends.
[0045] After a character is entered, it is removed from the character sequence of the password text. If an empty character sequence is detected, the input of multiple first characters in the password text is complete, and the traversal ends.
[0046] Figure 2 The illustrated embodiment can automatically complete the password input operation in the password control login scenario of unconventional web page components, enhance the automation of the process, reduce the workload of staff, and reduce costs; it is automatically completed by RPA robots and can be executed 24 hours a day, significantly improving processing efficiency.
[0047] Here is another specific example. Figure 2 As shown, this specific embodiment may include the following process: Step 201: Obtain startup parameters.
[0048] The startup parameters include the ciphertext of the password text.
[0049] Step 202: Decrypt the ciphertext based on the pre-configured decryption algorithm to obtain the plaintext of the ciphertext.
[0050] Step 203: Divide the plaintext of the password text into multiple first characters.
[0051] Step 204: Obtain the image of the currently displayed password control, and based on the image, obtain multiple key images and multiple second characters corresponding to the multiple key images.
[0052] The order of numbers and other characters displayed in the password control is random. The method proposed in this application automatically captures the overall image of the currently displayed password control before each automatic input and performs subsequent operations based on the virtual keyboard of the currently displayed password control, thereby dealing with scenarios where the virtual keyboard of the password control changes in real time.
[0053] In this specific embodiment, multiple button images and their corresponding characters can be stored in an image library.
[0054] Step 205: Determine if the input is complete. If not, proceed to step 206. If yes, end the traversal and proceed to step 209.
[0055] The input is considered complete when the input of multiple first characters in the password text is detected.
[0056] Step 206: Traverse the multiple first characters included in the password text, and find the second character that matches the current first character from the multiple second characters as the target character.
[0057] Step 207: Determine the target key image corresponding to the target character from multiple key images.
[0058] Step 208: Locate the first target position of the target button image in the password control, and simulate clicking the first target position with the mouse.
[0059] Step 209: Locate the second target position of the key image corresponding to the command in the password control, and simulate the mouse to perform a preset action on the second target position.
[0060] Confirm the button image corresponding to the command, that is, the button image with characters such as "OK", "Confirm", "Submit", "Next" to indicate confirmation.
[0061] The first target position is the position of the key images corresponding to the multiple characters included in the password text on the virtual keyboard of the currently displayed password control. The second target position is the position of the key images corresponding to the buttons containing confirmation semantic characters such as "OK" included in the password text on the virtual keyboard of the currently displayed password control.
[0062] For details on how to locate the second target position of the key image corresponding to the specified instruction in the password control, please refer to step 105 of the above embodiment, which describes how to locate the first target position of the target key image in the password control. These details will not be repeated here.
[0063] In this specific embodiment, the RPA robot identifies and saves each key image in the password control to an image library. After obtaining the plaintext of the password text, it segments the password text into individual characters. Each character in the character sequence composed of multiple characters in the password text is matched sequentially with the characters in the image library and the corresponding key images according to the order in the password text to determine the target key image. Based on the position of the matched target key image in the virtual keyboard of the currently displayed password control, the robot simulates the mouse to perform preset actions such as clicking at that position. After multiple characters in the password text are entered sequentially, the robot simulates the mouse to click the confirmation button, thus completing the automatic input of the password text.
[0064] The automatic password entry device provided in the embodiments of this application is described below. The system described below and the automatic password entry method described above can be referred to each other and can achieve the same or corresponding technical effects.
[0065] This application provides an automatic password entry device, such as... Figure 4 As shown, the device includes an RPA robot, which comprises the following modules: The acquisition and segmentation module 401 is used to acquire the password text and segment the password text into multiple first characters.
[0066] The recognition module 402 is used to obtain multiple key images included in the currently displayed password control, and to recognize the second character corresponding to each key image among the multiple key images.
[0067] The traversal module 403 is used to traverse multiple first characters included in the password text and find the second character that matches the current first character from multiple second characters as the target character.
[0068] The determination module 404 is used to determine the target key image corresponding to the target character from multiple key images.
[0069] The search module 405 is used to find the first target position of the target key image in the password control and simulate the mouse to perform a preset action on the first target position.
[0070] The traversal module 403 is also used to detect when the input of multiple first characters in the password text is complete and to end the traversal.
[0071] Optionally, in some embodiments, the acquisition and segmentation module is specifically used for: acquiring startup parameters, which include the ciphertext of the password text; and decrypting the ciphertext based on a pre-configured decryption algorithm to obtain the plaintext of the password text.
[0072] Optionally, in some embodiments, the multiple button images include the button image corresponding to the confirmation command; the search module is further configured to: search for the second target position of the button image corresponding to the confirmation command in the password control; and simulate the mouse to perform a preset action on the second target position.
[0073] Figure 5 An example is a schematic diagram of the physical structure of an electronic device. For example... Figure 5As shown, the electronic device may include: a processor 510, a communication interface 520, a memory 530, and a communication bus 550, wherein the processor 510, the communication interface 520, and the memory 530 communicate with each other via the communication bus 550. The processor 510 can call a computer program in the memory 530 to execute the steps of the automatic password entry method, such as including: Retrieve the password text and segment it into multiple first characters; retrieve the image of the currently displayed password control, and based on the image, obtain multiple button images and multiple second characters corresponding to the button images; iterate through the multiple first characters included in the password text, and find the second character that matches the current first character from among the multiple second characters as the target character; determine the target button image corresponding to the target character from among the multiple button images; find the first target position of the target button image in the password control, and simulate the mouse to perform a preset action on the first target position; when the input of multiple first characters included in the password text is detected, end the iteration.
[0074] Furthermore, the logical instructions in the aforementioned memory 530 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0075] On the other hand, embodiments of this application also provide a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can perform the steps of the automatic password entry method provided in the above embodiments, such as including: Retrieve the password text and segment it into multiple first characters; retrieve the image of the currently displayed password control, and based on the image, obtain multiple button images and multiple second characters corresponding to the button images; iterate through the multiple first characters included in the password text, and find the second character that matches the current first character from among the multiple second characters as the target character; determine the target button image corresponding to the target character from among the multiple button images; find the first target position of the target button image in the password control, and simulate the mouse to perform a preset action on the first target position; when the input of multiple first characters included in the password text is detected, end the iteration.
[0076] On the other hand, embodiments of this application also provide a processor-readable storage medium storing a computer program for causing a processor to perform the steps of the methods provided in the above embodiments, such as including: Retrieve the password text and segment it into multiple first characters; retrieve the image of the currently displayed password control, and based on the image, obtain multiple button images and multiple second characters corresponding to the button images; iterate through the multiple first characters included in the password text, and find the second character that matches the current first character from among the multiple second characters as the target character; determine the target button image corresponding to the target character from among the multiple button images; find the first target position of the target button image in the password control, and simulate the mouse to perform a preset action on the first target position; when the input of multiple first characters included in the password text is detected, end the iteration.
[0077] Processor-readable storage media can be any available medium or data storage device that the processor can access, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MOs), etc.), optical storage (such as CDs, DVDs, BDs, HVDs, etc.), and semiconductor storage (such as ROMs, EPROMs, EEPROMs, non-volatile memory (NAND flash), solid-state drives (SSDs)).
[0078] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0079] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of various embodiments or some parts of embodiments.
[0080] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for automatically entering passwords, characterized in that, The method includes performing the following operations via an RPA robot: Obtain the password text and split the password text into multiple first characters; Obtain the image of the currently displayed password control, and based on the image, obtain multiple key images and multiple second characters corresponding to the multiple key images; Iterate through the multiple first characters included in the password text, and search for the second character that matches the current first character from the multiple second characters as the target character; Determine the target key image corresponding to the target character from the plurality of key images; Locate the first target position of the target key image in the password control, and simulate the mouse to perform a preset action on the first target position; Once the input of multiple first characters in the password text is complete, the traversal ends.
2. The method according to claim 1, characterized in that, Obtain the password text, including: Obtain the startup parameters, which include the ciphertext of the password text; The ciphertext is decrypted using a pre-configured decryption algorithm to obtain the plaintext of the ciphertext.
3. The method according to claim 1 or 2, characterized in that, Multiple button images include the button image corresponding to the confirmation command; After the input of the multiple first characters comprising the password text is completed, the method further includes: Locate the second target position of the key image corresponding to the determined instruction in the password control; Simulate a mouse to perform a preset action on the second target position.
4. The method according to claim 1, characterized in that, The password control is a plugin that prevents the RPA robot from exposing web page element interfaces.
5. The method according to claim 1, characterized in that, The preset action is one of the following: a click action, a long press action, or a double-click action.
6. An automatic password input device, characterized in that, The device includes an RPA robot; the RPA robot includes: The acquisition and segmentation module is used to acquire the password text and segment the password text into multiple first characters; The recognition module is used to acquire multiple key images included in the currently displayed password control, and to recognize the second character corresponding to each key image among the multiple key images; The traversal module is used to traverse the multiple first characters included in the password text and find the second character that matches the current first character from the multiple second characters as the target character; A determining module is used to determine the target key image corresponding to the target character from the plurality of key images; The search module is used to find the first target position of the target key image in the password control and simulate the mouse to perform a preset action on the first target position; The traversal module is also used to detect when the input of multiple first characters included in the password text is complete, and then end the traversal.
7. The apparatus according to claim 1, characterized in that, The acquisition and segmentation module is specifically used for: Obtain the startup parameters, which include the ciphertext of the password text; The ciphertext is decrypted using a pre-configured decryption algorithm to obtain the plaintext of the ciphertext.
8. The apparatus according to claim 6 or 7, characterized in that, Multiple button images include the button image corresponding to the confirmation command; The search module is also used for: Locate the second target position of the key image corresponding to the determined instruction in the password control; simulate the mouse to perform a preset action on the second target position.
9. An electronic device, characterized in that, The electronic device includes a processor and a memory storing a computer program, wherein the processor executes the computer program to implement the automatic password entry method as described in any one of claims 1-5.
10. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the automatic password entry method as described in any one of claims 1-5.