Automatic data backup method and device based on Bluetooth
Through Bluetooth simulation key and mouse applications, simulate terminal operations in the data backup device, solving the problem of complex and inauspicious data backup operations in the prior art, and achieving an efficient data backup process.
Patent Information
- Application Number
- CN202510041814.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-12-26
- Filing Date
- 2025-01-10
- Publication Date
- 2025-05-30
AI Technical Summary
The operation process of existing data backup equipment is complicated and cannot automatically backup data, resulting in low data backup efficiency.
Through the Bluetooth simulation key and mouse application, screenshot instructions are sent to the target terminal, page images are received, and target controls and simulation operations to be operated based on the image. Through the Bluetooth simulation key and mouse application, data backup is performed in the terminal until all necessary simulation operations are completed.
It realizes the automation of the data backup process, simplifies the operation process, and improves the efficiency of data backup.
Smart Images

Figure CN120066854A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data processing, and particularly relates to a Bluetooth-based automated data backup method and device. Background Art
[0002] With the gradual popularization of terminals, the backup of terminal data has become increasingly important. If data is lost due to a failure of the terminal operating system or hardware failure, it will cause huge losses to terminal users. Therefore, it is necessary to backup terminal data.
[0003] The existing data backup devices usually require users to manually open the developer options or USB (Universal Serial Bus) debugging mode of the terminal for backing up terminal data. However, both the developer options and USB debugging mode are hidden settings of the terminal, and the opening process is relatively cumbersome and complex. Moreover, the opening processes of the developer options or USB debugging mode for terminals with different system versions are different, resulting in users being unable to open the developer options or USB, causing data backup failure. It can be seen that the existing data backup methods have complex operation processes, and due to the inability to automatically backup data, the data backup efficiency is low. Summary of the Invention
[0004] The purpose of the present invention is to automate the data backup process by simulating a keyboard and mouse through Bluetooth, and improve the data backup efficiency.
[0005] In a first aspect, an embodiment of the present invention provides a Bluetooth-based automated data backup method, which is applied to a data backup device. The data backup device runs a Bluetooth keyboard and mouse simulation application program, and the data backup device is connected to a target terminal through Bluetooth. The target terminal is a terminal for which data is to be backed up. The method includes:
[0006] Sending a screenshot instruction to the target terminal, so that after receiving the screenshot instruction, the target terminal performs a screenshot operation on the current page to obtain a page image of the current page;
[0007] Receiving the page image sent by the target terminal;
[0008] According to the page image, determining target controls required for the data backup process and target simulation operations to be performed on the target controls;
[0009] Performing the target simulation operations on the target controls in the current page of the target terminal through the Bluetooth keyboard and mouse simulation application program;
[0010] Determining whether target simulation operations have been performed on all target controls required for the data backup process;
[0011] If it is determined that the target simulation operation has been performed on all the target controls, send a backup data acquisition request to the target terminal, receive the backup data sent by the target terminal, and save the backup data.
[0012] Optionally, determining the target controls required for the data backup process according to the page image, and the target simulation operations to be performed on the target controls includes:
[0013] Determine the similarity between the page image and each preset image, where the preset image is a page image related to data backup stored in advance;
[0014] Determine the preset image with the greatest similarity to the page image as the target preset image;
[0015] Determine the controls that need to be operated in the target preset image as the target controls according to the pre - setting, and determine the simulation operations corresponding to the target controls as the target simulation operations according to the pre - setting.
[0016] Optionally, the method further includes:
[0017] Identify the position information of the target control in the current page according to the page image;
[0018] Correspondingly, performing the target simulation operation on the target control in the current page of the target terminal through the Bluetooth - simulated keyboard and mouse application program includes:
[0019] Perform the target simulation operation on the target control in the current page of the target terminal through the Bluetooth - simulated keyboard and mouse application program according to the position information.
[0020] Optionally, identifying the position information of the target control in the current page according to the page image includes:
[0021] Perform gray - scale processing on the page image to obtain the gray - scale image corresponding to the page image;
[0022] Perform binarization processing on the gray - scale image to obtain the binarized image corresponding to the page image;
[0023] Perform optical character recognition on the binarized image to obtain the position information of the target control in the binarized image;
[0024] Based on the position information of the target control in the binarized image, determine the position information of the target control in the current page.
[0025] Optionally, determine whether target simulation operations have been performed on all target controls required to be operated during the data backup process, including:
[0026] Obtain pre-set target text information, where the target text information includes the control names of all target controls required to be operated during the data backup process;
[0027] Parse the target text information to obtain the control names of all target controls required to be operated during the data backup process;
[0028] Compare the control names of all the target controls with the control names of the target controls on which the target simulation operations have been performed;
[0029] If the control names of the target controls on which the target simulation operations have been performed include the control names of all the target controls, determine that the target simulation operations have been performed on all the target controls.
[0030] Optionally, the method further includes:
[0031] If it is determined that the target simulation operations have not been performed on all target controls required to be operated during the data backup process, return to execute the step of sending the screenshot instruction to the target terminal until it is determined that the target simulation operations have been performed on all the target controls.
[0032] In a second aspect, an embodiment of the present invention provides a Bluetooth-based automated data backup device, which is applied to a data backup device. The data backup device runs a Bluetooth simulation keyboard and mouse application program, and the data backup device is connected to a target terminal through Bluetooth. The target terminal is a terminal for data to be backed up. The device includes:
[0033] A screenshot instruction sending module, configured to send a screenshot instruction to the target terminal, so that after receiving the screenshot instruction, the target terminal performs a screenshot operation on the current page to obtain a page image of the current page;
[0034] A page image receiving module, configured to receive the page image sent by the target terminal;
[0035] A first simulation operation determination module, configured to determine, according to the page image, target controls required to be operated during the data backup process and target simulation operations to be performed on the target controls;
[0036] A simulation operation execution module, configured to perform the target simulation operations on the target controls in the current page of the target terminal through the Bluetooth simulation keyboard and mouse application program;
[0037] A second simulation operation determination module, configured to determine whether target simulation operations have been performed on all target controls required to be operated during the data backup process;
[0038] A data backup module, configured to, if it is determined that the target simulation operation has been performed on all the target controls, send a backup data acquisition request to the target terminal, receive the backup data sent by the target terminal, and save the backup data.
[0039] In a third aspect, an embodiment of the present invention provides a data backup device, including:
[0040] At least one processor;
[0041] A memory for storing executable instructions of the at least one processor;
[0042] Wherein, the at least one processor is configured to execute the instructions to implement the method described in the first aspect.
[0043] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, when the instructions in the computer-readable storage medium are executed by a processor of a data backup device, enabling the data backup device to execute the method described in the first aspect.
[0044] In a fifth aspect, an embodiment of the present invention provides a computer program product, including a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.
[0045] The technical solution provided by the embodiment of the present invention, when it is necessary to back up the data of the target terminal to the data backup device, the data backup device runs a Bluetooth simulated keyboard and mouse application program, and the data backup device is connected to the target terminal through Bluetooth. The data backup device sends a screenshot instruction to the target terminal. After receiving the screenshot instruction, the terminal performs a screenshot operation on the current page and sends the intercepted page image to the data backup device. After receiving the page image, the data backup device can determine the target controls that need to be operated during the data backup process according to the page image, and the target simulation operations that need to be performed on the target controls; then through the Bluetooth simulated keyboard and mouse application program, perform the target simulation operations on the target controls in the current page of the target terminal. And determine whether the target simulation operation has been performed on all the target controls that need to be operated during the data backup process. If it is determined that the target simulation operation has been performed on all the target controls, it means that all the simulation operations during the data backup process have been completed. At this time, data backup can be performed. The data backup device sends a backup data acquisition request to the target terminal, and the target terminal sends the data to be backed up to the data backup device, and the data backup device saves the backup data, thereby realizing an automated data backup process and improving the data backup efficiency.
[0046] It can be seen that the Bluetooth - simulated keyboard and mouse application can achieve simulated manual operations on the target terminal, without the need for manual opening of the hidden settings option "developer mode" and "USB debugging mode", and without the need to separately install an automation application on the terminal, simplifying the data backup process and improving the data backup efficiency. Description of the Drawings
[0047] Figure 1 It is a schematic diagram of the overall technical solution provided by the embodiment of the present invention;
[0048] Figure 2 It is a flowchart of a Bluetooth - based automated data backup method provided by the embodiment of the present invention;
[0049] Figure 3 For Figure 2 It is a flowchart of the specific implementation manner of step S230 in
[0050] Figure 4 It is a flowchart of a specific implementation manner for identifying the position information of the target control in the current page according to the page image provided by the embodiment of the present invention;
[0051] Figure 5 For Figure 2 It is a flowchart of the specific implementation manner of step S250 in
[0052] Figure 6 It is a schematic structural diagram of a Bluetooth - based automated data backup device provided by the embodiment of the present invention;
[0053] Figure 7 It is a schematic structural diagram of an electronic device provided by the embodiment of the present invention. Specific Embodiment
[0054] The present invention will be described in detail below through embodiments.
[0055] With the gradual popularization of terminals, the backup of terminal data has become increasingly important. If data is lost due to a failure of the terminal operating system or a hardware failure, it will cause huge losses to terminal users. Therefore, it is necessary to back up terminal data.
[0056] The existing data backup devices usually require users to manually open the developer options or USB (Universal Serial Bus) debugging mode of the terminal for backing up terminal data. However, both the developer options and the USB debugging mode are hidden settings of the terminal, and the opening process is relatively cumbersome and complex. Moreover, the opening processes of the developer options or USB debugging mode for terminals with different system versions are different, resulting in users being unable to open the developer options or USB debugging mode, causing data backup failures. It can be seen that the existing data backup method has a complex operation process, and due to the inability to automate data backup, the data backup efficiency is relatively low.
[0057] To solve the above technical problems, in the technical solution of the present invention, the data backup device runs a Bluetooth simulated keyboard and mouse application program, and the data backup device is connected to the terminal via Bluetooth. The Bluetooth simulated keyboard and mouse application program can perform automated simulation operations such as clicking and text input on the terminal's page. The Bluetooth simulated keyboard and mouse application program simulates a keyboard and a mouse in the data backup device through Bluetooth technology to perform automated operations on the terminal through the Bluetooth simulated keyboard and the Bluetooth simulated mouse.
[0058] Specifically, the data backup device sends a screenshot instruction to the terminal. After receiving the screenshot instruction, the terminal performs a screenshot operation on the current page to obtain the page image of the current page. After obtaining the page image, it is possible to determine the target control required to be operated in the data backup process and the target simulation operation to be performed on the target control according to the pre-set target control and the target simulation operation to be performed on the target control, and through the Bluetooth simulated keyboard and mouse application program, perform the target simulation operation on the target control in the current page of the terminal, and determine whether the target simulation operation has been performed on all the target controls required to be operated in the data backup process. If it is determined that the target simulation operation has been performed on all the target controls, it means that all the simulation operations in the data backup process have been completed. At this time, data backup can be carried out, obtain the backup data from the terminal, and save the backup data.
[0059] The Bluetooth simulated keyboard and mouse can simulate manual operations on the terminal, with easy function implementation and better compatibility. There is no need for manual opening of the hidden setting option of the developer mode and the USB debugging mode, and there is no need to install an automated application separately on the terminal, which simplifies the data backup process and improves the data backup efficiency.
[0060] The technical solution of the present invention is widely applicable to the automated data extraction of data backup devices, can achieve connection and extraction immediately, reduce manual intervention, and greatly improve the terminal data backup efficiency.
[0061] To describe the solution clearly, the overall technical solution of the embodiments of the present invention will be elaborated first below.
[0062] As Figure 1 shown, the Bluetooth-based automated data backup method according to an embodiment of the present invention involves a data backup device and a terminal. The terminal can be a mobile phone or the like. The purpose of the present invention is to back up the data in the terminal in the data backup device.
[0063] The data backup device runs a Bluetooth emulated keyboard and mouse application program. The terminal is connected to the data backup device via Bluetooth. In this way, the terminal can connect to the Bluetooth emulated keyboard and mouse application program of the data backup device. And the terminal is also connected by means such as USB. In this way, the data backup device can access the data of the terminal to achieve data backup.
[0064] After the terminal is connected to the data backup device, the data backup device can send a screenshot instruction to the terminal through the Bluetooth emulated keyboard and mouse application program. After receiving the screenshot instruction, the terminal parses the screenshot instruction and sends a page image to the data backup device.
[0065] Multiple preset images can be preset in the data backup device. These multiple images are page images related to data backup. Each preset image includes target controls that need to be operated during the data backup process. After receiving the page image, the data backup device can calculate the similarity between the page image and each preset image. If the similarity between a preset image and the page image is large, it means that the controls included in this preset image are highly similar to the controls included in the page image. Therefore, the preset image with the largest similarity to the page image is determined as the target preset image, and the controls that need to be operated in the target preset image that are preset in advance are determined as the target controls, thereby determining the target controls that need to be operated in the page image intercepted by the terminal. In practical applications, the number of the target controls can be one or multiple. And the data backup device has preset the simulated operations corresponding to the target controls. Therefore, the simulated operations corresponding to the target controls preset in advance can be determined as the target simulated operations. The target simulated operations can be clicks and / or inputs. Among them, click operations and input operations can be performed on one target control or multiple target controls within the same page.
[0066] Moreover, after receiving the page image, the data backup device can perform the following image processing operations on the page image: perform grayscale processing on the page image to obtain the grayscale image corresponding to the page image; perform binarization processing on the grayscale image to obtain the binarized image corresponding to the page image; and perform optical character recognition on the binarized image to obtain the control name and position information of the target control in the binarized image. In this way, the position information of each target control in the binarized image can be obtained. Finally, based on the position information of the target control in the binarized image, the position information of the target control in the current page is determined, which helps the Bluetooth simulated keyboard and mouse application program to perform target simulation operations on the target control of the current page according to this position information in subsequent steps.
[0067] After determining the target control to be operated, the target simulation operation, and the target simulation operation to be performed on the target control, the Bluetooth simulated keyboard and mouse application program can perform the target simulation operation on the target control in the current page of the target terminal. After the terminal receives the target simulation operation, it starts to execute the data backup process. Since multiple pages of the target terminal may need to perform target simulation operations on the target control during the data backup process, the data backup device needs to determine whether the target simulation operation has been performed on all the target controls required for the data backup process. If it is determined that the target simulation operation has been performed on all the target controls, it means that all the simulation operations during the data backup process have been completed. At this time, data backup can be performed. The data backup device obtains the backup data from the terminal and saves the backup data, thereby automatically backing up the data of the terminal to the data backup device.
[0068] Among them, the specific implementation method for the data backup device to determine whether the target simulation operation has been performed on all the target controls required for the data backup process is as follows: The data backup device pre-sets the target text information, which includes the control names of all the target controls required for the data backup process. The data backup device can obtain the target text information from the local, parse the target text information, and obtain the control names of all the target controls required for the data backup process. Compare the control names of all the target controls with the control names of the target controls on which the target simulation operation has been performed. If the control names of the target controls on which the target simulation operation has been performed include the control names of all the target controls, it means that all the simulation operations during the data backup process have been completed, that is, it is determined that the target simulation operation has been performed on all the target controls.
[0069] Moreover, if the data backup device determines that target simulation operations have not been performed on all target controls that need to be operated during the data backup process, it means that target controls on multiple other pages of the target terminal still need to be operated. That is to say, after performing the target simulation operation on the target control of the current page, the page of the target terminal jumps from the current page to the next page, and the next page becomes the updated current page. The data backup device needs to perform the target simulation operation on the target control in the updated current page. Therefore, it is possible to return to the step of sending a screenshot instruction to the target terminal and re-execute all steps of this solution until it is determined that target simulation operations have been performed on all target controls, and then stop returning to the step of sending a screenshot instruction to the target terminal.
[0070] As can be seen from the above description, when the data backup device performs data backup on the data of the target terminal through the Bluetooth simulation keyboard and mouse application, after performing the target simulation operation on the target control of the current page, the target terminal jumps from the current page to the next page, and the next page is the updated current page. If the target simulation operation still needs to be performed on the target control in the updated current page, then continue to return and execute this solution. After executing this solution once, the page of the target terminal will continue to jump to the next page, and the next page is the updated current page. If the target simulation operation still needs to be performed on the target control in the updated current page, then continue to return and execute this solution until it is determined that target simulation operations have been performed on all target controls, and then stop returning to the step of sending a screenshot instruction to the target terminal.
[0071] It can be seen that through the technical solution provided by the embodiment of the present invention, during the data backup process, there is no need to manually open the hidden setting options of the developer mode and the USB debugging mode, and there is no need to install an automation application on the terminal separately, which simplifies the data backup process and improves the data backup efficiency.
[0072] Next, a Bluetooth-based automated data backup method, device, and electronic device provided by the embodiment of the present invention will be elaborated in detail.
[0073] A Bluetooth-based automated data backup method provided by an embodiment of the present invention is applied to a data backup device. The data backup device runs a Bluetooth simulation keyboard and mouse application, and the data backup device is connected to a target terminal through Bluetooth. The target terminal is the terminal for which data needs to be backed up.
[0074] As Figure 2 shown, the Bluetooth-based automated data backup method may include the following steps:
[0075] S210, send a screenshot instruction to the target terminal so that after receiving the screenshot instruction, the target terminal performs a screenshot operation on the current page to obtain a page image of the current page.
[0076] S220 receives the page image sent by the target terminal.
[0077] When it is necessary to back up the data of the target terminal to the data backup device, the data backup device sends a screenshot instruction to the target terminal. After receiving the screenshot instruction, the target terminal takes a screenshot of the current page to obtain the page image of the current page, and sends the page image to the data backup device.
[0078] S230 determines the target control required for the data backup process based on the page image, and the target simulation operation to be performed on the target control.
[0079] After obtaining the page image, the target control required for the operation in the page image and the target simulation operation to be performed on the target control can be determined according to the target control that needs to be operated in the preset data backup process and the target simulation operation performed on the target control.
[0080] S240 performs the target simulation operation on the target control in the current page of the target terminal through the Bluetooth simulated keyboard and mouse application.
[0081] Specifically, after determining the target control that needs to be operated and the target simulation operation to be performed on the target control, the target simulation operation can be performed on the target control in the current page of the target terminal through the Bluetooth simulated keyboard and mouse application. After the terminal receives the target simulation operation, the data backup process starts.
[0082] As an implementation manner of the embodiment of the present invention, the Bluetooth-based automated data backup method may further include the following step a:
[0083] Step a: Identify the position information of the target control in the current page according to the page image.
[0084] At this time, performing the target simulation operation on the target control in the current page of the target terminal through the Bluetooth simulated keyboard and mouse application may include the following step b:
[0085] Step b: Perform the target simulation operation on the target control in the current page of the target terminal through the Bluetooth simulated keyboard and mouse application according to the position information.
[0086] Specifically, in order to accurately perform the target simulation operation on the target control in the current page of the target terminal through the Bluetooth simulated keyboard and mouse application, it is necessary to determine the position information of the target control in the current page. In this way, the Bluetooth simulated keyboard and mouse application can perform the target simulation operation on the target control at the corresponding position in the current page based on the position information.
[0087] S250, determine whether the target simulation operation has been performed on all target controls required for the data backup process.
[0088] During the data backup process, it may be necessary to perform target simulation operations on target controls in multiple pages of the target terminal. Therefore, the data backup device needs to determine whether the target simulation operation has been performed on all target controls required for the data backup process.
[0089] For the sake of clear description of the solution, the specific implementation manner of S250 will be elaborated in detail in the following embodiments.
[0090] S260, if it is determined that the target simulation operation has been performed on all target controls, send a backup data acquisition request to the target terminal, receive the backup data sent by the target terminal, and save the backup data.
[0091] If it is determined that the target simulation operation has been performed on all target controls, it means that all simulation operations in the data backup process have been completed. At this time, data backup can be performed. The data backup device obtains the backup data from the terminal and saves the backup data, so as to automatically back up the data of the terminal to the data backup device.
[0092] In one implementation, the Bluetooth-based automated data backup method may further include:
[0093] If it is determined that the target simulation operation has not been performed on all target controls required for the data backup process, return to the step of sending a screenshot instruction to the target terminal until it is determined that the target simulation operation has been performed on all target controls.
[0094] Specifically, if the data backup device determines that the target simulation operation has not been performed on all target controls required for the data backup process, it means that it is still necessary to operate the target controls in other multiple pages of the target terminal. That is to say, after performing the target simulation operation on the target controls of the current page, the page of the target terminal jumps from the current page to the next page, and the next page becomes the updated current page. The data backup device needs to perform the target simulation operation on the target controls in the updated current page. Therefore, it can return to the step of sending a screenshot instruction to the target terminal and re-execute all steps of this solution until it is determined that the target simulation operation has been performed on all target controls, and then stop returning to the step of sending a screenshot instruction to the target terminal.
[0095] In the technical solution provided by the embodiment of the present invention, when it is necessary to back up the data of the target terminal to the data backup device, the data backup device runs a Bluetooth simulated keyboard and mouse application program, and the data backup device is connected to the target terminal through Bluetooth. The data backup device sends a screenshot instruction to the target terminal. After receiving the screenshot instruction, the terminal performs a screenshot operation on the current page and sends the intercepted page image to the data backup device. After receiving the page image, the data backup device can determine the target control that needs to be operated during the data backup process and the target simulated operation to be performed on the target control; then, through the Bluetooth simulated keyboard and mouse application program, the target simulated operation is performed on the target control in the current page of the target terminal. And it is determined whether the target simulated operation has been performed on all the target controls that need to be operated during the data backup process. If it is determined that the target simulated operation has been performed on all the target controls, it means that all the simulated operations during the data backup process have been completed. At this time, data backup can be performed. The data backup device sends a backup data acquisition request to the target terminal, and the target terminal sends the data to be backed up to the data backup device. The data backup device saves the backup data, thus realizing an automated data backup process and improving the data backup efficiency.
[0096] It can be seen that the Bluetooth simulated keyboard and mouse application program can simulate manual operations on the target terminal, without the need to manually open the hidden setting option Developer Mode and USB Debugging Mode, and without the need to install an automated application separately on the terminal, simplifying the data backup process and improving the data backup efficiency.
[0097] In one implementation manner, S230, according to the page image, determine the target control that needs to be operated during the data backup process and the target simulated operation to be performed on the target control. As Figure 3 shown, it may include the following steps:
[0098] S231, determine the similarity between the page image and each preset image, where the preset image is a page image related to data backup stored in advance.
[0099] S232, determine the preset image with the highest similarity to the page image as the target preset image.
[0100] S233, determine the control that needs to be operated in the target preset image as the target control, and determine the simulated operation corresponding to the target control as the target simulated operation.
[0101] Specifically, multiple preset images can be pre-set in the data backup device. These multiple images are page images related to data backup, and each preset image includes target controls that need to be operated during the data backup process. After the data backup device receives the page image, it can calculate the similarity between the page image and each preset image. If the similarity between a preset image and the page image is large, it indicates that the controls included in this preset image are highly similar to the controls included in the page image. Therefore, the preset image with the largest similarity to the page image is determined as the target preset image, and the controls that need to be operated in the target preset image, which are pre-set, are determined as the target controls, thereby determining the target controls that need to be operated in the page image intercepted by the terminal. In practical applications, the number of target controls can be one or multiple. Moreover, the data backup device has pre-set the simulated operations corresponding to the target controls. Therefore, the simulated operations corresponding to the target controls that are pre-set can be determined as the target simulated operations. The target simulated operations can be clicks and / or inputs, where click operations and input operations can be performed on one target control or multiple target controls within the same page.
[0102] As an implementation manner of the embodiment of the present invention, according to the page image, identify the position information of the target control in the current page, such as Figure 4 shown, the following steps can be included:
[0103] S410, perform grayscale processing on the page image to obtain the grayscale image corresponding to the page image.
[0104] S420, perform binarization processing on the grayscale image to obtain the binarized image corresponding to the page image.
[0105] S430, perform optical character recognition on the binarized image to obtain the position information of the target control in the binarized image.
[0106] S440, based on the position information of the target control in the binarized image, determine the position information of the target control in the current page.
[0107] Specifically, after the data backup device receives the page image, it can perform the following image processing operations on the page image: perform grayscale processing on the page image to obtain the grayscale image corresponding to the page image; perform binarization processing on the grayscale image to obtain the binarized image corresponding to the page image; and perform optical character recognition on the binarized image to obtain the control name and position information of the target control in the binarized image. In this way, the position information of each target control in the binarized image can be obtained; finally, based on the position information of the target control in the binarized image, the position information of the target control in the current page is determined.
[0108] In one embodiment, at S250, it is determined whether target simulation operations have been performed on all target controls that need to be operated during the data backup process. As Figure 5 shown, the following steps may be included:
[0109] At S251, obtain the pre-set target text information.
[0110] Among them, the target text information includes the control names of all target controls that need to be operated during the data backup process.
[0111] At S252, parse the target text information to obtain the control names of all target controls that need to be operated during the data backup process.
[0112] At S253, compare the control names of all target controls with the control names of the target controls on which the target simulation operations have been performed.
[0113] At S254, if the control names of the target controls on which the target simulation operations have been performed include the control names of all target controls, it is determined that the target simulation operations have been performed on all target controls.
[0114] Specifically, the data backup device has pre-set the target text information, which includes the control names of all target controls that need to be operated during the data backup process; the data backup device can obtain the target text information from the local, parse the target text information to obtain the control names of all target controls that need to be operated during the data backup process; compare the control names of all target controls with the control names of the target controls on which the target simulation operations have been performed; if the control names of the target controls on which the target simulation operations have been performed include the control names of all target controls, it indicates that all simulation operations during the data backup process have been completed, that is, it is determined that the target simulation operations have been performed on all target controls.
[0115] In a second aspect, an embodiment of the present invention provides a Bluetooth-based automated data backup device, which is applied to a data backup device. The data backup device runs a Bluetooth simulation keyboard and mouse application program, and the data backup device is connected to a target terminal through Bluetooth. The target terminal is the terminal for the data to be backed up. As Figure 6 shown, the device includes:
[0116] A screenshot instruction sending module 610, configured to send a screenshot instruction to the target terminal, so that after receiving the screenshot instruction, the target terminal performs a screenshot operation on the current page to obtain a page image of the current page;
[0117] A page image receiving module 620, configured to receive the page image sent by the target terminal;
[0118] The first simulated operation determination module 630 is configured to determine, according to the page image, a target control required for an operation in the data backup process and a target simulated operation to be performed on the target control;
[0119] The simulated operation execution module 640 is configured to, through a Bluetooth simulated keyboard and mouse application, perform the target simulated operation on the target control in the current page of the target terminal;
[0120] The second simulated operation determination module 650 is configured to determine whether target simulated operations have been performed on all target controls required for the data backup process;
[0121] The data backup module 660 is configured to, if it is determined that target simulated operations have been performed on all the target controls, send a backup data acquisition request to the target terminal, receive the backup data sent by the target terminal, and save the backup data.
[0122] In the technical solution provided by the embodiment of the present invention, when it is necessary to back up the data of the target terminal to the data backup device, the data backup device runs a Bluetooth simulated keyboard and mouse application, and the data backup device is connected to the target terminal through Bluetooth. The data backup device sends a screenshot instruction to the target terminal. After receiving the screenshot instruction, the terminal performs a screenshot operation on the current page and sends the intercepted page image to the data backup device. After receiving the page image, the data backup device can determine a target control required for the data backup process and a target simulated operation to be performed on the target control according to the page image; then, through the Bluetooth simulated keyboard and mouse application, perform the target simulated operation on the target control in the current page of the target terminal. And determine whether target simulated operations have been performed on all target controls required for the data backup process. If it is determined that target simulated operations have been performed on all target controls, it means that all simulated operations in the data backup process have been completed. At this time, data backup can be performed. The data backup device sends a backup data acquisition request to the target terminal, and the target terminal sends the data to be backed up to the data backup device. The data backup device saves the backup data, thereby realizing an automated data backup process and improving the data backup efficiency.
[0123] It can be seen that the Bluetooth simulated keyboard and mouse application can simulate manual operations on the target terminal, without the need to manually open the hidden setting options of the developer mode and the USB debugging mode, and without the need to install an automated application on the terminal separately, simplifying the data backup process and improving the data backup efficiency.
[0124] Optionally, the first simulated operation determination module is specifically configured to:
[0125] Determine the similarity between the page image and each preset image, where the preset image is a page image related to data backup stored in advance;
[0126] Determine the preset image with the greatest similarity to the page image as the target preset image;
[0127] Determine the control to be operated in the target preset image, which is preset, as the target control, and determine the simulated operation corresponding to the target control, which is preset, as the target simulated operation.
[0128] Optionally, the device further includes:
[0129] A position information determination module, configured to identify the position information of the target control in the current page according to the page image;
[0130] Correspondingly, the simulated operation execution module is specifically configured to:
[0131] Execute the target simulated operation on the target control in the current page of the target terminal according to the position information through a Bluetooth simulated keyboard and mouse application.
[0132] Optionally, the position information determination module is specifically configured to:
[0133] Perform grayscale processing on the page image to obtain a grayscale image corresponding to the page image;
[0134] Perform binarization processing on the grayscale image to obtain a binarized image corresponding to the page image;
[0135] Perform optical character recognition on the binarized image to obtain the position information of the target control in the binarized image;
[0136] Determine the position information of the target control in the current page based on the position information of the target control in the binarized image.
[0137] Optionally, the second simulated operation determination module is specifically configured to:
[0138] Obtain preset target text information, where the target text information includes the control names of all target controls that need to be operated during the data backup process;
[0139] Parse the target text information to obtain the control names of all target controls that need to be operated during the data backup process;
[0140] Compare the control names of all the target controls with the control names of the target controls for which the target simulated operation has been executed;
[0141] If the control name of the target control for which the target simulation operation has been performed includes the control names of all the target controls, it is determined that the target simulation operation has been performed on all the target controls.
[0142] Optionally, the device further includes:
[0143] A screenshot instruction trigger module, configured to, if it is determined that the target simulation operation has not been performed on all the target controls required to be operated during the data backup process, trigger the screenshot instruction sending module to execute the step of sending the screenshot instruction to the target terminal until it is determined that the target simulation operation has been performed on all the target controls.
[0144] In a third aspect, an embodiment of the present invention provides a data backup device 700, as Figure 7 shown, including:
[0145] At least one processor 701;
[0146] A memory 702 for storing executable instructions of the at least one processor;
[0147] Wherein, the at least one processor is configured to execute the instructions to implement the method described in the first aspect.
[0148] In the technical solution provided by the embodiment of the present invention, when it is necessary to back up the data of the target terminal to the data backup device, the data backup device runs a Bluetooth simulated keyboard and mouse application program, and the data backup device is connected to the target terminal through Bluetooth. The data backup device sends a screenshot instruction to the target terminal. After receiving the screenshot instruction, the terminal performs a screenshot operation on the current page and sends the intercepted page image to the data backup device. After receiving the page image, the data backup device can determine the target controls required for the data backup process based on the page image, and the target simulation operations to be performed on the target controls; then, through the Bluetooth simulated keyboard and mouse application program, perform the target simulation operations on the target controls in the current page of the target terminal. And determine whether the target simulation operation has been performed on all the target controls required to be operated during the data backup process. If it is determined that the target simulation operation has been performed on all the target controls, it means that all the simulation operations during the data backup process have been completed. At this time, data backup can be performed. The data backup device sends a backup data acquisition request to the target terminal, and the target terminal sends the data to be backed up to the data backup device. The data backup device saves the backup data, thereby realizing an automated data backup process and improving the data backup efficiency.
[0149] It can be seen that the Bluetooth simulated keyboard and mouse application program can simulate manual operations on the target terminal, without the need to manually open the hidden setting option developer mode and USB debugging mode, and without the need to install an automated application on the terminal separately, simplifying the data backup process and improving the data backup efficiency.
[0150] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium. When the instructions in the computer-readable storage medium are executed by a processor of a data backup device, the data backup device can execute an automated data backup method based on Bluetooth.
[0151] In the technical solution provided by the embodiment of the present invention, when it is necessary to back up the data of a target terminal to a data backup device, the data backup device runs a Bluetooth simulated keyboard and mouse application program, and the data backup device is connected to the target terminal through Bluetooth. The data backup device sends a screenshot instruction to the target terminal. After receiving the screenshot instruction, the terminal performs a screenshot operation on the current page and sends the captured page image to the data backup device. After receiving the page image, the data backup device can determine the target control that needs to be operated during the data backup process and the target simulated operation to be performed on the target control; then, through the Bluetooth simulated keyboard and mouse application program, the target simulated operation is performed on the target control in the current page of the target terminal. And it is determined whether the target simulated operation has been performed on all the target controls required for the data backup process. If it is determined that the target simulated operation has been performed on all the target controls, it means that all the simulated operations during the data backup process have been completed. At this time, data backup can be performed. The data backup device sends a backup data acquisition request to the target terminal, and the target terminal sends the data to be backed up to the data backup device. The data backup device saves the backup data, thereby realizing an automated data backup process and improving the data backup efficiency.
[0152] It can be seen that the Bluetooth simulated keyboard and mouse application program can simulate manual operations on the target terminal, without the need to manually open the developer mode and USB debugging mode of the hidden settings option, and without the need to install an automated application separately on the terminal, simplifying the data backup process and improving the data backup efficiency.
[0153] In a fifth aspect, an embodiment of the present invention provides a computer program product, including a computer program, and when the computer program is executed by a processor, it implements an automated data backup method based on Bluetooth.
[0154] In the technical solution provided by the embodiment of the present invention, when it is necessary to back up the data of the target terminal to the data backup device, the data backup device runs a Bluetooth simulated keyboard and mouse application program, and the data backup device is connected to the target terminal through Bluetooth. The data backup device sends a screenshot instruction to the target terminal. After receiving the screenshot instruction, the terminal performs a screenshot operation on the current page and sends the intercepted page image to the data backup device. After receiving the page image, the data backup device can determine the target control that needs to be operated during the data backup process and the target simulated operation to be performed on the target control; then, through the Bluetooth simulated keyboard and mouse application program, the target simulated operation is performed on the target control in the current page of the target terminal. And it is determined whether the target simulated operation has been performed on all the target controls that need to be operated during the data backup process. If it is determined that the target simulated operation has been performed on all the target controls, it means that all the simulated operations during the data backup process have been completed. At this time, data backup can be performed. The data backup device sends a backup data acquisition request to the target terminal, and the target terminal sends the data to be backed up to the data backup device. The data backup device saves the backup data, thereby realizing an automated data backup process and improving the data backup efficiency.
[0155] It can be seen that the Bluetooth simulated keyboard and mouse application program can simulate manual operations on the target terminal, without the need to manually open the developer mode and USB debugging mode of the hidden settings option, and without the need to install an automated application separately on the terminal, simplifying the data backup process and improving the data backup efficiency.
[0156] Although the embodiments of the present invention have been shown and described above, the above embodiments are exemplary and should not be construed as limiting the present invention. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention without departing from the principles and purposes of the present invention.
Claims
1. A Bluetooth-based automated data backup method, characterized in that: Applied to a data backup device, the data backup device runs a Bluetooth simulated keyboard and mouse application, and the data backup device is connected to a target terminal via Bluetooth, the target terminal is a terminal for data to be backed up, the method includes: Sending a screenshot instruction to the target terminal, so that the target terminal performs a screenshot operation on the current page after receiving the screenshot instruction to obtain a page image of the current page; Receiving the page image sent by the target terminal; Determine, according to the page image, a target control required for operation during the data backup process, and a target simulation operation required to be performed on the target control; Performing the target simulation operation on the target control in the current page of the target terminal through a Bluetooth simulated keyboard and mouse application; Determine whether the target simulation operation has been performed on all target controls required for the data backup process; If it is determined that the target simulation operation has been performed on all the target controls, a backup data acquisition request is sent to the target terminal, the backup data sent by the target terminal is received, and the backup data is saved.
2. The method according to claim 1, characterized in that The step of determining, according to the page image, a target control to be operated during the data backup process and a target simulation operation to be performed on the target control includes: Determining a similarity between the page image and each preset image, wherein the preset image is a pre-stored page image related to data backup; Determine the preset image with the greatest similarity to the page image as the target preset image; A preset control that needs to be operated in the target preset image is determined as a target control, and a preset simulation operation corresponding to the target control is determined as a target simulation operation.
3. The method according to claim 1, characterized in that The method further comprises: According to the page image, identifying the location information of the target control in the current page; Correspondingly, the target simulation operation is performed on the target control in the current page of the target terminal by simulating the keyboard and mouse application through Bluetooth, including: The target simulation operation is performed on the target control in the current page of the target terminal according to the position information through a Bluetooth simulated keyboard and mouse application.
4. The method according to claim 3, characterized in that The step of identifying the location information of the target control in the current page according to the page image includes: Performing grayscale processing on the page image to obtain a grayscale image corresponding to the page image; Binarizing the grayscale image to obtain a binary image corresponding to the page image; Performing optical character recognition on the binary image to obtain position information of a target control in the binary image; Based on the position information of the target control in the binary image, the position information of the target control in the current page is determined.
5. The method according to any one of claims 1 to 4, characterized in that: The step of determining whether target simulation operations have been performed on all target controls required to be operated during the data backup process includes: Acquire preset target text information, where the target text information includes the control names of all target controls that need to be operated during the data backup process; Parsing the target text information to obtain the control names of all target controls that need to be operated during the data backup process; Compare the control names of all the target controls with the control name of the target control that has performed the target simulation operation; If the control name of the target control on which the target simulation operation has been performed includes the control names of all the target controls, it is determined that the target simulation operation has been performed on all the target controls.
6. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: If it is determined that the target simulation operation has not been performed on all the target controls required to be operated during the data backup process, return to the step of sending the screenshot instruction to the target terminal until it is determined that the target simulation operation has been performed on all the target controls.
7. An automatic data backup device based on Bluetooth, characterized in that: Applied to a data backup device, the data backup device runs a Bluetooth simulated keyboard and mouse application, and the data backup device is connected to a target terminal via Bluetooth, the target terminal is a terminal for data to be backed up, and the device includes: A screenshot instruction sending module, used to send a screenshot instruction to the target terminal, so that the target terminal performs a screenshot operation on the current page after receiving the screenshot instruction to obtain a page image of the current page; A page image receiving module, used for receiving the page image sent by the target terminal; A first simulation operation determination module is used to determine, according to the page image, a target control required to be operated during the data backup process, and a target simulation operation required to be performed on the target control; A simulation operation execution module, used to perform the target simulation operation on the target control in the current page of the target terminal through a Bluetooth simulation keyboard and mouse application; A second simulation operation determination module is used to determine whether a target simulation operation has been performed on all target controls required to be operated during the data backup process; The data backup module is used to send a backup data acquisition request to the target terminal if it is determined that the target simulation operation has been performed on all the target controls, receive the backup data sent by the target terminal, and save the backup data.
8. A data backup device, characterized in that: include: at least one processor; a memory for storing the at least one processor-executable instruction; The at least one processor is configured to execute the instructions to implement the method according to any one of claims 1-6.
9. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of a data backup device, the data backup device is enabled to execute the method according to any one of claims 1 to 6.
10. A computer program product, characterized in that The method comprises a computer program, which implements the method according to any one of claims 1 to 6 when being executed by a processor.