Application installation processing method, device, storage medium and electronic device
By identifying applications in the desktop image of a new device, it solves the problems of long App migration and leakage of sensitive information, achieving a fast migration and high-security App migration process.
Patent Information
- Application Number
- CN202011009695.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-23
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2040-09-23
AI Technical Summary
Existing App migration technology is time-consuming and involves the risk of sensitive information leakage. Especially when the device is replaced, old device data needs to be scanned, which affects the user experience and increases security risks.
By obtaining and identifying applications in the desktop image of the new device, it determines the applications to be installed, eliminating the need to scan old device data, reducing the risk of sensitive information leakage, and simplifying user operations.
It achieves rapid migration of apps, reduces the risk of sensitive information leakage, is suitable for more scenarios, and improves user experience.
Smart Images

Figure CN114253559B_ABST
Abstract
Description
Background Art
[0002] When users replace terminal devices such as smartphones and tablet computers, they usually need to install the original App (Application) on the new device.
[0003] In the related art, there is software for App migration, and its processing process is generally as follows: first scan the data in the old device to determine which apps are installed; then download and install these apps on the new device, which is equivalent to achieving App migration. However, this method requires scanning the data in the old device, which is a time-consuming process and usually requires users to open higher data reading permissions, which poses a risk of leaking sensitive information (such as account numbers, passwords, payment information, etc.). Summary of the invention
[0004] The present disclosure provides an application installation processing method, an application installation processing device, a computer-readable storage medium and an electronic device, thereby at least to a certain extent improving the problem in the related art that App migration is time-consuming and there is a risk of sensitive information leakage.
[0005] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.
[0006] According to a first aspect of the present disclosure, a method for installing an application is provided, comprising: obtaining a desktop image of a first terminal; identifying an application in the desktop image through text and / or icons in the desktop image; and determining an application to be installed on a second terminal based on the application in the desktop image.
[0007] According to a second aspect of the present disclosure, an application installation processing device is provided, including: a desktop image acquisition unit, used to acquire a desktop image of a first terminal; an application identification unit, used to identify an application in the desktop image through text and / or icons in the desktop image; and an application determination unit, used to determine an application to be installed for a second terminal based on the application in the desktop image.
[0008] According to a third aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the installation processing method of the application program of the first aspect and its possible implementation manner are implemented.
[0009] According to a fourth aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the installation processing method of the application of the above-mentioned first aspect and its possible implementation method by executing the executable instructions.
[0010] The technical solution disclosed in this disclosure has the following beneficial effects:
[0011] Determine the application to be installed on the second terminal based on the application in the desktop of the first terminal. On the one hand, when the user changes from the old first terminal to the new second terminal, the application to be installed on the second terminal is determined based on the recognition of the desktop image, without the need to scan and parse the application data of the first terminal, which is conducive to the rapid migration of the application. On the other hand, there is no need to read relevant data from the first terminal, thereby reducing the risk of sensitive information leakage in the first terminal, and there is no need to establish a connection between the first terminal and the second terminal, so that this solution can be applied to more scenarios. On the other hand, the entire processing flow can be realized through simple image acquisition operations such as taking pictures and scanning, which simplifies user operations and improves user experience.
[0012] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0014] Figure 1 A schematic diagram showing a system architecture in this exemplary embodiment;
[0015] Figure 2 A structural diagram of an electronic device according to the exemplary embodiment is shown;
[0016] Figure 3 A flowchart showing a method for installing an application in this exemplary embodiment;
[0017] Figure 4 A flowchart of a method for acquiring a desktop image in this exemplary embodiment is shown;
[0018] Figure 5 A flowchart of a method for determining a start frame in this exemplary embodiment is shown;
[0019] Figure 6 A flowchart showing another method for determining a start frame in this exemplary embodiment is shown;
[0020] Figure 7 A schematic diagram showing a desktop image in this exemplary embodiment;
[0021] Figure 8 A flowchart showing a method for determining an application program through a target to be identified in this exemplary embodiment is shown;
[0022] Fig. 9 A flowchart of a method for determining an application program by using text and icons in this exemplary embodiment is shown;
[0023] Fig.10 A flowchart of a method for determining an application program through icon matching in this exemplary embodiment is shown;
[0024] Fig.11 A flowchart of a method for determining an application to be installed in this exemplary embodiment is shown;
[0025] Fig.12 A schematic diagram showing an installation processing method of an application deployed on a server in this exemplary embodiment;
[0026] Fig.13 A flowchart showing a method for installing an application program executed by a second terminal in this exemplary embodiment is shown;
[0027] Fig.14 A diagram showing the structure of an installation processing device for an application program in the present exemplary embodiment. DETAILED DESCRIPTION
[0028] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.
[0029] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0030] In one solution of the related technology, when migrating apps between Android devices, it is necessary to install the app migration software on the new device, and when the old device and the new device are connected (such as via Bluetooth connection, or connected to the same wireless local area network), select the files to be migrated, and transfer them after matching the dynamic code to achieve migration. This solution requires the two devices to be connected, and the operation process is relatively complicated and the transmission is relatively time-consuming.
[0031] In another solution of the related technology, when migrating apps between iOS devices, or between iOS devices and Android devices, it is necessary to use cloud storage services such as iCloud to upload the app-related data on the old device to the cloud, and then download it from the cloud to the new device to achieve migration. This solution relies on cloud storage services, which usually have restrictions on the size of the migrated file data, and requires two transmissions to and from the cloud, uploading and downloading, which is more time-consuming.
[0032] In view of the above problems, an exemplary embodiment of the present disclosure provides an installation processing method of an application program. Figure 1 The system architecture diagram of the operating environment of the method is shown. Figure 1 As shown, the system architecture 100 may include: a first terminal 110, a second terminal 120 and a server 130. The first terminal 110 and the second terminal 120 may be terminal devices such as smart phones, tablet computers, personal computers, wearable devices, game consoles, etc. The first terminal 110 is an old device, and the second terminal 120 is a new device. It is necessary to install the same or similar App as the first terminal 110 on the second terminal 120. The server 130 may be a background system that provides App installation services. For example, the server 130 may be a server of App migration software, providing complete App migration services, or it may be a platform of an App store, providing App search and download services. The server 130 is connected to at least the second terminal 120 through a network, and may also be connected to the first terminal 110 at the same time.
[0033] In an optional implementation, the server 130 includes a business server 1301 and a basic server 1302. The business server 1301 is responsible for providing App installation services to the second terminal 120, such as providing a list of Apps to be installed to the second terminal 120; the basic server 1302 is responsible for providing basic services such as App search and installation package acquisition.
[0034] The installation processing method of the application in the exemplary embodiment of the present disclosure can be executed by the above-mentioned second terminal 120 or server 130. In order to implement the method, the exemplary embodiment of the present disclosure also provides an electronic device, which can be the second terminal 120 or the server 130. Generally, the electronic device includes a processor and a memory. The memory is used to store executable instructions of the processor, and can also store application data, such as image data, game data, etc.; the processor is configured to execute the installation processing method of the application in the exemplary embodiment by executing executable instructions.
[0035] Below Figure 2 Taking the mobile terminal 200 in the example, the structure of the above electronic device is exemplarily described. It should be understood by those skilled in the art that, in addition to the components specifically used for mobile purposes, Figure 2 The construction in can also be applied to fixed type equipment.
[0036] like Figure 2 As shown, the mobile terminal 200 may specifically include: a processor 210, an internal memory 221, an external memory interface 222, a USB (Universal Serial Bus) interface 230, a charging management module 240, a power management module 241, a battery 242, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 271, a receiver 272, a microphone 273, an earphone interface 274, a sensor module 280, a display screen 290, a camera module 291, an indicator 292, a motor 293, a button 294 and a subscriber identification module (Subscriber Identification Module, SIM) card interface 295, etc.
[0037] The processor 210 may include one or more processing units. For example, the processor 210 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, an encoder, a decoder, a digital signal processor (DSP), a baseband processor and / or a neural network processor (NPU), etc.
[0038] In some implementations, the processor 210 may include one or more interfaces, and may be connected to other components of the mobile terminal 200 via different interfaces.
[0039] The internal memory 221 may be used to store computer executable program codes, including instructions. The internal memory 221 may include volatile memory, such as DRAM (Dynamic Random Access Memory), SRAM (Static Random Access Memory), and may also include non-volatile memory, such as at least one disk storage device, flash memory device, etc. The external memory interface 222 may be used to connect to an external memory to expand the storage capacity of the mobile terminal 200.
[0040] The USB interface 230 is an interface that complies with USB standard specifications and can be used to connect a charger to charge the mobile terminal 200, or to connect headphones or other electronic devices.
[0041] The charging management module 240 is used to receive charging input from a charger. While the charging management module 240 is charging the battery 242, it can also power the device through the power management module 241; the power management module 241 can also monitor the status of the battery.
[0042] The wireless communication function of the mobile terminal 200 can be implemented by antenna 1, antenna 2, mobile communication module 250, wireless communication module 260, modulation and demodulation processor and baseband processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. The mobile communication module 250 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the mobile terminal 200. The wireless communication module 260 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (BT), Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), infrared technology (IR) and the like applied to the mobile terminal 200.
[0043] The mobile terminal 200 can realize the display function through the GPU, the display screen 290 and the application processor, and can realize the shooting function through the ISP, the camera module 291, the encoder, the decoder, the GPU, the display screen 290 and the application processor, and can also realize the audio function through the audio module 270, the speaker 271, the receiver 272, the microphone 273, the headphone jack 274 and the application processor.
[0044] The sensor module 280 may include a depth sensor 2801 , a pressure sensor 2802 , a gyro sensor 2803 , an air pressure sensor 2804 , and the like.
[0045] Indicator 292 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc. Motor 293 may generate vibration prompts, and may also be used for touch vibration feedback, etc. Buttons 294 include a power button, a volume button, etc.
[0046] The mobile terminal 200 may support one or more SIM card interfaces 295 for connecting to a SIM card to implement voice calls and mobile communications.
[0047] Figure 3 The flowchart of a method for installing an application in this exemplary embodiment is shown, and may include:
[0048] Step S310, obtaining a desktop image of the first terminal;
[0049] Step S320, identifying the application in the desktop image through the text and / or icons in the desktop image;
[0050] Step S330: determining the application to be installed on the second terminal according to the application in the desktop image.
[0051] Through the above method, the application to be installed in the second terminal is determined based on the application in the desktop of the first terminal. On the one hand, when the user changes from the old first terminal to the new second terminal, the application to be installed in the second terminal is determined based on the recognition of the desktop image, without the need to scan and parse the application data of the first terminal, which is conducive to the rapid migration of the application. On the other hand, there is no need to read relevant data from the first terminal, thereby reducing the risk of sensitive information leakage in the first terminal, and there is no need to establish a connection between the first terminal and the second terminal, so that this solution can be applied to more scenarios. On the other hand, the entire processing flow can be realized through simple image acquisition operations such as taking pictures and scanning, which simplifies user operations and improves user experience.
[0052] The following are Figure 3 Provide detailed instructions for each step.
[0053] In step S310, a desktop image of the first terminal is obtained.
[0054] The desktop of the first terminal may include the App icons installed by the first terminal and the App names below the icons, so the desktop image can reflect the App information of the first terminal. The desktop image can be obtained by taking a photo or taking a screenshot of the desktop of the first terminal. For example, after the first terminal takes a screenshot of the desktop, the captured desktop image is sent to the second terminal or the server.
[0055] In an optional implementation, step 310 may include:
[0056] Controlling the camera to start, so as to capture an image of the desktop of the first terminal;
[0057] Get one or more frames of desktop images.
[0058] For example, the second terminal turns on the camera and captures images of the desktop of the first terminal by taking pictures, scanning, etc. In an optional implementation, a "scan" function can be added to the system interface, App store, or App migration software. When the user selects this function, the camera is turned on and the image scanning interface is displayed at the same time. The interface may include a scanning box. The user aligns the scanning box with the desktop of the first terminal, and the captured scanned image is the desktop image. This achieves the acquisition of desktop images through simple operations and visual methods, reducing the learning cost of users using related functions.
[0059] During the image acquisition process, the images actually acquired may include photographed images, scanned images, preview images, etc., and the number of images is usually more than one frame. All acquired images may be used as desktop images, or a part of them may be selected as desktop images.
[0060] In the process of collecting desktop images, useless images may be generated, such as images collected when the user is not aiming at the desktop of the first terminal, blurred images collected when the user's hand is shaking, etc. If these useless images are also regarded as desktop images and are identified and processed in subsequent steps, it will lead to a waste of system resources. Based on this, in an optional implementation, refer to Figure 4 As shown, the desktop image can be obtained by following the steps below:
[0061] Step S410, during the image acquisition process, determining a starting frame;
[0062] Step S420, starting from the start frame, taking the captured one or more frames of images as the desktop image.
[0063] In the scene of taking pictures or scanning, after turning on the camera, the user generally needs to adjust the position or angle of the camera to aim at the desktop of the first terminal, which takes a certain amount of time. Therefore, the first few frames of images collected are usually useless images. Starting from a certain frame, the camera has accurately and stably aimed at the desktop of the first terminal, and this frame is the starting frame. After that, the images collected can all be images with the desktop of the first terminal as the main image content, which can be used as desktop images. In this way, it is equivalent to screening all the collected images, retaining images that can accurately reflect the desktop content of the first terminal, reducing the processing of useless images, and improving the waste of system resources.
[0064] Several exemplary methods for determining the start frame are provided below:
[0065] (1)Reference Figure 5 As shown, step S410 can be implemented by the following steps:
[0066] Step S510, during the image acquisition process, determining the relative change amount of each frame of image;
[0067] Step S520: when the relative changes of the N consecutive image frames are all less than the change threshold, a starting frame is determined from the N consecutive image frames.
[0068] The relative change refers to the change of an image relative to the previous frame image, which can be represented by the change of any one or more image parameters, including but not limited to image pixel value, color, brightness, grayscale, etc.
[0069] In an optional embodiment, the relative change of the current frame image can be determined based on the change of the color distribution data of the current frame image relative to the color distribution data of the previous frame image. For example, the color space is pre-divided into multiple subspaces, the distribution of the pixels of the current frame image in different subspaces is counted, the pixel ratio values in each subspace are calculated, and the pixel ratio values are arranged in the order of the subspaces to form the color distribution vector of the current frame image; the previous frame image is processed in the same way to obtain the color distribution vector of the previous frame image; the distance between the two color distribution vectors (such as Euclidean distance, Mann distance, etc.) is calculated as the relative change. Alternatively, the color histograms of the current frame image and the previous frame image are counted, and the difference between the two color histograms (such as calculating the difference between the curves corresponding to the two color histograms) is calculated as the relative change.
[0070] In an optional implementation, feature vectors may be extracted from the current frame image and the previous frame image respectively through a model such as CNN (Convolutional Neural Network), and the distance between the two feature vectors may be calculated as a relative change.
[0071] When the user adjusts the camera, the image changes between the previous and next frames are large, and when the camera adjustment is completed and stably aimed at the desktop of the first terminal, the image changes between the previous and next frames are small. Therefore, when the relative changes of N consecutive frames of images are all less than the preset change threshold, it can be determined that the camera has been stably aimed at the desktop of the first terminal, and then the starting frame can be determined.
[0072] N represents the number of images that need to be continuously stable, and is a positive integer not less than 2. It can be set based on experience or actual conditions. Generally, the higher the frequency of image acquisition, the larger the value of N.
[0073] The change threshold is a standardized threshold for measuring whether two consecutive frames of images are stable, and can be set based on experience or actual conditions. When different image parameters are used to calculate the relative change, the change threshold can also be adaptively adjusted.
[0074] In an optional implementation, when a larger value is set for N, the change threshold can be appropriately lowered, or when a higher change threshold is set, the value of N can be appropriately lowered, or vice versa.
[0075] When it is detected that the relative changes of N consecutive image frames are all less than the change threshold, any frame in the N image frames can be used as the starting frame, such as the first frame or the last frame in the N image frames.
[0076] For example, N is set to 10 and the change threshold is set to 0.2. During the image acquisition process, each frame of image is acquired, its color distribution data is analyzed, and compared with the color distribution data of the previous frame of image, and the relative change is calculated. When 10 consecutive frames of images are detected, and the change in the color distribution data of each frame compared to the previous frame is less than 0.2, the starting frame is determined among these 10 frames of images.
[0077] (2)Reference Figure 6 As shown, step S410 can be implemented by the following steps:
[0078] Step S610, during the image acquisition process, performing target detection on the acquired image;
[0079] Step S620: When a target of a preset category is detected, the detected image is determined as a starting frame.
[0080] Object detection refers to the detection of objects or specific objects in an image, which can be processed by object detection models such as CNN, RCNN (Recurrent CNN, recurrent convolutional neural network), SSD (Single Shot MultiBox Detector, single-step multi-box detection). Object detection models generally include input layers, hidden layers, and output layers; the input layer is used to receive image input; the hidden layer is used to process the input image; the output layer is used to output the result of image processing, which can include information such as the category, location, and size of each detected object.
[0081] In this exemplary embodiment, the preset category may be a category related to the desktop of the first terminal, such as a mobile terminal, desktop, icon, etc. When a target is detected from the image and the category of the target is a preset category, it is determined that the camera is currently aimed at the desktop of the first terminal, and thus the image may be determined as the starting frame image.
[0082] (3) During the image acquisition process, the optical flow between each frame of image and the previous frame of image is determined. When the number of pixels in the optical flow of N consecutive frames of image is less than the number threshold, the starting frame is determined from the N consecutive frames of image. Optical flow can be used to measure the changes between two adjacent frames of image. Generally, the more pixels contained in the optical flow, the greater the change. Therefore, a number threshold for the number of pixels in the optical flow can be set based on experience or actual conditions. When the number of pixels in the optical flow is less than the number threshold, it indicates that the previous and next frames of image are basically consistent; when the number of pixels in the optical flow of N consecutive frames of image is less than the number threshold, it indicates that the camera has stabilized and the starting frame can be determined from it.
[0083] (4) When the second terminal is used to scan the desktop image of the first terminal, in order to ensure that the second terminal does not shake violently, the posture data of the second terminal can be obtained, such as measuring the posture data through the built-in IMU (Inertial Measurement Unit); then the posture data is detected to be stable, such as judging that the difference between the posture data of the two adjacent timestamps is less than the preset posture difference threshold; and the stability of multiple consecutive (such as N consecutive) posture data is used as one of the ways to determine the starting frame. Specifically, in the process of collecting images, the posture data can be measured synchronously, the posture data of each timestamp is formed into a posture vector, and the distance is calculated with the posture vector of the previous timestamp to obtain the posture data difference of the current timestamp relative to the previous timestamp, and compared with the preset posture difference threshold. If the posture data difference is less than the threshold, it means that the posture data of the current timestamp is stable and the second terminal does not shake significantly. Therefore, when the posture data of N consecutive timestamps remain stable, any frame of image collected within the time period of these N consecutive timestamps can be determined as the starting frame.
[0084] In practical applications, the above methods can be combined arbitrarily. For example, a combination of the above methods (1) and (2) can be used to simultaneously perform stability detection of image color distribution data and target detection. When the color distribution data of N consecutive frames of images remains stable and a target of a preset category is detected, the starting frame is determined.
[0085] In the process of scanning the desktop of the first terminal for image acquisition, a valid desktop image can be obtained by determining the starting frame as described above. Compared with the method of shooting the desktop image of the first terminal, abnormal situations such as picture jitter and poor focus that may occur during shooting are eliminated, thereby ensuring the quality of the desktop image. Compared with the method of taking a screenshot of the desktop of the first terminal, there is no need to obtain the screenshot image from the first terminal, and further there is no need to establish a connection between the first terminal and the second terminal. The desktop image can even be obtained when the first terminal has no network. For example, after the SIM card is removed from the first terminal, the first terminal has no network service. At this time, the second terminal can also be used to scan its desktop to obtain the desktop image. Therefore, this method is applicable to more scenarios.
[0086] In an optional implementation, the number M of desktop images may be preset. After the start frame is determined, the start frame and subsequent M-1 frames may be acquired to obtain M frames of desktop images.
[0087] In an optional implementation, after determining the starting frame, the starting frame image may be determined as a desktop image, and then subsequent processing may be performed. If the subsequent processing is normal, there is no need to obtain more desktop images; if the subsequent processing is abnormal, such as being unable to identify the desktop image, more desktop images may be selected after the starting frame, and subsequent processing may be performed again.
[0088] Furthermore, starting from the start frame, only one frame of image can be selected as the desktop image each time, and then the subsequent processing can be performed. If the subsequent processing is normal, the process ends. If the subsequent processing is abnormal, then after the currently selected desktop image, another frame of image (e.g., the next frame of image can be selected, or a frame of image can be selected after a certain number of frames) can be selected as the desktop image; this cycle is repeated until the subsequent processing is normal and the process ends. This further reduces the number of desktop images that need to be processed and improves efficiency.
[0089] It should be noted that the first terminal may include multiple desktops, for example, it has a large number of apps, occupying three desktop pages. Then, images of each desktop may be collected separately, and each desktop image may be processed separately later.
[0090] Continue to refer Figure 3 In step S320, the application program in the desktop image is identified through the text and / or icons in the desktop image.
[0091] Figure 7 is a schematic diagram of a desktop image. Figure 7 The text includes text and icons. The text refers to the text of the App name, such as "AA News", "BB Music", etc.; the icon refers to the App icon, such as the icon above "AA News" and "BB Music", etc. These two types of information are the main information in the desktop image. Through these two types of information, it is possible to identify which applications are in the desktop image, which is equivalent to identifying which applications are installed in the first terminal.
[0092] Generally, the text and icons in the desktop image appear in pairs, that is, each App has a line of name text and a corresponding icon. Therefore, this part of information can be extracted separately for identification without processing other information in the desktop image (such as the desktop background). Figure 8 As shown, step S320 may include:
[0093] Step S810, extracting one or more objects to be identified from the desktop image, each object to be identified includes a text and an icon;
[0094] Step S820: Identify the application corresponding to the target to be identified based on the text and / or icon in the target to be identified.
[0095] The text and icons in the target to be identified can be extracted separately.
[0096] Text extraction can be achieved through algorithms such as OCR (Optical Character Recognition). OCR determines the shape of characters contained in an image by detecting darkness and light, and then translates it into computer text by character recognition. Specifically, the background image can first be grayscaled and binarized to distinguish the background and foreground of the image; then the image can be optimized and corrected, such as noise reduction and tilt correction; then the character features are extracted from the foreground; finally, the characters in the desktop image are identified by comparing with the data in the character database. After the characters are identified, they are sorted into text strips according to their different positions in the desktop image.
[0097] Icon extraction can be achieved through edge detection, shape detection and other algorithms. For example, the connected areas in the desktop image are detected, and the parts with sudden changes in pixel values are determined as edges, thereby obtaining multiple independent connected areas; since icons are generally rounded squares, the shapes of the connected areas are detected, and the connected areas of the rounded squares are extracted to obtain icons. Icons and their positions in desktop images can also be detected through models such as CNN to achieve icon extraction.
[0098] In an optional implementation, the extracted text or icons can also be filtered according to the border position of the first terminal in the desktop image and the grid arrangement rule of the desktop. For example, the recognized text or icons outside the border are deleted; the desktop grid arrangement is 3*4, if 4 icons are recognized in a row, it means that one is a misidentified object, and the redundant icon can be deleted by aligning it with the icons in the next row, and so on.
[0099] There is a fixed positional relationship between the text and icon of each App, such as Figure 7 As shown, the text is generally located directly below the icon. Therefore, according to the extracted position information of the text and icon, the text and the icon are associated, one text is associated with one icon, and the two form a target to be identified. For example, the text and icons that meet the following conditions are associated: the horizontal coordinate of the midpoint of the icon is the same as the horizontal coordinate of the midpoint of the text, and the vertical coordinate of the lower border of the icon is the same as the vertical coordinate of the upper border of the text (or the difference is less than a certain threshold). Subsequently, the text and icon in each target to be identified are identified separately to determine which application it is.
[0100] The corresponding application can be identified by using either text or icon information, or the application can be identified by combining both text and icon information to improve accuracy.
[0101] In an optional embodiment, reference Fig. 9 As shown, step S320 may include:
[0102] Step S910, matching each text in the desktop image with the application name, and determining the application corresponding to the text information according to the matching result.
[0103] The application name is the standardized name of each application in the application library. After extracting text from the desktop image, there may be some misrecognition, such as recognizing a certain text as other text with similar glyphs, such as recognizing "AA News" as "AA News". By matching with the standardized application name, the above misrecognition can be corrected. The matching of text and application name includes but is not limited to the following methods:
[0104] Character matching can be performed on text and application names, such as detecting whether the proportion of identical characters is higher than a certain threshold (such as 50%, which can be set based on experience or actual conditions), and detecting whether different characters are characters with similar shapes. When these two conditions are met, it is determined that the text and the application name are matched successfully, and it is determined that the text is the application name, thereby determining the application.
[0105] The same font can be used to draw binary images of the text and the application name respectively, and then the sequence features of the image can be extracted through models such as LSTM (Long Short-Term Memory) to calculate the similarity of the two sequence features. When the similarity is higher than a certain threshold (such as 80%, which can be set based on experience or actual conditions), it is determined that the text and the application name match successfully, and the application corresponding to the text is determined.
[0106] In an optional embodiment, referring to the above Fig. 9 As shown, step S320 may also include:
[0107] Step S920: When the text and the application name are not matched successfully, the application corresponding to the text is determined according to the icon corresponding to the text.
[0108] If the text is misrecognized seriously and deviates greatly from the correct application name, it may fail to match all application names in the application library. In this case, icon recognition can be used to determine the application.
[0109] In an optional implementation, a CNN model for image classification can be pre-trained, and the classification label is the application name. Thus, by inputting the icon into the CNN model, the corresponding application name can be directly output, which is very convenient.
[0110] In an optional implementation, an icon matching method may also be used. Fig.10As shown, step S920 may include:
[0111] Step S1010: The icon corresponding to the above text is formed into a first icon image. For example, the part where the icon is located can be cut out from the desktop image to form the first icon image.
[0112] Step S1020, the first icon image is matched with the second icon image formed by each application icon in the application library, for example, by using image retrieval to calculate the matching degree (or confidence, similarity, etc., which are basically the same) between the first icon image and each second icon image, such as extracting the feature vector of the first icon image and the feature vector of the second icon image, and calculating the similarity between the feature vectors.
[0113] Step S1030, when there is a second icon image whose matching degree with the first icon image is greater than the matching degree threshold, the application corresponding to the second icon image is determined as the application corresponding to the above text. The matching degree threshold is a standard for measuring whether the first icon image matches the second icon image, which can be set based on experience or actual conditions, such as 80%. When the matching degree between the first icon image and the second icon image is greater than the threshold, it is determined that the two match, thereby determining the application corresponding to the above text or icon.
[0114] It should be noted that there may be multiple second icon images whose matching degree with the first icon image is greater than the matching degree threshold. The second icon image with the highest matching degree can be selected as the matching result, or all the second icon images can be presented to the user as matching results, and the user can select an icon from them. It is also possible that no second icon image with a matching degree greater than the matching degree threshold is found with the first icon image, that is, the matching is unsuccessful, and the result of unsuccessful matching can be presented, for example, the application corresponding to the above text is marked as "?", "unknown", etc.
[0115] Fig. 9 The process shown is essentially to use text recognition applications first, and if recognition is unsuccessful, use icons to identify applications. Since in most cases the corresponding application can be accurately identified by text, Fig. 9 The process can reduce the processing volume and further improve efficiency.
[0116] In an optional implementation, it is also possible to determine whether to use text recognition or icon recognition based on the characteristics of the environment and scene. Generally, in an environment with insufficient lighting or reflection, the effect of using text recognition is poor, and icon recognition can be used. For example, the ambient light sensor can be used to detect the lighting parameters of the environment. If the lighting parameters are within a preset value range (indicating a range with good lighting, which can be set based on experience or actual conditions), it is determined that the lighting is sufficient and there is no reflection, and text recognition is used, otherwise icon recognition is used.
[0117] In an optional implementation, in order to improve accuracy, the text and icon can also be recognized at the same time. Specifically, the text can be matched with the application name to obtain a first matching result, and the icon can be matched with the application icon to obtain a second matching result; then the first matching result and the second matching result are compared to see if they are the same. If they are the same, any matching result is used to determine the corresponding application; if they are not the same, an unsuccessful matching result is returned; or the one with a higher matching degree between the first matching result and the second matching result can be selected to determine the corresponding application.
[0118] Through step S320, the corresponding application program can be determined for each text or icon in the desktop image, thereby determining the application program of the first terminal.
[0119] Continue to refer Figure 3 In step S330, the application to be installed on the second terminal is determined according to the application in the desktop image.
[0120] If it is necessary to install the same application as the first terminal on the second terminal, the applications in the desktop image are all the applications to be installed on the second terminal. Alternatively, some applications may have been installed on the second terminal, and the installed applications are excluded from the applications in the desktop image, and the remaining applications are the applications to be installed. Alternatively, the second terminal has a different system from the first terminal, and there may be some applications that use different versions or names in different systems. In this case, the applications in the desktop image can be adaptively converted according to the system of the second terminal to obtain the applications to be installed on the second terminal.
[0121] In an optional embodiment, reference Fig.11 As shown, step S330 may include:
[0122] Step S1110, generating an application list of the first terminal according to the application programs in the desktop image;
[0123] Step S1120, obtaining user feedback information on the application list of the first terminal;
[0124] Step S1130: determining the application to be installed on the second terminal according to the user feedback information.
[0125] The application list of the first terminal may be presented in the form of a list or an image. The application list may be displayed to the user, and the user may be allowed to submit feedback information, such as providing feedback on errors in the list, or modifying or deleting some applications. Then, the application list is adjusted according to the user feedback information to obtain the application to be installed on the second terminal.
[0126] In an optional implementation, in the application list, a plurality of recommended similar applications may be provided next to each application. For example, if the first terminal has "AA News" installed, "XX News" and "YY News" may be recommended in the application list, and relevant text descriptions may be added, such as "70% of users have installed XX News", or ratings of recommended applications may be displayed. This disclosure is not limited to this.
[0127] In an optional implementation, the location information of the application to be installed in the desktop of the second terminal can be determined based on the location information of each application in the desktop image. For example, when the second terminal has the same screen size and the same resolution setting as the first terminal, the desktop grid arrangement of the two is also the same, and the location information of each application in the desktop image of the first terminal can be used as the location information of each application in the desktop of the second terminal; or, when the desktop grid arrangement of the second terminal is different from that of the first terminal, a corresponding conversion calculation can be performed, for example, in the desktop image of the first terminal, the applications are arranged in order from left to right and from top to bottom, and then rearranged according to the desktop grid arrangement of the second terminal to determine the location of each application. In this way, the desktop of the second terminal is automatically laid out.
[0128] In an optional implementation, a desktop preview image of the second terminal can be generated based on the location information of the application to be installed on the desktop of the second terminal, which is a preview of the layout of the application to be installed on the desktop, so that the user can intuitively see the layout effect. The user can also make adjustments in the desktop preview image, such as changing the location of the application, to determine the final desktop layout solution.
[0129] The above method for determining the application to be installed can be deployed and executed on the server. Fig.12As shown, the API (Application Programming Interface) of the "Scan" service is deployed on the second terminal 120. The user performs a "scan" operation to obtain the desktop image of the first terminal and send it to the basic server 1302. The basic server 1302 provides identification services, performs App identification, and provides search services. In the search service, the App identification results are matched and corrected through the information of the application library obtained from the resource service, and the final App information is sent to the business server 1301. The business server 1301 generates the desktop layout of the second terminal 120 and returns it to the second terminal 120 for result display. The user can provide feedback on the desktop layout, such as correcting the erroneous identification, and providing feedback icons and correct App names. The feedback information is sent to the resource service of the basic server 1302, and the resource error correction is updated according to the icon and the correct App name to improve the accuracy of subsequent App identification. Subsequently, the basic server 1302 provides App downloads through the resource service, automatically downloads the App to the second terminal 120 and installs it. Through Fig.12 The installation process is mainly deployed on the server side, which reduces the pressure on the terminal side and realizes the decoupling between the scan service and the basic service, which is conducive to the flexible deployment and expansion of related service logic.
[0130] Fig.13 An exemplary process of an installation processing method executed by a second terminal is shown, including:
[0131] Step S1301, the user chooses to turn on the scan function, which can be deployed as a separate client or integrated into the App store or system function, and turns on the camera at the same time.
[0132] Step S1302, the camera scans the desktop image of the first terminal and determines whether the scanned image is a starting frame; if so, execute step S1303, if not, continue to determine whether the next frame of image is a starting frame.
[0133] Step S1303, starting from the start frame, obtain the desktop image, combine the text and icons in the desktop image to locate the App, and extract the to-be-identified targets corresponding to each App.
[0134] Step S1304, match the text with the App name provided by the App resource service. The App resource service can be deployed on the server side, or pre-deployed on the second terminal.
[0135] Step S1305, determine whether the text match is successful; if so, execute step S1306, if not, execute step S1307.
[0136] Step S1306, determining the corresponding App according to the matching result.
[0137] Step S1307: Match the icon with the App icon provided by the App resource service.
[0138] Step S1308, determine whether the icon matching is successful; if so, execute step S1306, if not, execute step S1309.
[0139] Step S1309, returning a result indicating that the recognition was unsuccessful.
[0140] Step S1310, when all the targets to be identified obtain corresponding App identification results, including successful identification of the corresponding App and unsuccessful identification results, determine the Apps to be installed on the second terminal, download and install these Apps, and lay them out according to the desktop of the first terminal.
[0141] The entire process is completed, and the App of the first terminal is migrated to the second terminal.
[0142] The exemplary embodiment of the present disclosure also provides an installation processing device for an application program. Fig.14 As shown, the application installation processing device 1400 may include:
[0143] The desktop image acquisition unit 1410 is used to acquire the desktop image of the first terminal;
[0144] The application recognition unit 1420 is used to recognize the application in the desktop image through the text and / or icons in the desktop image;
[0145] The application determining unit 1430 is configured to determine the application to be installed on the second terminal according to the application in the desktop image.
[0146] In an optional implementation, the desktop image acquisition unit 1410 is configured to:
[0147] Controlling the camera to start, so as to capture an image of the desktop of the first terminal;
[0148] Get one or more frames of desktop images.
[0149] In an optional implementation, the desktop image acquisition unit 1410 is configured to:
[0150] During the image acquisition process, determining a starting frame;
[0151] Starting from the start frame, the captured one or more frames of images are used as the desktop image.
[0152] In an optional implementation, the desktop image acquisition unit 1410 is configured to:
[0153] During the image acquisition process, the relative change amount of each frame of image is determined, and the relative change amount is the change amount of each frame of image relative to the previous frame of image;
[0154] When the relative changes of N consecutive image frames are all less than the change threshold, a starting frame is determined from the N consecutive image frames; N is a positive integer not less than 2.
[0155] In an optional implementation, the desktop image acquisition unit 1410 is configured to:
[0156] The relative change amount of the current frame image is determined according to the change amount of the color distribution data of the current frame image relative to the color distribution data of the previous frame image.
[0157] In an optional implementation, the desktop image acquisition unit 1410 is configured to:
[0158] During the image acquisition process, target detection is performed on the acquired images;
[0159] When a target of a preset category is detected, the detected image is determined as a starting frame.
[0160] In an optional implementation, the application identification unit 1420 is configured to:
[0161] Extract one or more objects to be identified from the desktop image, each object to be identified includes a text and an icon;
[0162] Identify the application corresponding to the target to be identified based on the text and / or icon in the target to be identified.
[0163] In an optional implementation, the application identification unit 1420 is configured to:
[0164] Each text in the desktop image is matched with the application name, and the application corresponding to the text information is determined according to the matching result.
[0165] In an optional implementation, the application identification unit 1420 is configured to:
[0166] When the text and the application name are not matched successfully, the application corresponding to the text is determined according to the icon corresponding to the text.
[0167] In an optional implementation, the application identification unit 1420 is configured to:
[0168] The icon corresponding to the text forms a first icon image;
[0169] Matching the first icon image with the second icon image formed by each application icon in the application library respectively;
[0170] When there is a second icon image whose matching degree with the first icon image is greater than a matching degree threshold, the application corresponding to the second icon image is determined as the application corresponding to the text.
[0171] In an optional implementation, the application determination unit 1430 is configured to:
[0172] generating an application list of the first terminal according to the application programs in the desktop image;
[0173] Obtain user feedback information for the application list of the first terminal;
[0174] The application program to be installed on the second terminal is determined according to the user feedback information.
[0175] In an optional implementation, the application determination unit 1430 is configured to:
[0176] The location information of the application to be installed in the desktop of the second terminal is determined according to the location information of each application in the desktop image.
[0177] In an optional implementation, the application determination unit 1430 is configured to:
[0178] A desktop preview image of the second terminal is generated according to the location information of the application to be installed on the desktop of the second terminal.
[0179] The specific details of each part of the above device have been described in detail in the implementation method part, so they will not be repeated here.
[0180] The exemplary embodiments of the present disclosure further provide a computer-readable storage medium, which can be implemented in the form of a program product, including program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification, for example, to execute Figures 3 to 6 or Figures 8 to 13 The program product may be in the form of a portable compact disk read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto, and in this document, a readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, apparatus, or device.
[0181] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory, a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0182] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0183] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0184] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0185] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".
[0186] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and embodiments are to be regarded as exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.
[0187] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A method for installing an application, characterized in that: include: Acquire a desktop image of the first terminal; Identifying an application in the desktop image by using text and / or icons in the desktop image; The identifying of the application in the desktop image by using the text and / or icon in the desktop image includes: matching each text in the desktop image with the application name, and determining the application corresponding to the text information according to the matching result; the identifying of the application in the desktop image by using the text and / or icon in the desktop image also includes: when the text and the application name are not matched successfully, determining the application corresponding to the text according to the icon corresponding to the text; Determining the application to be installed on the second terminal according to the application in the desktop image; The step of obtaining the desktop image of the first terminal includes: Controlling the camera to start, so as to capture an image of the desktop of the first terminal; Acquire one or more frames of desktop images; The step of acquiring the collected one or more frames of desktop images comprises: During the image acquisition process, determining a starting frame; Starting from the starting frame, taking the captured one or more frames of images as the desktop image; In the process of image acquisition, determining the starting frame includes any one of the following methods or a combination of multiple methods: During the image acquisition process, target detection is performed on the acquired image; when a target of a preset category is detected, the detected image is determined as the starting frame; wherein the preset category is a category that is relevant to the desktop of the first terminal; In the process of image acquisition, the relative change amount of each frame of image is determined, and the relative change amount is the change amount of each frame of image relative to the previous frame of image; when the relative change amounts of N consecutive frames of image are all less than the change amount threshold, the starting frame is determined from the N consecutive frames of image; N is a positive integer not less than 2; the relative change amount of each frame of image is determined, including: determining the relative change amount of the current frame of image according to the change amount of the color distribution data of the current frame of image relative to the color distribution data of the previous frame of image; During the image acquisition process, an optical flow between each frame of image and a previous frame of image is determined, and when the number of pixel points in the optical flow of consecutive N frames of image is less than a number threshold, a starting frame is determined from the consecutive N frames of image; During the image acquisition process, the posture data is measured synchronously, and the posture data of each timestamp is formed into a posture vector. The distance with the posture vector of the previous timestamp is calculated to obtain the posture data difference between the current timestamp and the previous timestamp, and the posture data is compared with the preset posture difference threshold. If the posture data difference is less than the preset posture difference threshold, the posture data of the current timestamp is determined to be stable. When the posture data of N consecutive timestamps remain stable, any frame image collected within the time period of N consecutive timestamps is determined as the starting frame.
2. The method according to claim 1, characterized in that The step of identifying the application program in the desktop image by using the text and / or icon in the desktop image includes: Extracting one or more objects to be identified from the desktop image, each of the objects to be identified includes a text and an icon; An application corresponding to the target to be identified is identified according to the text and / or the icon in the target to be identified.
3. The method according to claim 1, characterized in that The determining the application corresponding to the text according to the icon corresponding to the text includes: The icon corresponding to the text forms a first icon image; Matching the first icon image with the second icon image formed by each application icon in the application library respectively; When there is a second icon image whose matching degree with the first icon image is greater than a matching degree threshold, the application corresponding to the second icon image is determined as the application corresponding to the text.
4. The method according to claim 1, characterized in that The step of determining the application to be installed on the second terminal according to the application in the desktop image includes: generating an application list of the first terminal according to the application programs in the desktop image; Obtaining user feedback information on the application list of the first terminal; Determine the application program to be installed on the second terminal according to the user feedback information.
5. The method according to claim 1, characterized in that The method further comprises: The location information of the application to be installed in the desktop of the second terminal is determined according to the location information of each application in the desktop image.
6. The method according to claim 5, characterized in that The method further comprises: A desktop preview image of the second terminal is generated according to the location information of the application to be installed on the desktop of the second terminal.
7. An application installation processing device, characterized in that: include: A desktop image acquisition unit, used to acquire a desktop image of the first terminal; An application recognition unit is used to recognize an application in the desktop image through text and / or icons in the desktop image; the recognition of the application in the desktop image through text and / or icons in the desktop image is configured to: match each text in the desktop image with an application name, and determine the application corresponding to the text information according to the matching result; the recognition of the application in the desktop image through text and / or icons in the desktop image is also configured to: when the text and the application name are not matched successfully, determine the application corresponding to the text according to the icon corresponding to the text; an application determining unit, configured to determine an application to be installed on the second terminal according to the application in the desktop image; The desktop image acquisition unit is configured as follows: Controlling the camera to start, so as to capture an image of the desktop of the first terminal; Acquire one or more frames of desktop images; The acquiring of the collected one or more frames of desktop images is configured as follows: During the image acquisition process, determining a starting frame; Starting from the starting frame, taking the captured one or more frames of images as the desktop image; In the process of image acquisition, determining the starting frame is configured to be implemented by any one of the following methods or a combination of multiple methods: During the image acquisition process, target detection is performed on the acquired image; when a target of a preset category is detected, the detected image is determined as the starting frame; wherein the preset category is a category that is relevant to the desktop of the first terminal; In the process of image acquisition, the relative change amount of each frame of image is determined, and the relative change amount is the change amount of each frame of image relative to the previous frame of image; when the relative change amounts of N consecutive frames of image are all less than the change amount threshold, the starting frame is determined from the N consecutive frames of image; N is a positive integer not less than 2; the relative change amount of each frame of image is determined, including: determining the relative change amount of the current frame of image according to the change amount of the color distribution data of the current frame of image relative to the color distribution data of the previous frame of image; During the image acquisition process, an optical flow between each frame of image and a previous frame of image is determined, and when the number of pixel points in the optical flow of consecutive N frames of image is less than a number threshold, a starting frame is determined from the consecutive N frames of image; During the image acquisition process, the posture data is measured synchronously, and the posture data of each timestamp is formed into a posture vector. The distance with the posture vector of the previous timestamp is calculated to obtain the posture data difference between the current timestamp and the previous timestamp, and the posture data is compared with the preset posture difference threshold. If the posture data difference is less than the preset posture difference threshold, the posture data of the current timestamp is determined to be stable. When the posture data of N consecutive timestamps remain stable, any frame image collected within the time period of N consecutive timestamps is determined as the starting frame.
8. A computer-readable 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 6 is implemented.
9. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to perform the method of any one of claims 1 to 6 by executing the executable instructions.
