Movatterモバイル変換


[0]ホーム

URL:


CN110188518B - Parameter configuration method, device, terminal and storage medium - Google Patents

Parameter configuration method, device, terminal and storage medium
Download PDF

Info

Publication number
CN110188518B
CN110188518BCN201910457936.XACN201910457936ACN110188518BCN 110188518 BCN110188518 BCN 110188518BCN 201910457936 ACN201910457936 ACN 201910457936ACN 110188518 BCN110188518 BCN 110188518B
Authority
CN
China
Prior art keywords
application
interface
component
permission
level
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910457936.XA
Other languages
Chinese (zh)
Other versions
CN110188518A (en
Inventor
林进全
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp LtdfiledCriticalGuangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201910457936.XApriorityCriticalpatent/CN110188518B/en
Publication of CN110188518ApublicationCriticalpatent/CN110188518A/en
Application grantedgrantedCritical
Publication of CN110188518BpublicationCriticalpatent/CN110188518B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

Translated fromChinese

本申请实施例提供了一种参数配置方法、装置、终端及存储介质。所述方法包括:接收应用程序发送的组件创建请求,组件创建请求用于请求创建组件;创建组件,并对应记录应用程序的权限等级;接收应用程序发送的参数配置请求,参数配置请求用于请求为组件配置参数;根据应用程序的权限等级,确定应用程序是否具备调用接口的权限,该接口是用于为组件配置参数的接口;若应用程序具备调用该接口的权限,则调用该接口为组件配置参数。本申请实施例提高了权限控制的灵活性。

The embodiments of the present application provide a parameter configuration method, device, terminal and storage medium. The method includes: receiving a component creation request sent by an application, the component creation request is used to request the creation of a component; creating a component and correspondingly recording the permission level of the application; receiving a parameter configuration request sent by the application, the parameter configuration request is used to request configuration parameters for the component; according to the permission level of the application, determining whether the application has the permission to call an interface, the interface is an interface for configuring parameters for the component; if the application has the permission to call the interface, calling the interface to configure parameters for the component. The embodiments of the present application improve the flexibility of permission control.

Description

Parameter configuration method, device, terminal and storage medium
Technical Field
The embodiment of the application relates to the technical field of terminals, in particular to a parameter configuration method, a parameter configuration device, a terminal and a storage medium.
Background
Currently, an application program can be installed in a terminal such as a mobile phone, an operating system provides different interfaces for the application program, and the application program can configure related parameters by calling the interfaces.
Applications installed in the terminal may include system applications and third party applications. The system application refers to a system-level application, that is, an application provided by a developer of an operating system, which is usually pre-installed in a terminal before the terminal leaves the factory. A third party application refers to an application that is not provided by the developer of the operating system, which is typically installed by the user after the terminal leaves the factory.
Disclosure of Invention
The embodiment of the application provides a parameter configuration method, a device, a terminal and a storage medium. The technical scheme is as follows:
in one aspect, an embodiment of the present application provides a parameter configuration method, where the method includes:
Receiving a component creation request sent by an application program, wherein the component creation request is used for requesting to create a component;
creating the component;
Receiving a parameter configuration request sent by the application program, wherein the parameter configuration request is used for requesting to configure parameters for the component;
Determining whether the application program has the authority for calling an interface according to the authority level of the application program, wherein the interface is used for configuring the parameters for the component;
And if the application program has the authority to call the interface, calling the interface to configure the parameters for the component.
In another aspect, an embodiment of the present application provides a parameter configuration apparatus, including:
The first receiving module is used for receiving a component creation request sent by an application program, wherein the component creation request is used for requesting to create a component;
the component creation module is used for creating the component;
The second receiving module is used for receiving a parameter configuration request sent by the application program, wherein the parameter configuration request is used for requesting to configure parameters for the component;
the first determining module is used for determining whether the application program has the authority for calling an interface according to the authority level of the application program, wherein the interface is used for configuring the parameters for the component;
And the parameter configuration module is used for calling the interface to configure the parameters for the component if the application program has the authority to call the interface.
In yet another aspect, an embodiment of the present application provides a terminal, including a processor and a memory, where the memory stores a computer program that is loaded and executed by the processor to implement the parameter configuration method as described in the above aspect.
In yet another aspect, embodiments of the present application provide a computer readable storage medium having a computer program stored therein, the computer program being loaded and executed by a processor to implement the parameter configuration method as described in the above aspect.
The technical scheme provided by the embodiment of the application can bring the following beneficial effects:
By setting different authority levels for the application program, wherein the different authority levels have the authority to call different interfaces, when the application program needs to call a certain interface to configure related parameters for a component created by the application program, the operating system judges whether the application program has the authority to call the interface, and if so, the interface is called to complete the parameter configuration for the application program.
Drawings
FIG. 1 is a flow chart of a parameter configuration method provided by one embodiment of the present application;
FIG. 2 is a schematic diagram of a rights list and an interface level list provided by one embodiment of the application;
FIG. 3 is a flow chart of a parameter configuration method according to another embodiment of the present application;
FIG. 4 is a block diagram of a parameter configuration apparatus provided by one embodiment of the present application;
FIG. 5 is a block diagram of a parameter configuration apparatus provided by another embodiment of the present application;
fig. 6 is a block diagram of a terminal according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail with reference to the accompanying drawings.
Since developers of different applications are different, and the capabilities of the developers are also irregular, the quality of the applications developed by the different developers is also greatly different. The high-level developer obeys the coding standard, is familiar with the framework of the operating system, knows the bottom implementation flow, and the written application program realizes the functions according to the office, and can be released after the resource is called, so that the operating system is convenient for managing the resource. However, the low-level developer does not know about the framework and the bottom implementation, only considers the function implementation at the upper layer, and does not consider the bottom logic, resource application and release, which causes difficulty in managing the resources by the operating system and influences the user experience.
The system application program can call the upper layer interface and the bottom layer interface of the terminal to carry out parameter configuration. For the third party application program, the interface management mode provided by the related technology is the same for all third party application programs, all upper layer interfaces are opened, all bottom layer interfaces are closed, only the upper layer interfaces can be called for parameter configuration, but the bottom layer interfaces cannot be called for parameter configuration, only the system application program has the opportunity to call the bottom layer interfaces, the interface management mode is relatively solidified and single, and the flexibility is lacking.
For example, for some functions that require invocation of an underlying interface, the third party application employs an alternative to achieve the above functions because the third party application does not have the authority to invoke the underlying interface. The third party application performs corresponding operations in the CPU (Central Processing Unit ) to achieve the above functions. But this increases the power consumption of the terminal and this alternative does not necessarily fully implement the functions provided by the underlying interface.
In the technical scheme provided by the embodiment of the application, different permission levels are set for the application program, the different permission levels have the permission of calling different interfaces, when the application program needs to call a certain interface to configure related parameters for the created component, the operating system judges whether the application program has the permission of calling the interface, and if so, the interface is called to complete the parameter configuration for the application program.
In addition, in the method provided by the embodiment of the application, the execution main body of each step can be a terminal, such as a mobile phone, a tablet personal computer, a multimedia playing device, a wearable device, a PC (Personal Computer, a personal computer) and the like. Optionally, the execution subject of each step is an operating system of the terminal. The operating system is a computer program for managing the hardware and software resources of the terminal. The technical scheme provided by the embodiment of the application is suitable for the terminal of an Android (Android) operating system, wherein the Android operating system can be an Android native operating system or other customized operating systems developed based on the Android operating system. In the following method embodiments, for convenience of explanation, the explanation will be given by taking the execution subject of each step as the terminal, but this is not limitative.
Referring to fig. 1, a flowchart of a parameter configuration method according to an embodiment of the application is shown. The method may comprise the following steps (101-106).
And step 101, receiving a component creation request sent by an application program.
The application may be any one of applications installed in the terminal. The application may be a system application or a third party application. In the embodiment of the present application, the kind of the application program is not limited, and may be, for example, a video recording application program, a video playing application program, a social application program, a photographing application program, an instant messaging application program, and the like.
In an embodiment of the present application, a component creation request is used to request creation of a component. A component is a software module for implementing a function, which may be a simple package of data and methods for implementing the function. The components that need to be created during execution will also vary from application to application. For example, when the application is a video recording enabled application, the component it is requested to create may be a video encoder. For another example, when the application is a recording enabled application, the component it is requested to create may be an audio encoder. For another example, when the application is an application having a data transfer function, the component it requests to create may be a data transfer channel.
Step 102, create a component.
The terminal creates the video encoder according to a video encoder creation request sent by the application program when the application program is an application program with a video recording function, creates the audio encoder according to an audio encoder creation request sent by the application program when the application program is an application program with a recording function, and creates the data transmission channel according to a data transmission channel creation request sent by the application program when the application program is an application program with a data transmission function.
And step 103, receiving a parameter configuration request sent by the application program.
In an embodiment of the present application, a parameter configuration request is used to request configuration of parameters for a component.
Illustratively, when the component is a video encoder, the parameters may include at least one of resolution, bit rate type, code stream type, image quality, and frame rate, among others. Resolution means the size of the image, and is used to set the image size of the video. The bit rate is also called code rate, and refers to the data quantity generated by a single video channel in unit time. The bit rate type is also called as code rate type, and has two types of dynamic code rate and solid state code rate, wherein the dynamic code rate is that the encoder adjusts the code rate in real time according to the condition of the image in the process of carrying out compression coding on the image, and the fixed code rate is that the encoder adopts a fixed code rate value all the time in the process of carrying out coding on the image. The types of the code stream include a composite stream (a code stream containing only video and audio data), a video stream (a code stream containing only video data), and an audio stream (a code stream containing only audio data). The image quality parameter may be fine-tuned to the range of values of the video encoder. The frame rate represents the number of image frames per unit time of video.
Step 104, determining whether the application program has the authority for calling the interface according to the authority level of the application program.
In an embodiment of the application, the interface is an interface for configuring parameters for the component. After receiving a parameter configuration request sent by an application program, the terminal determines a component needing parameter configuration and corresponding parameters needing configuration. And then, the terminal determines an interface for configuring parameters for the component according to the component and the parameters.
An interface may be used to configure one parameter, or may be used to configure multiple parameters, which is not limited by the embodiments of the present application.
For example, the permission level of the application may be determined from a permission list.
The authority list stores authority levels of at least one application program. For example, the authority list includes a correspondence between the identification of the application program and the authority level. The identity of the application is used to uniquely indicate the application, with different applications having different identities. For example, the identification of the application may be a package name of the application (simply "application package name") or other unique identifier. And the terminal acquires the authority level corresponding to the identification of the application program from the authority list as the authority level of the application program.
In the embodiment of the application, different permission levels have permissions to call different interfaces. For example, different permission levels have permissions to invoke different classes and numbers of interfaces. Alternatively, the higher the permission level of an application, the more interfaces the application can call.
Optionally, in the authority list, one application package name corresponds to one authority level. Illustratively, the greater the value to which the permission level corresponds, the lower the permission level. Assuming that the authority levels are four, if the authority level corresponding to the application package name 1 is 4, the authority level corresponding to the application package name 1 is the lowest, and if the authority level corresponding to the application package name 2 is 1, the authority level corresponding to the application package name 2 is the highest.
The terminal may store the correspondence between the application package name and the permission level in the permission list. Fig. 2 is an overall schematic diagram illustrating the technical solution of the present application. The terminal stores a permission list 21, wherein the permission list 21 comprises 4 permission levels, namely level 1, level 2, level 3 and level 4, the permission level represented by level 1 is highest, the permission levels represented by level 2, level 3 and level 4 are sequentially reduced, and the permission level represented by level 4 is lowest. Assume that application package names corresponding to application program 1, application program 2, application program 3 and application program 4 are application package name 1, application package name 2, application package name 3 and application package name 4, respectively, the authority level corresponding to application package name 1 is level 2, the authority level corresponding to application package name 2 is level 3, the authority level corresponding to application package name 3 is level 1, and the authority level corresponding to application package name 4 is level 4. The terminal may determine, according to the authority list, that the authority level of the application 1 is level 2, that the authority level of the application 2 is level 3, that the authority level of the application 3 is level 1, and that of the application 4 is level 4. Of course, the same permission level may correspond to multiple application package names, i.e., multiple different applications have the same permission level.
In one example, when it is required to acquire the authority level of a certain application, if the authority list does not contain the authority level corresponding to the identification of the application, the terminal determines the default authority level as the authority level of the application. Optionally, the default permission level is the lowest permission level. For example, if the permission level of the application 5 needs to be obtained, and the permission list does not have the identifier of the application 5, the terminal determines the permission level of the application 5 as level 4.
In another example, when it is required to acquire the authority level of a certain application, if the authority list does not include the authority level corresponding to the identification of the application, the terminal may determine the authority level of the application by:
1. acquiring characteristic information of the application program;
The feature information may be any information capable of embodying features of the application program, such as a developer of the application program, a type of the application program, a CPU occupation amount of the application program, a memory occupation amount, an interface call order, and the like. The embodiment of the application does not limit the specific content of the characteristic information.
2. Selecting an application program with highest similarity with the application program from a right list according to the characteristic information of the application program;
For example, the terminal may calculate the similarity between two applications based on the feature information of the two applications. For example, feature information of two applications is input as a model by a neural network model trained in advance, and the similarity of the two applications is output by the model. When the authority level of an application program needs to be acquired, the terminal sorts the similarity between the application program and other application programs from large to small, and the application program with the highest similarity with the application program is selected from the authority list according to the similarity sorting.
3. And taking the authority level corresponding to the application program with the highest similarity as the authority level of the application program.
And determining the authority level corresponding to the application program with the highest similarity according to the authority list, and taking the authority level as the authority level of the application program. By taking the authority level corresponding to the application program with the highest similarity as the authority level of the application program, the determined authority level is more reasonable and accurate.
In addition, the authority list can be created by a terminal or a server, and the terminal can be obtained synchronously from the server through a network. In addition, the authority list can be updated periodically, and the server issues the updated authority list to the terminal.
In addition, the interface that can be invoked by each authority level can be preset and stored in the terminal. The corresponding relation between the authority level and the callable interface can also be recorded in the authority list. The authority list includes a first corresponding relation and a second corresponding relation. The first correspondence is a correspondence between the identifier of the application program and the permission level described above. The second correspondence refers to a correspondence between the interface level and the interface identifier. The interface identifier is used for uniquely identifying the interface. Each interface level may correspond to one or more interfaces. Different permission levels, have permission to invoke interfaces of different interface levels. Of course, in some other examples, the first correspondence and the second correspondence may be stored separately, for example, the first correspondence is stored in a rights list, and the second correspondence is stored in an interface level list.
As shown in fig. 2, the terminal also stores an interface level list 22. The interface level list 22 contains 4 different levels of interfaces, namely, a level 1 interface, a level 2 interface, a level 3 interface, and a level 4 interface, each interface level may correspond to one or more interfaces. The application program can call a level 1 interface, a level 2 interface, a level 3 interface and a level 4 interface if the authority level corresponding to the application program is level 1 (highest authority level), can call only the level 4 interface if the authority level corresponding to the application program is level 4 (lowest authority level), can call the level 3 interface and the level 4 interface if the authority level corresponding to the application program is level 3, and can call the level 2 interface, the level 3 interface and the level 4 interface if the authority level corresponding to the application program is level 2.
Step 105, if the application program has the authority to call the interface, call the interface to configure parameters for the component.
Still taking the above example as an example, assuming that an application program requests to be a component configuration parameter a, the parameter a needs to call an interface a to perform configuration, the interface a belongs to a level 1 interface, if the authority level corresponding to the application program is level 1, the application program has the authority to call the level 1 interface, and if the terminal calls the interface a to be the component configuration parameter a.
Optionally, if the application program does not have the authority to invoke the interface, the response parameter configuration request is refused, or the calling interface configures default parameters for the component.
Assuming that the application program requests to configure the parameter B for the component, the parameter B needs to call the interface B to configure, the interface B belongs to a level 2 interface, the authority level corresponding to the application program is level 3, if the application program does not have the authority to call the level 2 interface, the terminal refuses to respond to the parameter configuration request of the application program.
In another possible implementation, in the case that the application does not have the authority to invoke the interface B, the terminal may invoke the interface B to configure parameters for the component, but configure default parameters for the component instead of parameters that the terminal requests to configure for the component. The default parameters are parameters which belong to the same category as the parameters but have different values. The default parameter may be a minimum configured parameter that is preset. For example, the application program requests that the code rate configured for the video encoder is 60, but the authority level of the application program does not have an interface for calling the code rate, and the terminal calls the interface to configure the code rate for the video encoder, but the configured code rate is 30.
In summary, in the technical solution provided in the embodiment of the present application, by setting different permission levels for an application program, where the different permission levels have permission to call different interfaces, when the application program needs to call a component configuration related parameter created by a certain interface for the application program, the operating system determines whether the application program has permission to call the interface, and if so, calls the interface to complete the above parameter configuration for the application program.
For example, the server may determine the authority level corresponding to the application program according to the performance information of the application program. The authority level corresponding to the application program can be adjusted, and the adjustment process is as follows:
In an embodiment of the application, the performance information is used for indicating actions of the application program in the running process. The performance information may include at least one of order information of calling interfaces, validity information of parameters, application and release information of resources, and the like. The order information of the calling interfaces is used to indicate the order in which the application calls the different interfaces. For example, the order in which application A calls the different interfaces is to call interface 1, then interface 2, and finally interface 3. The validity information of the parameter is used for indicating the validity of the parameter in the parameter configuration request of the application program. Such as the validity of the parameter value type. The application and release information of the resources are used for indicating the release condition of the application program after applying the resources, and the resources can refer to the memory or the CPU occupancy rate of the terminal or other resources and the like.
The terminal may also perform the steps of:
1. collecting the performance information of an application program;
The terminal may collect the performance information of the application program at intervals of a preset time.
2. Transmitting the performance information of the application program to a server;
3. Receiving authority adjustment information of an application program sent by a server;
in the embodiment of the application, the server is used for determining the authority adjustment information of the application program according to the performance information of the application program. The permission adjustment information of the application program is used for indicating the terminal to adjust the permission level of the application program.
Still taking the above example as an example, the server may determine the rights adjustment information of the application program according to the order information of the call interface. For example, the basic calling sequence of the application program is that the interface 1 is called first, then the interface 2 is called, and finally the interface 3 is called, if the sequence information of the calling interface indicates that the calling sequence of the application program is consistent with the basic calling sequence, the application program has good performance, the server can properly improve the authority level of the application program, if the original authority level of the application program is 4, the server adjusts the authority level to 3.
The server may also determine rights adjustment information for the application based on the validity information of the parameter. For example, the value type corresponding to the parameter a is a number, and the value type corresponding to the parameter a carried in the parameter configuration request is a letter, so that the parameter a is illegal, the application program performs poorly, the server can properly reduce the authority level of the application program, if the original authority level of the application program is 4 (the authority level is lowest), the server determines that the authority level of the application program is 4, and if the original authority level of the application program is 3, the server can adjust the authority level of the application program to be 4.
The server can also determine the authority adjustment information of the application program according to the application and release information of the resource. For example, the application program does not release the resource after the original application program finishes the resource, but the application program releases the resource after the application program finishes the resource, the application program performs well, and the server can properly improve the authority level of the application program, if the original authority level of the application program is 4, the server adjusts the authority level to 3.
The server can also comprehensively consider any two or three of sequence information of the calling interface, validity information of the parameters, application and release information of the resources, and adjust the authority level of the application program.
4. And adjusting the authority level of the application program according to the authority adjustment information of the application program.
If the permission adjustment information indicates to increase the permission level of the application program, the terminal correspondingly increases the permission level of the application program, and if the permission adjustment information indicates to decrease the permission level of the application program, the terminal correspondingly decreases the permission level of the application program.
Optionally, the permission adjustment information includes indication information of the permission level adjusted by the application program, and the terminal adjusts the permission level of the application program according to the indication information.
In summary, in the technical solution provided in the embodiments of the present application, by collecting the performance information of the application program and sending the performance information to the server, so that the server determines the authority adjustment information of the application program according to the performance information, and the terminal makes corresponding adjustment to the authority level of the application program according to the authority adjustment information, thereby improving the flexibility of authority control.
By way of example, an application refers to an application having video recording capabilities, and the component is a video encoder.
The interface at least comprises one of a system universal interface, a Native (local) layer universal interface, an OMX (OpenMax, standard of multimedia application program) common interface and an OMX expansion interface.
In the embodiment of the application, the terminal can call the different interfaces to configure parameters for video recording. The system universal interface is an upper interface of an operating system, and can directly call configuration from a Java layer. The system universal interface comprises a setBitrate interface, and the terminal can call the setBitrate interface to configure the code rate for the video encoder. The Native layer universal interface is an interface for configuring parameters irrelevant to the OMX component, the Native layer universal interface includes a SETQPRANGE interface, and the terminal can call the SETQPRANGE interface to configure QP (Quantization Parameter ) range for the video encoder. The OMX common interface is an interface for configuring general OMX component parameters, wherein the OMX common interface comprises a setCABAC interface, and the terminal can call the setCABAC interface to configure entropy coding for the video encoder. The OMX expansion interface is an interface for configuring non-universal OMX component parameters, the OMX expansion interface comprises a setBlurRect interface, and the terminal can call the setBlurRect interface to configure a fuzzy range for the video encoder.
Still taking the above example as an example, referring to fig. 2 in combination, when the authority level of the application program is level 1, the application program has the authority to call the system universal interface, native layer universal interface, OMX common interface and OMX expansion interface, when the authority level of the application program is level 2, the application program has the authority to call the system universal interface, native layer universal interface and OMX common interface, when the authority level of the application program is level 3, the application program has the authority to call the system universal interface and Native layer universal interface, and when the authority level of the application program is level 4, the application program has the authority to call the system universal interface. In the embodiment of the application, whether the permission of the calling interface is provided is determined according to the permission level of the application program, so that the operability of the application program is improved, and the types and the number of the callable interfaces of the application program are improved to a certain extent. For video encoders, the operability of the video encoder is improved to some extent, thereby increasing the functionality available for video recording.
Referring to fig. 3 in combination, taking a component as an example of a video encoder, a corresponding parameter configuration method may include the following steps:
301. the video recording application program sends a video encoder creation request to an operating system;
The video recording application refers to an application having a video recording function. The video encoder creation request is for requesting creation of a video encoder.
302. The operating system acquires a permission list;
303. the operating system determines the authority level of the video recording application program according to the authority list;
304. The operating system creates a video encoder and correspondingly records the authority level of the video recording application program;
305. the video recording application program sends a parameter configuration request to an operating system;
The parameter configuration request is for requesting the operating system to configure parameters for the video encoder.
306. The operating system determines whether the video recording application program has the authority for calling the interface according to the authority level of the video recording application program recorded corresponding to the video encoder, if so, the step 307 is executed, and if not, the step 308 is executed;
the interface is an interface for configuring parameters for a video encoder.
307. The operating system calls the interface to configure parameters carried in the parameter configuration request for the video encoder;
308. The operating system calls the interface to configure default parameters for the video encoder;
309. the operating system judges whether the parameter configuration is finished;
And when the operating system does not receive the parameter configuration request sent by the video recording application program in excess of the preset time, the operating system considers that the parameter configuration is finished.
310. After the parameter configuration is completed, the video recording application program starts recording.
Because the video encoder needs to use more parameters in the operation process, such as resolution, bit rate type, code stream type, image quality, frame rate and the like, the parameters need to be pre-configured, and after the configuration is completed, the video encoder can perform video encoding according to the configured parameters. In the embodiment of the application, after the application program requests to create the video encoder, the permission level of the application program is recorded corresponding to the video encoder, and then when relevant parameters are configured for the video encoder, an interface corresponding to the permission level of the application program can be called for parameter configuration. For example, if the terminal determines that the authority level of the application program is level 1 (the authority level is highest) according to the authority list, the terminal will record the video encoder and the corresponding level 1 of the authority level, which indicates that when relevant parameters are configured for the video encoder, an interface corresponding to level 1 of the authority level can be invoked to perform parameter configuration. By the technical scheme of the embodiment of the application, the flexible management and control of the interface calling authority in the process of configuring the parameters of the video encoder are realized.
The following are examples of the apparatus of the present application that may be used to perform the method embodiments of the present application. For details not disclosed in the embodiments of the apparatus of the present application, please refer to the embodiments of the method of the present application.
Referring to fig. 4, a block diagram of a parameter configuration apparatus according to an embodiment of the application is shown. The device has the function of realizing the method example, and the function can be realized by hardware or can be realized by executing corresponding software by hardware. The apparatus 400 may include a first receiving module 401, a component creation module 402, a second receiving module 403, a first determining module 404, and a parameter configuration module 405.
The first receiving module 401 is configured to receive a component creation request sent by an application, where the component creation request is used to request to create a component.
The component creation module 402 is configured to create the component.
The second receiving module 403 is configured to receive a parameter configuration request sent by the application, where the parameter configuration request is used to request to configure parameters for the component.
The first determining module 404 is configured to determine whether the application program has a right to invoke an interface according to a right level of the application program recorded corresponding to the component, where the interface is an interface for configuring the parameter for the component.
The parameter configuration module 405 is configured to invoke the interface to configure the parameter for the component if the application program has the authority to invoke the interface.
In summary, in the technical solution provided in the embodiment of the present application, by setting different permission levels for an application program, where the different permission levels have permission to call different interfaces, when the application program needs to call a component configuration related parameter created by a certain interface for the application program, the operating system determines whether the application program has permission to call the interface, and if so, calls the interface to complete the above parameter configuration for the application program.
Optionally, as shown in FIG. 5, the apparatus 400 further comprises a second determination module 406.
The second determining module 406 is configured to obtain, from the permission list, a permission level corresponding to the identifier of the application program, as the permission level of the application program;
the permission list comprises the corresponding relation between the identification of the application program and the permission levels, and different permission levels have permission for calling different interfaces.
Optionally, the second determining module 406 is further configured to:
And if the authority list does not contain the authority level corresponding to the identification of the application program, determining the default authority level as the authority level of the application program.
Optionally, the second determining module 406 is further configured to:
Acquiring characteristic information of the application program;
selecting an application program with highest similarity with the application program according to the characteristic information of the application program;
and taking the authority level corresponding to the application program with the highest similarity as the authority level of the application program.
Optionally, the parameter configuration module 405 is further configured to:
and if the application program does not have the authority to call the interface, refusing to respond to the parameter configuration request or calling the interface to configure default parameters for the component.
Optionally, the device 400 further comprises an information acquisition module 407, an information transmission module 408, an information reception module 409 and a level adjustment module 410.
The information collection module 407 is configured to collect performance information of the application, where the performance information is used to indicate an action of the application in a running process.
The information sending module 408 is configured to send the performance information of the application program to a server.
The information receiving module 409 is configured to receive rights adjustment information of the application program sent by the server.
The level adjustment module 410 is configured to adjust the authority level of the application according to the authority adjustment information of the application.
Optionally, the component is a video encoder;
the interface at least comprises one of a system universal interface, a local Native layer universal interface, an OMX common interface and an OMX expansion interface;
The system universal interface is an upper layer interface of an operating system, the Native layer universal interface is an interface for configuring parameters irrelevant to an OMX component, the OMX common interface is an interface for configuring parameters of the general OMX component, and the OMX expansion interface is an interface for configuring parameters of a non-general OMX component.
It should be noted that, when the apparatus provided in the foregoing embodiment performs the functions thereof, only the division of the foregoing functional modules is used as an example, in practical application, the foregoing functional allocation may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to perform all or part of the functions described above. In addition, the apparatus and the method embodiments provided in the foregoing embodiments belong to the same concept, and specific implementation processes of the apparatus and the method embodiments are detailed in the method embodiments and are not repeated herein.
Referring to fig. 6, a block diagram of a terminal 600 according to an embodiment of the present application is shown. The terminal 600 may be a cell phone, tablet computer, electronic book reading device, multimedia playing device, wearable device, or other portable electronic device.
The terminal 600 in embodiments of the present application may include one or more of a processor 610 and a memory 620.
Processor 610 may include one or more processing cores. The processor 610 connects various parts within the overall terminal using various interfaces and lines, performs various functions of the terminal and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 620, and invoking data stored in the memory 620. Alternatively, the processor 610 may be implemented in at least one hardware form of digital signal Processing (DIGITAL SIGNAL Processing, DSP), field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA), programmable logic array (Programmable Logic Array, PLA). The processor 610 may integrate one or a combination of several of a central processing unit (Central Processing Unit, CPU) and a modem, etc. The CPU is mainly used for processing an operating system, application programs and the like, and the modem is used for processing wireless communication. It will be appreciated that the modem may not be integrated into the processor 610 and may be implemented by a single chip.
Optionally, the processor 610, when executing program instructions in the memory 620, implements the parameter configuration methods provided by the various method embodiments described above.
Memory 620 may include random access Memory (Random Access Memory, RAM) or Read-Only Memory (ROM). Optionally, the memory 620 includes a non-transitory computer readable medium (non-transitory computer-readable storage medium). Memory 620 may be used to store instructions, programs, code sets, or instruction sets. The memory 620 may include a storage program area that may store instructions for implementing an operating system, instructions for at least one function, instructions for implementing the various method embodiments described above, and the like, and a storage data area that may store data created according to the use of the terminal, and the like.
The structure of the terminal is merely illustrative, and the terminal may include more or less components, such as a display screen, etc., in actual implementation, which is not limited in this embodiment.
Those skilled in the art will appreciate that the structure shown in fig. 6 is not limiting of the terminal 600 and may include more or fewer components than shown, or may combine certain components, or may employ a different arrangement of components.
In an exemplary embodiment, there is also provided a computer readable storage medium having stored therein a computer program that is loaded and executed by a processor of a terminal to implement the steps in the above-described method embodiments.
In an exemplary embodiment, a computer program product is also provided, which, when executed, is adapted to carry out the above-mentioned parameter configuration method.
The foregoing description of the exemplary embodiments of the application is not intended to limit the application to the particular embodiments disclosed, but on the contrary, the intention is to cover all modifications, equivalents, and alternatives falling within the spirit and scope of the application.

Claims (9)

Translated fromChinese
1.一种参数配置方法,其特征在于,所述方法包括:1. A parameter configuration method, characterized in that the method comprises:接收应用程序发送的组件创建请求,所述组件创建请求用于请求创建组件,其中,所述应用程序已经安装在终端中;receiving a component creation request sent by an application, the component creation request being used to request creation of a component, wherein the application has been installed in a terminal;由所述终端创建所述组件,所述组件是用于实现所述应用程序的目标功能的软件模块;The terminal creates the component, which is a software module for realizing the target function of the application program;接收所述应用程序发送的参数配置请求,所述参数配置请求用于请求为所述组件配置参数;receiving a parameter configuration request sent by the application, wherein the parameter configuration request is used to request configuration of parameters for the component;确定所述终端中用于为所述组件配置参数的接口;Determining an interface in the terminal for configuring parameters for the component;从权限名单中获取与所述应用程序的标识相对应的权限等级,作为所述应用程序的权限等级,其中,所述权限名单包含第一对应关系和第二对应关系,所述第一对应关系为所述应用程序的标识与权限等级之间的对应关系,并且,所述应用程序对应的权限等级基于所述应用程序的表现信息而确定,所述表现信息用于指示所述应用程序在运行过程中的动作;所述第二对应关系为接口级别与接口标识之间的对应关系,所述接口标识用于对接口起到唯一标识作用;Acquire a permission level corresponding to the identifier of the application from the permission list as the permission level of the application, wherein the permission list includes a first correspondence and a second correspondence, the first correspondence being a correspondence between the identifier of the application and the permission level, and the permission level corresponding to the application is determined based on performance information of the application, the performance information being used to indicate actions of the application during operation; the second correspondence being a correspondence between an interface level and an interface identifier, the interface identifier being used to uniquely identify the interface;根据所述应用程序的权限等级,确定所述应用程序是否具备调用用于为所述组件配置参数的接口的权限;其中,所述应用程序具有调用接口级别与其权限等级相同的接口和接口级别低于其权限等级的接口的权限;Determining, according to the permission level of the application, whether the application has permission to call an interface for configuring parameters for the component; wherein the application has permission to call an interface whose interface level is the same as its permission level and an interface whose interface level is lower than its permission level;若所述应用程序具备调用所述接口的权限,则调用所述接口为所述组件配置所述参数。If the application has the authority to call the interface, the interface is called to configure the parameters for the component.2.根据权利要求1所述的方法,其特征在于,所述方法还包括:2. The method according to claim 1, characterized in that the method further comprises:若所述权限名单中不包含与所述应用程序的标识相对应的权限等级,则将默认权限等级确定为所述应用程序的权限等级。If the permission list does not include a permission level corresponding to the identifier of the application program, a default permission level is determined as the permission level of the application program.3.根据权利要求1所述的方法,其特征在于,所述方法还包括:3. The method according to claim 1, characterized in that the method further comprises:若所述权限名单中不包含与所述应用程序的标识相对应的权限等级,则If the permission list does not contain the permission level corresponding to the identification of the application program, then获取所述应用程序的特征信息;Obtaining characteristic information of the application;根据所述应用程序的特征信息,选取与所述应用程序的相似度最高的应用程序;Selecting an application program having the highest similarity to the application program according to the feature information of the application program;将所述相似度最高的应用程序相对应的权限等级,作为所述应用程序的权限等级。The permission level corresponding to the application with the highest similarity is used as the permission level of the application.4.根据权利要求1或2所述的方法,其特征在于,所述根据所述应用程序的权限等级,确定所述应用程序是否具备调用接口的权限之后,还包括:4. The method according to claim 1 or 2, characterized in that after determining whether the application has the permission to call the interface according to the permission level of the application, it also includes:若所述应用程序不具备调用所述接口的权限,则拒绝响应所述参数配置请求,或者调用所述接口为所述组件配置默认参数。If the application does not have the authority to call the interface, it refuses to respond to the parameter configuration request, or calls the interface to configure default parameters for the component.5.根据权利要求1或2所述的方法,其特征在于,所述方法还包括:5. The method according to claim 1 or 2, characterized in that the method further comprises:采集所述应用程序的表现信息,所述表现信息用于指示所述应用程序在运行过程中的动作;Collecting performance information of the application, where the performance information is used to indicate actions of the application during operation;将所述应用程序的表现信息发送给服务器;sending performance information of the application to a server;接收所述服务器发送的所述应用程序的权限调整信息;Receiving permission adjustment information of the application sent by the server;根据所述应用程序的权限调整信息,对所述应用程序的权限等级进行调整。The permission level of the application is adjusted according to the permission adjustment information of the application.6.根据权利要求1或2所述的方法,其特征在于,所述组件为视频编码器;6. The method according to claim 1 or 2, characterized in that the component is a video encoder;所述接口至少包括以下其中之一:系统通用接口、本地Native层通用接口、OMX普通接口、OMX拓展接口;The interface includes at least one of the following: system general interface, local Native layer general interface, OMX common interface, OMX extended interface;其中,系统通用接口为操作系统的上层接口,所述Native层通用接口是指用于配置与OMX组件无关参数的接口,所述OMX普通接口是指用于配置通用的OMX组件参数的接口,所述OMX拓展接口是指用于配置非通用的OMX组件参数的接口。Among them, the system universal interface is the upper layer interface of the operating system, the Native layer universal interface refers to the interface used to configure parameters unrelated to the OMX component, the OMX common interface refers to the interface used to configure universal OMX component parameters, and the OMX extended interface refers to the interface used to configure non-universal OMX component parameters.7.一种参数配置装置,其特征在于,所述装置包括:7. A parameter configuration device, characterized in that the device comprises:第一接收模块,用于接收应用程序发送的组件创建请求,所述组件创建请求用于请求创建组件,其中,所述应用程序已经安装在终端;A first receiving module, configured to receive a component creation request sent by an application, wherein the component creation request is used to request the creation of a component, wherein the application has been installed on a terminal;组件创建模块,用于由所述终端创建所述组件,所述组件是用于实现所述应用程序的目标功能的软件模块;A component creation module, used for creating the component by the terminal, wherein the component is a software module for realizing the target function of the application program;第二接收模块,用于接收所述应用程序发送的参数配置请求,所述参数配置请求用于请求为所述组件配置参数;A second receiving module, used for receiving a parameter configuration request sent by the application, wherein the parameter configuration request is used for requesting to configure parameters for the component;第三确定模块,用于确定所述终端中用于为所述组件配置参数的接口;A third determining module, used to determine an interface in the terminal for configuring parameters for the component;第二确定模块,用于从权限名单中获取与所述应用程序的标识相对应的权限等级,作为所述应用程序的权限等级,其中,所述权限名单包含第一对应关系和第二对应关系,所述第一对应关系为所述应用程序的标识与权限等级之间的对应关系,并且,所述应用程序对应的权限等级基于所述应用程序的表现信息而确定,所述表现信息用于指示所述应用程序在运行过程中的动作,所述第二对应关系为接口级别与接口标识之间的对应关系,所述接口标识用于对接口起到唯一标识作用;a second determination module, configured to obtain, from a permission list, a permission level corresponding to the identifier of the application as the permission level of the application, wherein the permission list comprises a first correspondence and a second correspondence, the first correspondence being a correspondence between the identifier of the application and the permission level, and the permission level corresponding to the application being determined based on performance information of the application, the performance information being used to indicate an action of the application during operation, and the second correspondence being a correspondence between an interface level and an interface identifier, the interface identifier being used to uniquely identify the interface;第一确定模块,用于根据所述应用程序的权限等级,确定所述应用程序是否具备调用用于为所述组件配置参数的接口的权限;其中,所述应用程序具有调用接口级别与其权限等级相同的接口和接口级别低于其权限等级的接口的权限;A first determination module is used to determine whether the application has the permission to call the interface for configuring parameters for the component according to the permission level of the application; wherein the application has the permission to call the interface whose interface level is the same as its permission level and the interface whose interface level is lower than its permission level;参数配置模块,用于若所述应用程序具备调用所述接口的权限,则调用所述接口为所述组件配置所述参数。The parameter configuration module is used to call the interface to configure the parameters for the component if the application has the authority to call the interface.8.一种终端,其特征在于,所述终端包括处理器和存储器,所述存储器存储有计算机程序,所述计算机程序由所述处理器加载并执行以实现如权利要求1至6任一项所述的参数配置方法。8. A terminal, characterized in that the terminal comprises a processor and a memory, the memory stores a computer program, and the computer program is loaded and executed by the processor to implement the parameter configuration method according to any one of claims 1 to 6.9.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机程序,所述计算机程序由处理器加载并执行以实现如权利要求1至6任一项所述的参数配置方法。9. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, and the computer program is loaded and executed by a processor to implement the parameter configuration method according to any one of claims 1 to 6.
CN201910457936.XA2019-05-292019-05-29 Parameter configuration method, device, terminal and storage mediumActiveCN110188518B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201910457936.XACN110188518B (en)2019-05-292019-05-29 Parameter configuration method, device, terminal and storage medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201910457936.XACN110188518B (en)2019-05-292019-05-29 Parameter configuration method, device, terminal and storage medium

Publications (2)

Publication NumberPublication Date
CN110188518A CN110188518A (en)2019-08-30
CN110188518Btrue CN110188518B (en)2024-12-31

Family

ID=67718622

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201910457936.XAActiveCN110188518B (en)2019-05-292019-05-29 Parameter configuration method, device, terminal and storage medium

Country Status (1)

CountryLink
CN (1)CN110188518B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN112104671B (en)*2020-11-122021-03-02深圳壹账通智能科技有限公司Interface authorization monitoring method and device, computer equipment and storage medium
CN114048049A (en)*2021-11-172022-02-15中电金信软件有限公司 Application program interface calling method, interface calling device and electronic device
CN119004561B (en)*2024-10-222024-12-20百信信息技术有限公司 A safety control system based on FPGA
CN119961901A (en)*2024-12-312025-05-09斑马网络技术有限公司 Interface authority management method, device, equipment, storage medium and program product

Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN104778033A (en)*2014-01-092015-07-15大唐电信科技股份有限公司Construction method and device of building block type software
CN107169320A (en)*2017-04-202017-09-15北京小米移动软件有限公司Method of calibration and device

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
KR100447064B1 (en)*2001-11-142004-09-04에스케이텔레텍주식회사Method for Limiting Authority to use Application Programming Interface of Contents Application Program for Mobile Communication Device
US9356916B2 (en)*2010-04-302016-05-31T-Central, Inc.System and method to use a cloud-based platform supported by an API to authenticate remote users and to provide PKI- and PMI-based distributed locking of content and distributed unlocking of protected content
CN102609264A (en)*2012-02-142012-07-25深圳市同洲视讯传媒有限公司Method and device for generating calling codes by calling application programming interfaces
CN104252339B (en)*2013-06-252018-07-06腾讯科技(深圳)有限公司The method and apparatus that interface layer exploitation, interface layer realize data interaction
WO2019049042A1 (en)*2017-09-052019-03-14Rebel Os Inc.Distributed computing platform service management
CN107577537A (en)*2017-09-062018-01-12广东欧珀移动通信有限公司Resource allocation method and Related product
CN108733334B (en)*2018-03-132020-06-09Oppo广东移动通信有限公司 Image quality parameter adjustment method, device, terminal and storage medium
CN109558191A (en)*2018-10-312019-04-02深圳壹账通智能科技有限公司A kind of method, apparatus, storage medium and computer equipment configuring the page

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN104778033A (en)*2014-01-092015-07-15大唐电信科技股份有限公司Construction method and device of building block type software
CN107169320A (en)*2017-04-202017-09-15北京小米移动软件有限公司Method of calibration and device

Also Published As

Publication numberPublication date
CN110188518A (en)2019-08-30

Similar Documents

PublicationPublication DateTitle
CN110188518B (en) Parameter configuration method, device, terminal and storage medium
CN110535777B (en)Access request control method and device, electronic equipment and readable storage medium
CN108255905B (en)Interface calls data processing method, device and computer equipment
CN110673964A (en)Audio playing control method and device of vehicle-mounted system
CN111294647B (en) A video processing method, device and device, and storage medium
WO2017167121A1 (en)Method and device for determining and applying association relationship between application programs
CN112749022A (en)Camera resource access method, operating system, terminal and virtual camera
CN111163130A (en) A network service system and data transmission method thereof
CN109522131A (en)Resource allocation method, device and equipment
CN115967507A (en)Account binding method, device, server and system
CN111901639A (en)Multimedia video uploading method, device and system, storage medium and platform
CN110958399A (en) High dynamic range image HDR realization method and related products
CN115238299A (en) Access control method, related device and system based on security level
CN103051623B (en)The method of calling of restriction open platform
WO2023071616A1 (en)Service processing method and apparatus, electronic device, and medium
CN113722114A (en)Data service processing method and device, computing equipment and storage medium
CN113835789A (en)Rendering method, rendering device, electronic equipment and computer storage medium
CN116916146A (en) Methods, devices, equipment and systems for sharing cameras
CN113590346B (en) Method and electronic device for processing business requests
CN112596929B (en)Micro-service registration and calling method based on command event conversion and related device
CN116248921A (en)Media file transcoding method and device, computing equipment and storage medium
CN116700913A (en)Scheduling method, equipment and storage medium of embedded file system
CN112583877B (en)Resource information processing method and device, storage medium and electronic equipment
CN110120963A (en)A kind of data processing method, device, equipment and machine readable media
CN113347171A (en)Internet of things equipment disposal method and method for setting equipment resources in internet of things equipment

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp