Image data processing method, device, mobile terminal and storage medium

By integrating the application program interface on the mobile terminal, receiving image data request information, determining the acquisition strategy and calling the operating system interface, the problem of poor quality and high development cost of image data acquired by third-party applications is solved, and high-quality image data acquisition and Cost reduction.

CN112199127BActive Publication Date: 2024-09-27OPPO CHONGQING INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011078915.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-10
Publication Date
2024-09-27
Estimated Expiration
2040-10-10

AI Technical Summary

Technical Problem

The image data obtained by third-party applications on mobile terminals is of poor quality and has high development costs. It is difficult for existing technology to effectively solve this problem.

Method used

By integrating the application program interface (API) in third-party applications, it receives image data request information, determines the image data acquisition strategy, and calls the operating system interface of the mobile terminal to obtain high-quality image data and reduce development costs.

Benefits of technology

It improves the quality of image data obtained by third-party applications, reduces development costs, and eliminates the need for third-party applications to develop imaging capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112199127B
    Figure CN112199127B
Patent Text Reader

Abstract

The present application is applicable to the field of image technology, and provides an image data processing method, device, mobile terminal and storage medium, including: receiving image data request information sent by an application program interface, the application program interface is integrated in a third-party application; according to the image data request information, determining an image data acquisition strategy, the image data acquisition strategy includes an image data acquisition action; according to the image data acquisition action, calling the operating system interface of the mobile terminal to obtain corresponding image data; calling back the image data to the third-party application through the application program interface. The present application can improve the quality of image data acquired by third-party applications and reduce the development cost of third-party applications.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of imaging technology, and in particular, relates to an image data processing method, device, mobile terminal and storage medium. Background Art

[0002] With the popularity of mobile terminals, more and more third-party applications are installed on mobile terminals. Some third-party applications can perform operations such as taking photos, recording videos, and previewing, thereby obtaining image data such as photos, videos, and preview images. However, these third-party applications usually use native interfaces for application development, which increases the development cost of third-party applications. In addition, the photo taking, video recording, and preview capabilities of third-party applications are far from those of the system camera, resulting in poor quality of image data obtained by third-party applications. Summary of the invention

[0003] The present application provides an image data processing method, device, mobile terminal and storage medium to improve the quality of image data acquired by third-party applications and reduce the development cost of third-party applications.

[0004] In a first aspect, an embodiment of the present application provides an image data processing method, which is applied to a mobile terminal. The image data processing method includes:

[0005] Receiving image data request information sent by an application program interface, wherein the application program interface is integrated in a third-party application;

[0006] Determining an image data acquisition strategy according to the image data request information, wherein the image data acquisition strategy includes an image data acquisition action;

[0007] Calling the operating system interface of the mobile terminal according to the image data acquisition action to acquire corresponding image data;

[0008] The image data is called back to the third-party application through the application program interface.

[0009] In a second aspect, an embodiment of the present application provides an image data processing device, which is applied to a mobile terminal, and the image data processing device includes:

[0010] An information receiving module, used to receive image data request information sent by an application program interface, wherein the application program interface is integrated in a third-party application;

[0011] A strategy determination module, used to determine an image data acquisition strategy according to the image data request information, wherein the image data acquisition strategy includes an image data acquisition action;

[0012] A data acquisition module, used to call the operating system interface of the mobile terminal according to the image data acquisition action to acquire corresponding image data;

[0013] The data callback module is used to call back the image data to the third-party application through the application program interface.

[0014] In a third aspect, an embodiment of the present application provides a mobile terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the image data processing method described in the first aspect are implemented.

[0015] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the image data processing method described in the first aspect are implemented.

[0016] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when executed on a mobile terminal, enables the mobile terminal to execute the steps of the image data processing method described in the first aspect above.

[0017] As can be seen from the above, the present application can determine the image data acquisition strategy based on the image data request information by receiving the image data request information sent by the application program interface integrated in the third-party application, and then call the operating system interface of the mobile terminal according to the image data acquisition strategy to implement the call of the imaging capability of the operating system and obtain high-quality image data. There is no need for the third-party application to redevelop the imaging capability, thereby reducing the development cost of the third-party application. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0019] Figure 1 It is a schematic diagram of the implementation flow of the image data processing method provided in the first embodiment of the present application;

[0020] Figure 2 This is a schematic diagram of the implementation flow of the image data processing method provided in the second embodiment of the present application;

[0021] Figure 3 This is a schematic diagram of the implementation flow of the image data processing method provided in Embodiment 3 of the present application;

[0022] Figure 4 is a structural diagram of an image data processing device provided in Embodiment 4 of the present application;

[0023] Figure 5 is a structural diagram of a mobile terminal provided in Embodiment 5 of the present application;

[0024] Figure 6 It is a structural diagram of the mobile terminal provided in Example 6 of the present application. DETAILED DESCRIPTION

[0025] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0026] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

[0027] In a specific implementation, the mobile terminal described in the embodiments of the present application includes but is not limited to other portable devices such as mobile phones, laptop computers or tablet computers with touch-sensitive surfaces (e.g., touch screen displays and / or touch pads). It should also be understood that in some embodiments, the device is not a portable communication device, but a desktop computer with a touch-sensitive surface (e.g., touch screen displays and / or touch pads).

[0028] In the following discussion, a mobile terminal including a display and a touch-sensitive surface is described. However, it should be understood that the mobile terminal may include one or more other physical user interface devices such as a physical keyboard, mouse and / or joystick.

[0029] The mobile terminal supports various applications, such as one or more of the following: a drawing application, a presentation application, a word processing application, a website creation application, a disk burning application, a spreadsheet application, a game application, a phone application, a video conferencing application, an email application, an instant messaging application, a workout support application, a photo management application, a digital camera application, a digital camcorder application, a web browsing application, a digital music player application, and / or a digital video player application.

[0030] Various applications that can be executed on a mobile terminal can use at least one common physical user interface device such as a touch-sensitive surface. One or more functions of the touch-sensitive surface and corresponding information displayed on the terminal can be adjusted and / or changed between applications and / or within a corresponding application. In this way, the common physical architecture of the terminal (e.g., a touch-sensitive surface) can support a variety of applications with user interfaces that are intuitive and transparent to the user.

[0031] It should be understood that the size of the serial numbers of the steps in this embodiment does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.

[0032] In order to illustrate the technical solution described in this application, a specific embodiment is provided below for illustration.

[0033] See also Figure 1 , is a schematic diagram of the implementation flow of the image data processing method provided in the first embodiment of the present application. The image data processing method is applied to a mobile terminal, and specifically can be applied to a software development kit in a mobile terminal. As shown in the figure, the image data processing method may include the following steps:

[0034] Step 101: receiving image data request information sent by an application programming interface, where the application programming interface is integrated in a third-party application.

[0035] Among them, the Application Interface (API) can be some pre-defined functions or an agreement to connect different components of the software system. It is used to provide a set of routines that applications and developers can access based on certain software or hardware without accessing the source code or understanding the details of the internal working mechanism.

[0036] The application program interface can be integrated into the third-party application in the form of a jar package or an aar package to provide the imaging capability interface of the operating system of the mobile terminal to the developer of the third-party application. The operating system of the mobile terminal includes but is not limited to the Android system, the IOS system, the Linux system, etc.

[0037] The application programming interface is used to forward image data request information to the software development kit when it receives image data request information from a third-party application. It does not involve image data processing, thereby reducing the size of the application programming interface and ensuring the stability of the application programming interface version. Developers do not need to continuously integrate new versions of the application programming interface into third-party applications, thereby reducing developers' maintenance costs.

[0038] Third-party applications can also be called third-party software, which is software developed by non-device manufacturers that needs to obtain image data. The above-mentioned third-party applications are set in the application layer of the operating system. The above-mentioned device manufacturer can refer to the manufacturer that produces or develops mobile terminals.

[0039] The image data request information may refer to information sent by a third-party application requesting to obtain image data, such as information sent by a chat software requesting to take a photo, request a video, or request a preview.

[0040] A software development kit (SDK) generally refers to a collection of development tools for building application software for a specific software package, software framework, hardware platform, operating system, etc. The software development kit is integrated into the operating system as a system component and can be iterated with the upgrade of the operating system's imaging capabilities. The software development kit can be part of the operating system, including but not limited to being integrated into the system partition, or as part of the system service and called through the service interface.

[0041] Optionally, receiving the image data request information sent by the application program interface includes:

[0042] The image data request information sent by the application program interface is received through the process of the third-party application or the service process of the operating system of the mobile terminal.

[0043] The software development kit is integrated into the operating system and can work through a process attached to a third-party application or as a separate service process. If the software development kit works by attaching to the process of a third-party application, since the application software interface is integrated into the third-party application, the application interface and the software development kit are in the same process. When transmitting data between the application interface and the software development kit, there is no need for cross-process transmission, and the delay is small. If the software development kit works as a separate service process, the application interface and the software development kit are not in the same process. The software development kit does not rely on the survival of the third-party application and can process related data in the background to obtain higher system permissions, such as CPU frequency increase and access to special interfaces.

[0044] Step 102: Determine an image data acquisition strategy according to the image data request information. The image data acquisition strategy includes an image data acquisition action.

[0045] The information carried in the image data request information includes, but is not limited to, the requested acquisition action and parameter information of the acquisition action. For example, operations such as taking pictures, recording videos, and previewing are all image data acquisition actions, and parameter information may refer to parameters required when performing acquisition actions. For example, if the acquisition action in the data request information is recording videos, then the parameter information of the acquisition action in the image data request information may be the video size, the size of the recorded stream, the video storage format, etc.

[0046] The software development kit can determine the image data acquisition strategy based on the requested acquisition action and parameter information of the acquisition action in the image data request information. For example, if the acquisition action is taking a photo and the parameter information is super anti-shake, then the image data acquisition strategy is to use the super anti-shake function when taking photos. The image data acquisition strategy can be understood as the image capability to be accessed by the image data request information, or as the business process of the operating system that needs to be called when acquiring image data.

[0047] Step 103: calling the operating system interface of the mobile terminal according to the image data acquisition action to acquire corresponding image data.

[0048] Among them, the software development kit calls the operating system interface of the mobile terminal according to the image data acquisition action, and can complete the execution of the image data acquisition action, such as completing the operations of taking pictures, recording, and previewing. Calling the operating system interface of the mobile terminal may refer to calling the imaging capability of the operating system of the mobile terminal, and specifically may be calling the imaging capability based on hardware implementation of the operating system of the mobile terminal (such as the ultra-wide-angle lens capability). The imaging capability of the operating system is the imaging capability of the operating system itself (that is, the imaging capability that can be directly used when using the system camera), including but not limited to the imaging capability based on software algorithm implementation and the imaging capability based on hardware implementation, so as to ensure that the imaging capability of the mobile terminal can be fully provided to the developers of third-party applications, improve the development efficiency and agility of the developers of third-party applications in developing related applications, and reduce the development cost, and at the same time can improve the use experience of third-party applications, maintain system stability, and enhance the market competitiveness of mobile terminals with open imaging capabilities. Calling the imaging capability based on software algorithm implementation of the operating system can avoid the developers of third-party applications from repeatedly developing the imaging capability that the operating system already has, and reduce the development cost; calling the imaging capability based on hardware implementation of the operating system can effectively utilize the imaging capability based on hardware implementation provided by the operating system, thereby improving the user experience of third-party applications and mobile terminals.

[0049] By calling the imaging capabilities provided by the operating system, third-party applications can use the imaging capabilities of the system camera, thereby ensuring that the quality of image data obtained by the third-party applications is close to that of the system camera, thereby improving the quality of image data obtained by third-party applications. For example, when taking photos through a chat software, by calling the super anti-shake capability provided by the operating system, images with better anti-shake effects can be obtained, thereby improving image quality.

[0050] Step 104: Call back the image data to the third-party application through the application programming interface.

[0051] The software development kit calls back the image data to the third-party application through the application program interface. The image data can be sent to the third-party application. After receiving the image data, the third-party application can perform preset operations, such as presenting it on the screen, saving it locally, uploading it to the network, etc.

[0052] The embodiment of the present application receives image data request information sent by an application program interface integrated in a third-party application through a software development kit, and is able to determine an image data acquisition strategy based on the image data request information, thereby calling the operating system interface of the mobile terminal according to the image data acquisition strategy, implementing the call to the imaging capability of the operating system, and obtaining high-quality image data. There is no need for the third-party application to redevelop the imaging capability, thereby reducing the development cost of the third-party application.

[0053] See also Figure 2 , is a schematic diagram of the implementation flow of the image data processing method provided in the second embodiment of the present application. The image data processing method is applied to a mobile terminal, and specifically can be applied to a software development kit in a mobile terminal. As shown in the figure, the image data processing method may include the following steps:

[0054] Step 201: receiving image data request information sent by an application programming interface, where the application programming interface is integrated in a third-party application.

[0055] This step is the same as step 101. For details, please refer to the relevant description of step 101, which will not be repeated here.

[0056] Step 202: Determine an image data acquisition strategy according to the image data request information.

[0057] The image data acquisition strategy includes but is not limited to the image data acquisition action and the image data processing algorithm. The image data processing algorithm refers to an algorithm for processing image data to obtain high-quality image data, such as a multi-frame algorithm, a noise reduction algorithm, a beauty algorithm, an anti-shake algorithm, etc. Optionally, an algorithm flag may be carried in the parameter information in the image data request information. The software development kit may determine, based on the algorithm flag in the parameter information, that the image data processing algorithm corresponding to the algorithm flag is the algorithm required to process the image data.

[0058] Step 203: calling the operating system interface of the mobile terminal according to the image data acquisition action in the image data acquisition strategy to acquire corresponding image data.

[0059] This step is the same as step 103. For details, please refer to the relevant description of step 103, which will not be repeated here.

[0060] Step 204, sending the image data to the algorithm processing service module.

[0061] In this embodiment, the algorithm processing service (APS) module can receive the image data sent by the software development kit through the process where the software development kit is located or the service process of the operating system of the mobile terminal, that is, the algorithm processing service module can work in the process where the software development kit is located, or it can work as a separate service process. If the algorithm processing service module works in the process where the software development kit is located, the algorithm processing service module and the software development kit are in the same process, and there is no need for cross-process transmission between the algorithm processing service module and the software development kit when transmitting data, and the delay is small. If the algorithm processing service module works as a separate service process, the algorithm processing service module and the software development kit are not in the same process, and the algorithm processing service module does not rely on the survival of third-party applications. It can process related data in the background and obtain higher system permissions.

[0062] The image data is used to instruct the algorithm processing service module to process the received image data based on the image data processing algorithm to obtain the processed image data, that is, the algorithm processing service module can process the image data based on the image data processing algorithm in the image data acquisition strategy, such as noise reduction, sharpening, filter, etc. The algorithm processing service module can be independently integrated into the operating system or as part of a software development kit to provide image processing capabilities.

[0063] Optionally, this embodiment also includes:

[0064] When the number of the image data processing algorithms is at least two, the algorithm processing service module controls at least two image data processing algorithms to process the received image data in a pipeline manner.

[0065] In the algorithm processing service module, the image data can be processed in a pipeline manner. The above pipeline manner can refer to connecting different image data processing algorithms in series on a production line in their logical order, and each algorithm acts as a node to provide image data processing algorithms for their respective related links.

[0066] Step 205: Obtain processed image data from the algorithm processing service module.

[0067] In this embodiment, the processed image data can be called back to the software development kit through the algorithm processing service module, and a calling interface is provided to the software development kit, thereby releasing the coupling with the specific business.

[0068] Step 206: Call back the processed image data to the third-party application through the application programming interface.

[0069] The software development kit calls back the processed image data to the third-party application through the application program interface. The processed image data can be sent to the third-party application. After receiving the processed image data, the third-party application can perform preset operations, such as presenting it on the screen, saving it locally, uploading it to the network, etc.

[0070] By sending the image data to the algorithm processing service module, the algorithm processing service module can process the image data in the background to complete operations such as noise reduction, sharpening, and filtering of the image data, thereby further improving the quality of the image data.

[0071] See also Figure 3 , is a schematic diagram of the implementation flow of the image data processing method provided in the third embodiment of the present application. The image data processing method is applied to a mobile terminal, and specifically can be applied to a software development kit in a mobile terminal. As shown in the figure, the image data processing method may include the following steps:

[0072] Step 301: receiving image data request information sent by an application programming interface, where the application programming interface is integrated in a third-party application.

[0073] This step is the same as step 101. For details, please refer to the relevant description of step 101, which will not be repeated here.

[0074] Step 302: Authenticate the legitimacy of the image data request information.

[0075] In this embodiment, by authenticating the legitimacy of the image data request information, it can be verified whether the third-party application has the authority to call the imaging capabilities of the operating system. Specifically: if the image data request information is legal, it is determined that the third-party application has the authority to call the imaging capabilities of the operating system; if the image data request information is illegal, it is determined that the third-party application does not have the authority to call the imaging capabilities of the operating system.

[0076] Optionally, the image data request information includes an authorization code of a third-party application, and the software development kit authenticates the legitimacy of the image data request information by:

[0077] Based on the authorization code of the third-party application, the legitimacy of the image data request information is authenticated.

[0078] Developers of third-party applications can apply for permission to call the operating system's imaging capabilities through the permission application website provided by the device manufacturer. They can fill in the third-party application's identification information (such as package name, application name, etc.), signature hash value, imaging capabilities to be accessed (such as super anti-shake, ultra-wide-angle lens, etc.) and other parameters on the application page. After the application is approved, you can obtain the authorization code.

[0079] Optionally, based on the authorization code of the third-party application, the legitimacy of the image data request information is authenticated including:

[0080] Check whether there is an authorization code in the authorization code database that is the same as the authorization code of the third-party application;

[0081] If there is an authorization code in the authorization code database that is the same as the authorization code of the third-party application, it is determined that the image data request information is legal, and the authorization code database is stored in the mobile terminal;

[0082] If the authorization code database does not contain the same authorization code as the authorization code of the third-party application, it is determined that the image data request information is illegal.

[0083] Among them, when the legitimacy of the image data request information is authenticated by the authorization code of the third-party application and the authorization code database, if the authorization code database is stored locally in the mobile terminal, it can be understood as an offline authentication of the legitimacy of the image data request information, and it is possible to detect whether there is an authorization code identical to the authorization code of the third-party application in the authorization code database without the need for networking. The authorization code database includes at least one authorization code.

[0084] It should be noted that in order to improve the security of the authorization code, the authorization code in the image data request information is usually encrypted. Therefore, before checking whether there is an authorization code identical to the authorization code of a third-party application in the authorization code database, the authorization code in the image data request information needs to be decrypted first.

[0085] Optionally, based on the authorization code of the third-party application, the legitimacy of the image data request information is authenticated including:

[0086] Send the authorization code of the third-party application to the server. The authorization code of the third-party application is used to instruct the server to detect whether there is an authorization code identical to the authorization code of the third-party application in the authorization code database, and feed back the detection result to the mobile terminal. The authorization code database is stored in the server;

[0087] If the detection result is that there is an authorization code in the authorization code database that is the same as the authorization code of the third-party application, then the image data request information is determined to be legal;

[0088] If the detection result is that the authorization code that is identical to the authorization code of the third-party application does not exist in the authorization code database, it is determined that the image data request information is illegal.

[0089] Among them, when authenticating the legitimacy of the image data request information through the authorization code of the third-party application and the authorization code database, if the authorization code database is stored on the server, it can be understood as an online authentication of the legitimacy of the image data request information, and an Internet connection is required when detecting whether there is an authorization code in the authorization code database that is the same as the authorization code of the third-party application.

[0090] Step 303: If the image data request information is legal, determine the image data acquisition strategy according to the image data request information.

[0091] If the image data request information is legitimate, it is determined that the third-party application has the authority to call the imaging capability of the operating system. The imaging capability to be called can be determined based on the image data request information to call the imaging capability and obtain high-quality image data.

[0092] Step 304: calling the operating system interface of the mobile terminal according to the image data acquisition action in the image data acquisition strategy to acquire corresponding image data.

[0093] This step is the same as step 103. For details, please refer to the relevant description of step 103, which will not be repeated here.

[0094] Step 305: Send the image data to the algorithm processing service module.

[0095] This step is the same as step 204. For details, please refer to the relevant description of step 204, which will not be repeated here.

[0096] Step 306, obtaining processed image data from the algorithm processing service module.

[0097] This step is the same as step 205. For details, please refer to the relevant description of step 205, which will not be repeated here.

[0098] Step 307: Call back the processed image data to the third-party application through the application programming interface.

[0099] This step is the same as step 206. For details, please refer to the relevant description of step 206, which will not be repeated here.

[0100] The embodiment of the present application can verify whether the third-party application has the authority to call the imaging capability of the operating system by authenticating the legitimacy of the image data request information sent by the third-party application, so as to achieve the management and control of the access rights to the imaging capability of the operating system.

[0101] See also Figure 4 , is a structural diagram of an image data processing device provided in Embodiment 4 of the present application. The image data processing device is applied to a mobile terminal, and specifically can be applied to a software development kit in a mobile terminal. For ease of explanation, only the parts related to the embodiment of the present application are shown.

[0102] The above-mentioned image data processing device comprises:

[0103] An information receiving module 41 is used to receive image data request information sent by an application program interface, where the application program interface is integrated in a third-party application;

[0104] A strategy determination module 42, used to determine an image data acquisition strategy according to the image data request information, wherein the image data acquisition strategy includes an image data acquisition action;

[0105] The data acquisition module 43 is used to call the operating system interface of the mobile terminal according to the image data acquisition action to acquire the corresponding image data;

[0106] The data callback module 44 is used to callback the image data to a third-party application through an application programming interface.

[0107] Optionally, the image data acquisition strategy further includes an image data processing algorithm, and the data callback module 44 includes an image sending unit, an image acquisition unit, and an image callback unit;

[0108] An image sending unit, used to send image data to the algorithm processing service module, the image data is used to instruct the algorithm processing service module to process the received image data based on the image data processing algorithm to obtain processed image data;

[0109] An image acquisition unit, used to acquire processed image data from the algorithm processing service module;

[0110] The image callback unit is used to call back the processed image data to the third-party application through the application program interface.

[0111] Optionally, the policy determination module 42 includes:

[0112] An information authentication unit, used to authenticate the legitimacy of the image data request information;

[0113] The strategy determination unit is used to determine the image data acquisition strategy according to the image data request information if the image data request information is legal.

[0114] Optionally, the image data request information includes an authorization code of a third-party application, and the information authentication unit is specifically used to:

[0115] Based on the authorization code of the third-party application, the legitimacy of the image data request information is authenticated.

[0116] The information authentication unit is specifically used for:

[0117] Detecting whether there is an authorization code identical to the authorization code of the third-party application in an authorization code database, the authorization code database being stored in the mobile terminal;

[0118] If the authorization code database contains the same authorization code as the authorization code of the third-party application, the image data request information is determined to be legal;

[0119] If the authorization code database does not contain the same authorization code as the authorization code of the third-party application, it is determined that the image data request information is illegal.

[0120] The information authentication unit is specifically used for:

[0121] Send the authorization code of the third-party application to the server. The authorization code of the third-party application is used to instruct the server to detect whether there is an authorization code identical to the authorization code of the third-party application in the authorization code database, and feed back the detection result to the mobile terminal. The authorization code database is stored in the server;

[0122] If the detection result is that there is an authorization code in the authorization code database that is the same as the authorization code of the third-party application, then the image data request information is determined to be legal;

[0123] If the detection result is that the authorization code that is identical to the authorization code of the third-party application does not exist in the authorization code database, it is determined that the image data request information is illegal.

[0124] Optionally, the information receiving module 41 is specifically used for:

[0125] The image data request information sent by the application program interface is received through the process of the third-party application or the service process of the operating system of the mobile terminal.

[0126] The image data processing device provided in the embodiment of the present application can be applied in the aforementioned method embodiment. For details, please refer to the description of the aforementioned method embodiment, which will not be repeated here.

[0127] Figure 5 : is a structural diagram of a mobile terminal provided in Embodiment 5 of the present application. As shown in the figure, the mobile terminal may include: one or more processors 501 (only one is shown in the figure); one or more input devices 502 (only one is shown in the figure), one or more output devices 503 (only one is shown in the figure) and a memory 504. The above-mentioned processor 501, input device 502, output device 503 and memory 504 are connected via a bus 505. The memory 504 is used to store instructions, and the processor 501 is used to execute the instructions stored in the memory 504 to implement the steps in the above-mentioned various image data processing method embodiments.

[0128] It should be understood that in the embodiment of the present application, the processor 501 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0129] The input device 502 may include a touch panel, a fingerprint sensor (for collecting the user's fingerprint information and fingerprint direction information), a microphone, a data receiving interface, etc. The output device 503 may include a display (LCD, etc.), a speaker, a data sending interface, etc.

[0130] The memory 504 may include a read-only memory and a random access memory, and provide instructions and data to the processor 501. A portion of the memory 504 may also include a non-volatile random access memory. For example, the memory 504 may also store information about the device type.

[0131] In a specific implementation, the processor 501, input device 502, output device 503 and memory 504 described in the embodiments of the present application can execute the implementation method described in the embodiment of the image data processing method provided in the embodiments of the present application, and can also execute the implementation method described in the image data processing device provided in Example 4, which will not be repeated here.

[0132] Figure 6 Schematic diagram of the structure of the mobile terminal provided in Example 6 of the present application. Figure 6As shown, the mobile terminal 6 of this embodiment includes: one or more processors 60 (only one is shown in the figure), a memory 61, and a computer program 62 stored in the memory 61 and executable on at least one processor 60. When the processor 60 executes the computer program 62, the steps in the above-mentioned various image data processing method embodiments are implemented.

[0133] The mobile terminal 6 may be a device with a camera and a shooting function, such as a mobile phone, a tablet computer, etc. The mobile terminal may include, but is not limited to, a processor 60 and a memory 61. Those skilled in the art will appreciate that Figure 6 It is only an example of the mobile terminal 6 and does not constitute a limitation of the mobile terminal 6. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the mobile terminal may also include input and output devices, network access devices, buses, etc.

[0134] The processor 60 may be a central processing unit CPU, or other general-purpose processors, digital signal processors DSP, application-specific integrated circuits ASIC, off-the-shelf programmable gate arrays FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.

[0135] The memory 61 may be an internal storage unit of the mobile terminal 6, such as a hard disk or memory of the mobile terminal 6. The memory 61 may also be an external storage device of the mobile terminal 6, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the mobile terminal 6. Further, the memory 61 may also include both an internal storage unit of the mobile terminal 6 and an external storage device. The memory 61 is used to store computer programs and other programs and data required by the mobile terminal. The memory 61 may also be used to temporarily store data that has been output or is to be output.

[0136] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0137] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0138] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0139] In the embodiments provided in the present application, it should be understood that the disclosed device / mobile terminal and method can be implemented in other ways. For example, the device / mobile terminal embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0140] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0141] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0142] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electric carrier signals and telecommunication signals.

[0143] The present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed through a computer program product. When the computer program product runs on a mobile terminal, the mobile terminal can implement the steps in the above-mentioned method embodiments when executing it.

[0144] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A method for processing image data, characterized in that: Applied to a mobile terminal, the image data processing method includes: Receiving image data request information sent by an application program interface, where the application program interface is integrated in a third-party application; the image data request information includes information sent by the third-party application requesting to take a photo or to record a video; Determine an image data acquisition strategy according to the image data request information, wherein the image data acquisition strategy is an image capability to be accessed by the image data request information, including an image data acquisition action; the image data acquisition action includes a photo taking and a video recording operation; Calling the operating system interface of the mobile terminal according to the image data acquisition action to acquire corresponding image data; wherein calling the operating system interface of the mobile terminal specifically includes: calling the image capability of the operating system of the mobile terminal, and the image capability is the image capability of the system camera of the mobile terminal; The image data is called back to the third-party application through the application program interface.

2. The image data processing method according to claim 1, characterized in that: The image data acquisition strategy also includes an image data processing algorithm, and calling back the image data to the third-party application through the application program interface includes: Sending the image data to an algorithm processing service module, wherein the image data is used to instruct the algorithm processing service module to process the received image data based on the image data processing algorithm to obtain the processed image data; Acquiring the processed image data from the algorithm processing service module; The processed image data is called back to the third-party application through the application program interface.

3. The image data processing method according to claim 1, wherein: Determining the image data acquisition strategy according to the image data request information includes: Authenticating the legitimacy of the image data request information; If the image data request information is legal, the image data acquisition strategy is determined according to the image data request information.

4. The image data processing method according to claim 3, wherein: The image data request information includes the authorization code of the third-party application, and the authentication of the legitimacy of the image data request information includes: Based on the authorization code of the third-party application, the legitimacy of the image data request information is authenticated.

5. The image data processing method according to claim 4, characterized in that: The authenticating the legitimacy of the image data request information based on the authorization code of the third-party application includes: Detecting whether there is an authorization code identical to the authorization code of the third-party application in an authorization code database stored in the mobile terminal; If the authorization code database contains an authorization code identical to the authorization code of the third-party application, determining that the image data request information is legal; If the authorization code database does not contain the same authorization code as the authorization code of the third-party application, it is determined that the image data request information is illegal.

6. The image data processing method according to claim 4, characterized in that: The authenticating the legitimacy of the image data request information based on the authorization code of the third-party application includes: Sending the authorization code of the third-party application to a server, wherein the authorization code of the third-party application is used to instruct the server to detect whether there is an authorization code identical to the authorization code of the third-party application in an authorization code database, and feeding back the detection result to the mobile terminal, wherein the authorization code database is stored in the server; If the detection result is that there is an authorization code in the authorization code database that is the same as the authorization code of the third-party application, then determining that the image data request information is legal; If the detection result is that the authorization code that is identical to the authorization code of the third-party application does not exist in the authorization code database, it is determined that the image data request information is illegal.

7. The image data processing method according to any one of claims 1 to 6, characterized in that: The image data request information sent by the receiving application program interface includes: The image data request information sent by the application program interface is received through a process of a third-party application or a service process of the operating system of the mobile terminal.

8. An image data processing device, characterized in that: Applied to a mobile terminal, the image data processing device comprises: An information receiving module, used to receive image data request information sent by an application program interface, wherein the application program interface is integrated in a third-party application; the image data request information includes information sent by the third-party application requesting to take a photo or request to record a video; A strategy determination module, used to determine an image data acquisition strategy according to the image data request information, wherein the image data acquisition strategy is an image capability to be accessed by the image data request information, including an image data acquisition action; the image data acquisition action includes a photo taking and a video recording operation; A data acquisition module, configured to call the operating system interface of the mobile terminal according to the image data acquisition action to acquire corresponding image data; wherein calling the operating system interface of the mobile terminal specifically includes: calling the image capability of the operating system of the mobile terminal, wherein the image capability is the image capability of the system camera of the mobile terminal; The data callback module is used to call back the image data to the third-party application through the application program interface.

9. A mobile terminal comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the image data processing method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the image data processing method according to any one of claims 1 to 7 are implemented.