Debugging method and device of application program, storage medium and computer equipment
Through the automated device account login process, the problem of developers frequently entering their account and password on mobile devices is solved, which improves development efficiency and optimizes the development process.
Patent Information
- Application Number
- CN202411623281.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-04-18
AI Technical Summary
The installation verification mechanism of existing mobile devices leads to frequent input of device accounts and passwords when developers debug applications, which increases operational complexity and waste of time and reduces development efficiency.
Through the automated device account login process, respond to the installation instructions of the target application, monitor whether the mobile device needs to log in to the account in real time, obtain the account login status information, determine the data to be entered from the preset mapping file, and automatically fill in the login area to complete the device account login.
It significantly improves the efficiency of developers installing and debugging applications on mobile devices that need to log in to their device accounts, reduces the waste of time caused by frequent entry of accounts and passwords, and optimizes the development process.
Smart Images

Figure CN119848824A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method and device for debugging an application program, a storage medium, and a computer device. Background Art
[0002] With the rapid development of mobile Internet technology, mobile devices such as smartphones and tablets have become an indispensable part of people's daily lives. The operating systems on these mobile devices have taken strict measures to protect user privacy and data security. Especially in the application installation process, existing mobile devices generally implement installation verification mechanisms, requiring users to log in and verify their device account and password before installing applications downloaded from unofficial application stores. This mechanism undoubtedly greatly improves the security of users' mobile devices, effectively prevents the intrusion of malicious software, and protects the safety of users' personal information and property.
[0003] However, this security measure has brought some inconvenience to the developer community. During the development and debugging phase before the application goes online, developers need to frequently install and uninstall the application on the test device to verify the various functions and performance of the software. However, due to the above security policies of existing mobile devices, developers need to enter the device account and password for verification every time they install an application from an unofficial channel, which not only increases the complexity of the operation process, but also significantly reduces the work efficiency of developers. This problem is particularly prominent in scenarios that require rapid iteration and frequent testing. Summary of the invention
[0004] In view of this, the present application provides a method and apparatus for debugging an application, a storage medium, and a computer device, which replaces the step of manually entering a device account by automating the device account login process, thereby avoiding the time waste caused by frequently entering a device account and password, significantly improving the developer's efficiency in installing and debugging applications on mobile devices that require logging in to a device account, and helping to optimize the development process.
[0005] According to one aspect of the present application, a method for debugging an application is provided, comprising:
[0006] In response to the installation instruction of the target application, control the target mobile device to install the target application, and monitor in real time whether the target mobile device needs to log in to the device account;
[0007] When it is detected that the target mobile device needs to log in to a device account, the account login status information corresponding to the target mobile device is obtained, and based on the account login status information, the data to be input of the target mobile device is determined from a preset mapping file, and the data to be input is filled into the device account login area, so that the target mobile device completes the device account login operation, wherein the preset mapping file stores a mapping relationship between the mobile device identifier and the device account and password;
[0008] Return to the step of real-time monitoring whether the target mobile device needs to log in to a device account until the target application is installed, and debug the target application installed on the target mobile device.
[0009] According to another aspect of the present application, there is provided a debugging device for an application program, comprising:
[0010] A monitoring module, for controlling a target mobile device to install the target application in response to an installation instruction of the target application, and monitoring in real time whether the target mobile device needs to log in to a device account;
[0011] An account login module, for obtaining account login status information corresponding to the target mobile device when it is detected that the target mobile device needs to log in to a device account, and based on the account login status information, determining the data to be input of the target mobile device from a preset mapping file, and filling the data to be input into the device account login area, so that the target mobile device completes the device account login operation, wherein the preset mapping file stores a mapping relationship between a mobile device identifier and a device account and a password;
[0012] The debugging module is used to return to the step of real-time monitoring whether the target mobile device needs to log in to the device account until the target application is installed, and debug the target application installed on the target mobile device.
[0013] According to another aspect of the present application, a storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the debugging method of the above application program is implemented.
[0014] According to another aspect of the present application, a computer device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the above-mentioned debugging method of the application program when executing the program.
[0015] By means of the above technical scheme, the present application provides a method and device for debugging an application, a storage medium, and a computer device. First, in response to the installation instruction of the target application, the target mobile device is controlled to install the target application. At the same time, it can also monitor in real time whether the target mobile device triggers the need to log in to the device account during the installation process. Once it is detected that the device account needs to be logged in, the account login status information of the current target mobile device can be obtained. Then, according to the account login status information and the mobile device identification of the target mobile device, the data to be input is searched in the preset mapping file. After determining the data to be input, the data to be input can be automatically filled in the device account login area to simulate the user input process, thereby completing the device account login operation. After the device account login is completed this time, it can continue to return to the monitoring state and check again whether there are other steps that need to log in to the device account. Until the target application is successfully installed, the target application installed on the target mobile device is debugged. The embodiment of the present application automates the device account login process and replaces the step of manually entering the device account, thereby avoiding the time waste caused by frequently entering the device account and password, significantly improving the efficiency of developers in installing and debugging applications on mobile devices that need to log in to the device account, and helping to optimize the development process.
[0016] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0018] Figure 1 A schematic diagram of a process flow of a method for debugging an application program provided in an embodiment of the present application is shown;
[0019] Figure 2 A schematic diagram of the structure of a debugging device for an application program provided in an embodiment of the present application is shown;
[0020] Figure 3 A schematic diagram of the device structure of a computer device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0021] The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.
[0022] In this embodiment, a method for debugging an application is provided, such as Figure 1 As shown, the method includes:
[0023] Step 101 , in response to an installation instruction of a target application, controlling a target mobile device to install the target application, and monitoring in real time whether the target mobile device needs to log in to a device account.
[0024] A method for debugging an application provided in an embodiment of the present application can be applied to a computer side, and the target mobile device is controlled by the computer side to install the target application. Specifically, it can simplify the process of application developers installing and debugging applications downloaded from unofficial application stores on the target mobile device. Here, the target mobile device can be a mobile device used to test the target application. First, when the developer or tester triggers the installation instruction of the target application, the target mobile device (such as a smart phone or tablet computer) can be controlled to install the target application in response to the installation instruction. At the same time, because some mobile device systems require users to log in to the device account for security verification when installing applications from unofficial sources, therefore, during the process of the target mobile device installing the target application, it is also possible to monitor in real time whether the target mobile device triggers the need to log in to the device account during the installation process.
[0025] Step 102, when it is monitored that the target mobile device needs to log in to the device account, the account login status information corresponding to the target mobile device is obtained, and based on the account login status information, the data to be input of the target mobile device is determined from the preset mapping file, and the data to be input is filled in the device account login area, so that the target mobile device completes the device account login operation, wherein the preset mapping file stores the mapping relationship between the mobile device identifier and the device account and password.
[0026] In this embodiment, once it is detected that a device account needs to be logged in, the account login status information of the current target mobile device can be obtained. Here, the account login status information can include two situations: the account has been logged in and the account has not been logged in. Then, according to the account login status information and the mobile device identification of the target mobile device, the data to be input is searched in the preset mapping file. Here, the data to be input can be the device account and password corresponding to the target mobile device. It should be noted that for different account login status information, the data to be input is also different. When the account login status information indicates that the account has been logged in, the data to be input can be only the password; when the account login status information indicates that the account has not been logged in, the data to be input can include the device account and password. Among them, the preset mapping file is set in advance and is used to store the mapping relationship between each mobile device and its corresponding device account and password. After determining the data to be input, the data to be input can be automatically filled in the device account login area to simulate the user input process, thereby completing the login operation of the device account. Here, the automatic filling process can be implemented by calling adb shell input text.
[0027] Step 103, returning to the step of real-time monitoring whether the target mobile device needs to log in to a device account, until the target application is installed, and debugging the target application installed on the target mobile device.
[0028] In this embodiment, after the device account login is completed, the monitoring state can be returned to check again whether there are other steps that require logging in to the device account. Until the target application is successfully installed, the target application installed on the target mobile device is debugged. The debugging process may include running the application, checking whether the function is normal, capturing logs, etc., which are not limited here.
[0029] By applying the technical solution of this embodiment, first, in response to the installation instruction of the target application, the target mobile device is controlled to install the target application. At the same time, it is also possible to monitor in real time whether the target mobile device triggers the need to log in to the device account during the installation process. Once the need to log in to the device account is detected, the account login status information of the current target mobile device can be obtained. Then, according to the account login status information and the mobile device identifier of the target mobile device, the data to be input is searched in the preset mapping file. After determining the data to be input, the data to be input can be automatically filled in the device account login area to simulate the user input process, thereby completing the login operation of the device account. After the device account login is completed this time, it can continue to return to the monitoring state and check again whether there are other steps that require logging in to the device account. Until the target application is successfully installed, the target application installed on the target mobile device is debugged. The embodiment of the present application replaces the step of manually entering the device account by automating the device account login process, avoiding the time waste caused by frequently entering the device account and password, significantly improving the efficiency of developers installing and debugging applications on mobile devices that need to log in to the device account, and helping to optimize the development process.
[0030] In an embodiment of the present application, optionally, the "determining the data to be input of the target mobile device from a preset mapping file based on the account login status information" in step 102 includes: when the account login status information corresponding to the target mobile device is logged in, obtaining the mobile device identification of the target mobile device, and calling a query command, querying the password corresponding to the mobile device identification of the target mobile device in the preset mapping file through the query command, and using the password as the data to be input; when the account login status information corresponding to the target mobile device is not logged in, obtaining the mobile device identification of the target mobile device, and calling a query command, querying the device account and password corresponding to the mobile device identification of the target mobile device in the preset mapping file through the query command, and using the device account and password as the data to be input.
[0031] In this embodiment, when it is detected that the login status of the account corresponding to the target mobile device is logged in, the mobile device identification of the mobile device is first obtained. The mobile device identification of each mobile device is unique and is used to find the corresponding device account and password in the preset mapping file. Then, the query command is called to query the corresponding password in the preset mapping file according to the mobile device identification. It should be noted that since the device account has been logged in, only the password needs to be queried at this time, and the login status can be maintained by re-entering the password. After the password is queried, it is automatically filled in the password input box in the device account login area as the data to be entered to simulate the behavior of the user entering the password.
[0032] When the account login status of the target mobile device is detected as not logged in, the mobile device identifier of the mobile device is also obtained first. Unlike the logged in state, the query command is called at this time to query the corresponding device account and password in the preset mapping file according to the mobile device identifier. Because the device account is not logged in, a complete device account and password are required to perform the login operation. After the device account and password are queried, they are automatically filled in as data to be input into the device account and password input boxes in the device account login area to simulate the user's behavior of entering the device account and password, thereby completing the login operation.
[0033] The embodiment of the present application dynamically determines the information that needs to be queried and filled in according to the login status of the device account, which is applicable to scenarios where the device account is logged in but password verification is required, and also to scenarios where the device account is not logged in at all.
[0034] In an embodiment of the present application, optionally, the method further includes: when the device account and / or password corresponding to the mobile device identifier of the target mobile device does not exist in the preset mapping file, outputting a preset mapping file correction interface; identifying the device account and / or password corresponding to the target mobile device from user input data filled in the preset mapping file correction interface, and updating the preset mapping file based on the mobile device identifier of the target mobile device, the device account and the password.
[0035] In this embodiment, when trying to query the device account and / or password of the target mobile device from the preset mapping file, first, the preset mapping file can be checked to see if there is an entry corresponding to the target mobile device identifier. If it is found that there is no corresponding entry, that is, the device account and / or password of the target mobile device is not recorded in the preset mapping file, a preset mapping file correction interface can be output. This interface is designed to allow developers to manually enter missing information. On the correction interface, developers can fill in the device account and / or password corresponding to the target mobile device. After that, the device account and / or password corresponding to the target mobile device can be identified from the data entered by the user. After identifying the device account and / or password entered by the user, the preset mapping file is updated based on the mobile device identifier, device account and password of the target mobile device. That is, a new entry is added to the preset mapping file, or an existing entry is updated when the previous information is incomplete or wrong. The embodiment of the present application increases the configuration flexibility of the preset mapping file by providing a correction interface to allow users to manually enter missing information.
[0036] In an embodiment of the present application, optionally, in step 101, "in response to the installation instruction of the target application, real-time monitoring of whether the target mobile device needs to log in to the device account" includes: in response to the installation instruction of the target application, calling the UI layout information acquisition command, and looping through the UI layout information acquisition command to analyze the UI tree of the target mobile device to determine whether there is a target view element in the UI tree, wherein the target view element includes an account input view element and / or a password input view element; when the target view element exists in the UI tree, it is determined that the target mobile device needs to log in to the device account.
[0037] In this embodiment, when the developer or tester triggers the installation instruction of the target application, the UI layout information acquisition command can be called in response to the installation instruction. The purpose of this command is to obtain the layout information of the UI interface currently displayed on the target mobile device. Specifically, the UI layout information acquisition command can be adb shell uiautomatordump. Through this command, the UI tree of the target mobile device can be analyzed cyclically, and the target view element can be determined by traversing the UI tree. If it exists, it means that the current UI interface requires the user to enter the device account and password to log in. Here, the UI tree is a data structure representing the hierarchical structure of the UI interface, which contains information about all view elements on the interface, such as buttons, text boxes, labels, etc.; the target view element includes an account input view element and / or a password input view element, which are usually used to collect the account and password information entered by the user. Then, when the target view element is detected in the UI tree, it can be inferred that the target mobile device needs to log in to the device account. The embodiment of the present application continuously and automatically analyzes the UI tree of the target mobile device to determine whether the device account needs to be logged in when installing the target application, which is effective and flexible, and is convenient for timely discovery of situations where the device account and password need to be entered.
[0038] In an embodiment of the present application, optionally, the "determining whether there is a target view element in the UI tree" includes: identifying an information input view element from the UI tree, and when an information input view element is identified, determining an element attribute corresponding to the information input view element, and when the element attribute is consistent with a preset attribute, determining that there is a target view element in the UI tree, wherein the element attribute includes at least one of an element identifier, an element description text, and an element editable state.
[0039] In this embodiment, it can be determined whether the target view element exists in the UI tree in the following manner. First, the UI tree of the target mobile device is traversed, and in the traversal process, all view elements belonging to the information input type are identified. Here, the information input view element generally includes a text box, a password box, etc., allowing the user to enter text or data. Then, for each identified information input view element, its corresponding element attributes are further determined. These element attributes describe the characteristics and status of the information input view element, which are crucial for determining whether it is a target view element. Element attributes may include, but are not limited to, element identifiers (such as ID or class name), element description text (such as placeholder text or label text), element editable status (indicating whether the user can edit the element), etc. Before debugging the application, a set of preset attributes can also be maintained in advance, which define the characteristics that the target view element should have. For example, for an account input view element, the preset attributes may include a specific element identifier, a description text containing keywords such as "account" or "user name", and attributes such as the editable status being true. Afterwards, the element attributes of each information input view element are compared with the preset attributes. If the attributes of an information input view element are found to be consistent with the preset attributes after comparison, then the element is considered to be the target view element. It should be noted that the types of element attributes and preset attributes are the same. For example, the preset attributes include element identifiers, element description texts, and element editable states. If the element identifier of an information input view element hits the element identifier in the preset attributes, the element description text of the information input view element hits the description text in the preset attributes, and the editable state of the information input view element hits the element editable state in the preset attributes, then it means that the information input view element is the target view element. Through the above comparison process, it can be determined whether there is a target view element in the UI tree. By comparing the element attributes of the information input view element with the preset attributes, the embodiment of the present application can more accurately identify the target view element and reduce the possibility of misjudgment and missed judgment. In addition, the preset attributes can be adjusted as needed to adapt to UI changes of different applications and mobile devices.
[0040] In an embodiment of the present application, optionally, when the target mobile device includes multiple devices, the "response to the installation instruction of the target application, control the target mobile device to install the target application" in step 101 includes: responding to the installation instruction of the target application, determining an idle thread from multiple threads, and allocating an idle thread to each target mobile device, and installing the target application for each target mobile device through the allocated idle thread.
[0041] In this embodiment, when installing the target application to multiple target mobile devices at the same time, multithreading can be used for installation. Multithreading allows multiple tasks to be processed simultaneously, and each task is executed in an independent thread, thereby improving the overall execution efficiency and response speed. Specifically, first, one or more thread pools can be maintained, which contain multiple threads that can be used to execute tasks. When receiving the installation instruction of the target application, you can first check which threads are currently idle (i.e., there is no task being executed). After determining the idle thread, an independent idle thread can be assigned to each target mobile device. This one-to-one allocation method ensures that each device can independently receive and execute the installation instruction, which can avoid thread conflicts and unnecessary waiting time, thereby ensuring that each installation task can be started as soon as possible. Afterwards, through the idle thread corresponding to each target mobile device, the target mobile device is controlled to install the target application. The embodiment of the present application allocates an idle thread to each target mobile device, and then installs the target application for each target mobile device, which can significantly improve the efficiency and response speed of installing the target application on multiple devices at the same time. At the same time, each device has its own independent thread to handle the installation task, reducing interference and dependence between each other.
[0042] In an embodiment of the present application, optionally, the preset mapping file is an encrypted file; the step 101 of "determining the data to be input of the target mobile device from the preset mapping file based on the account login status information, and filling the data to be input into the device account login area" includes: obtaining the private key corresponding to the preset mapping file from the blockchain, decrypting the preset mapping file according to the private key and a preset algorithm; determining the data to be input of the target mobile device from the decrypted preset mapping file based on the account login status information, filling the data to be input into the device account login area, and deleting the decrypted preset mapping file and the data to be input.
[0043] In this embodiment, the preset mapping file can be an encrypted file. The preset mapping file stores information about the device account and the corresponding password, which is highly sensitive and can be encrypted to prevent unauthorized access. This encryption can use a strong encryption algorithm and rely on one or more keys to perform encryption and decryption operations. Specifically, the private key associated with the preset mapping file (the key for decrypting the file) may not be directly stored locally or in an easily accessible place, but may be stored on the blockchain, and the encrypted preset mapping file may be stored locally. Since any changes to the private key will be recorded and verified by the nodes in the blockchain network, the distributed and tamper-proof characteristics of the blockchain can make the storage of the private key safer. When the preset mapping file needs to be decrypted, the corresponding private key can be retrieved from the blockchain, and the encrypted preset mapping file can be decrypted using the private key obtained from the blockchain and the preset decryption algorithm (such as key decryption of a symmetric encryption algorithm, or private key decryption of an asymmetric encryption algorithm). Next, based on the account login status information, the corresponding target mobile device's input data is determined from the decrypted preset mapping file. The input data is then automatically filled in the device's account login area to complete the device account login operation. In addition, for security reasons, after completing the data filling, the decrypted preset mapping file and the extracted data to be input are immediately deleted, which helps to reduce the residence time of sensitive data in the system and reduce the risk of data leakage. The embodiment of the present application ensures the security of the preset mapping file and private key through encryption and blockchain technology, which can effectively avoid the risk of unauthorized access to the preset mapping file and data leakage; in addition, after the data to be input is filled in the device account login area, the decrypted preset mapping file and the data to be input are deleted in time, which can make the whole process imperceptible. Except for the person who wrote the preset mapping file, other people cannot successfully obtain the device account and password of the target mobile device, thereby further improving the security of the device account and password.
[0044] Further, as Figure 1 The specific implementation of the method, the embodiment of the present application provides a debugging device for an application program, such as Figure 2 As shown, the device comprises:
[0045] A monitoring module, for controlling a target mobile device to install the target application in response to an installation instruction of the target application, and monitoring in real time whether the target mobile device needs to log in to a device account;
[0046] An account login module, for obtaining account login status information corresponding to the target mobile device when it is detected that the target mobile device needs to log in to a device account, and based on the account login status information, determining the data to be input of the target mobile device from a preset mapping file, and filling the data to be input into the device account login area, so that the target mobile device completes the device account login operation, wherein the preset mapping file stores a mapping relationship between a mobile device identifier and a device account and a password;
[0047] The debugging module is used to return to the step of real-time monitoring whether the target mobile device needs to log in to the device account until the target application is installed, and debug the target application installed on the target mobile device.
[0048] Optionally, the account login module is used to:
[0049] When the account login status information corresponding to the target mobile device is logged in, obtaining the mobile device identification of the target mobile device, and calling a query command, querying the password corresponding to the mobile device identification of the target mobile device in the preset mapping file through the query command, and using the password as the data to be input;
[0050] When the account login status information corresponding to the target mobile device is not logged in, the mobile device identification of the target mobile device is obtained, and a query command is called. The device account and password corresponding to the mobile device identification of the target mobile device are queried in the preset mapping file through the query command, and the device account and password are used as the data to be input.
[0051] Optionally, the device further comprises:
[0052] An interface output module, configured to output a preset mapping file correction interface when the device account and / or password corresponding to the mobile device identifier of the target mobile device does not exist in the preset mapping file;
[0053] The file update module is used to identify the device account and / or password corresponding to the target mobile device from the user input data filled in the preset mapping file correction interface, and update the preset mapping file based on the mobile device identification of the target mobile device, the device account and the password.
[0054] Optionally, the monitoring module is used to:
[0055] In response to the installation instruction of the target application, a UI layout information acquisition command is called, and a UI tree of the target mobile device is cyclically analyzed through the UI layout information acquisition command to determine whether a target view element exists in the UI tree, wherein the target view element includes an account input view element and / or a password input view element;
[0056] When the target view element exists in the UI tree, it is determined that the target mobile device needs to log in to a device account.
[0057] Optionally, the monitoring module is further used to:
[0058] Identify an information input view element from the UI tree, and when an information input view element is identified, determine the element attribute corresponding to the information input view element, and when the element attribute is consistent with a preset attribute, determine that a target view element exists in the UI tree, wherein the element attribute includes at least one of an element identifier, an element description text, and an element editable state.
[0059] Optionally, when the target mobile device includes multiple devices, the monitoring module is further used to:
[0060] In response to the installation instruction of the target application, an idle thread is determined from multiple threads, and an idle thread is allocated to each target mobile device, and the target application is installed for each target mobile device through the allocated idle thread.
[0061] Optionally, the preset mapping file is an encrypted file; and the account login module is further used to:
[0062] Obtaining a private key corresponding to the preset mapping file from the blockchain, and decrypting the preset mapping file according to the private key and a preset algorithm;
[0063] Based on the account login status information, the data to be input of the target mobile device is determined from the decrypted preset mapping file, the data to be input is filled into the device account login area, and the decrypted preset mapping file and the data to be input are deleted.
[0064] It should be noted that for other corresponding descriptions of the functional units involved in the debugging device for an application provided in the embodiment of the present application, reference can be made to Figure 1 The corresponding description in the method will not be repeated here.
[0065] The present application also provides a computer device, which may be a personal computer, a server, a network device, etc. Figure 3As shown, the computer device includes a bus, a processor, a memory and a communication interface, and may also include an input and output interface and a display device. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store location information. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the steps in each method embodiment are implemented.
[0066] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0067] In one embodiment, a computer-readable storage medium is provided. The computer-readable storage medium may be non-volatile or volatile, and stores a computer program thereon. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0068] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0069] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0070] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0071] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0072] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for debugging an application, characterized in that: include: In response to the installation instruction of the target application, control the target mobile device to install the target application, and monitor in real time whether the target mobile device needs to log in to the device account; When it is detected that the target mobile device needs to log in to a device account, the account login status information corresponding to the target mobile device is obtained, and based on the account login status information, the data to be input of the target mobile device is determined from a preset mapping file, and the data to be input is filled into the device account login area, so that the target mobile device completes the device account login operation, wherein the preset mapping file stores a mapping relationship between the mobile device identifier and the device account and password; Return to the step of real-time monitoring whether the target mobile device needs to log in to a device account until the target application is installed, and debug the target application installed on the target mobile device.
2. The method according to claim 1, characterized in that The step of determining the data to be inputted of the target mobile device from a preset mapping file based on the account login status information includes: When the account login status information corresponding to the target mobile device is logged in, obtaining the mobile device identification of the target mobile device, and calling a query command, querying the password corresponding to the mobile device identification of the target mobile device in the preset mapping file through the query command, and using the password as the data to be input; When the account login status information corresponding to the target mobile device is not logged in, the mobile device identification of the target mobile device is obtained, and a query command is called. The device account and password corresponding to the mobile device identification of the target mobile device are queried in the preset mapping file through the query command, and the device account and password are used as the data to be input.
3. The method according to claim 2, characterized in that The method further comprises: When the device account and / or password corresponding to the mobile device identifier of the target mobile device does not exist in the preset mapping file, outputting a preset mapping file correction interface; The device account and / or password corresponding to the target mobile device is identified from the user input data filled in the preset mapping file correction interface, and the preset mapping file is updated based on the mobile device identification of the target mobile device, the device account and the password.
4. The method according to claim 1, characterized in that: In response to the installation instruction of the target application, real-time monitoring of whether the target mobile device needs to log in to the device account includes: In response to the installation instruction of the target application, a UI layout information acquisition command is called, and a UI tree of the target mobile device is cyclically analyzed through the UI layout information acquisition command to determine whether a target view element exists in the UI tree, wherein the target view element includes an account input view element and / or a password input view element; When the target view element exists in the UI tree, it is determined that the target mobile device needs to log in to a device account.
5. The method according to claim 4, characterized in that The determining whether a target view element exists in the UI tree comprises: Identify an information input view element from the UI tree, and when an information input view element is identified, determine the element attribute corresponding to the information input view element, and when the element attribute is consistent with a preset attribute, determine that a target view element exists in the UI tree, wherein the element attribute includes at least one of an element identifier, an element description text, and an element editable state.
6. The method according to claim 1, characterized in that When the target mobile device includes multiple devices, the step of controlling the target mobile device to install the target application in response to the installation instruction of the target application includes: In response to the installation instruction of the target application, an idle thread is determined from multiple threads, and an idle thread is allocated to each target mobile device, and the target application is installed for each target mobile device through the allocated idle thread.
7. The method according to claim 1, characterized in that The preset mapping file is an encrypted file; based on the account login status information, determining the data to be input of the target mobile device from the preset mapping file, and filling the data to be input into the device account login area, comprises: Obtaining a private key corresponding to the preset mapping file from the blockchain, and decrypting the preset mapping file according to the private key and a preset algorithm; Based on the account login status information, the data to be input of the target mobile device is determined from the decrypted preset mapping file, the data to be input is filled into the device account login area, and the decrypted preset mapping file and the data to be input are deleted.
8. A debugging device for an application, characterized in that: include: A monitoring module, for controlling a target mobile device to install the target application in response to an installation instruction of the target application, and monitoring in real time whether the target mobile device needs to log in to a device account; An account login module, for obtaining account login status information corresponding to the target mobile device when it is detected that the target mobile device needs to log in to a device account, and based on the account login status information, determining the data to be input of the target mobile device from a preset mapping file, and filling the data to be input into the device account login area, so that the target mobile device completes the device account login operation, wherein the preset mapping file stores a mapping relationship between a mobile device identifier and a device account and a password; The debugging module is used to return to the step of real-time monitoring whether the target mobile device needs to log in to the device account until the target application is installed, and debug the target application installed on the target mobile device.
9. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
10. A computer device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.