CN110188518A - Method for parameter configuration, device, terminal and storage medium - Google Patents
Method for parameter configuration, device, terminal and storage medium Download PDFInfo
- Publication number
- CN110188518A CN110188518A CN201910457936.XA CN201910457936A CN110188518A CN 110188518 A CN110188518 A CN 110188518A CN 201910457936 A CN201910457936 A CN 201910457936A CN 110188518 A CN110188518 A CN 110188518A
- Authority
- CN
- China
- Prior art keywords
- application program
- interface
- permission
- parameter
- component
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/30—Authentication, i.e. establishing the identity or authorisation of security principals
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/30—Authentication, i.e. establishing the identity or authorisation of security principals
- G06F21/44—Program or device authentication
Abstract
The embodiment of the present application provides a parameter configuration method, device, terminal and storage medium.The described method includes: receiving the component request to create that application program is sent, component request to create is for requesting creation component;Create component, and the Permission Levels of corresponding record application program;The parameter-configuring request that application program is sent is received, parameter-configuring request is component configuration parameter for requesting;According to the Permission Levels of application program, determine whether application program has the permission of calling interface, which is used to the interface of component configuration parameter;If application program has the permission for calling the interface, calling the interface is component configuration parameter.The embodiment of the present application improves the flexibility of permission control.
Description
Technical field
The invention relates to field of terminal technology, in particular to a parameter configuration method, device, terminal and storage
Medium.
Background technique
Currently, can install application program in the terminal of such as mobile phone etc, operating system can provide not to application program
Same interface, application program can be by calling above-mentioned interface to configure relevant parameter.
The application program installed in terminal may include system application and third party application.System application
Refer to the application program of system level, namely the application program as provided by the exploitation side of operating system, system application is logical
Often just pre-installed in the terminal before terminal factory.Third party application, which refers to, to be mentioned by the exploitation side of operating system
The application program of confession is usually installed after terminal factory by user.
Summary of the invention
The embodiment of the present application provides a parameter configuration method, device, terminal and storage medium.The technical solution is such as
Under:
On the one hand, the embodiment of the present application provides a parameter configuration method, which comprises
The component request to create that application program is sent is received, the component request to create is for requesting creation component;
Create the component;
The parameter-configuring request that the application program is sent is received, the parameter-configuring request is the component for requesting
Configuration parameter;
According to the Permission Levels of the application program, determine whether the application program has the permission of calling interface, institute
State the interface that interface is used to parameter described in the component Configuration;
If the application program has the permission for calling the interface, calling the interface is described in the component Configuration
Parameter.
On the other hand, the embodiment of the present application provides a kind of parameter configuration device, and described device includes:
First receiving module, for receiving the component request to create of application program transmission, the component request to create is used for
Request creation component;
Component creation module, for creating the component;
Second receiving module, the parameter-configuring request sent for receiving the application program, the parameter-configuring request
For requesting to be the component configuration parameter;
First determining module determines whether the application program has for the Permission Levels according to the application program
The permission of calling interface, the interface are used to the interface of parameter described in the component Configuration;
Parameter configuration module calls the interface if having the permission for calling the interface for the application program
For parameter described in the component Configuration.
In another aspect, the embodiment of the present application provides a kind of terminal, the terminal includes processor and memory, the storage
Device is stored with computer program, and the computer program is as the processor loads and executes to realize as described in terms of above-mentioned
Method for parameter configuration.
Another aspect, the embodiment of the present application provide a kind of computer readable storage medium, the computer-readable storage medium
It is stored with computer program in matter, the computer program is as processor loads and executes to realize such as the ginseng as described in terms of above-mentioned
Number configuration method.
Technical solution provided by the embodiments of the present application can be brought the following benefits:
By the Permission Levels different for application setting, different Permission Levels have the power for calling distinct interface
Limit, in the component Configuration relevant parameter that application program needs to call a certain interface for its creation, operating system judges the application
Whether program has the permission for calling the interface, and it is that application program completes above-mentioned parameter configuration that the interface is called if having,
Interface management mode provided by the embodiments of the present application is more flexible, and facilitates the runnability for promoting terminal and application program.
Detailed description of the invention
Fig. 1 is the flow chart for the method for parameter configuration that the application one embodiment provides;
Fig. 2 is the schematic diagram of the permission list that the application one embodiment provides and interface level list;
Fig. 3 is the flow chart for the method for parameter configuration that another embodiment of the application provides;
Fig. 4 is the block diagram for the parameter configuration device that the application one embodiment provides;
Fig. 5 is the block diagram for the parameter configuration device that another embodiment of the application provides;
Fig. 6 is the structural block diagram for the terminal that the application one embodiment provides.
Specific embodiment
To keep the purposes, technical schemes and advantages of the application clearer, below in conjunction with attached drawing to the application embodiment party
Formula is described in further detail.
Since the developer of different application is different, and the ability of developer is also irregular, therefore different exploitations
The quality for the application program that person is developed is also to differ widely.High-caliber developer abides by coding criterion, is familiar with operating system
Frame, understand bottom layer realization process, the application program write, which is followed the prescribed order, realizes function, can discharge, be convenient for after resource transfer
Management of the operating system to resource.But low-level developer to frame and bottom layer realization and does not know about, and only considers on upper layer
Function is realized, does not consider Lower level logical, resource bid and release, is caused operating system to resource management difficulty, is influenced user's body
It tests.
System application can call the high-level interface of terminal and physical layer interface to carry out parameter configuration.And for third party
For application program, the interface management mode that the relevant technologies provide all makes no exception to all third party applications, open
All high-level interfaces close all physical layer interfaces, and high-level interface can only be called to carry out parameter configuration, and bottom can not be called to connect
Mouth carries out parameter configuration, and only system application just has an opportunity to call physical layer interface, and this interface management mode more solidifies
It is single, lack flexibility.
For example, for some functions of needing that physical layer interface is called just to be able to achieve, because third party application is not adjusted
With the permission of the physical layer interface, so third party application realizes above-mentioned function using a kind of alternative solution.Third party answers
Corresponding operation is carried out in CPU (Central Processing Unit, central processing unit) with program, to realize above-mentioned function.
But it will increase the power consumption of terminal in this way, and this alternative solution also can not necessarily fully achieve what physical layer interface had
Function.
It is different by the Permission Levels different for application setting in technical solution provided by the embodiments of the present application
Permission Levels there is the permission for calling distinct interface, need to call a certain interface for the component Configuration of its creation in application program
When relevant parameter, operating system judges whether the application program has the permission for calling the interface, calls this to connect if having
Mouth is that application program completes above-mentioned parameter configuration, and interface management mode provided by the embodiments of the present application is more flexible, facilitates
Promote the runnability of terminal and application program.
In addition, method provided by the embodiments of the present application, the executing subject of each step can be terminal, such as mobile phone, plate electricity
Brain, multimedia play equipment, wearable device, PC (Personal Computer, personal computer) etc..Optionally, each step
Executing subject be terminal operating system.Operating system is the computer journey of the hardware and software resource for management terminal
Sequence.Technical solution provided by the embodiments of the present application, suitable for the terminal of Android (Android) operating system, Android behaviour
It can be the primary operating system of Android as system, be also possible to some other and determined based on Android operation system exploitation
Inhibition and generation operating system.In following methods embodiment, for ease of description, only it is situated between using the executing subject of each step as terminal
Continue explanation, but does not constitute restriction to this.
Referring to FIG. 1, the flow chart of the method for parameter configuration provided it illustrates the application one embodiment.This method can
To comprise the following steps (101~106).
Step 101, the component request to create that application program is sent is received.
Application program can be any one application program installed in terminal.Application program can be system application journey
Sequence is also possible to third party application.In the embodiment of the present application, the type of application program is not construed as limiting, as it can be with
It is that video record application program, video playing application program, social category application program, class of taking pictures application program, instant messaging are answered
With program, etc..
In the embodiment of the present application, component request to create is for requesting creation component.Component is for realizing a certain function
Software module, can be the simplified package to data and method for realizing the function.For different application programs,
Its component that required request creates in the process of running would also vary from.Illustratively, when application program is with video record
When the application program of function processed, the component of creation is requested to can be video encoder.In another example when application program is that have
When the application program of sound-recording function, the component of creation is requested to can be audio coder.For another example when application program is tool
When having the application program of data-transformation facility, the component of creation is requested to can be data transmission channel.
Step 102, component is created.
Illustratively, when application program, which is, has the application program of video record function, terminal can be according to application program
The video encoder request to create of transmission creates video encoder;When application program is the application program with sound-recording function,
The audio coder request to create that terminal can be sent according to application program, creates audio coder;When application program is that have number
According to transfer function application program when, terminal can according to application program send data transmission channel request to create, create data
Transmission channel.
Step 103, the parameter-configuring request that application program is sent is received.
In the embodiment of the present application, parameter-configuring request is component configuration parameter for requesting.
Illustratively, when component is video encoder, parameter may include following at least one: resolution ratio, bit rate, position
Rate type, code stream type, picture quality and frame per second etc..Resolution ratio indicates the size of image, for the figure of video recording to be arranged
As size.Bit rate is also known as code rate, refers to data volume caused by single recording channel in the unit time.Bit rate type is also known as code
Rate type, there is dynamic code rate and two kinds of solid-state code rate, and dynamic code rate refers to the process of that encoder is carrying out compressed encoding to image
In, according to the situation of image adjust in real time code rate height, cbr (constant bit rate) refer to encoder during being encoded to image,
A cbr (constant bit rate) value is used from beginning to end.Code stream type includes: combined-flow (only including the code stream of video and audio data), view
Frequency stream (the only code stream of video data), audio stream (the only code stream of audio data).Image quality parameter can compile video
The value range of code device is finely adjusted.Frame per second indicates image frames numbers of the video within the unit time.
Step 104, according to the Permission Levels of application program, determine whether application program has the permission of calling interface.
In the embodiment of the present application, interface is used to the interface of component configuration parameter.Terminal is receiving application program
After the parameter-configuring request of transmission, determine to need the component for carrying out parameter configuration and the parameter accordingly needed to configure.So
Afterwards, terminal is determined according to the component and parameter for the interface for the component configuration parameter.
One interface can be used for configuring a kind of parameter, can be used for configuration many kinds of parameters, the embodiment of the present application is to this
It is not construed as limiting.
Illustratively, the Permission Levels of application program can be determined according to permission list.
The Permission Levels of at least one application program are stored in permission list.For example, comprising applying journey in permission list
Corresponding relationship between the mark and Permission Levels of sequence.The mark of application program is different for uniquely indicating the application program
Application program has different marks.For example, the mark of application program can be packet name (referred to as " the application packet of application program
Name ") or other unique identifiers.Terminal obtains Permission Levels corresponding with the mark of application program from permission list,
Permission Levels as the application program.
In the embodiment of the present application, different Permission Levels have the permission for calling distinct interface.For example, different permissions
Grade has the permission for the interface for calling variety classes and quantity.Optionally, the Permission Levels of application program are higher, this applies journey
The interface that sequence is capable of calling is more.
Optionally, in permission list, the corresponding Permission Levels of application packet name.Illustratively, Permission Levels pair
The numerical value answered is bigger, and Permission Levels are lower.Assuming that there are four grades for Permission Levels, if being 4 using the corresponding Permission Levels of packet name 1
Grade is then minimum using the corresponding Permission Levels of packet name 1;If being 1 grade using the corresponding Permission Levels of packet name 2,2 pairs of packet name are applied
The Permission Levels highest answered.
The corresponding relationship of application Bao Mingyu Permission Levels can be stored in permission list by terminal.As shown in Fig. 2, it shows
Example property shows the overall schematic of technical scheme.Terminal storage has permission list 21, includes 4 in the permission list 21
A Permission Levels, i.e., 1 grade, 2 grades, 3 grades and 4 grades, the Permission Levels highest of 1 grade of representative, the Permission Levels of 2 grades, 3 grades, 4 grades representatives
It successively reduces, the Permission Levels of 4 grades of representatives are minimum.Assuming that application program 1, application program 2, application program 3 and application program 4 are right
Answer application packet name be respectively apply packet name 1, using packet name 2, using packet name 3 and apply packet name 4, using the corresponding power of packet name 1
Limiting grade is 2 grades, is 3 grades using the corresponding Permission Levels of packet name 2, is 1 grade, using packet using the corresponding Permission Levels of packet name 3
4 corresponding Permission Levels of name are 4 grades.Terminal according to permission list, can determine that the Permission Levels of application program 1 are 2 grades, application
The Permission Levels of program 2 are 3 grades, and the Permission Levels of application program 3 are 1 grade, and the Permission Levels of application program 4 are 4 grades.Certainly,
The same Permission Levels can be corresponding with multiple application packet names namely multiple and different application programs Permission Levels having the same.
In one example, when needing to obtain the Permission Levels of a certain application program, if do not included in permission list
When Permission Levels corresponding with the mark of the application program, default privilege grade is determined as the permission of the application program by terminal
Grade.Optionally, default privilege grade is least privilege grade.For example, the Permission Levels of application program 5 are if desired obtained, power
There is no the mark of application program 5 in limit list, then the Permission Levels of application program 5 are determined as 4 grades by terminal.
In another example, when needing to obtain the Permission Levels of a certain application program, if do not wrapped in permission list
When containing Permission Levels corresponding with the mark of the application program, terminal can determine the power of the application program in the following manner
Limit grade:
1, the characteristic information of the application program is obtained;
Characteristic information can be the information of any feature that can embody application program, for example, the developer of application program,
The type of application program, the CPU occupancy of application program, EMS memory occupation amount, interface calling sequence etc..The embodiment of the present application pair
The particular content of characteristic information is not construed as limiting.
2, according to the characteristic information of the application program, from permission list, the similarity highest with the application program is chosen
Application program;
Illustratively, terminal can calculate between the two application programs according to the characteristic information of two application programs
Similarity.For example, by preparatory trained neural network model, the characteristic information of two application programs is defeated as model
Enter, the similarity of the two application programs is exported by the model.When needing to obtain the Permission Levels of a certain application program, terminal
It is ranked up the similarity between the application program and other application program is descending, against sequencing of similarity from permission
The highest application program of similarity with the application program is chosen in list.
3, by Permission Levels corresponding with the highest application program of the similarity of the application program, as the application program
Permission Levels.
The corresponding Permission Levels of the highest application program of similarity are determined according to permission list, and as the application
The Permission Levels of program.By by Permission Levels corresponding with the highest application program of the similarity of the application program, as
The Permission Levels of the application program, determining Permission Levels are more reasonable, accurate.
In addition, permission list can be created by terminal, it can also be created by server, terminal can be by network from service
Device synchronizes to obtain.In addition, permission list can also regularly update, updated permission list is handed down to terminal by server.
In addition, the interface that each Permission Levels is capable of calling, can preset and store in the terminal.The permission etc.
Corresponding relationship between grade and the interface being capable of calling, also can recorde in permission list.Illustratively, it is wrapped in permission list
Containing the first corresponding relationship and the second corresponding relationship.Wherein, the first corresponding relationship refer to the mark of application program described above with
Corresponding relationship between Permission Levels.Second corresponding relationship refers to the corresponding relationship between interface level and interface identifier.Interface
Mark is for playing the role of unique identification to interface.Each interface level can correspond to one or more interfaces.Different
Permission Levels have the permission for the interface for calling distinct interface rank.Certainly, in some other examples, above-mentioned first is corresponding
Relationship and the second corresponding relationship can be stored respectively, such as the first corresponding relationship is stored in permission list, and second is corresponding
Relationship is stored in interface level list.
As shown in Fig. 2, terminal is also stored with interface level list 22.It is not at the same level comprising 4 kinds in the interface level list 22
Other interface, i.e. 1 grade of interface, 2 grades of interfaces, 3 grades of interfaces and 4 grades of interfaces, each interface level can correspond to one or more
A interface.If the corresponding Permission Levels of application program are 1 grade (Permission Levels highest), which can call 1 grade to connect
Mouth, 2 grades of interfaces, 3 grades of interfaces and 4 grades of interfaces;If the corresponding Permission Levels of application program are 4 grades (Permission Levels are minimum), should
Application program can only call 4 grades of interfaces;If the corresponding Permission Levels of application program are 3 grades, which can call 3
Grade interface and 4 grades of interfaces;If the corresponding Permission Levels of application program are 2 grades, which can call 2 grades of interfaces, 3 grades
Interface and 4 grades of interfaces.
Step 105, if application program has the permission for calling the interface, calling the interface is component configuration parameter.
Still taking the above example as an example, it is assumed that application requests are component configuration parameter A, and parameter A, which needs to call, to be connect
Mouth A is configured, and interface A belongs to 1 grade of interface, and the corresponding Permission Levels of application program are 1 grade, then the application program has calling
The permission of 1 grade of interface, then it is component configuration parameter A that terminal, which calls interface A,.
Optionally, if application program does not have the permission of calling interface, parameter-configuring request is refused to respond, or call
Interface is component Configuration default parameters.
Assuming that application requests are component configuration parameter B, parameter B needs calling interface B to be configured, and interface B belongs to
In 2 grades of interfaces, the corresponding Permission Levels of application program are 3 grades, then the application program does not have the permission for calling 2 grades of interfaces, then
Terminal refuses to respond the parameter-configuring request of the application program.
In alternatively possible embodiment, in the case where application program does not have the permission of calling interface B, terminal
It can not also be the parameter configured to component Configuration terminal request using calling interface B as component configuration parameter, but be the group
Part allocating default parameter.Wherein, default parameters, which refers to, belongs to one species, but the parameter that value is different with parameter.Default parameters
It can be the parameter of a preset minimalist configuration.For example, the code rate that application requests are video encoder configuration is
60, but the Permission Levels of application program do not have this are called to be used to configure the interface of code rate, then although terminal calls the interface
Code rate is configured for video encoder, but the code rate configured is 30.
In conclusion passing through the permission etc. different for application setting in technical solution provided by the embodiments of the present application
Grade, different Permission Levels have the permission for calling distinct interface, need to call a certain interface for its creation in application program
When component Configuration relevant parameter, operating system judges whether the application program has the permission for calling the interface, if having
Calling the interface is that application program completes above-mentioned parameter configuration, and interface management mode provided by the embodiments of the present application is more flexible
Property, facilitate the runnability for promoting terminal and application program.
Illustratively, server can determine the corresponding Permission Levels of application program according to the performance information of application program.
The corresponding Permission Levels of application program are adjustable, and adjustment process is as follows:
In the embodiment of the present application, performance information is used to indicate the movement of application program in the process of running.Performance information
It may include following at least one: the order information of calling interface, the legality message of parameter, the application of resource and release information
Etc..The order information of calling interface is used to indicate sequence when application call distinct interface.For example, application program A tune
Sequence when with distinct interface is first calling interface 1, then calling interface 2, last calling interface 3.The legality message of parameter
It is used to indicate the legitimacy of the parameter in the parameter-configuring request of application program.For example, the legitimacy of parameter values type.Resource
Application and release information be used to indicate the release conditions after application program resource, resource can refer to terminal memory or
CPU usage or other resources etc..
Following steps can also be performed in terminal:
1, the performance information of acquisition applications program;
Terminal can be every the performance information of preset time acquisition applications program.
2, the performance information of application program is sent to server;
3, the permission adjustment information for the application program that server is sent is received;
In the embodiment of the present application, server is used to determine the permission tune of application program according to the performance information of application program
Whole information.The permission adjustment information of application program is used to indicate the Permission Levels of terminal adjustment application program.
Still taking the above example as an example, server can determine the permission of application program according to the order information of calling interface
Adjustment information.For example, the basic calling sequence of application program is first calling interface 1, interface 2, last calling interface 3 are recalled;
If the calling sequence of the order information instruction application program of calling interface calls sequence consensus, the performance of application program with basic
Well, server can properly increase the Permission Levels of application program, if the original Permission Levels of application program are 4 grades, then take
Business device is adjusted to 3 grades.
Server can also determine the permission adjustment information of application program according to the legality message of parameter.For example, parameter A
Corresponding value type is number, and the corresponding value type of parameter A carried in parameter-configuring request is letter, then parameter A
Illegal, the performance of application program is poor, and server can suitably reduce the Permission Levels of application program, if application program is original
Permission Levels be 4 grades (Permission Levels are minimum), then server still determine the application program Permission Levels be 4 grades;If answering
It is 3 grades with the original Permission Levels of program, then server can be adjusted to 4 grades.
Server can also determine the permission adjustment information of application program according to the application and release information of resource.For example,
Application program did not discharged the resource after originally having called resource, and can discharge the money after the complete resource of application call now
The performance in source, application program is good, and server can properly increase the Permission Levels of application program, original power such as application program
Limiting grade is 4 grades, then server is adjusted to 3 grades.
Server can also comprehensively consider the order information of calling interface, the legality message of parameter, resource application and
Any two or three in information is discharged, the Permission Levels of application program are adjusted.
4, according to the permission adjustment information of application program, the Permission Levels of application program are adjusted.
If the instruction of permission adjustment information improves the Permission Levels of application program, terminal correspondingly improves the power of application program
Limit grade;If the instruction of permission adjustment information reduces the Permission Levels of application program, terminal accordingly decreases the power of application program
Limit grade.
Optionally, in permission adjustment information include application program Permission Levels adjusted instruction information, terminal according to
The instruction information is adjusted the Permission Levels of application program.
In conclusion in technical solution provided by the embodiments of the present application, by the performance information of acquisition applications program, and will
Performance information is sent to server, so that server determines the permission adjustment information of application program according to above-mentioned performance information,
Terminal makes corresponding adjustment to the Permission Levels of application program according to the permission adjustment information, improves the flexible of permission control
Property.
Illustratively, application program refers to the application program with video record function, and component is video encoder.
Interface includes at least one of: system general-purpose interface, Native (local) layer general-purpose interface, OMX
(OpenMax, the standard of multimedia application) generic interface, OMX expand interface.
In the embodiment of the present application, it is video record configuration parameter that terminal, which can call above-mentioned distinct interface,.System is general
Interface is the high-level interface of operating system, can directly be configured from Java layers of calling.Include in system general-purpose interface
SetBitrate interface, it is that video encoder configures code rate that terminal, which can call the setBitrate interface,.Native layers general
Interface refer to for configure with the interface of OMX component independent parameter, including setQPRange interface in Native layer general-purpose interface,
It is that video encoder configures QP (Quantization Parameter, quantization ginseng that terminal, which can call the setQPRange interface,
Number) range.OMX generic interface refers to the interface for configuring general OMX component parameter, includes in OMX generic interface
SetCABAC interface, it is that video encoder configures entropy coding that terminal, which can call the setCABAC interface,.OMX expands interface and refers to
For configuring the interface of non-universal OMX component parameter, it includes setBlurRect interface in interface that OMX, which is expanded, and terminal can be adjusted
It is video encoder configuration fuzzy ranges with the setBlurRect interface.
Still taking the above example as an example, in conjunction with reference Fig. 2, when the Permission Levels of application program are 1 grade, application program tool
Standby calling system general-purpose interface, Native layers of general-purpose interface, OMX generic interface, OMX expand the permission of interface;Work as application program
Permission Levels when being 2 grades, application program has calling system general-purpose interface, Native layer general-purpose interface, OMX generic interface
Permission;When the Permission Levels of application program are 3 grades, application program has calling system general-purpose interface, Native layers and general connects
The permission of mouth;When the Permission Levels of application program are 4 grades, application program has the permission of calling system general-purpose interface.At this
Apply, according to the Permission Levels of application program, deciding whether the permission for having calling interface in embodiment, improving application program
Operability, improve the type and quantity of application program callable interface to a certain extent.For video encoder,
The operability of video encoder is improved to a certain extent, to increase function workable for video record.
In conjunction with reference Fig. 3, by taking component is video encoder as an example, corresponding method for parameter configuration may include following
Step:
301, video record application program sends video encoder request to create to operating system;
Video record application program refers to the application program with video record function.Video encoder request to create is used for
Request creation video encoder.
302, operating system obtains permission list;
303, operating system determines the Permission Levels of video record application program according to permission list;
304, operating system creates video encoder, and the Permission Levels of corresponding record video record application program;
305, video record application program sends parameter-configuring request to operating system;
Parameter-configuring request is video encoder configuration parameter for requesting operating system.
306, operating system is determined according to the Permission Levels of the video record application program with video encoder corresponding record
Whether video record application program has the permission of calling interface;If so, thening follow the steps 307;If it is not, thening follow the steps 308;
The interface is used to the interface of video encoder configuration parameter.
307, it is the parameter carried in video encoder configuration parameter configuring request that operating system, which calls the interface,;
308, it is video encoder allocating default parameter that operating system, which calls the interface,;
309, operating system, which judges whether parameter configures, terminates;
When operating system is more than that preset time does not receive the parameter-configuring request that video record application program is sent, behaviour
Think that parameter has been configured end as system.
310, after parameter configuration terminates, video record application program starts to record.
Since video encoder needs to use in the process of running compared with multi-parameter, such as resolution ratio, bit rate, bit rate type, code
Stream type, picture quality and frame per second etc., these parameters needs are pre-configured with, and after configuration is completed, video encoder could be pressed
Video coding is carried out according to the parameter of the configuration.In the embodiment of the present application, by creating video encoder in application requests
Later, subsequent to configure phase for the video encoder by the Permission Levels of the application program and the video encoder corresponding record
When closing parameter, the corresponding interface of the Permission Levels of the application program can be called to carry out parameter configuration.Such as terminal is according to permission
List determines that the Permission Levels of the application program are 1 grade (Permission Levels highest), then terminal can be by the video encoder and the power
1 grade of corresponding record of grade is limited, shows that 1 grade of correspondence of Permission Levels can be called when configuring relevant parameter for the video encoder
Interface carry out parameter configuration.By the technical solution of the embodiment of the present application, when realizing to video encoder parameter configuration
The flexible management and control of interface calling permission.
Following is the application Installation practice, can be used for executing the application embodiment of the method.It is real for the application device
Undisclosed details in example is applied, the application embodiment of the method is please referred to.
Referring to FIG. 4, the block diagram of the parameter configuration device provided it illustrates the application one embodiment.The device has
Realize that the exemplary function of the above method, the function can also be executed corresponding software realization by hardware realization by hardware.
The device 400 may include: the first receiving module 401, component creation module 402, the determining mould of the second receiving module 403, first
Block 404 and parameter configuration module 405.
First receiving module 401, for receiving the component request to create of application program transmission, the component creation is asked
It asks for requesting creation component.
The component creation module 402, for creating the component.
Second receiving module 403, the parameter-configuring request sent for receiving the application program, the parameter are matched
It is the component configuration parameter that request, which is set, for requesting.
First determining module 404, for according to the permission etc. with the application program of the component corresponding record
Grade, determines whether the application program has the permission of calling interface, the interface is used to ginseng described in the component Configuration
Several interfaces.
The parameter configuration module 405 calls institute if having the permission for calling the interface for the application program
Stating interface is parameter described in the component Configuration.
In conclusion passing through the permission etc. different for application setting in technical solution provided by the embodiments of the present application
Grade, different Permission Levels have the permission for calling distinct interface, need to call a certain interface for its creation in application program
When component Configuration relevant parameter, operating system judges whether the application program has the permission for calling the interface, if having
Calling the interface is that application program completes above-mentioned parameter configuration, and interface management mode provided by the embodiments of the present application is more flexible
Property, facilitate the runnability for promoting terminal and application program.
Optionally, as shown in figure 5, described device 400 further include: the second determining module 406.
Second determining module 406, for obtaining opposite with the mark of the application program from the permission list
The Permission Levels answered, the Permission Levels as the application program;
Wherein, the corresponding relationship between the mark and Permission Levels in the permission list comprising application program, it is different
Permission Levels have the permission for calling distinct interface.
Optionally, second determining module 406, is also used to:
If not including Permission Levels corresponding with the mark of the application program in the permission list, default is weighed
Limit grade is determined as the Permission Levels of the application program.
Optionally, second determining module 406, is also used to:
Obtain the characteristic information of the application program;
According to the characteristic information of the application program, the highest application program of similarity with the application program is chosen;
Permission etc. by the corresponding Permission Levels of the highest application program of the similarity, as the application program
Grade.
Optionally, the parameter configuration module 405, is also used to:
If the application program does not have the permission for calling the interface, the parameter-configuring request is refused to respond, or
It is the component Configuration default parameters that person, which calls the interface,.
Optionally, described device 400 further include: information acquisition module 407, information sending module 408, information receiving module
409 and level adjustment module 410.
The information acquisition module 407, for acquiring the performance information of the application program, the performance information is for referring to
Show the movement of the application program in the process of running.
The information sending module 408, for the performance information of the application program to be sent to server.
The information receiving module 409, for receiving the permission adjustment letter for the application program that the server is sent
Breath.
The level adjustment module 410, for the permission adjustment information according to the application program, to the application program
Permission Levels be adjusted.
Optionally, the component is video encoder;
The interface includes at least one of: system general-purpose interface, Native layers of local general-purpose interface, OMX are general
Connect mouth, OMX expands interface;
Wherein, system general-purpose interface is the high-level interface of operating system, and the Native layers of general-purpose interface refers to for matching
The interface with OMX component independent parameter is set, the OMX generic interface refers to the interface for configuring general OMX component parameter,
The OMX expands interface and refers to the interface for configuring non-universal OMX component parameter.
It should be noted that device provided by the above embodiment is when realizing its function, only with above-mentioned each functional module
It divides and carries out for example, can according to need in practical application and be completed by different functional modules above-mentioned function distribution,
The internal structure of equipment is divided into different functional modules, to complete all or part of the functions described above.In addition,
Apparatus and method embodiment provided by the above embodiment belongs to same design, and specific implementation process is detailed in embodiment of the method, this
In repeat no more.
Referring to FIG. 6, the structural block diagram of the terminal 600 provided it illustrates the application one embodiment.The terminal 600 can
To be that mobile phone, tablet computer, e-book reading device, multimedia play equipment, wearable device or other portable electronics are set
It is standby.
Terminal 600 in the embodiment of the present application may include one or more such as lower component: processor 610 and memory
620。
Processor 610 may include one or more processing core.Processor 610 utilizes various interfaces and connection
Various pieces in entire terminal, by running or executing the instruction being stored in memory 620, program, code set or instruction
Collection, and the data being stored in memory 620 are called, execute the various functions and processing data of terminal.Optionally, processor
610 can use Digital Signal Processing (Digital Signal Processing, DSP), field programmable gate array
(Field-Programmable Gate Array, FPGA), programmable logic array (Programmable Logic
Array, PLA) at least one of example, in hardware realize.Processor 610 can integrating central processor (Central
Processing Unit, CPU) and one or more of modem etc. combination.Wherein, the main processing operation system of CPU
System and application program etc.;Modem is for handling wireless communication.It is understood that above-mentioned modem can not also
It is integrated into processor 610, is realized separately through chip piece.
Optionally, realize that above-mentioned each embodiment of the method provides when processor 610 executes the program instruction in memory 620
Method for parameter configuration.
Memory 620 may include random access memory (Random Access Memory, RAM), also may include read-only
Memory (Read-Only Memory).Optionally, which includes non-transient computer-readable medium (non-
transitory computer-readable storage medium).Memory 620 can be used for store instruction, program, generation
Code, code set or instruction set.Memory 620 may include storing program area and storage data area, wherein storing program area can store
Instruction for realizing operating system, the instruction at least one function, for realizing the finger of above-mentioned each embodiment of the method
Enable etc.;Storage data area, which can be stored, uses created data etc. according to terminal.
The structure of above-mentioned terminal is only illustrative, and in actual implementation, terminal may include more or fewer components,
Such as: display screen etc., the present embodiment is not construed as limiting this.
It will be understood by those skilled in the art that the restriction of structure shown in Fig. 6 not structure paired terminal 600, can wrap
It includes than illustrating more or fewer components, perhaps combine certain components or is arranged using different components.
In the exemplary embodiment, a kind of computer readable storage medium, the computer-readable storage medium are additionally provided
Computer program is stored in matter, the computer program is loaded by the processor of terminal and executed to realize that the above method is implemented
Each step in example.
In the exemplary embodiment, a kind of computer program product is additionally provided, when the computer program product is performed
When, for realizing above-mentioned parameter configuration method.
The foregoing is merely the exemplary embodiments of the application, all in spirit herein not to limit the application
Within principle, any modification, equivalent replacement, improvement and so on be should be included within the scope of protection of this application.
Claims (10)
1. a parameter configuration method, which is characterized in that the described method includes:
The component request to create that application program is sent is received, the component request to create is for requesting creation component;
Create the component;
The parameter-configuring request that the application program is sent is received, the parameter-configuring request is the component Configuration for requesting
Parameter;
According to the Permission Levels of the application program, determine whether the application program has the permission of calling interface, it is described to connect
Mouth is used to the interface of parameter described in the component Configuration;
If the application program has the permission for calling the interface, calling the interface is ginseng described in the component Configuration
Number.
2. the method according to claim 1, wherein the Permission Levels according to the application program, determine
Whether the application program has before the permission of calling interface, further includes:
Permission Levels corresponding with the mark of the application program, the power as the application program are obtained from permission list
Limit grade;
Wherein, the mark comprising the application program and the corresponding relationship between the Permission Levels in the permission list, no
Same Permission Levels have the permission for calling distinct interface.
3. according to the method described in claim 2, it is characterized in that, the method also includes:
If not including Permission Levels corresponding with the mark of the application program in the permission list, by default privilege etc.
Grade is determined as the Permission Levels of the application program.
4. method according to claim 1 or 2, which is characterized in that the method also includes:
Obtain the characteristic information of the application program;
According to the characteristic information of the application program, the highest application program of similarity with the application program is chosen;
Permission Levels by the corresponding Permission Levels of the highest application program of the similarity, as the application program.
5. method according to any one of claims 1 to 3, which is characterized in that the permission according to the application program
Grade, after determining whether the application program has the permission of calling interface, further includes:
If the application program does not have the permission for calling the interface, the parameter-configuring request is refused to respond, or adjust
It is the component Configuration default parameters with the interface.
6. method according to any one of claims 1 to 3, which is characterized in that the method also includes:
Acquire the performance information of the application program, the performance information is used to indicate the application program in the process of running
Movement;
The performance information of the application program is sent to server;
Receive the permission adjustment information for the application program that the server is sent;
According to the permission adjustment information of the application program, the Permission Levels of the application program are adjusted.
7. method according to any one of claims 1 to 3, which is characterized in that the component is video encoder;
The interface includes at least one of: system general-purpose interface, Native layers of local general-purpose interface, OMX commonly connect
Mouth, OMX expand interface;
Wherein, system general-purpose interface be operating system high-level interface, the Native layer general-purpose interface refer to for configure and
The interface of OMX component independent parameter, the OMX generic interface refers to the interface for configuring general OMX component parameter, described
OMX expands interface and refers to the interface for configuring non-universal OMX component parameter.
8. a kind of parameter configuration device, which is characterized in that described device includes:
First receiving module, for receiving the component request to create of application program transmission, the component request to create is for requesting
Create component;
Component creation module, for creating the component;
Second receiving module, the parameter-configuring request sent for receiving the application program, the parameter-configuring request are used for
Request is the component configuration parameter;
First determining module determines whether the application program has calling for the Permission Levels according to the application program
The permission of interface, the interface are used to the interface of parameter described in the component Configuration;
Parameter configuration module calls the interface for institute if having the permission for calling the interface for the application program
State parameter described in component Configuration.
9. a kind of terminal, which is characterized in that the terminal includes processor and memory, and the memory is stored with computer journey
Sequence, the computer program are loaded by the processor and are executed to realize that parameter as described in any one of claim 1 to 7 is matched
Set method.
10. a kind of computer readable storage medium, which is characterized in that be stored with computer in the computer readable storage medium
Program, the computer program are loaded by processor and are executed to realize parameter configuration as described in any one of claim 1 to 7
Method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910457936.XA CN110188518A (en) | 2019-05-29 | 2019-05-29 | Method for parameter configuration, device, terminal and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910457936.XA CN110188518A (en) | 2019-05-29 | 2019-05-29 | Method for parameter configuration, device, terminal and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110188518A true CN110188518A (en) | 2019-08-30 |
Family
ID=67718622
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910457936.XA Pending CN110188518A (en) | 2019-05-29 | 2019-05-29 | Method for parameter configuration, device, terminal and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110188518A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112104671A (en) * | 2020-11-12 | 2020-12-18 | 深圳壹账通智能科技有限公司 | Interface authorization monitoring method and device, computer equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102609264A (en) * | 2012-02-14 | 2012-07-25 | 深圳市同洲视讯传媒有限公司 | Method and device for generating calling codes by calling application programming interfaces |
CN104252339A (en) * | 2013-06-25 | 2014-12-31 | 腾讯科技(深圳)有限公司 | Method and device for developing interface layers and realizing data interaction of interface layers |
CN104778033A (en) * | 2014-01-09 | 2015-07-15 | 大唐电信科技股份有限公司 | Construction method and device of building block type software |
US20150381580A1 (en) * | 2010-04-30 | 2015-12-31 | Donald Houston Graham, III | 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 |
CN107169320A (en) * | 2017-04-20 | 2017-09-15 | 北京小米移动软件有限公司 | Method of calibration and device |
-
2019
- 2019-05-29 CN CN201910457936.XA patent/CN110188518A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150381580A1 (en) * | 2010-04-30 | 2015-12-31 | Donald Houston Graham, III | 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-14 | 2012-07-25 | 深圳市同洲视讯传媒有限公司 | Method and device for generating calling codes by calling application programming interfaces |
CN104252339A (en) * | 2013-06-25 | 2014-12-31 | 腾讯科技(深圳)有限公司 | Method and device for developing interface layers and realizing data interaction of interface layers |
CN104778033A (en) * | 2014-01-09 | 2015-07-15 | 大唐电信科技股份有限公司 | Construction method and device of building block type software |
CN107169320A (en) * | 2017-04-20 | 2017-09-15 | 北京小米移动软件有限公司 | Method of calibration and device |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112104671A (en) * | 2020-11-12 | 2020-12-18 | 深圳壹账通智能科技有限公司 | Interface authorization monitoring method and device, computer equipment and storage medium |
CN112104671B (en) * | 2020-11-12 | 2021-03-02 | 深圳壹账通智能科技有限公司 | Interface authorization monitoring method and device, computer equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10089106B2 (en) | Communications network, computer architecture, computer-implemented method and computer program product for development and management of femtocell-based applications | |
TW457823B (en) | Radio communications device and method with API between user application program and telephony program and method | |
CN102523007B (en) | Method and device for operating wireless apparatus having at least one wireless device | |
EP2955631A1 (en) | Controlling of virtualized network functions for usage in communication network | |
WO2004021127A3 (en) | Method and apparatus for planning resources base on events in a master queue | |
CN108370580A (en) | Match user equipment and network scheduling period | |
EP3624453A1 (en) | A transcoding task allocation method, scheduling device and transcoding device | |
CN103442172A (en) | Camera image quality adjusting method, system and mobile terminal based on android platform | |
CN108932948A (en) | Audio data processing method, device, computer equipment and computer readable storage medium | |
CN106464943A (en) | Information processing device and method | |
CN106802864A (en) | A kind of method of testing and device based on financial sector | |
CN110475091A (en) | The processing method and processing device of video conference | |
CN110650255A (en) | Method and device for editing color ring back tone, color ring back tone editing unit and storage medium | |
CN101884197B (en) | Method and apparatus for controlling quality of service in universal plug and play network | |
EP1806671A2 (en) | Digital Rights Management in an information terminal | |
CN110188518A (en) | Method for parameter configuration, device, terminal and storage medium | |
CN107223317A (en) | Determine the method and device of modulation coding mode | |
CN110968432B (en) | Control event processing method and device and readable storage medium | |
CN114171172A (en) | System and method for matching and distributing medical information | |
CN114566173A (en) | Audio mixing method, device, equipment and storage medium | |
Lazar et al. | Packetized video on MAGNET | |
CN107332644A (en) | Signal frame building method, device, system and computer-readable recording medium | |
JP3803726B2 (en) | Radio resource management method in radio base station apparatus and radio resource management method in radio base station apparatus | |
CN106470411A (en) | Build the method and device of associated person information | |
CN116800384B (en) | Equipment testing method, testing equipment and chip system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |