Database calling method, device, electronic device and storage medium

By configuring the intermediate interface and algorithm library in the storage partition of the electronic device and ensuring its permissions, the problem of the camera capability opening unit being unable to improve the application's image processing capability is solved, achieving stable image processing capability after system upgrade, and simplifying The interaction of the application with the underlying algorithm.

CN113900839BActive Publication Date: 2024-09-03GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111254695.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-27
Publication Date
2024-09-03
Estimated Expiration
2041-10-27

AI Technical Summary

Technical Problem

In the existing technology, the camera capability opening unit cannot effectively improve the image processing capability of the application. Especially after the system upgrade, the image processing capability of the application becomes worse due to the change of access permissions between storage partitions.

Method used

By configuring the intermediate interface and algorithm library in the storage partition of the electronic device, and ensuring that the intermediate interface has the permission to access the algorithm library storage partition, the camera capability opening unit can normally call the image processing algorithm library and improve the image processing capability of the application.

Benefits of technology

It ensures that the camera capability opening unit can continue to improve the image processing capabilities of applications after system upgrades, avoids the decline in image processing capabilities caused by changes in storage partition permissions, simplifies the interaction between applications and underlying algorithms, reduces the size of the installation package and releases storage space.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113900839B
    Figure CN113900839B
Patent Text Reader

Abstract

The present application relates to a database calling method, device, electronic device and storage medium, the database calling method comprising: receiving an image processing request generated by an application that triggers a camera function; in response to the image processing request, calling an intermediate interface to call an algorithm library storing an image processing algorithm through the intermediate interface; wherein the intermediate interface is configured in a first storage partition of the electronic device, the algorithm library is configured in a second storage partition of the electronic device, and the first storage partition has permission to access the second storage partition. The database calling method can ensure that the image processing capability of the application can be improved through the camera capability exposure unit.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a database calling method, device, electronic device and storage medium. Background Art

[0002] With the development of image processing technology, a camera capability exposure unit has emerged. In related technologies, the camera capability exposure unit can help applications call camera algorithms from the bottom layer of electronic devices, thereby improving the image processing capabilities of the applications.

[0003] However, there is still a situation in the related art where the image processing capability of an application cannot be improved through a camera capability exposure unit. Summary of the invention

[0004] The embodiments of the present application provide a database calling method, device, electronic device and storage medium, which can ensure that the image processing capability of an application can be improved through a camera capability exposure unit.

[0005] A database calling method, applied to a camera capability opening unit, comprises:

[0006] receiving an image processing request generated by an application that triggers a camera function;

[0007] In response to the image processing request, calling an intermediate interface to call an algorithm library storing an image processing algorithm through the intermediate interface;

[0008] The intermediate interface is configured in a first storage partition of the electronic device, the algorithm library is configured in a second storage partition of the electronic device, and the first storage partition has permission to access the second storage partition.

[0009] A database calling device, applied to a camera capability opening unit, comprising:

[0010] A receiving module, used for receiving an image processing request generated by an application program that triggers a camera function;

[0011] A calling module, configured to call an intermediate interface in response to the image processing request, so as to call an algorithm library storing image processing algorithms through the intermediate interface;

[0012] The intermediate interface is configured in a first storage partition of the electronic device, the algorithm library is configured in a second storage partition of the electronic device, and the first storage partition has permission to access the second storage partition.

[0013] An electronic device comprises a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the above method.

[0014] A computer-readable storage medium stores a computer program, which implements the steps of the above method when executed by a processor.

[0015] The above-mentioned database calling method, device, electronic device and storage medium, the database calling method is applied to the camera capability exposure unit, and the database calling method includes: receiving an image processing request generated by an application that triggers a camera function; in response to the image processing request, calling an intermediate interface to call an algorithm library storing an image processing algorithm through the intermediate interface; wherein the intermediate interface is configured in a first storage partition of the electronic device, and the algorithm library is configured in a second storage partition of the electronic device, and the first storage partition has the authority to access the second storage partition; the intermediate interface of the present application is configured in the first storage partition of the electronic device, and the algorithm library is configured in the second storage partition configured in the electronic device. Since the first storage partition has the authority to access the second storage partition, the camera capability exposure unit can call the algorithm library through the intermediate interface, thereby helping the application to call the image processing algorithm stored in the algorithm library in the electronic device, avoiding the problem that the algorithm in the algorithm library cannot be called due to lack of authority between storage partitions, resulting in the inability to improve the image processing capability of the application through the camera capability exposure unit, and ensuring that the image processing capability of the application can be improved through the camera capability exposure unit. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, 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 work.

[0017] Figure 1 A schematic diagram of a call framework for related technologies;

[0018] Figure 2 A flowchart of a database calling method provided by an embodiment of the present application;

[0019] Figure 3 A flowchart of a database calling method provided in another embodiment of the present application;

[0020] Figure 4 A schematic diagram of a framework of a database calling method provided in an embodiment of the present application;

[0021] Figure 5 A structural block diagram of a database calling device provided in an embodiment of the present application;

[0022] Figure 6 FIG. 1 is a schematic diagram of the internal structure of an electronic device in an embodiment. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0024] It is understood that the terms "first", "second", etc. used in this application may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, without departing from the scope of this application, a first storage partition may be referred to as a second storage partition, and similarly, a second storage partition may be referred to as a first storage partition. Both the first storage partition and the second storage partition are storage partitions, but they are not the same storage partition.

[0025] refer to Figure 1 , Figure 1 This is one of the framework diagrams of the calling framework of the related technology provided in the embodiment of the present application. Figure 1 As shown, the storage system of the electronic device includes system_ext storage partition, system storage partition, odm storage partition, product storage partition and my_stock storage partition, etc. The application is configured in the my_stock storage partition, the JNI (Java Native Interface) is configured in the system_ext storage partition, the Camera Unit (camera capability exposure unit) is configured in the system_ext storage partition, the APSClient (algo processservic client) is configured in the system_ext storage partition, the public library is configured in the system_ext storage partition, and the algorithm library is configured in the odm storage partition.

[0026] The algorithm library refers to a database storing image data processing algorithms, and the public library refers to a database storing image encoding and decoding algorithms.

[0027] exist Figure 1In the example related technology, the application can call the algorithm library by calling the Java local interface, or the application first calls the camera capability exposure unit, the camera capability exposure unit then calls APSClient, and APSClient then calls the public library or algorithm library respectively.

[0028] In the related art, an application can call a camera algorithm through a camera capability exposure unit, thereby improving the image processing capability of the application.

[0029] However, in some cases of the example, after the electronic device upgrades the system, such as upgrading to the Android S system, the camera capability exposure unit cannot function, that is, the image processing capability of the application cannot be improved through the camera capability exposure unit, and the image processing capability of the application will deteriorate. Generally, in the case of upgrading to the Android S system, the Android S system has strict restrictions on access rights between storage partitions, and the APSClient and JNI configured in the system_ext storage partition cannot normally access the algorithm library configured in the odm partition. Since the APSClient and JNI cannot normally access the algorithm library, the application cannot perform image processing through the underlying image processing algorithm of the electronic device, resulting in the deterioration of the image capability of the application.

[0030] Therefore, the embodiment of the present application is explained by how to ensure that the image processing capability of the application can be improved through the camera capability exposure unit.

[0031] refer to Figure 2 , Figure 2 This is one of the flow charts of the database calling method provided in the embodiment of the present application. Figure 2 As shown, a database calling method is provided. This embodiment uses the method applied to the camera capability exposure unit of the electronic device as an example for illustration. It can be understood that the method can also be applied to the server, and can also be applied to the system including the electronic device and the server, and is implemented through the interaction between the electronic device and the server. In this embodiment, the method includes steps 210 to 230.

[0032] Step 210: Receive an image processing request generated by an application that triggers a camera function.

[0033] Among them, the application refers to a computer program for completing one or more specific tasks. It runs in user mode, can interact with the user, and has a visual user interface. The application in this embodiment can be a third-party application or a system application. Third-party applications can be, for example, WeChat, music player, beauty camera, etc., which are built into the terminal or downloaded and installed during the user's use. System applications can be, for example, system cameras, etc. Generally speaking, system applications have the authority to call the underlying algorithms of electronic devices, while third-party applications do not have the authority to call the underlying algorithms of electronic devices.

[0034] An image processing request refers to a request that triggers the camera capability exposure unit to process an image. The image processing request in this embodiment is generated by an application that triggers the camera function. Among them, triggering the camera function can be calling the camera interface of the electronic device through the application, that is, calling the camera interface of the electronic device through the application can be regarded as triggering the camera function; it can also be calling the camera interface of the electronic device through the application to take a picture, that is, taking a picture is regarded as triggering the camera function, which is not limited in this embodiment. Exemplarily, the application that triggers the camera function may be an application such as "Beauty Camera" and "WeChat". Taking the application "WeChat" as an example, the "WeChat" triggering the camera function may be calling the camera interface of the electronic device after clicking the shooting control in the chat dialog box.

[0035] Step 220: In response to the image processing request, call an intermediate interface to call an algorithm library storing image processing algorithms through the intermediate interface.

[0036] Among them, the intermediate interface can be an interface that plays a connecting role. The intermediate interface of this embodiment plays a connecting role between the camera capability exposure unit and the algorithm library, so that the camera capability exposure unit can call the algorithm library through the intermediate interface. In this step, the camera capability exposure unit responds to the image processing request and calls the intermediate interface, thereby calling the algorithm library storing the image processing algorithm through the intermediate interface. The algorithm library refers to a database storing image processing algorithms. Optionally, the image processing algorithm includes but is not limited to a beauty algorithm, a blur algorithm, an HDR algorithm, and a portrait color retention algorithm, etc. This embodiment does not limit the specific image processing algorithm.

[0037] It should be noted that the intermediate interface is configured in the first storage partition of the electronic device, the algorithm library is configured in the second storage partition of the electronic device, and the first storage partition has the authority to access the second storage partition. The storage partition refers to the storage location of the database object in the storage system of the electronic device.

[0038] It can be understood that since the intermediate interface is configured in the first storage partition of the electronic device, the algorithm library is configured in the second storage partition of the electronic device, and the first storage partition has the authority to access the second storage partition, it can be ensured that the intermediate interface configured in the first storage partition can normally call the algorithm library configured in the second storage partition, so that the application can also use the image processing algorithm built into the electronic device, thereby improving the image processing capability of the application.

[0039] The technical solution of this embodiment is to receive the image processing request generated by the application that triggers the camera function through the camera capability opening unit, and call the intermediate interface in response to the image processing request, so as to call the algorithm library storing the image processing algorithm through the intermediate interface. Since the algorithm library is configured in the second storage partition, and the intermediate interface is configured in the first storage partition with the permission to access the second storage partition, the intermediate interface can call the algorithm library normally, so the application can also call the image processing algorithm in the algorithm library, avoiding the problem that the algorithm in the algorithm library cannot be called due to the lack of permission between the storage partitions, resulting in the inability to improve the image processing capability of the application through the camera capability opening unit, and ensuring that the image processing capability of the application can be improved through the camera capability opening unit. In addition, the application calls the underlying algorithm of the electronic device through the camera capability opening unit, and the image processing algorithm does not need to be configured in the installation package of the application, and the size of the installation package of the application is correspondingly reduced, freeing up the storage space of the electronic device.

[0040] It should be noted that in some cases of the examples, after the system is upgraded, the access rights between the storage partitions may change compared with the system before the upgrade, resulting in a deterioration in the image processing capability of the application. However, in this embodiment, by configuring the intermediate interface in the first storage partition and the algorithm library in the second storage partition, after the system is upgraded, the first storage partition has the right to access the second storage partition, and the intermediate interface can call the algorithm library normally. Optionally, one of the intermediate interface and the algorithm library can be transplanted from the storage partition before the system is upgraded to other partitions, so that the storage partition where the intermediate interface is located has the right to access the storage partition where the algorithm library is located.

[0041] It can be understood that the database calling method of the above embodiment can not only solve the problem of the image processing capability of the application being deteriorated due to the change of the access rights of the storage partition due to the system upgrade, but in other situations, as long as the image processing capability of the application is deteriorated due to the change of the access rights of the storage partition, the method of the above embodiment can be used to ensure that the image processing capability of the application can be improved through the camera capability exposure unit, thereby improving the applicability of improving the image processing capability of the application through the camera capability exposure unit.

[0042] In a possible implementation manner, the intermediate interface includes at least one of a Java native interface and a client for providing algorithm processing services.

[0043] Specifically, in this embodiment, the intermediate interface may include a Java native interface, may include a client, or may include a Java native interface and a client.

[0044] Among them, the client of this embodiment refers to the client that provides algorithm processing services, namely APSClient. Among them, the Java Native Interface (JNI) is a programming framework that enables a Java program running on a Java virtual machine to call or be called by programs written in other languages ​​(C, C++ or assembly language, etc.) that are specific to the native hardware and operating system. When the intermediate interface includes a client, the client is configured in the first storage partition of the electronic device, and the camera capability exposure unit calls the algorithm library through the client configured in the first storage partition. When the intermediate interface includes a Java native interface, the Java native interface is configured in the first storage partition of the electronic device, and the camera capability exposure unit calls the algorithm library through the Java native interface configured in the first storage partition.

[0045] It should be noted that, generally, when the camera capability exposure unit calls the algorithm library through the client, it usually calls some algorithms for image processing after the image is taken, such as HDR and blurring of the image, etc., which are not specifically limited in this embodiment. When the camera capability exposure unit calls the algorithm library through the Java local interface, it usually calls some algorithms for previewing the image before the image is taken, such as the beauty algorithm during preview, etc., which are not specifically limited in this embodiment. Optionally, calling the image processing algorithm after the image is taken and calling the image processing algorithm before the image is taken can also be called through an intermediate interface, which is not limited in this embodiment.

[0046] For example, the process of image processing is described by taking the camera capability exposure unit to call the image processing algorithm through the client after taking a photo and the camera capability exposure unit to call the image processing algorithm through the Java local interface before taking a photo. Specifically, when the application turns on the camera function, the camera capability exposure unit can call the preview algorithm through the Java local interface for preview, and after taking a photo, the camera capability exposure unit can call the algorithm through the client to process the image obtained by taking a photo.

[0047] It is understandable that by calling the algorithm library through the client, some algorithms for processing the image are called after the image is taken; and by calling the algorithm library through the Java local interface, the algorithm for previewing the image is called before the image is taken, that is, the algorithm calls before and after taking the photo are called through different paths. The algorithm library can be decoupled to a certain extent, thereby ensuring that the image processing capability in at least one situation before and after taking the photo can take effect normally, thereby improving the applicability of the application calling the underlying algorithm of the electronic device to improve the image processing capability.

[0048] In addition, by using the camera capability exposure unit as the interface between the application and the underlying algorithm, the application does not have to worry about the adaptation issues between the algorithm library, JNI and the client, which improves the decoupling performance between the application and the underlying algorithm.

[0049] In some cases of the examples, in addition to processing the image, the image also needs to be coded and decoded. The following embodiments, based on any of the above embodiments, illustrate the process of how an application program calls the underlying coding and decoding algorithm of an electronic device.

[0050] refer to Figure 3 , Figure 3 The second flowchart of the database calling method provided in the embodiment of the present application is shown in FIG. Figure 3 As shown, the database calling method in one embodiment includes steps 310 to 340.

[0051] Step 310: Receive an image processing request generated by an application that triggers a camera function.

[0052] This step may refer to the description of any of the above embodiments, and will not be described in detail in this embodiment.

[0053] Step 320: In response to the image processing request, call an intermediate interface to call an algorithm library storing image processing algorithms through the intermediate interface.

[0054] This step may refer to the description of any of the above embodiments, and will not be described in detail in this embodiment.

[0055] Step 330: Receive the image encoding and decoding request generated by the client.

[0056] Among them, the image encoding and decoding request refers to a request that triggers the camera open unit to encode and / or decode the image. The image encoding and decoding request in this embodiment is generated by the client. Encoding is the process of converting information from one form or format to another form, also known as the code of a computer programming language, referred to as encoding. Decoding is the inverse process of encoding. Optionally, the image encoding and decoding request can be before or after image processing, which is not limited in this embodiment.

[0057] Step 340: In response to the image encoding and decoding request, call the framework component to call the public library storing the image encoding and decoding algorithm through the framework component.

[0058] Among them, the framework component (framework) in this embodiment acts as an interface for the camera capability exposure unit to call the public library. In this step, the camera capability exposure unit responds to the image codec request and calls the framework component, thereby accessing the public library through the framework component. Among them, the public library refers to a database storing image codec algorithms. Optionally, the image codec algorithm includes but is not limited to the heif codec algorithm, etc., and this embodiment does not limit the specific image codec algorithm.

[0059] It should be noted that the camera capability exposure unit is configured in the first storage partition, the framework component is configured in the third storage partition of the electronic device, the public library is configured in the fourth storage partition of the electronic device, the first storage partition has the authority to access the third storage partition, and the third storage partition has the authority to access the fourth storage partition.

[0060] It can be understood that even if the camera capability exposure unit configured in the first storage partition does not have the authority to directly access the public library configured in the fourth storage partition, since the first storage partition has the authority to access the third storage partition, and the third storage partition has the authority to access the fourth storage partition, the camera capability exposure unit can first call the framework component configured in the third storage partition, and then call the public library through the framework component. The camera capability exposure unit can indirectly call the public library, so that the application can call the image encoding and decoding algorithm of the public library through the camera capability exposure unit, thereby improving the image compression capability and imaging capability of the application.

[0061] According to the technical solution of this embodiment, the application can not only call the underlying image processing algorithm of the electronic device through the camera capability exposure unit, but also call the underlying image coding and decoding algorithm of the electronic device through the camera capability exposure unit, which can not only improve the image processing capability of the application, but also improve the coding and decoding capability of the application, thereby improving the image compression capability and imaging capability of the application. In addition, the camera capability exposure unit is configured in the first storage partition, that is, the camera capability exposure unit and the intermediate interface and framework component are configured in the same storage partition, then there is no access permission problem when the camera capability exposure unit calls the intermediate interface and framework component, and there is no need to consider the access permissions between the camera capability exposure unit and the intermediate interface, and between the camera capability exposure unit and the framework component, which improves the simplicity of the camera capability exposure unit calling the algorithm.

[0062] In a possible implementation, the image encoding and decoding request carries an address pointer, and the steps of calling the framework component include:

[0063] The framework component is called from the third storage partition according to the storage address pointed to by the address pointer.

[0064] The address pointer describes the location of the data in the memory, and indicates the relative distance value of an entity occupying the storage space from the starting position of this space. In C / C++ language, a pointer is generally considered to be a pointer variable. The content of the pointer variable stores the first address of the object it points to. The pointed object can be a variable (pointer variable is also a variable), array, function, and other entities occupying storage space. The address pointer in this embodiment describes the location of the framework component in the third storage partition. According to the address pointer carried by the image encoding and decoding request, the framework component can be called from the third storage partition.

[0065] Optionally, the address pointer in this embodiment is a pointer of type long, wherein an object of type long includes a field of type long.

[0066] In a possible implementation, the step of calling the framework component includes:

[0067] The framework components are called through a reflection mechanism.

[0068] The core of the Java reflection mechanism is to dynamically load classes when the program is running, and obtain detailed information about the class, so as to operate the properties and methods of the class or object. The essence is that after the JVM obtains the class object, it decompiles through the class object to obtain various information about the object. Java is a language that is compiled before running. The type of objects in the program is determined at compile time, and when the program is running, some classes may need to be dynamically loaded. These classes have not been used before, so they have not been loaded into the JVM. Through reflection, objects can be dynamically created and their properties can be called at runtime, without having to know who the running object is in advance at compile time.

[0069] Optionally, the step of calling the framework component through a reflection mechanism may specifically be accessing a class attribute of the framework component through a reflection mechanism, thereby calling the framework component according to the class attribute.

[0070] In one embodiment, the application is configured in a first storage partition.

[0071] It can be understood that if the application is configured in the first storage partition, then the application and the camera capability exposure unit are configured in the same storage partition, then there is no access permission issue between the application and the camera capability exposure unit, and there is no need to consider the access permission between the application and the camera capability exposure unit, thereby improving the ease of interaction between the application and the camera capability exposure unit.

[0072] In one embodiment, the first storage partition, the second storage partition, the third storage partition and the fourth storage partition are all different storage partitions.

[0073] It can be understood that the first storage partition, the second storage partition, the third storage partition and the fourth storage partition are all different storage partitions, and the algorithm library is configured in the second storage partition, and the public library is configured in the fourth storage partition. The algorithm library is independent, and the public library is also independent. If the algorithm needs to be updated or the public library needs to be updated in the future, it is sufficient to update the corresponding partitions (system, odm), and the partitions where the other parts (JNI, APSClient) are located do not need to be updated at all. The maintainability and scalability have certain advantages compared to before.

[0074] In one embodiment, the first storage partition is a product storage partition, the second storage partition is an odm storage partition, the third storage partition is a system storage partition, and the fourth storage partition is a system_ext storage partition.

[0075] refer to Figure 4 , Figure 4 The framework diagram of the calling framework of the database calling method provided in the embodiment of the present application is shown in FIG. Figure 4 As shown, the application is configured in the product storage partition, the camera capability exposure unit is configured in the product storage partition, the Java local interface is configured in the product storage partition, the client is configured in the product storage partition, the algorithm library is configured in the odm storage partition, the framework component is configured in the system storage partition, and the public library is configured in the system_ext storage partition.

[0076] Exemplarily, when the application turns on the camera function, the camera capability exposure unit can call the preview algorithm in the algorithm library through the Java local interface, so as to process the image captured by the camera of the electronic device through the preview algorithm, so as to display the processed preview image on the visual interface of the electronic device. After the application calls the camera of the electronic device to capture an image, the camera capability exposure unit calls some synthesis algorithms in the algorithm library through the client, so as to process the captured image through the synthesis algorithm to obtain a processed image. At this time, after the image processing algorithm is called to process the captured image, the client calls back the camera capability exposure unit, and the camera capability exposure unit needs to call the framework component, so as to call the public library through the framework component, so as to encode and decode the processed image through the image encoding and decoding algorithm in the public library.

[0077] Also refer to Figure 1 and Figure 4 After the system is upgraded, the partition permissions are strictly controlled. If the application is installed (installed in the data partition), it cannot access the odm storage partition by accessing the system_ext storage partition, while the solution of the embodiment of the present application can normally access the algorithm library in the odm storage partition. APSClient is a code written in C++. When it is in the product storage partition, it cannot directly call the public library in the system_ext storage partition (implemented in C++). Through the solution of this embodiment, the public library can be called through the framework component, so the public library in the system_ext storage partition can be normally accessed.

[0078] In this embodiment, after the system is upgraded, when partition authority control is strict, the problem that the application cannot access certain storage partitions is solved by a series of means such as porting the client to the product partition, C++ callback JAVA, reflection, etc.

[0079] Also refer to Figure 1 and Figure 4 , you can port applications from the my_stock storage partition to the product storage partition, port the camera capability exposure unit from the system_ext storage partition to the product storage partition, port the APSClient from the system_ext storage partition to the product storage partition, and port the Java local interface from the system_ext storage partition to the product storage partition.

[0080] It is understandable that since the workload of porting public libraries and algorithm libraries is relatively large, the workload of adaptation can be reduced by porting applications, camera capability exposure units, APSClient and Java local interfaces.

[0081] It should be noted that Figure 1 and Figure 4 In the example, the storage partitions configured by the application, client, camera capability opening unit, Java local interface, algorithm library and public library are only an example. It is understandable that before the system upgrade, the application may be configured in the fifth storage partition, the client may be configured in the sixth storage partition, the camera capability opening unit may be configured in the seventh storage partition, the Java local interface may be configured in the eighth storage partition, the algorithm library may be configured in the ninth storage partition, and the public library may be configured in the tenth storage partition. At this time, the fifth storage partition is different from the first storage partition, the sixth storage partition is different from the first storage partition, the seventh storage partition is different from the first storage partition, and the eighth storage partition is different from the first storage partition. Therefore, by transplanting one or more of the application, client, camera capability opening unit, Java local interface, algorithm library and public library from the storage partition before the system upgrade to the storage partition after the system upgrade, it is sufficient to have calling permissions between each other.

[0082] It should be understood that although Figure 2-3 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2-3 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0083] refer to Figure 5 , Figure 5 This is a structural block diagram of the database calling device provided in the embodiment of the present application. Figure 5 As shown, a database calling device is provided. This embodiment is described by taking the device applied to a camera capability opening unit of an electronic device as an example. It can be understood that the device can also be applied to a server, and can also be applied to a system including an electronic device and a server, and is implemented through the interaction between the electronic device and the server. In this embodiment, the device includes a receiving module 510 and a calling module 520, wherein:

[0084] The receiving module 510 is used to receive an image processing request generated by an application that triggers a camera function;

[0085] The calling module 520 is used to call the intermediate interface in response to the image processing request, so as to call the algorithm library storing the image processing algorithm through the intermediate interface;

[0086] The intermediate interface is configured in a first storage partition of the electronic device, the algorithm library is configured in a second storage partition of the electronic device, and the first storage partition has permission to access the second storage partition.

[0087] In one embodiment, the intermediate interface includes at least one of a Java native interface and a client for providing algorithm processing services.

[0088] In one embodiment, the intermediate interface includes the client, and the receiving module 510 is also used to receive an image encoding and decoding request generated by the client; the calling module 520 is also used to call the framework component in response to the image encoding and decoding request, so as to call the public library storing the image encoding and decoding algorithm through the framework component; wherein the camera capability exposure unit is configured in the first storage partition, the framework component is configured in the third storage partition of the electronic device, the public library is configured in the fourth storage partition of the electronic device, the first storage partition has the right to access the third storage partition, and the third storage partition has the right to access the fourth storage partition.

[0089] In one embodiment, the image encoding and decoding request carries an address pointer, and the calling module 520 is specifically configured to call the framework component from the third storage partition according to the storage address pointed to by the address pointer.

[0090] In one embodiment, the calling module 520 is specifically used to call the framework component through a reflection mechanism.

[0091] In one embodiment, the first storage partition is a product storage partition, the second storage partition is an odm storage partition, the third storage partition is a system storage partition, and the fourth storage partition is a system_ext storage partition.

[0092] In one embodiment, the application is configured in the first storage partition.

[0093] The division of the various modules in the above-mentioned database calling device is only for illustration. In other embodiments, the database calling device can be divided into different modules as needed to complete all or part of the functions of the above-mentioned database calling device.

[0094] For the specific definition of the database calling device, please refer to the definition of the database calling method above, which will not be repeated here. Each module in the above-mentioned database calling device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0095] Figure 6 FIG. 1 is a schematic diagram of the internal structure of an electronic device in one embodiment. Figure 6 As shown, the electronic device includes a processor and a memory connected via a system bus. The processor is used to provide computing and control capabilities to support the operation of the entire electronic device. The memory may include a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The computer program can be executed by the processor to implement a database calling method provided in each of the following embodiments. The internal memory provides a cached operating environment for the operating system computer program in the non-volatile storage medium. The electronic device can be any electronic device such as a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), a vehicle-mounted computer, a wearable device, etc.

[0096] The implementation of each module in the database call device provided in the embodiment of the present application can be in the form of a computer program. The computer program can be run on an electronic device or a server. The program module constituted by the computer program can be stored in the memory of the electronic device. When the computer program is executed by the processor, the steps of the method described in the embodiment of the present application are implemented.

[0097] The embodiment of the present application also provides a computer-readable storage medium, one or more non-volatile computer-readable storage media containing computer-executable instructions, which, when executed by one or more processors, enable the processors to execute the steps of the database calling method.

[0098] A computer program product comprising instructions, when the computer program product is run on a computer, causes the computer to execute a database calling method.

[0099] Any reference to memory, storage, database or other medium used in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM), which is used as an external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0100] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A database calling method, characterized in that: Applied to a camera capability exposure unit, the method includes: receiving an image processing request generated by an application that triggers a camera function; In response to the image processing request, calling an intermediate interface to call an algorithm library storing an image processing algorithm through the intermediate interface; the intermediate interface includes a client for providing algorithm processing services; Receiving an image encoding and decoding request generated by the client; In response to the image encoding and decoding request, calling a framework component to call a public library storing an image encoding and decoding algorithm through the framework component; Among them, the intermediate interface and the camera capability exposure unit are configured in a first storage partition of the electronic device, the algorithm library is configured in a second storage partition of the electronic device, the framework component is configured in a third storage partition of the electronic device, and the public library is configured in a fourth storage partition of the electronic device. The first storage partition has the authority to access the second storage partition and the third storage partition, and the third storage partition has the authority to access the fourth storage partition.

2. The method according to claim 1, characterized in that: The intermediate interface also includes a Java native interface.

3. The method according to claim 1, characterized in that The image encoding and decoding request carries an address pointer, and the calling framework component includes: The framework component is called from the third storage partition according to the storage address pointed to by the address pointer.

4. The method according to claim 1, characterized in that: The calling framework component includes: The framework components are called through a reflection mechanism.

5. The method according to claim 1, characterized in that The first storage partition is a product storage partition, the second storage partition is an odm storage partition, the third storage partition is a system storage partition, and the fourth storage partition is a system_ext storage partition.

6. The method according to any one of claims 1 to 5, characterized in that: The application is configured in the first storage partition.

7. A database calling device, characterized in that: Applied to a camera capability exposure unit, the device comprises: A receiving module, used for receiving an image processing request generated by an application program that triggers a camera function; A calling module, configured to call an intermediate interface in response to the image processing request, so as to call an algorithm library storing an image processing algorithm through the intermediate interface; the intermediate interface includes a client for providing algorithm processing services; and further configured to receive an image encoding and decoding request generated by the client, and in response to the image encoding and decoding request, call a framework component, so as to call a public library storing an image encoding and decoding algorithm through the framework component; Among them, the intermediate interface and the camera capability exposure unit are configured in a first storage partition of the electronic device, the algorithm library is configured in a second storage partition of the electronic device, the framework component is configured in a third storage partition of the electronic device, and the public library is configured in a fourth storage partition of the electronic device. The first storage partition has the authority to access the second storage partition and the third storage partition, and the third storage partition has the authority to access the fourth storage partition.

8. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.