A method, system, electronic device and storage medium for automatic signature
Patent Information
- Application Number
- CN202510190733.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-20
- Publication Date
- 2026-08-28
AI Technical Summary
[0003]在开发和调试阶段,由于需要多次对文件进行签名操作,每次都要重复这一繁琐的流程,在验证过程中可能会遇到如验证码接收延迟、验证方式繁琐等问题,耗费开发人员的时间和精力,增加了操作的复杂性,极大地降低了研发效率,延长了研发周期
[0039]This application provides an automatic signature method. First, a signature file and signature configuration are obtained, both corresponding to the POS program. Then, when logging into a designated webpage based on account information, if secondary verification is required, a verification code is obtained and verified. After successful verification and login, a signature is performed in a signature webpage control based on the signature file and signature configuration, with the signature webpage control corresponding to the signature configuration. This automatic signature method automatically logs in and signs by obtaining the signature file, signature configuration, and account information. The process also automatically verifies login security by calling a verification code, eliminating the need for manual operation. Even if multiple logins, verifications, and signatures are required, the instructions can be completed quickly, thereby improving development efficiency and reducing the development cycle.
Smart Images

Figure CN122660894A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of information security technology, and in particular to an automatic signature method, system, electronic device and storage medium. Background Technology
[0002] In today's digital market, the security of POS systems is paramount, and secure file signing is a crucial step in ensuring transaction data security and preventing tampering and forgery. Currently, commonly used POS file security signing solutions require developers to manually complete a series of complex operations. First, they must manually compile and package the signing file. After preparing the file, developers need to open a browser, accurately enter their secure backend account, and pass two-factor authentication. After logging in, they must select parameters matching the signing file from numerous options, upload the file, wait for the secure backend to complete the signing process, and then download and unzip the signed file through their browser.
[0003] During the development and debugging phases, the need to sign files multiple times and repeat this tedious process each time can lead to problems such as delayed verification code reception and complicated verification methods during the verification process. This consumes the time and energy of developers, increases the complexity of operations, greatly reduces development efficiency, and prolongs the development cycle. Summary of the Invention
[0004] To address the aforementioned technical problems, this application provides an automatic signing method, system, electronic device, and storage medium for efficiently compiling and signing POS files.
[0005] The technical solution provided in this application is described below:
[0006] The first aspect of this application provides a method for automatic signing, including:
[0007] Obtain the signature file and signature configuration, both of which correspond to the POS program;
[0008] When logging into a designated webpage using account information, if secondary verification is required, a verification code will be obtained and verified.
[0009] After successful verification and login, a signature is made in the signature webpage control according to the signature file and the signature configuration. The signature webpage control corresponds to the signature configuration.
[0010] Optionally, the step of obtaining the signature file and signature configuration is implemented by compiling a script, and after obtaining the signature file and signature configuration, the following steps are also included:
[0011] Copy and package the signature file to obtain a packaged file;
[0012] The packaged file and the signature configuration are uploaded to the API server. The signature configuration includes the POS device model, signature type, and packaged file path information.
[0013] Optionally, the account information includes a username and password, and the step of logging into the specified webpage based on the account information is implemented through an automatic login script. Logging into the specified webpage based on the account information includes:
[0014] The API server searches for the account and password in the credential manager to obtain search results. The API server communicates with the credential manager to achieve data interaction.
[0015] If the search results indicate that the account and password exist in the credential manager, then login is performed on the designated webpage based on the account and password, and the designated webpage corresponds to the account.
[0016] Optionally, obtaining and verifying the verification code includes:
[0017] Retrieve the verification controls from the specified webpage;
[0018] Send a verification code request to the API server to obtain a verification code, which is pre-stored in the API server's credential manager;
[0019] The verification code is parsed and input into the verification control for verification.
[0020] Optionally, the step of signing in the signing webpage control according to the signing file and the signing configuration is implemented by an automatic signing script. The signing configuration includes a signing process to be executed. The step of signing in the signing webpage control according to the signing file and the signing configuration includes:
[0021] Perform format conversion on the signature file and the signature configuration;
[0022] Read the converted signature file and signature configuration, and obtain the corresponding signature webpage control;
[0023] Perform the signing according to the signature process to be executed.
[0024] Optionally, after obtaining and verifying the verification code, the method further includes:
[0025] If the number of consecutive verification failures exceeds the preset limit, the account lockout mechanism will be triggered, and an alarm notification will be displayed.
[0026] Optionally, before obtaining the signature file and signature configuration, the following steps are also included:
[0027] Verify the integrity of the POS program and obtain the verification results;
[0028] If the test result indicates that the POS program has an incomplete problem, then the backup POS program is retrieved. The backup POS program is a copy of the program that has passed the integrity test in advance.
[0029] A second aspect of this application provides an automatic signing system, comprising:
[0030] The acquisition unit is used to acquire the signature file and the signature configuration, both of which correspond to the POS program.
[0031] The login unit is used to obtain and verify a verification code when logging into a specified webpage based on account information, if secondary verification is required.
[0032] The signing unit is used to sign the webpage control according to the signing file and the signing configuration after the verification is successful and the login is completed. The signing webpage control corresponds to the signing configuration.
[0033] A third aspect of this application provides an electronic device, the electronic device comprising:
[0034] Processor, memory, input / output units, and bus;
[0035] The processor is connected to the memory, the input / output unit, and the bus;
[0036] The memory stores a program that the processor invokes to execute the first aspect and any optional automatic signature method of the first aspect.
[0037] A fourth aspect of this application provides a computer-readable storage medium storing a program that, when executed on a computer, performs the automatic signature method of the first aspect and any one of the first aspects.
[0038] As can be seen from the above technical solutions, this application has the following advantages:
[0039] This application provides an automatic signature method. First, a signature file and signature configuration are obtained, both corresponding to the POS program. Then, when logging into a designated webpage based on account information, if secondary verification is required, a verification code is obtained and verified. After successful verification and login, a signature is performed in a signature webpage control based on the signature file and signature configuration, with the signature webpage control corresponding to the signature configuration. This automatic signature method automatically logs in and signs by obtaining the signature file, signature configuration, and account information. The process also automatically verifies login security by calling a verification code, eliminating the need for manual operation. Even if multiple logins, verifications, and signatures are required, the instructions can be completed quickly, thereby improving development efficiency and reducing the development cycle. Attached Figure Description
[0040] To more clearly illustrate the technical solutions in this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0041] Figure 1 A schematic flowchart of an embodiment of the automatic signing method provided in this application;
[0042] Figure 2 A schematic flowchart of another embodiment of the automatic signing method provided in this application;
[0043] Figure 3 A schematic flowchart of another embodiment of the automatic signing method provided in this application;
[0044] Figure 4 A schematic flowchart of another embodiment of the automatic signing method provided in this application;
[0045] Figure 5 A schematic diagram of an embodiment of the automatic signing system provided in this application;
[0046] Figure 6 A schematic diagram of an embodiment of the electronic device provided in this application. Detailed Implementation
[0047] This application provides a method, system, electronic device, and storage medium for automatic signing, used to efficiently compile and sign POS files.
[0048] It should be noted that the automatic signature method provided in this application can be applied to terminals or systems. For example, a terminal can be a smartphone, computer, tablet, portable computer terminal, or a fixed terminal such as a desktop computer or POS device.
[0049] It should also be noted that the terms "first," "second," etc., in the specification and drawings are used to distinguish similar objects and are not necessarily used to describe a specific order, sequence, or importance.
[0050] Please see Figure 1 , Figure 1 One embodiment of the automatic signing method provided in this application includes:
[0051] Step S101: Obtain the signature file and signature configuration, both of which correspond to the POS program;
[0052] Step S102: When logging into the designated webpage based on account information, if secondary verification is required, obtain the verification code and perform the verification.
[0053] Step S103: After successful verification and login, sign the webpage control according to the signature file and signature configuration. The signature webpage control corresponds to the signature configuration.
[0054] In step S101 of this embodiment, signature files and signature configurations are obtained, both corresponding to the POS program. First, the POS program is compiled, that is, the POS program source code is compiled into signature files such as firmware or dependent libraries, and all signature files are stored in the same or different locations. Then, a file retrieval module can be built on the local system. This file retrieval module can deeply traverse the storage paths related to the POS program and accurately locate the signature files based on pre-defined file signature codes or extension rules. For example, for transaction data files compiled from the POS program, their extension is usually ".posdt", and the file retrieval module can quickly filter out signature files by recognizing this type of extension.
[0055] Simultaneously, a configuration reading module can be constructed, which is connected to a locally stored signature configuration database. This database stores various signature configuration information applicable to different POS programs. The configuration reading module extracts the exact matching signature configuration from the database based on the POS program identifier (such as program name, version number, etc.) to which the signature file belongs, found through the aforementioned traversal. These signature configurations cover key parameters such as signature algorithm type (such as RSA, DSA, etc.), certificate path, and encryption key length, ensuring the standardization and validity of subsequent signature operations. It should be noted that before obtaining the signature file and signature configuration, to ensure the accuracy and integrity of the signature file and avoid signature failures or unusable signed files due to source file issues, the integrity of the POS program should be verified, and the verification result obtained. If the verification result indicates that the POS program has incompleteness issues, a backup POS program is retrieved. The backup POS program is a pre-verified copy that has passed the integrity verification. The correct and complete signature file is obtained by compiling the backup POS program.
[0056] In step S102 of this embodiment, when logging into the designated webpage based on account information, if secondary verification is required, a verification code is obtained and verified. Secondary verification is performed by obtaining the verification code from the API server; that is, an API server is pre-built locally, and the signature file and signature configuration obtained in step S101 are stored on this API server. In addition, encrypted account information can also be stored on the API server, using a high-strength symmetric encryption algorithm (such as AES). When the login command is executed, the account information is decrypted and restored via the API server, and an automated script drives the browser to open the designated webpage, automatically filling in the username and password fields.
[0057] If a secondary verification step is encountered, the API server is called again. The API server has a prior cooperation agreement with the verification code provider and has the authority to obtain the verification code. A request to obtain the verification code is sent to the API server, which retrieves the verification code from the provider according to the established process and sends it back to the system. The system then uses the verification code recognition and input module to accurately fill the verification code into the corresponding verification field, completing the verification process. It should be noted that if the number of consecutive verification failures exceeds the preset number, it indicates that the verification process has encountered an anomaly. This could be due to a failure to obtain the verification code or a third-party attack causing the verification failure. In this case, the account lockout mechanism should be triggered, and an alarm notification should be sent. An alarm message can be sent to the user interface to inform the user to take timely countermeasures. The preset number of attempts can be set according to actual needs. For POS programs with higher security requirements, a smaller preset number should be set, such as 2-3 attempts; for POS programs with lower security requirements, the standard can be appropriately relaxed, such as 5 attempts.
[0058] In step S103 of this embodiment, after successful verification and login, a signature is made in the signature webpage control according to the signature file and signature configuration. The signature webpage control corresponds to the signature configuration. After successful verification and login, automatic signing is prepared by uploading the previously obtained signature file to the signature webpage via the API server. During the upload process, the file is verified in real time to ensure its integrity, such as calculating the hash value of the file using a hash algorithm and comparing it with the hash value of the original file pre-stored locally. The signature webpage control is initialized according to the passed signature configuration information. For example, if the signature configuration specifies the use of the RSA signature algorithm, the control automatically loads the corresponding RSA algorithm library and loads the digital certificate according to the certificate path in the configuration. Subsequently, the signing process is started. The control performs operations such as encryption and adding digital signature to the signature file, finally generating a signed file, which is then sent back to the local system through the same secure transmission channel for subsequent use.
[0059] The automatic signature method of this application first obtains a signature file and signature configuration, both of which correspond to the POS program. Then, when logging into a designated webpage based on account information, if secondary verification is required, a verification code is obtained and verified. After successful verification and login, a signature is performed in the signature webpage control based on the signature file and signature configuration, with the signature webpage control corresponding to the signature configuration. This automatic signature method automatically logs in and signs by obtaining the signature file, signature configuration, and account information. During the process, a verification code is also invoked to automatically verify login security, eliminating the need for manual operation. Even if multiple logins, verifications, and signatures are required, the instructions can be completed quickly, thereby improving development efficiency and reducing the development cycle.
[0060] Reference Figure 2 According to some embodiments of the present invention, step S101 is implemented by compiling a script. After obtaining the signature file and signature configuration, it is also necessary to preprocess the signature file and signature configuration, which may include, but is not limited to, the following:
[0061] Step S201: Copy and package the signature file to obtain the packaged file;
[0062] Step S202: Upload the packaged file and signature configuration to the API server. The signature configuration includes the POS device model, signature type, and packaged file path information.
[0063] In steps S201 to S202 of this embodiment, the signature file is first copied and packaged to obtain a packaged file; then, the packaged file and signature configuration are uploaded to the API server. The signature configuration includes the POS device model, signature type, and packaged file path information. First, the compilation script locates the storage location of the signature file by reading the path information. Then, the compilation script uses a file copy function (e.g., the shutil.copy() function in Python) to copy the signature file to a temporary directory or a specified packaging directory. After copying, the compilation script calls a packaging tool to package the signature file and its possible dependent files into a compressed file. During packaging, parameters such as compression level and whether to include directory structure can be specified. After packaging, the compilation script can retrieve the path and name of the packaged file for use in subsequent steps. Next, the compilation script calls the API server's upload interface to send the packaged file and signature configuration. The compilation script calls the API server's upload interface generally by sending an HTTP POST request, where the request body contains the binary data of the packaged file and the JSON or XML representation of the signature configuration. After receiving the upload request, the API server returns a response. This response may contain the upload result status code, message, or other relevant information. The compilation script parses the response and performs corresponding operations based on the result. Steps S201 to S202 automate the operation through the compilation script, improving the efficiency of obtaining the signature file and signature configuration, and uploading the signature file and signature configuration to the API server, thereby enhancing the controllability and security of the subsequent signature process.
[0064] Reference Figure 3 According to some embodiments of the present invention, the account information includes a username and a password, and step S102 is implemented by an automatic login script. Therefore, step S102, which involves logging into a specified webpage based on the account information and obtaining a verification code for verification, may specifically include, but is not limited to, the following:
[0065] Step S301: Search for the account and password in the credential manager through the API server to obtain the search results. The API server and the credential manager establish a communication connection to realize data interaction.
[0066] Step S302: If the search results indicate that an account and password exist in the credential manager, then log in on the specified webpage based on the account and password, with the specified webpage corresponding to the account;
[0067] Step S303: If secondary verification exists, obtain the verification control from the specified webpage;
[0068] Step S304: Send a verification code request to the API server to obtain the verification code, which is pre-stored in the API server's credential manager;
[0069] Step S305: Parse the verification code and input it into the verification control to perform verification.
[0070] In steps S301 to S305 of this embodiment, the API server searches for the account and password in the credential manager to obtain search results. The API server and the credential manager establish a communication connection to achieve data interaction. If the search results indicate that the account and password exist in the credential manager, login is performed on a specified webpage based on the account and password. The specified webpage corresponds to the account. If two-factor authentication is required during login, the verification control on the specified webpage is obtained. A verification code request is sent to the API server to obtain the verification code, which is pre-stored in the credential manager of the API server. The verification code is parsed and input into the verification control for verification. First, the automatic login script can construct an HTTP request as a search request. This search request contains the account information to be searched (which may be part or the complete account name) and necessary authentication information (such as API keys or tokens) to ensure that only authorized users can access the credential manager. The credential manager is built into the system locally and is used to store, manage, and protect user authentication information (such as accounts, passwords, and certificates). According to instructions or requests, the API server can interact with the credential manager to enable the system to call data stored in the credential manager through the API server. The automatic login script sends the search request to the API server. The API server searches the Credential Manager based on the search request, then returns a response. The API server parses the JSON or XML data in the response body to obtain the search results. If the search results do not contain a username and password, it indicates that the account does not exist in the Credential Manager. An error notification is sent to the user interface via a UI library or logging function, indicating that the account does not exist or the Credential Manager is inaccessible. Following the error notification, an input box is provided in the user interface for the user to enter their username and password, which are then retrieved via standard input. If the search results contain a username and password, they are extracted from the search results. A browser automation tool is then invoked to open a specified webpage and automatically fill in the username and password in a login form. Finally, the login form is submitted to trigger the login process.
[0071] After logging in, the auto-login script can detect the presence of two-factor authentication controls on a specified webpage, such as CAPTCHA input boxes, SMS verification code input boxes, or image CAPTCHA images. This is done by examining the DOM structure of the specified webpage or executing JavaScript. If a two-factor authentication control is detected, the auto-login script uses element locating methods provided by the browser's automation tools to obtain references to these controls. Next, the auto-login script constructs another HTTP request as a CAPTCHA request, which includes the account information requesting the CAPTCHA and necessary authentication information. The auto-login script sends the CAPTCHA request to the API server. The API server searches in the credential manager based on the CAPTCHA request, then returns a response and parses the JSON or XML data in the response body to obtain the CAPTCHA. The CAPTCHA may be returned in plaintext or in encrypted form and requires decryption. If the CAPTCHA is returned in encrypted form, the auto-login script should decrypt it first. After obtaining the CAPTCHA, the browser automation tool uses the parsed CAPTCHA to input it into the two-factor authentication control (such as the CAPTCHA input box), and then, according to the auto-login script, automatically clicks the submit button to trigger the verification process. Finally, wait for the verification result and perform the corresponding operation based on the verification result (such as login successful, login failed and prompting the user to re-enter the verification code, etc.). Steps S301 to S305 implement the login and secondary verification operations through an automatic login script, which improves the flexibility of login and promotes the automation of the entire signature process.
[0072] Reference Figure 4 According to some embodiments of the present invention, the signature configuration includes a signature process to be executed, and step S103 is implemented by an automatic signature script. Step S103, which involves signing in the signature webpage control based on the signature file and signature configuration, may specifically include, but is not limited to, the following:
[0073] Step S401: Convert the format of the signature file and signature configuration;
[0074] Step S402: Read the format-converted signature file and signature configuration, and obtain the corresponding signature webpage control;
[0075] Step S403: Sign according to the signature process to be executed.
[0076] In steps S401 to S403 of this embodiment, the signature file and signature configuration are converted into their respective formats; the converted signature file and signature configuration are read, and the corresponding signature webpage control is obtained; and the signature is performed according to the signature process to be executed. First, the automatic signature script parses the provided signature file. The signature file may exist in various formats, such as PDF, images (PNG, JPEG), XML, etc. Depending on the type of the signature file, the corresponding parsing library or tool is used to read the file content; while the signature configuration usually contains information such as the signature's location, size, and style, and may be stored in formats such as JSON, YAML, or XML. The corresponding parsing library is used to read and parse this configuration information. Then, according to the requirements of the signature webpage control, the parsed signature file and configuration information are converted into a format acceptable to the control. For example, if the control requires a Base64-encoded image as a signature, then the image file needs to be converted into a Base64-encoded string. During the format conversion process, problems such as file corruption and configuration errors may be encountered. Therefore, an error handling mechanism, such as exception handling and logging, needs to be added to detect and handle problems promptly.
[0077] The automated signing script calls an automated testing tool or browser extension to load the webpage containing the signing control. It then locates the signing control based on the control identifier in the signing configuration. Before signing, it verifies that the control's state meets expectations (e.g., visibility, editability). If the control's state does not meet expectations, error handling or other measures are taken. Next, based on the formatted signing configuration and signing file, the parameters of the signing control are set. The specific signing operation depends on the control type and the requirements of the signing process. For example, if the control is a button, clicking the button triggers the signing operation. After the signing operation is complete, it verifies that the signing result meets expectations. For example, it checks whether the signature was successfully added to the document or whether the signature meets specific format or style requirements. If any problems are encountered during the signing process (e.g., the control is not clickable, signing fails), error handling is performed. This may include logging errors, retrying the signing operation, or notifying the user for manual intervention. If the signing is successful and the result meets expectations, the signing result can be saved. Steps S401 to S403 achieve automatic and precise control positioning and automatic signing through the automatic signing script, which enhances the compatibility of the signing process and improves the system's processing efficiency.
[0078] The above embodiments illustrate the automatic signing method provided in this application. The automatic signing system, electronic device, and storage medium provided in this application are described below:
[0079] Please see Figure 5This application provides an embodiment of an automatic signing system, the system comprising:
[0080] The acquisition unit 501 is used to acquire the signature file and signature configuration, both of which correspond to the POS program.
[0081] Login unit 502 is used to obtain and verify a verification code when logging into a specified webpage based on account information if secondary verification is required.
[0082] The signature unit 503 is used to sign the web page control according to the signature file and signature configuration after the verification is successful and the login is completed. The signature web page control corresponds to the signature configuration.
[0083] Optionally, the compilation script is used to obtain unit 501. After obtaining unit 501, the following steps are also included:
[0084] Packaging unit 504 is used to copy and package the signature file to obtain a packaged file;
[0085] Upload unit 505 is used to upload the packaged file and signature configuration to the API server. The signature configuration includes the POS device model, signature type and packaged file path information.
[0086] Optionally, the account information includes username and password. Login unit 502 uses an automatic login script. Login unit 502 is specifically used for:
[0087] The API server searches for accounts and passwords in the Credential Manager to obtain search results. The API server and the Credential Manager communicate to achieve data interaction.
[0088] If the search results indicate that an account and password exist in the credential manager, then the user will log in using the account and password on the specified webpage, with the specified webpage corresponding to the account.
[0089] Optionally, login unit 502 is specifically used for:
[0090] Retrieve validation controls from a specified webpage;
[0091] Send a verification code request to the API server to obtain the verification code, which is pre-stored in the API server's credential manager;
[0092] Parse the verification code and input it into the verification control for verification.
[0093] Optionally, the signature unit 503 uses an automatic signature script. The signature configuration includes the signature process to be executed. The signature unit 503 is specifically used for:
[0094] Perform format conversion on the signature file and signature configuration;
[0095] Read the converted signature file and signature configuration, and obtain the corresponding signature webpage control;
[0096] Sign according to the signature process to be executed.
[0097] Optionally, following login unit 502, the following may also be included:
[0098] Locking unit 506 is used to trigger an account locking mechanism and issue an alarm notification if the number of consecutive verification failures exceeds a preset number.
[0099] Optionally, before acquiring unit 501, the following may also be included:
[0100] The inspection unit 507 is used to inspect the integrity of the POS program and obtain the inspection results;
[0101] Backup unit 508 is used to retrieve backup POS program if the test result indicates that the POS program has an incomplete problem. Backup POS program is a copy of the program that has passed the integrity test in advance.
[0102] This application also provides an electronic device, please refer to... Figure 6 The electronic device includes:
[0103] Processor 601, memory 602, input / output unit 603, bus 604;
[0104] The processor 601 is connected to the memory 602, the input / output unit 603, and the bus 604;
[0105] The memory 602 stores a program, and the processor 601 calls the program to execute it, such as... Figures 1 to 4 The automatic signing method shown in any of the embodiments.
[0106] This application also relates to a computer-readable storage medium on which a program is stored, which, when run on a computer, causes the computer to perform actions such as... Figures 1 to 4 The automatic signing method shown in any of the embodiments.
[0107] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0108] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.
[0109] The units described as separate components may or may not be physically separate. 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 units can be selected to achieve the purpose of this embodiment according to actual needs.
[0110] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0111] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it 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 all or 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 described in 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.
Claims
1. A method for automatic signature, characterized in that, The method includes: Obtain the signature file and signature configuration, both of which correspond to the POS program; When logging into a designated webpage using account information, if secondary verification is required, a verification code will be obtained and verified. After successful verification and login, a signature is made in the signature webpage control according to the signature file and the signature configuration. The signature webpage control corresponds to the signature configuration.
2. The method according to claim 1, characterized in that, The step of obtaining the signature file and signature configuration is implemented by compiling a script. After obtaining the signature file and signature configuration, the following steps are also included: Copy and package the signature file to obtain a packaged file; The packaged file and the signature configuration are uploaded to the API server. The signature configuration includes the POS device model, signature type, and packaged file path information.
3. The method according to claim 1, characterized in that, The account information includes a username and password. The step of logging into a specified webpage based on the account information is implemented through an automatic login script. Logging into a specified webpage based on the account information includes: The API server searches for the account and password in the credential manager to obtain search results. The API server communicates with the credential manager to achieve data interaction. If the search results indicate that the account and password exist in the credential manager, then login is performed on the designated webpage based on the account and password, and the designated webpage corresponds to the account.
4. The method according to claim 1, characterized in that, The process of obtaining and verifying the verification code includes: Retrieve the verification controls from the specified webpage; Send a verification code request to the API server to obtain a verification code, which is pre-stored in the API server's credential manager; The verification code is parsed and input into the verification control for verification.
5. The method according to claim 1, characterized in that, The step of signing in the signing webpage control according to the signature file and the signature configuration is implemented by an automatic signing script. The signature configuration includes the signing process to be executed. The step of signing in the signing webpage control according to the signature file and the signature configuration includes: Perform format conversion on the signature file and the signature configuration; Read the converted signature file and signature configuration, and obtain the corresponding signature webpage control; Perform the signing according to the signature process to be executed.
6. The method according to any one of claims 1-5, characterized in that, After obtaining and verifying the verification code, the process also includes: If the number of consecutive verification failures exceeds the preset limit, the account lockout mechanism will be triggered, and an alarm notification will be displayed.
7. The method according to any one of claims 1-5, characterized in that, Before obtaining the signature file and signature configuration, the following is also included: Verify the integrity of the POS program and obtain the verification results; If the test result indicates that the POS program has an incomplete problem, then the backup POS program is retrieved. The backup POS program is a copy of the program that has passed the integrity test in advance.
8. An automatic signature system, characterized in that, The system includes: The acquisition unit is used to acquire the signature file and the signature configuration, both of which correspond to the POS program. The login unit is used to obtain and verify a verification code when logging into a specified webpage based on account information, if secondary verification is required. The signing unit is used to sign the webpage control according to the signing file and the signing configuration after the verification is successful and the login is completed. The signing webpage control corresponds to the signing configuration.
9. An electronic device, characterized in that, The electronic device includes: Processor, memory, input / output units, and bus; The processor is connected to the memory, the input / output unit, and the bus; The memory stores a program, which the processor invokes to perform the automatic signature method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium contains a program that, when executed on a computer, performs the automatic signing method as described in any one of claims 1 to 7.