Data processing method and device and storage medium

By detecting the camera call instructions initiated by the application and determining the device on which the camera to be called is located, the image quality problems caused by poor camera performance or the device is far away from the target object are solved, and higher quality image acquisition is achieved.

CN119893268APending Publication Date: 2025-04-25BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311397644.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-25
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

Because the camera performance in electronic devices is poor or the device is far away from the target object to be collected and cannot move, the collected images are of poor quality and cannot meet user needs.

Method used

By detecting the camera call command initiated by the application, the device where the camera to be called is located is determined, and a camera call command is sent to the device, turning on the camera and entering the preview interface, thereby obtaining high-quality image data.

Benefits of technology

Without increasing the number of cameras in the first device, the number of cameras that the first device can call is increased, the flexibility of image acquisition is improved, and the image quality is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119893268A_ABST
    Figure CN119893268A_ABST
Patent Text Reader

Abstract

The invention relates to a data processing method and device and a storage medium. The method comprises the steps of determining second equipment where a to-be-called camera of a first application is located under the condition that the first application in the first equipment is detected to initiate a camera calling instruction; sending a camera calling instruction to a second device; wherein the camera calling instruction is used for instructing the second equipment to start a camera and enter a first preview interface; entering a second preview interface based on first image data received from a second device; wherein the content displayed in the second preview interface is the same as the content displayed in the first preview interface; second image data is acquired from a second device based on an image processing operation initiated for the first application. Through the method disclosed by the invention, the number of cameras capable of being called by the first equipment can be increased under the condition that the number of the cameras in the first equipment is not increased, and the flexibility of image acquisition is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of image acquisition technology, and in particular to a data processing method, device and storage medium. Background Art

[0002] With the advancement of electronic technology, the types of electronic devices are increasing, and most electronic devices are equipped with cameras. However, since different types of electronic devices have different main uses, manufacturers will configure cameras with different performances for different types of electronic devices when producing different types of electronic devices.

[0003] In the related art, when a user needs to capture an image of a target object through a camera in an electronic device, the captured image quality may be poor and fail to meet user needs because the camera performance of the electronic device is poor, or the electronic device is far away from the target object and cannot move. Summary of the invention

[0004] In order to overcome the problems existing in the related art, the present disclosure provides a data processing method, device and storage medium. By calling the camera in other electronic devices, the problem that the quality of the collected images is poor and cannot meet the user's needs due to the poor performance of the camera of the current electronic device or the electronic device is far away from the target object to be collected and cannot be moved is solved.

[0005] According to a first aspect of an embodiment of the present disclosure, there is provided a data processing method, which is applied to a first device and includes:

[0006] When detecting that a first application in a first device initiates a camera calling instruction, determining a second device where a camera to be called by the first application is located;

[0007] Sending the camera calling instruction to the second device; wherein the camera calling instruction is used to instruct the second device to turn on the camera and enter the first preview interface;

[0008] Entering a second preview interface based on the first image data received from the second device; wherein the content displayed in the second preview interface is the same as the content displayed in the first preview interface;

[0009] Based on the image processing operation initiated for the first application, second image data is obtained from the second device.

[0010] In some embodiments, obtaining second image data from the second device based on the image processing operation initiated for the first application includes:

[0011] Based on the image processing operation, generating an image acquisition instruction;

[0012] Sending the image acquisition instruction to the second device; wherein the image acquisition instruction is used to instruct the second device to perform a corresponding image acquisition task;

[0013] Receive the second image data obtained by the second device performing the image acquisition task.

[0014] In some embodiments, obtaining second image data from the second device based on the image processing operation initiated for the first application includes:

[0015] Creating a target layer based on the operation type of the image processing operation;

[0016] The first service module of the first device writes the second image data into the corresponding target layer according to the operation type;

[0017] The first application reads the second image data from the target layer.

[0018] In some embodiments, the first service module writes the second image data into the corresponding target layer according to the operation type, including:

[0019] When the operation type is a shooting type, writing the second image data obtained by executing the shooting task into the target layer corresponding to the shooting type;

[0020] When the operation type is a scanning type, writing the second image data obtained by executing the scanning task into the target layer corresponding to the scanning type;

[0021] The data format of the second image data obtained by executing the shooting task is different from the data format of the second image data obtained by executing the scanning task.

[0022] In some embodiments, the receiving the second image data obtained by the second device performing the image acquisition task includes:

[0023] When the image acquisition task is a scanning task, acquiring, by a first service module of the first device, second image data in a first format sent by the second device;

[0024] The first service module converts the second image data in the first format into second image data in a second format based on the operation type.

[0025] In some embodiments, when detecting that a first application in a first device initiates a camera calling instruction, determining a second device where a camera to be called by the first application is located includes:

[0026] When the camera calling instruction is detected and it is determined that the camera in the second device can be called by the first device, displaying a first interface;

[0027] If a first selection operation on the first interface is detected, it is determined that the camera to be called by the first application is a camera in the second device.

[0028] In some embodiments, the method further comprises:

[0029] If a second selection operation on the first interface is detected, determining that the camera to be called by the first application is a camera in the first device;

[0030] The camera in the first device is turned on, and a third preview interface is entered, wherein the content displayed in the third preview interface is different from the content displayed in the first preview interface.

[0031] In some embodiments, the method further comprises:

[0032] generating a first target image based on the second image data, and storing the first target image; and / or

[0033] A second target image is generated according to the second image data, and image content of the second target image is recognized.

[0034] According to a second aspect of an embodiment of the present disclosure, there is provided a data processing method, which is applied to a second device and includes:

[0035] Receiving a camera calling instruction sent by a first device; wherein the camera calling instruction is initiated by a first application in the first device;

[0036] Based on the camera calling instruction, turn on the camera and enter the first preview interface;

[0037] Sending the first image data collected by the camera to the first device; wherein the first image data is used by the first device to enter a second preview interface, and the content displayed in the second preview interface is the same as the content displayed in the first preview interface;

[0038] In case of receiving an image acquisition instruction sent by the first device, sending second image data to the first device; wherein the image acquisition instruction is generated based on an image processing operation initiated by the first application.

[0039] In some embodiments, upon receiving the image acquisition instruction sent by the first device, sending the second image data to the first device includes:

[0040] When receiving the image acquisition instruction, determining the image acquisition task corresponding to the image acquisition instruction;

[0041] Executing the image acquisition task by the camera to acquire the second image data;

[0042] The second image data is sent to the first device.

[0043] In some embodiments, the task type of the image acquisition task includes a shooting type and a scanning type, and the performing the image acquisition task by the camera to acquire the second image data includes:

[0044] When the task type is the shooting type, executing the shooting task to obtain the second image data;

[0045] When the task type is the scanning type, executing the scanning task to obtain the second image data;

[0046] The data format of the second image data obtained by executing the shooting task is different from the data format of the second image data obtained by executing the scanning task.

[0047] In some embodiments, sending the second image data to the first device includes:

[0048] Based on a data format that can be transmitted between the second device and the first device, convert the second image data in the second format obtained by the camera performing the scanning task to obtain the second image data in the first format;

[0049] The second image data in the first format is sent to the first service module of the first device through the second service module of the second device.

[0050] According to a third aspect of an embodiment of the present disclosure, there is provided a data processing apparatus, applied to a first device, including:

[0051] A first determination module is used to determine a second device where a camera to be called by the first application is located when detecting that the first application in the first device initiates a camera call instruction;

[0052] A first sending module, used for sending the camera calling instruction to the second device; wherein the camera calling instruction is used for instructing the second device to turn on the camera and enter the first preview interface;

[0053] A first receiving module, configured to enter a second preview interface based on the first image data received from the second device; wherein the content displayed in the second preview interface is the same as the content displayed in the first preview interface;

[0054] The first acquisition module is used to acquire second image data from the second device based on an image processing operation initiated for the first application.

[0055] In some embodiments, the first acquisition module includes:

[0056] A generating unit, configured to generate an image acquisition instruction based on the image processing operation;

[0057] A first sending unit, configured to send the image acquisition instruction to the second device; wherein the image acquisition instruction is used to instruct the second device to perform a corresponding image acquisition task;

[0058] A receiving unit is used to receive the second image data obtained by the second device performing the image acquisition task.

[0059] In some embodiments, the first acquisition module includes:

[0060] A creating unit, used for creating a target layer based on the operation type of the image acquisition task;

[0061] A writing unit, configured for the first service module of the first device to write the second image data into the corresponding target layer according to the operation type;

[0062] A reading unit is used for the first application to read the second image data from the target layer.

[0063] In some embodiments, the first service module writes a unit according to the operation type, for:

[0064] When the operation type is a shooting type, writing the second image data obtained by executing the shooting task into the target layer corresponding to the shooting type;

[0065] When the operation type is a scanning type, writing the second image data obtained by executing the scanning task into the target layer corresponding to the scanning type;

[0066] The data format of the second image data obtained by executing the shooting task is different from the data format of the second image data obtained by executing the scanning task.

[0067] In some embodiments, the receiving unit is used to:

[0068] When the image acquisition task is a scanning task, acquiring, by a first service module of the first device, second image data in a first format sent by the second device;

[0069] The first service module converts the second image data in the first format into second image data in a second format based on the operation type.

[0070] In some embodiments, the first determining module is used to:

[0071] When the camera calling instruction is detected and it is determined that the camera in the second device can be called by the first device, displaying a first interface;

[0072] If a first selection operation on the first interface is detected, it is determined that the camera to be called by the first application is a camera in the second device.

[0073] In some embodiments, the apparatus further comprises:

[0074] A second determining module is used to determine that the camera to be called by the first application is a camera in the first device if a second selection operation on the first interface is detected;

[0075] The first opening module is used to open the camera in the first device and enter a third preview interface, wherein the content displayed in the third preview interface is different from the content displayed in the first preview interface.

[0076] In some embodiments, the apparatus further comprises:

[0077] a storage module, configured to generate a first target image based on the second image data, and store the first target image; and / or

[0078] The recognition module is used to generate a second target image according to the second image data and recognize the image content of the second target image.

[0079] According to a fourth aspect of an embodiment of the present disclosure, there is provided a data processing apparatus, applied to a second device, including:

[0080] A second receiving module is used to receive a camera calling instruction sent by the first device; wherein the camera calling instruction is initiated by a first application in the first device;

[0081] A second opening module, used to open the camera and enter the first preview interface based on the camera calling instruction;

[0082] A second sending module, used to send the first image data collected by the camera to the first device; wherein the first image data is used by the first device to enter a second preview interface, and the content displayed in the second preview interface is the same as the content displayed in the first preview interface;

[0083] The third sending module is used to send the second image data to the first device when receiving the image acquisition instruction sent by the first device; wherein the image acquisition instruction is generated based on the image processing operation initiated by the first application.

[0084] In some embodiments, the third sending module includes:

[0085] A determination unit, configured to determine, upon receiving the image acquisition instruction, an image acquisition task corresponding to the image acquisition instruction;

[0086] A collection unit, used for performing the image collection task through the camera to collect the second image data;

[0087] A sending unit is used to send the second image data to the first device.

[0088] In some embodiments, the task type of the image acquisition task includes a shooting type and a scanning type, and the acquisition unit is used to:

[0089] When the task type is the shooting type, executing the shooting task to obtain the second image data;

[0090] When the task type is the scanning type, executing the scanning task to obtain the second image data;

[0091] The data format of the second image data obtained by executing the shooting task is different from the data format of the second image data obtained by executing the scanning task.

[0092] In some embodiments, the third sending module is used to:

[0093] Based on a data format that can be transmitted between the second device and the first device, convert the second image data in the second format obtained by the camera performing the scanning task to obtain the second image data in the first format;

[0094] The second image data in the first format is sent to the first service module of the first device through the second device and the second service module.

[0095] According to a fifth aspect of an embodiment of the present disclosure, there is provided a data processing device, including:

[0096] processor;

[0097] a memory configured to store processor-executable instructions;

[0098] Wherein, the processor is configured to: implement the steps in any one of the data processing methods in the first aspect and the second aspect when executed.

[0099] According to the sixth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of a data processing device, the device is enabled to execute any one of the data processing methods in the first and second aspects above.

[0100] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0101] In the embodiment of the present disclosure, when the first device detects that the first application initiates a camera calling instruction, it can control the camera in the second device to collect image data required by the first application by calling the camera in the second device. This increases the number of cameras that can be called by the first device without increasing the number of cameras in the first device, thereby improving the flexibility of image acquisition.

[0102] In addition, when the distance between the second device and the target object to be imaged is closer, or the performance of the camera in the second device is better than that of the camera in the first device, the quality of the image data acquired by the first application can be improved by calling the camera in the second device, thereby obtaining a higher quality image.

[0103] 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

[0104] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0105] Figure 1 It is a flowchart of a data processing method according to an exemplary embodiment.

[0106] Figure 2 It is a system architecture diagram involved in a data processing method according to an exemplary embodiment.

[0107] Figure 3 It is a flowchart diagram of another data processing method according to an exemplary embodiment.

[0108] Figure 4It is a flowchart diagram of another data processing method according to an exemplary embodiment.

[0109] Figure 5 The present invention is a flowchart showing a process in which a first application calls a camera in a first device or a camera in a second device to enter a preview interface according to an exemplary embodiment.

[0110] Figure 6 The present invention is a flowchart showing another process of a first application calling a camera in a first device or a camera in a second device to enter a preview interface according to an exemplary embodiment.

[0111] Figure 7 The present invention is a flowchart showing a first application calling a camera in a first device or a camera in a second device to perform a shooting task according to an exemplary embodiment.

[0112] Figure 8 The present invention is a flowchart showing another process of a first application calling a camera in a first device or a camera in a second device to perform a shooting task according to an exemplary embodiment.

[0113] Fig. 9 The present invention is a flowchart showing a process in which a first application calls a camera in a first device or a camera in a second device to perform a scanning task according to an exemplary embodiment.

[0114] Fig.10 The present invention is a flowchart showing another process of a first application calling a camera in a first device or a camera in a second device to perform a scanning task according to an exemplary embodiment.

[0115] Fig.11 It is a block diagram of a data processing device according to an exemplary embodiment.

[0116] Fig.12 is a block diagram of a data processing device according to another exemplary embodiment.

[0117] Fig.13 is a hardware structure block diagram of a data processing device 800 according to an exemplary embodiment. DETAILED DESCRIPTION

[0118] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0119] Figure 1 is a flowchart of a data processing method according to an exemplary embodiment. Figure 1 In some embodiments, the data processing method can be applied to a first device, and the data processing method mainly includes the following steps:

[0120] S101: When it is detected that a first application in a first device initiates a camera calling instruction, determine a second device where a camera to be called by the first application is located.

[0121] The first device in the embodiment of the present disclosure may include a terminal device having a camera or capable of being connected to a camera. The terminal device may include a mobile terminal and a fixed terminal. For example, the first device may be a mobile phone, a tablet computer, a PDA, a laptop computer, a desktop computer, a wearable device, or an intelligent learning machine.

[0122] In the embodiment of the present disclosure, the second device may be a mobile terminal of the same type as the first device, or may be a mobile terminal of a different type from the second device.

[0123] Exemplarily, the first device is a desktop computer or a laptop computer, and the second device is a mobile phone; or the first device is a mobile phone, and the second device is also a mobile phone.

[0124] In some embodiments, the second device may be a terminal device having better camera performance than the first device.

[0125] In other embodiments, the second device may be a terminal device that is closer to the target object to be imaged than the first device.

[0126] In some other embodiments, the second device may also be a device that can capture images of higher quality when capturing images of the same target object compared to the first device.

[0127] In some embodiments, the first application mentioned above may be an application installed in the first device that is capable of calling a camera.

[0128] Exemplarily, the first application mentioned above may be one of a camera application, a social application, and a payment application.

[0129] For example, the first application mentioned above may be a beauty camera application, a WeChat application, or a QQ application in the first device.

[0130] In some embodiments, if the first application is a camera application in the first device, when the camera application detects a start-up operation by the user, the camera application will generate a camera call instruction. Accordingly, the first device can detect the camera call instruction sent by the camera application.

[0131] In other embodiments, if the first application is a social application in the first device, when the social application detects that the user starts an image acquisition function or a video function in the social application, the social application generates a camera call instruction. At this time, the first device can detect the camera call instruction initiated by the social application in the first device.

[0132] In some embodiments, when detecting that the first application initiates a camera call instruction, the first device may check whether there is a second device whose camera can be called by the first device. If so, it is determined that the camera to be called by the first device is the camera in the second device.

[0133] In some embodiments, reference Figure 2 , Figure 2 A system architecture diagram for a data processing method provided in an embodiment of the present disclosure. When the first device detects that the first application initiates a camera call instruction, the application framework can send the camera call instruction to the first service module. The first service module checks the interface information of the first distributed hardware service and determines whether there is a second device whose camera can be called by the first device through the interface information. If so, it is determined that the camera to be called by the first device is the camera in the second device.

[0134] In some embodiments, the framework module includes a Hook function, and the framework module can obtain the camera calling instruction initiated by the first application through the Hook function, and send the camera calling instruction to the first service module.

[0135] In some embodiments, when the first device determines that the camera in the second device can be called, it can also obtain a first distance between the first device and the target object to be photographed, and a second distance between the second device and the target object to be photographed. If the first distance is greater than the second distance, it is determined that the camera to be called by the first device is the camera in the second device.

[0136] In other embodiments, when the first device determines that it can call the camera in the second device, it can also obtain parameter information of the camera in the second device, and compare the parameter information of the camera in the first device with the parameter information of the camera in the second device to determine the performance of the camera in the first device. If the performance of the camera in the second device is better than the performance of the camera in the first device, it is determined that the camera to be called by the first device is the camera in the second device.

[0137] In other embodiments, when the first device determines that it can call the camera in the second device, it can also determine whether the first application has the permission to call the camera in the second device. When it is determined that the first application has the permission to call the camera in the second device, it is determined that the camera to be called by the first device is the camera in the second device. If the first application does not have the permission to call the camera in the second device, the camera in the first device is turned on.

[0138] S102: Send a camera calling instruction to the second device.

[0139] The camera call instruction is used to instruct the second device to turn on the camera and enter the first preview interface.

[0140] It can be understood that when the first device determines through the above S101 that the camera to be called by the first application in the first device is located in the second device, a camera call instruction is sent to the second device. The camera call instruction is used to instruct the second device to turn on the camera in the second device, and to collect the first image data through the camera in the second device, and to enter the first preview interface based on the first image data. In addition, after the second device collects the first image data through the camera in the second device, it can also send the first image data to the first device, and accordingly, the first device receives the first image data sent by the second device.

[0141] In some embodiments, considering that the second device will keep collecting image data after turning on the camera based on the camera call instruction, the first device receives the first image data sent by the second device in the form of a data stream.

[0142] S103: Entering a second preview interface based on the first image data received from the second device.

[0143] The content displayed in the second preview interface is the same as the content displayed in the first preview interface.

[0144] It is understandable that after the first device receives the first image data sent by the second device through the above S102, it can enter the second preview interface according to the first image data, and update the content displayed in the first preview interface according to the latest received first image data. Since the first image data in the first preview interface and the second preview interface are both acquired by the camera in the second device, the content displayed in the first preview interface is the same as the content displayed in the second preview interface.

[0145] In some embodiments, reference Figure 2 and Figure 6, the first device also includes a first service module, and the first device can communicate with the second device and transmit image data through the first service module. In addition, when the first device detects that the first application initiates a camera call instruction, it will establish a target layer corresponding to the preview task, and the target layer is used to store the first image data of the preview image. Therefore, after the first device creates the target layer corresponding to the preview task, it will send the target layer corresponding to the preview task to the first service module. Accordingly, after receiving the first image data from the second device, the first service module can write the first image data into the target layer corresponding to the preview task. Afterwards, the first device can read the first image data in the target layer corresponding to the preview task, and determine the display content in the second preview interface based on the first image data.

[0146] S104: Acquire second image data from a second device based on the image processing operation initiated for the first application.

[0147] It can be understood that when the first device displays the second preview interface based on the received first image data, if the first device detects an image processing operation initiated by the user on the first application, the first device obtains the corresponding second image data from the second device according to the image processing operation.

[0148] In the embodiment of the present disclosure, when the first device detects that the first application initiates a camera calling instruction, it can control the camera in the second device to collect image data required by the first application by calling the camera in the second device. This increases the number of cameras that can be called by the first device without increasing the number of cameras in the first device, thereby improving the flexibility of image acquisition.

[0149] In addition, when the distance between the second device and the target object to be imaged is closer, or the performance of the camera in the second device is better than that of the camera in the first device, the quality of the image data acquired by the first application can be improved by calling the camera in the second device, thereby obtaining a higher quality image.

[0150] In some embodiments, S104 includes:

[0151] Generate image acquisition instructions based on the image processing operation;

[0152] Sending an image acquisition instruction to the second device; wherein the image acquisition instruction is used to instruct the second device to perform a corresponding image acquisition task;

[0153] Receive second image data obtained by the second device performing the image acquisition task.

[0154] It is understandable that after the first device enters the second preview interface, if the first application detects the user's image processing operation on the first application, it can generate a corresponding image acquisition instruction based on the detected image processing operation, and send the generated image acquisition instruction to the second device. Correspondingly, after receiving the image acquisition instruction sent by the first device, the second device can execute the corresponding image acquisition task according to the image acquisition instruction, and send the second image data obtained by executing the image acquisition task to the first device. At this time, the first device can receive the second image data sent by the second device.

[0155] In some embodiments, the above-mentioned image acquisition instruction can be generated by the first application after detecting the user's image processing operation. After generating the image acquisition instruction, the first application will send the image acquisition instruction to the application framework, and the application framework will send the image acquisition instruction to the second device through the first service module.

[0156] In some embodiments, the image processing operation initiated by the user on the first application includes, but is not limited to, a shooting operation and a scanning operation, and may also be other types of image processing operations, which are not limited in the embodiments of the present disclosure.

[0157] Exemplarily, the above-mentioned scanning operation includes but is not limited to scanning a QR code or scanning an object. For example, the above-mentioned scanning operation can be a scanning operation of flowers, plants and trees.

[0158] In some embodiments, when a user triggers an image processing operation of a first application installed in a first device, the application framework can detect the image processing operation and generate a corresponding image acquisition instruction based on the image processing operation. After generating the image acquisition instruction, the first device can send the image acquisition instruction to the second device through the first service module. Accordingly, the second device can receive the image acquisition instruction through the second service module in the second device and perform the corresponding image acquisition task according to the image acquisition instruction. Afterwards, the second device sends the second image data obtained by performing the image acquisition task to the first device, and at this time, the first device can receive the second image data sent by the second device.

[0159] In some embodiments, if the image processing operation initiated by the user on the first application is a shooting operation, the first device may determine that the first application needs to call the camera in the second device to perform a shooting task. At this time, the image acquisition instruction sent by the first device to the second device is a shooting instruction. Accordingly, the second device may receive the shooting instruction sent by the first device, and control the camera in the second device to perform the shooting task based on the shooting instruction, and send the second image data obtained by performing the shooting task to the first device. Accordingly, the first device may receive the second image data obtained by the second device performing the shooting task.

[0160] In other embodiments, if the image processing operation initiated by the user on the first application is a scanning operation, the first device may determine that the first application needs to call the camera in the second device to perform a scanning task. In this case, the image acquisition instruction sent by the first device to the second device is a scanning instruction. Accordingly, the second device may receive the scanning instruction sent by the first device, and control the camera in the second device to perform the scanning task based on the scanning instruction, and send the second image data obtained by performing the scanning task to the first device. Accordingly, the first device may receive the second image data obtained by the second device performing the scanning task.

[0161] In the disclosed embodiment, the application framework in the first device can send an image acquisition instruction to the second device through the first service module, and receive the second image data obtained by the second device performing the image acquisition task through the first service module, and send the obtained second image data to the first application. That is, the application framework and the first service module are used to transmit instructions and image data between the first application and the second device, and the first application does not need to directly interact with the second device for data, thereby realizing the non-perception call of the first application to the camera in the second device.

[0162] refer to Figure 3 In some embodiments, S104 further includes:

[0163] S301: Create a target layer based on the operation type of the image processing operation.

[0164] It is understandable that, considering that the data formats of the image data collected by the camera are different when performing different image acquisition tasks, the first device may also create different target layers to store the second image data obtained by the second device performing different image acquisition tasks according to different types of image processing operations.

[0165] In some embodiments, when the image processing operation initiated by the user on the first application is a shooting operation, the first device can create a target layer corresponding to the shooting type to store the second image data obtained by the second device performing the shooting task.

[0166] In other embodiments, when the image processing operation initiated by the first application is a scanning operation, the first device may create a target layer corresponding to the scanning type for storing second image data obtained by the second device when performing the scanning task.

[0167] S302: The first service module of the first device writes the second image data into a corresponding target layer according to the operation type.

[0168] It can be understood that after the first device receives the second image obtained by the second device performing the image acquisition task through the first service module, it can determine the operation type corresponding to the second image data and write the second image data into the target layer corresponding to the operation type.

[0169] In some embodiments, S302 includes:

[0170] When the operation type is a shooting type, the second image data obtained by executing the shooting task is written into a target layer corresponding to the shooting type;

[0171] When the operation type is a scanning type, writing the second image data obtained by executing the scanning task into a target layer corresponding to the scanning type;

[0172] The data format of the second image data obtained by executing the shooting task is different from the data format of the second image data obtained by executing the scanning task.

[0173] It can be understood that when the first device receives the second image data obtained by the camera in the second device through the first service module to perform a shooting task, the first service module writes the second image data into the target layer corresponding to the shooting type. When the first device receives the second image data obtained by the camera in the second device through the first service module to perform a scanning task, the first service module writes the second image data into the target layer corresponding to the scanning type.

[0174] S303: Read the second image data from the target layer.

[0175] It can be understood that in the above S302, after the first service module writes the second image data received from the second device into the target layer, the first device can read the second image data from the target layer.

[0176] In some embodiments, when the first application detects that the user triggers a shooting operation, a first callback interface is created, and the first callback interface is an interface for the application framework to transmit the second image data obtained by the camera performing the shooting task to the first application. Based on this, after the first service module writes the second image data to the target layer corresponding to the shooting type, the application framework can read the second image data from the target layer corresponding to the shooting type. Afterwards, the application framework can transmit the second image data to the first application through the first callback interface.

[0177] In other embodiments, when the first application detects that the user triggers a scanning operation, a second callback interface is created, and the second callback interface is an interface for the application framework to transmit the second image data obtained by the camera performing the scanning task to the first application. Based on this, after the first service module writes the second image data to the target layer corresponding to the scanning type, the application framework can read the second image data from the target layer corresponding to the scanning type. Afterwards, the application framework can transmit the second image data to the first application through the second callback interface.

[0178] In the disclosed embodiment, whether the image data is collected by the camera in the first device or the camera in the second device, the image data is transmitted to the first device by the application framework. Therefore, the first application does not know which camera collected the received image data, further realizing the first application's senseless call to the camera in the second device.

[0179] In some embodiments, receiving second image data obtained by the second device performing the image acquisition task includes:

[0180] When the image acquisition task is a scanning task, obtaining, by a first service module of the first device, second image data in a first format sent by the second device;

[0181] The first service module converts the second image data in the first format into the second image data in the second format based on the operation type.

[0182] In some embodiments, the amount of second image data collected by the second device when performing a scanning task is large. Therefore, the second device can convert the collected second image data into second image data in a first format to reduce the amount of data that needs to be sent. Based on this, the second image data sent by the second device after performing a scanning task and received by the first device is second image data in a first format. Therefore, after receiving the second image data, the first service module can convert the second image data in the first format into second image data in a second format, and then write the second image data in the second format into the target layer corresponding to the scanning type. Accordingly, the application framework can read the second image data in the second format from the target layer corresponding to the scanning type, and transmit the second image data in the second format to the first application through the second callback interface.

[0183] Exemplarily, the first format mentioned above may be an ARGB format, and the second format may be a YUV format.

[0184] In some embodiments, S101 includes: when a camera calling instruction is detected and it is determined that the camera in the second device can be called by the first device, displaying the first interface;

[0185] If a first selection operation on the first interface is detected, it is determined that the camera to be called by the first application is a camera in the second device.

[0186] It can be understood that, when the first device detects that the first application installed in the first device initiates a camera call instruction, it can determine whether there is a second device whose camera can be called by the first device. If so, the first device can control the display screen to display the first interface so that the user can choose whether to call the camera in the second device. When the user's first selection operation on the first interface is detected, it is determined that the user needs to call the camera in the second device. That is, it is determined that the camera to be called by the first application in the first device is the camera in the second device.

[0187] Exemplarily, the first interface may be an interface including “yes” and “no” selection buttons, and the first operation may be a triggering operation of the user on the “yes” selection button in the first interface.

[0188] In some embodiments, the method further comprises:

[0189] If a second selection operation on the first interface is detected, determining that the camera to be called by the first application is a camera in the first device;

[0190] The camera in the first device is turned on, and a third preview interface is entered, wherein content displayed in the third preview interface is different from content displayed in the first preview interface.

[0191] It is understandable that when the first device detects the user's second selection operation on the first interface, it can be determined that the user needs to call the camera in the first device to perform an image processing operation. At this time, the first device can determine that the camera to be called by the first application is the camera in the first device. When the first device determines that the camera to be called by the first application is the camera in the first device, it can control the first device to turn on the camera, collect third image data, and enter the third preview interface based on the collected third image data.

[0192] In some embodiments, when the first device determines that the camera to be called by the first application is the camera in the first device, the application framework can be used to control the camera in the first device to turn on, and the target layer corresponding to the preview task can be sent to the camera module in the first device, so that the camera module writes the image data collected by the camera into the target layer corresponding to the preview task.

[0193] In some embodiments, after entering the third preview interface, if the first device detects a user's image processing operation on the first application, it can call the camera through the application framework to perform an image acquisition task corresponding to the image processing operation and send the obtained image data to the first application.

[0194] For example, when the camera in the first device performs a shooting task, the application framework can transmit the fourth image data collected by the camera of the first device to the first application through the first callback interface. When the camera in the first device performs a scanning task, the application framework can transmit the fifth image data obtained by the camera of the first device performing the scanning task to the first application through the second callback interface.

[0195] In some embodiments, the method further comprises:

[0196] generating a first target image based on the second image data, and storing the first target image; and / or

[0197] A second target image is generated according to the second image data, and image content of the second target image is recognized.

[0198] It can be understood that after the application framework in the first device sends the second image data read from the target layer corresponding to the shooting type to the first application, the first application can generate a first target image based on the second image data and store the first target image so that the user can view the first target image from the album. After the application framework in the first device sends the second image data read from the target layer corresponding to the scanning type to the first application, the first application can generate a second target image based on the second image data and recognize the image content in the second target image.

[0199] Exemplarily, when the second image data is second image data obtained by scanning the target flowers and trees by a camera in the second device, the first application in the first device can generate images of the flowers and trees based on the received second image data and identify the types of the flowers and trees in the image.

[0200] refer to Figure 4 , Figure 4 A flowchart of another data processing method provided in an embodiment of the present disclosure. In some embodiments, the data processing method can be applied to a second device, and the data processing method includes:

[0201] S401: Receive a camera calling instruction sent by a first device.

[0202] The camera calling instruction is initiated by the first application in the first device.

[0203] It can be understood that in the above S101, when the first device detects the camera calling instruction initiated by the first application and determines that the camera to be called by the first application is located in the second device, it will send the camera calling instruction to the second device. Correspondingly, the second device can receive the camera calling instruction sent by the first device.

[0204] In some embodiments, reference Figure 2 The second device includes a second service module that can communicate with the first service module in the first device. Based on this, the second device can receive the camera call instruction sent by the first device through the second service module.

[0205] S402: Based on the camera calling instruction, turn on the camera and enter the first preview interface.

[0206] It is understandable that after receiving the camera call instruction sent by the first device through the above S401, the second device can control the camera to start and collect the first image data. After the camera collects the first image data, it enters the first preview interface based on the first image data.

[0207] S403: Send the first image data captured by the camera to the second device.

[0208] The first image data is used by the second device to enter a second preview interface, and the content displayed in the second preview interface is the same as the content displayed in the first preview interface.

[0209] It can be understood that after the second device collects the first image data through the camera, the first image data can be sent to the first device through the second service module.

[0210] In some embodiments, since the camera will continue to collect the first image data after it is turned on, the second device sends the first image data collected by the camera to the first device in the form of a data stream, so that the first device can enter the second preview interface according to the first image data sent by the second device, and update the content displayed on the second preview interface.

[0211] In some embodiments, before sending the first image data to the first device, the second device may also compress the first image data to reduce the amount of data that needs to be sent.

[0212] In some embodiments, before sending the first image data to the first device, the second device may further process the first image data to improve the display effect of the second preview interface in the first device.

[0213] S404: When receiving the image acquisition instruction sent by the first device, send the second image data to the first device.

[0214] The image acquisition instruction is generated based on the image processing operation initiated by the first application.

[0215] It can be understood that, since the first device generates an image acquisition instruction based on the image processing operation sent by the user for the first application, and sends the image acquisition instruction to the second device, the second device can receive the image acquisition instruction sent by the first device. After receiving the image acquisition instruction sent by the first device, the second device can perform the corresponding image acquisition task according to the received image acquisition instruction to obtain the second image data corresponding to the image acquisition task. Afterwards, the second device can send the obtained second image data to the first device.

[0216] In some embodiments, the second device may receive the image acquisition instruction sent by the first device through the second service module, and send the acquired second image data to the first device through the second service module.

[0217] In some embodiments, S404 includes:

[0218] When receiving an image acquisition instruction, determining an image acquisition task corresponding to the image acquisition instruction;

[0219] Performing an image acquisition task through a camera to acquire second image data;

[0220] The second image data is sent to the first device.

[0221] It can be understood that after receiving the image acquisition instruction sent by the first device, the second device can determine the task type of the image acquisition task to be performed by the first device through the camera in the second device according to the image acquisition instruction, and according to the determined task type of the image acquisition task, control the camera to perform the corresponding image acquisition task, and send the second image data obtained by the camera performing the image acquisition task to the first device.

[0222] In some embodiments, the image acquisition tasks performed by the camera in the second device include but are not limited to shooting tasks and scanning tasks. The image acquisition tasks performed by the camera in the second device may also be other types of image acquisition tasks indicated by the first device, which is not limited in this embodiment of the present disclosure.

[0223] In some embodiments, when the second device determines that the image acquisition task to be executed is a shooting task based on the received image acquisition instruction, it can control the camera to execute the shooting task, and send the second image data obtained by the camera executing the shooting task to the first device through the second service module.

[0224] In some embodiments, the second device can send the original image data obtained by the camera performing the shooting task to the first device, so that the first application in the first device can generate a high-quality first target image based on the received original image data.

[0225] Exemplarily, when the second image data obtained by the camera in the second device when performing a shooting task is data in jpeg format, the second device can send the second image data in jpeg format to the first device.

[0226] In some embodiments, the second device may send the second image data obtained by executing the shooting task to the first device through the soft bus.

[0227] In other embodiments, when the second device determines that the image acquisition task to be executed is a scanning task based on the received image acquisition instruction, it can control the camera to perform a scanning operation, and send the second image data obtained by the camera performing the scanning operation to the first device through the second service module.

[0228] In some embodiments, if the second image data obtained by the second device is data obtained by a camera performing a scanning task, the second device may compress the second image data before sending the second image data to the first device to reduce the amount of data that needs to be transmitted.

[0229] In some embodiments, the task type of the image acquisition task includes a shooting type and a scanning type, and performing the image acquisition task by using a camera to acquire the second image data includes:

[0230] When the task type is a shooting type, executing the shooting task to obtain second image data;

[0231] When the task type is a scanning type, executing the scanning task to obtain second image data;

[0232] The data format of the second image data obtained by executing the shooting task is different from the data format of the second image data obtained by executing the scanning task.

[0233] It can be understood that, when the image processing operation initiated by the user through the first application is a shooting operation, the image acquisition task to be performed by the camera in the second device is a shooting type task, and when the image processing operation initiated by the user through the first application is a scanning operation, the image acquisition task to be performed by the camera in the second device is a scanning type task. When the image acquisition task to be performed by the camera in the second device is a shooting type task, the second device controls the camera to perform the shooting task to obtain the second image data obtained by the second camera performing the shooting task. When the image acquisition task to be performed by the camera in the second device is a scanning type task, the second device controls the camera to perform the scanning task to obtain the second image data obtained by the second camera performing the scanning task.

[0234] In some instances, the second image data obtained by the camera in the second device performing a shooting task may be image data in jpeg format, and the second image data obtained by the camera in the second device performing a scanning task may be image data in YUV format.

[0235] In some embodiments, S404 includes:

[0236] Based on a data format that can be transmitted between the second device and the first device, convert the second image data in the second format obtained by the camera performing the scanning task to obtain the second image data in the first format;

[0237] The second image data in the first format is sent to the first service module of the first device through the second service module of the second device.

[0238] It can be understood that when the data format that can be transmitted between the first service module and the second service module is the first format, and the camera in the second device performs a scanning task to obtain second image data in the second format, the second device can convert the image data in the second format into image data in the first format. Afterwards, the second image data in the first format is sent to the first device through the second service module.

[0239] Exemplarily, the second format may be a YUV format, and the first format may be an ARGB format.

[0240] Hereinafter, the data processing method provided above will be introduced with three specific embodiments.

[0241] In some embodiments, reference Figure 5 and Figure 6 , Figure 5 A schematic diagram of a process of a first application calling a camera in a first device or a camera in a second device to enter a preview interface provided by an embodiment of the present disclosure; Figure 6 Another flowchart of a first application calling a camera in a first device or a camera in a second device to enter a preview interface is provided in an embodiment of the present disclosure. Figure 5 and Figure 6 The steps shown in the figure introduce the process in which the first application performs a preview task by calling the camera in the first device or calling the camera in the second device.

[0242] S501: The first application opens a camera in the first device through the application framework.

[0243] S502: The application framework sends a camera calling instruction to the first service module.

[0244] S503: After the camera in the first device is turned on, the application framework creates a target layer (surface) corresponding to the preview task.

[0245] S504: The application framework sends the surface to the first service module.

[0246] S505: The application framework sends the third image data collected by the camera in the first device to the first application, so that the first application enters the third preview interface based on the received image data.

[0247] S506: The application framework determines whether the first device can call the camera in the second device.

[0248] S507: When the application framework determines that the first device can call the camera in the second device, a first interface is displayed to inquire the user whether to call the camera in the second device.

[0249] S508: When it is detected that the user triggers the first selection operation, the first service module sends a camera calling instruction to the second device.

[0250] S509: After receiving the camera call instruction through the second service module, the second device turns on the camera in the second device and establishes a stream transmission channel.

[0251] S510: Send the first image data captured by the camera in the second device to the first device through the stream transmission channel.

[0252] S511: After receiving the first image data sent by the second device, the first device cuts off the connection between the surface and the camera in the first device, and then writes the first image data to the surface, so that the first application enters the second preview interface.

[0253] In some embodiments, reference Figure 7 and Figure 8 , Figure 7 A schematic diagram of a process of a first application calling a camera in a first device or a camera in a second device to perform a shooting task provided by an embodiment of the present disclosure; Figure 8 Another flowchart of a first application calling a camera in a first device or a camera in a second device to perform a shooting task is provided in an embodiment of the present disclosure. Figure 5 and Figure 6 The steps shown in the figure introduce the process in which the first application performs a shooting task by calling the camera in the first device or calling the camera in the second device.

[0254] S701: When the first application detects that the user triggers a shooting operation, the first application creates a first callback interface.

[0255] S702: If the application framework determines that the first device is calling the camera in the second device, determine to receive the second image data obtained by the camera in the second device performing the shooting task through the first callback interface; if the application framework determines that the first device is calling the camera in the first device, determine to receive the fourth image data obtained by the camera in the first device performing the shooting task through the first callback interface.

[0256] S703: If the application framework determines that the first device is calling the camera in the second device to perform a shooting task, a target layer (jpeg surface) corresponding to the shooting type is created, and the jpeg surface and the shooting instruction are sent to the first service module.

[0257] S704: After receiving the shooting instruction, the first service module sends the shooting instruction to the second device.

[0258] S705: The second device controls the camera to perform a shooting task.

[0259] S706: Send the second image data obtained by executing the shooting task to the first device.

[0260] S707: The first service module receives the second image data sent by the second device, and writes the second image data into the jpeg surface.

[0261] S708: The Hook function in the application framework reads the second image data from the jpeg surface.

[0262] S709: Send the read second image data to the first application through the first callback interface.

[0263] In some embodiments, reference Fig. 9 and Fig.10 , Fig. 9 A schematic diagram of a process of a first application calling a camera in a first device or a camera in a second device to perform a scanning task provided by an embodiment of the present disclosure; Fig.10 Another flowchart of a first application calling a camera in a first device or a camera in a second device to perform a scanning task is provided in an embodiment of the present disclosure. Fig. 9 and Fig.10 The steps shown in the figure introduce the process of the first application performing a scanning task by calling the camera in the first device or calling the camera in the second device.

[0264] S901: The scanning function in the first application requires data in YUV format. Therefore, when the first application detects that the user triggers a scanning operation, a second callback interface (YUV callback interface) is created through the application framework to receive data in YUV format.

[0265] S902: When determining that the first device is currently calling the camera in the second device, the Hook function in the application framework creates a target layer (YUV surface) corresponding to the scan type, and sends the YUV surface to the first service module.

[0266] S903: The first service module sends a scanning instruction to the second service module.

[0267] S904: After receiving the scanning instruction, the second service module executes the scanning task through the camera.

[0268] S905: The second service module executes the scanning task to obtain the second image data and sends it to the first service module through the streaming transmission channel.

[0269] S906: After receiving the second image data, the first service module converts the second image data in ARGB format into second image data in YUV format.

[0270] S907: The first service module writes the second image data in YUV format into the YUV surface.

[0271] S908: The application framework reads the second image data from the YUV surface and sends it to the first application.

[0272] Fig.11 FIG. 1 is a block diagram of a data processing device according to an exemplary embodiment. Fig.11 As shown, the data processing device 1100 is applied to a first device and mainly includes:

[0273] A first determining module 1101 is used to determine a second device where a camera to be called by the first application is located when detecting that the first application in the first device initiates a camera calling instruction;

[0274] The first sending module 1102 is used to send the camera calling instruction to the second device; wherein the camera calling instruction is used to instruct the second device to turn on the camera and enter the first preview interface;

[0275] A first receiving module 1103, configured to enter a second preview interface based on the first image data received from the second device; wherein the content displayed in the second preview interface is the same as the content displayed in the first preview interface;

[0276] The first acquisition module 1104 is configured to acquire second image data from the second device based on an image processing operation initiated for the first application.

[0277] In some embodiments, the first acquisition module 1104 includes:

[0278] A generating unit, configured to generate an image acquisition instruction based on the image processing operation;

[0279] A first sending unit, configured to send the image acquisition instruction to the second device; wherein the image acquisition instruction is used to instruct the second device to perform a corresponding image acquisition task;

[0280] A receiving unit is used to receive the second image data obtained by the second device performing the image acquisition task.

[0281] In some embodiments, the first acquisition module 1104 includes:

[0282] A creating unit, used for creating a target layer based on the operation type of the image acquisition task;

[0283] A writing unit, configured for the first service module of the first device to write the second image data into the corresponding target layer according to the operation type;

[0284] A reading unit is used for the first application to read the second image data from the target layer.

[0285] In some embodiments, the first service module writes a unit according to the operation type, for:

[0286] When the operation type is a shooting type, writing the second image data obtained by executing the shooting task into the target layer corresponding to the shooting type;

[0287] When the operation type is a scanning type, writing the second image data obtained by executing the scanning task into the target layer corresponding to the scanning type;

[0288] The data format of the second image data obtained by executing the shooting task is different from the data format of the second image data obtained by executing the scanning task.

[0289] In some embodiments, the receiving unit is used to:

[0290] When the image acquisition task is a scanning task, acquiring, by a first service module of the first device, second image data in a first format sent by the second device;

[0291] The first service module converts the second image data in the first format into second image data in a second format based on the operation type.

[0292] In some embodiments, the first determining module 1101 is used to:

[0293] When the camera calling instruction is detected and it is determined that the camera in the second device can be called by the first device, displaying a first interface;

[0294] If a first selection operation on the first interface is detected, it is determined that the camera to be called by the first application is a camera in the second device.

[0295] In some embodiments, the apparatus further comprises:

[0296] A second determining module is used to determine that the camera to be called by the first application is a camera in the first device if a second selection operation on the first interface is detected;

[0297] The first opening module is used to open the camera in the first device and enter a third preview interface, wherein the content displayed in the third preview interface is different from the content displayed in the first preview interface.

[0298] In some embodiments, the apparatus further comprises:

[0299] a storage module, configured to generate a first target image based on the second image data, and store the first target image; and / or

[0300] The recognition module is used to generate a second target image according to the second image data and recognize the image content of the second target image.

[0301] Fig.12 FIG. 1 is a block diagram of a data processing device according to an exemplary embodiment. Fig.12 As shown, the data processing device 1200 is applied to the second device and mainly includes:

[0302] According to a fourth aspect of an embodiment of the present disclosure, there is provided a data processing apparatus, applied to a second device, including:

[0303] The second receiving module 1201 is used to receive a camera calling instruction sent by the first device; wherein the camera calling instruction is initiated by the first application in the first device;

[0304] The second opening module 1202 is used to open the camera and enter the first preview interface based on the camera calling instruction;

[0305] A second sending module 1203 is used to send the first image data collected by the camera to the first device; wherein the first image data is used by the first device to enter a second preview interface, and the content displayed in the second preview interface is the same as the content displayed in the first preview interface;

[0306] The third sending module 1204 is used to send second image data to the first device when receiving an image acquisition instruction sent by the first device; wherein the image acquisition instruction is generated based on the image processing operation initiated by the first application.

[0307] In some embodiments, the third sending module 1204 includes:

[0308] A determination unit, configured to determine, upon receiving the image acquisition instruction, an image acquisition task corresponding to the image acquisition instruction;

[0309] A collection unit, used for performing the image collection task through the camera to collect the second image data;

[0310] A sending unit is used to send the second image data to the first device.

[0311] In some embodiments, the task type of the image acquisition task includes a shooting type and a scanning type, and the acquisition unit is used to:

[0312] When the task type is the shooting type, executing the shooting task to obtain the second image data;

[0313] When the task type is the scanning type, executing the scanning task to obtain the second image data;

[0314] The data format of the second image data obtained by executing the shooting task is different from the data format of the second image data obtained by executing the scanning task.

[0315] In some embodiments, the third sending module 1204 is used to:

[0316] Based on a data format that can be transmitted between the second device and the first device, convert the second image data in the second format obtained by the camera performing the scanning task to obtain the second image data in the first format;

[0317] The second image data in the first format is sent to the first service module of the first device through the second service module of the second device.

[0318] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0319] Fig.13 1 is a hardware structure block diagram of a data processing device 1300 according to an exemplary embodiment. For example, the device 1300 may be a mobile phone, a computer, a digital broadcast terminal, a message transceiver device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, a wearable device, etc.

[0320] Reference Fig.13 , the device 1300 may include one or more of the following components: a processing component 1302 , a memory 1304 , a power component 1306 , a multimedia component 1308 , an audio component 1310 , an input / output (I / O) interface 1312 , a sensor component 1314 , and a communication component 1316 .

[0321] The processing component 1302 generally controls the overall operation of the device 1300, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 1302 may include one or more processors 1320 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 1302 may include one or more modules to facilitate the interaction between the processing component 1302 and other components. For example, the processing component 1302 may include a multimedia module to facilitate the interaction between the multimedia component 1308 and the processing component 1302.

[0322] The memory 1304 is configured to store various types of data to support the operation of the device 1300. Examples of such data include instructions for any application or method operating on the device 1300, contact data, phone book data, messages, pictures, videos, etc. The memory 1304 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0323] The power supply component 1306 provides power to the various components of the device 1300. The power supply component 1306 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 1300.

[0324] The multimedia component 1308 includes a screen that provides an output interface between the device 1300 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1308 includes a front camera and / or a rear camera. When the device 1300 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0325] The audio component 1310 is configured to output and / or input audio signals. For example, the audio component 1310 includes a microphone (MIC), and when the device 1300 is in an operation mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 1304 or sent via the communication component 1316. In some embodiments, the audio component 1310 also includes a speaker for outputting audio signals.

[0326] I / O interface 1312 provides an interface between processing component 1302 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0327] The sensor assembly 1314 includes one or more sensors for providing various aspects of the status assessment of the device 1300. For example, the sensor assembly 1314 can detect the open / closed state of the device 1300, the relative positioning of components, such as the display and keypad of the device 1300, the sensor assembly 1314 can also detect the position change of the device 1300 or a component of the device 1300, the presence or absence of user contact with the device 1300, the orientation or acceleration / deceleration of the device 1300, and the temperature change of the device 1300. The sensor assembly 1314 can include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 1314 can also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1314 can also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0328] The communication component 1316 is configured to facilitate wired or wireless communication between the device 1300 and other devices. The device 1300 can access a wireless network based on a communication standard, such as Wi-Fi, 4G or 5G, or a combination thereof. In an exemplary embodiment, the communication component 1316 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1316 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0329] In an exemplary embodiment, the device 1300 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above-mentioned methods.

[0330] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1304 including instructions, and the instructions can be executed by the processor 1320 of the device 1300 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0331] A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by the processor of the wearable device, enables the first device or the second device to perform the above Figure 1 , Figure 3 or Figure 4 The data processing method shown.

[0332] 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 techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0333] 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 data processing method, characterized in that: include: When detecting that a first application in a first device initiates a camera calling instruction, determining a second device where a camera to be called by the first application is located; Sending the camera calling instruction to the second device; wherein the camera calling instruction is used to instruct the second device to turn on the camera and enter the first preview interface; Entering a second preview interface based on the first image data received from the second device; wherein the content displayed in the second preview interface is the same as the content displayed in the first preview interface; Based on the image processing operation initiated for the first application, second image data is obtained from the second device.

2. The method according to claim 1, characterized in that The acquiring second image data from the second device based on the image processing operation initiated for the first application includes: Based on the image processing operation, generating an image acquisition instruction; Sending the image acquisition instruction to the second device; wherein the image acquisition instruction is used to instruct the second device to perform a corresponding image acquisition task; Receive the second image data obtained by the second device performing the image acquisition task.

3. The method according to claim 2, characterized in that The acquiring second image data from the second device based on the image processing operation initiated for the first application includes: Creating a target layer based on the operation type of the image processing operation; The first service module of the first device writes the second image data into the corresponding target layer according to the operation type; The second image data is read from the target layer.

4. The method according to claim 3, characterized in that The first service module writes the second image data into the corresponding target layer according to the operation type, including: When the operation type is a shooting type, writing the second image data obtained by executing the shooting task into the target layer corresponding to the shooting type; When the operation type is a scanning type, writing the second image data obtained by executing the scanning task into the target layer corresponding to the scanning type; The data format of the second image data obtained by executing the shooting task is different from the data format of the second image data obtained by executing the scanning task.

5. The method according to claim 3, characterized in that: The receiving the second image data obtained by the second device executing the image acquisition task includes: When the image acquisition task is a scanning task, acquiring, by a first service module of the first device, second image data in a first format sent by the second device; The first service module converts the second image data in the first format into second image data in a second format based on the operation type.

6. The method according to claim 1, characterized in that The method of, in the case of detecting that a first application in a first device initiates a camera calling instruction, determining a second device where a camera to be called by the first application is located, comprises: When the camera calling instruction is detected and it is determined that the camera in the second device can be called by the first device, displaying a first interface; If a first selection operation on the first interface is detected, it is determined that the camera to be called by the first application is a camera in the second device.

7. The method according to claim 6, characterized in that The method further comprises: If a second selection operation on the first interface is detected, determining that the camera to be called by the first application is a camera in the first device; The camera in the first device is turned on, and a third preview interface is entered, wherein the content displayed in the third preview interface is different from the content displayed in the first preview interface.

8. The method according to any one of claims 1 to 7, characterized in that: The method further comprises: generating a first target image based on the second image data, and storing the first target image; and / or A second target image is generated according to the second image data, and image content of the second target image is recognized.

9. A data processing method, characterized in that: include: Receiving a camera calling instruction sent by a first device; wherein the camera calling instruction is initiated by a first application in the first device; Based on the camera calling instruction, turn on the camera and enter the first preview interface; Sending the first image data collected by the camera to the first device; wherein the first image data is used by the first device to enter a second preview interface, and the content displayed in the second preview interface is the same as the content displayed in the first preview interface; In case of receiving an image acquisition instruction sent by the first device, sending second image data to the first device; wherein the image acquisition instruction is generated based on an image processing operation initiated by the first application.

10. The method according to claim 9, characterized in that The sending the second image data to the first device when receiving the image acquisition instruction sent by the first device includes: When receiving the image acquisition instruction, determining the image acquisition task corresponding to the image acquisition instruction; Executing the image acquisition task by the camera to acquire the second image data; The second image data is sent to the first device.

11. The method according to claim 10, characterized in that The task types of the image acquisition task include a shooting type and a scanning type. The performing of the image acquisition task by the camera to acquire the second image data includes: When the task type is the shooting type, executing the shooting task to obtain the second image data; When the task type is the scanning type, executing the scanning task to obtain the second image data; The data format of the second image data obtained by executing the shooting task is different from the data format of the second image data obtained by executing the scanning task.

12. The method according to claim 9, characterized in that The sending the second image data to the first device comprises: Based on a data format that can be transmitted between the second device and the first device, convert the second image data in the second format obtained by the camera performing the scanning task to obtain the second image data in the first format; The second image data in the first format is sent to the first service module of the first device through the second service module of the second device.

13. A data processing device, characterized in that: include: A first determination module is used to determine a second device where a camera to be called by the first application is located when detecting that the first application in the first device initiates a camera call instruction; A first sending module, used for sending the camera calling instruction to the second device; wherein the camera calling instruction is used for instructing the second device to turn on the camera and enter the first preview interface; A first receiving module, configured to enter a second preview interface based on the first image data received from the second device; wherein the content displayed in the second preview interface is the same as the content displayed in the first preview interface; The first acquisition module is used to acquire second image data from the second device based on an image processing operation initiated for the first application.

14. A data processing device, characterized in that: include: A second receiving module is used to receive a camera calling instruction sent by the first device; wherein the camera calling instruction is initiated by a first application in the first device; A second opening module, used to open the camera and enter the first preview interface based on the camera calling instruction; A second sending module, used to send the first image data collected by the camera to the first device; wherein the first image data is used by the first device to enter a second preview interface, and the content displayed in the second preview interface is the same as the content displayed in the first preview interface; The third sending module is used to send the second image data to the first device when receiving the image acquisition instruction sent by the first device; wherein the image acquisition instruction is generated based on the image processing operation initiated by the first application.

15. A data processing device, characterized in that: include: processor; a memory configured to store processor-executable instructions; Wherein, the processor is configured to: implement the steps in any one of the data processing methods in claims 1 to 12 when executed.

16. A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of a data processing device, the device is enabled to perform any one of the data processing methods of claims 1 to 12.