Invention content
An embodiment of the present invention provides a kind of interface call method and devices, can solve the relevant technologies and need to rely on service
Device, response speed are slow and the problem of safety problem occur.The technical solution is as follows:
In a first aspect, a kind of interface call method is provided, including:
The mark for the first page that the memory address of first view component, the first view component are loaded and described the
At least one interface that one page provides is registered in the memory of terminal;
When receiving the call request of the second view component, the memory address of the first view component is searched, it is described
The second page that call request is used to indicate the second view component load needs the target for calling the first page to provide
Interface, the target interface are the either interface at least one interface;
According to the memory address of the first view component, the target interface is called by second view component.
It is described to add the memory address of first view component, the first view component in a kind of possible realization method
At least one interface that the mark of the first page of load and the first page provide is registered in the memory of terminal, is wrapped
It includes:
By the memory address of the first view component, the mark of the first page and at least one interface registration
The preset interface provided to the terminal;
By the mark of the first page and the memory address pair of at least one interface and the first view component
In the memory that the terminal should be stored.
In a kind of possible realization method, it is described by the mark of the first page and at least one interface with it is described
The memory address of first view component corresponds in storage to the memory of the terminal, including:
It is based respectively on the mark of each interface and the first page at least one interface, generates context letter
Breath;
Using at least one contextual information of generation as key, the memory address of the first view component is value, will be described
The terminal is arrived in key-value pair relationship between at least one contextual information and the memory address of the first view component, storage
Memory in.
It is described when receiving the call request of the second view component in a kind of possible realization method, search described the
The memory address of one view component, including:
When receiving the call request of the second view component, the mark of the first page is extracted from the call request
The target interface provided with the first page is provided;
Mark based on the first page and the target interface generate target context information;
According to the target context information and the key-value pair relationship, with determining the memory of the first view component
Location.
In a kind of possible realization method, the method further includes:
During loading the first page by the first view component, when the first page is initialized to
When work(, the step of being registered in the memory of terminal is executed.
Second aspect, provides a kind of interface calling device, and described device includes:
Registration module, the first page for loading the memory address of first view component, the first view component
Mark and the first page provide at least one interface registered in the memory of terminal;
Searching module, for when receiving the call request of the second view component, searching the first view component
Memory address, the second page that the call request is used to indicate the second view component load need to call the first page
The target interface that face provides, the target interface are the either interface at least one interface;
Calling module is called for the memory address according to the first view component by second view component
The target interface.
In a kind of possible realization method, the registration module is used for:
By the memory address of the first view component, the mark of the first page and at least one interface registration
The preset interface provided to the terminal;
By the mark of the first page and the memory address pair of at least one interface and the first view component
In the memory that the terminal should be stored.
In a kind of possible realization method, the registration module is used for:
It is based respectively on the mark of each interface and the first page at least one interface, generates context letter
Breath;
Using at least one contextual information of generation as key, the memory address of the first view component is value, will be described
The terminal is arrived in key-value pair relationship between at least one contextual information and the memory address of the first view component, storage
Memory in.
In a kind of possible realization method, the searching module is used for:
When receiving the call request of the second view component, the mark of the first page is extracted from the call request
The target interface provided with the first page is provided;
Mark based on the first page and the target interface generate target context information;
According to the target context information and the key-value pair relationship, with determining the memory of the first view component
Location.
In a kind of possible realization method, registration module is used to load the first page by the first view component
During face, when the first page initializes successfully, the step of being registered in the memory of terminal is executed.
The third aspect provides a kind of terminal, including processor and memory;The memory, for storing computer
Program;The processor realizes any realization of first aspect for executing the computer program stored on the memory
Method and step described in mode.
Fourth aspect provides a kind of computer readable storage medium, is stored in the computer readable storage medium
Computer program realizes the method step described in any realization method of first aspect when the computer program is executed by processor
Suddenly.
The advantageous effect that technical solution provided in an embodiment of the present invention is brought includes at least:
Mark and first page by the first page for loading the memory address of first view component, first view component
At least one interface that face provides is registered in the memory of terminal so that second page is needing to call appointing for first page
It, can be by initiating call request when a kind of interface is communicated, triggering terminal search the interior of registered first view component
Address is deposited, and then realizes the calling of interface.In said program, between two pages realize interface call process in terminal into
Row is not necessarily to reliance server, will not bring the flow of uplink and downlink, improve response speed, and whole process will not expose to net
Network improves safety.
Specific implementation mode
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention
Formula is described in further detail.
Fig. 1 is a kind of flow chart of interface call method provided in an embodiment of the present invention.Referring to Fig. 1, this method includes:
101, the mark for the first page for loading the memory address of first view component, the first view component and this
At least one interface that one page provides is registered in the memory of terminal.
102, when receiving the call request of the second view component, the memory address of the first view component is searched, it should
The second page that call request is used to indicate second view component load needs the target interface for calling the first page to provide,
The target interface is the either interface at least one interface.
103, according to the memory address of the first view component, which is called by second view component.
Method provided in an embodiment of the present invention, by loading the memory address of first view component, first view component
First page mark and first page provide at least one interface registered in the memory of terminal so that second page
Face, can be by initiating call request when needing that any interface of first page is called to be communicated, and triggering terminal is searched
The memory address of registered first view component, and then realize the calling of interface.In said program, realized between two pages
The process that interface calls carries out in terminal, is not necessarily to reliance server, will not bring the flow of uplink and downlink, improves response speed
Degree, and whole process will not expose to network, improve safety.
In a kind of possible realization method, the memory address by first view component, first view component load
At least one interface that the mark of first page and the first page provide is registered in the memory of terminal, including:
The memory address of the first view component, the mark of the first page and at least one interface are registered to the end
The preset interface provided is provided;
By the storage corresponding with the memory address of the first view component of the mark of the first page and at least one interface
Into the memory of the terminal.
In a kind of possible realization method, this is by the mark of the first page and at least one interface and the first view
The memory address of component corresponds in storage to the memory of the terminal, including:
It is based respectively on the mark of each interface and the first page at least one interface, generates contextual information;
Using at least one contextual information of generation as key, the memory address of the first view component is value, at least by this
Key-value pair relationship between one contextual information and the memory address of the first view component, the memory of storage to the terminal
In.
In a kind of possible realization method, when should receive the call request of the second view component, searches this and first regard
The memory address of figure component, including:
When receiving the call request of the second view component, extracted from the call request first page mark and
The target interface that the first page provides;
Based on the mark of the first page and the target interface, target context information is generated;
According to the target context information and the key-value pair relationship, the memory address of the first view component is determined.
In a kind of possible realization method, this method further includes:
During loading the first page by the first view component, when the first page initializes successfully,
The step of execution is registered in the memory of terminal.
The alternative embodiment that any combination forms the present invention may be used, herein no longer in above-mentioned all optional technical solutions
It repeats one by one.
Fig. 2 is a kind of flow chart of interface call method provided in an embodiment of the present invention.This method is executed by terminal, referring to
Fig. 2, this method include:
201, first page is loaded by first view component, second page is loaded by the second view component.
Wherein, first page and second page can be two different web pages.
In the embodiment of the present invention, the page can be carried by view component, and terminal can be by view component come loaded page
Face loads multiple pages if necessary, then terminal can start the form of multiple view components to load multiple page.
It should be noted that the step 201 is optional step, interface calling provided in an embodiment of the present invention can only include
Subsequent step 202 to 204 that is to say that for terminal when realizing the method that interface calls, the first page and second page may be
It is completed through load, subsequent step 202 to step 204 carries out after the completion of first page and second page load.Certainly, follow-up step
Rapid 202 can also carry out to step 204 in first page and second page loading procedure, and the embodiment of the present invention does not limit this
It is fixed.
202, by the memory address of first view component, first view component load first page mark and this first
At least one interface that the page provides is registered in the memory of terminal.
Wherein, the memory address of first view component, that is to say, the reference of first view component, what first page provided
Interface that is to say, the method that first page provides.
In a kind of possible realization method, terminal can by first view component load first page during,
Initial work is carried out to first page, when the first page initializes successfully, execution is registered in the memory of terminal
The step of.
For example, terminal, during loading the first page, first page can carry out the initial work on basis, packet
The readjustment for including life cycle, to tell the initialization of terminal first page to complete.After first page is initialised successfully, first page
Face just has life cycle, and first page can carry out a series of initial work at this time, including does some initialization
It is arranged and is registered etc. in the memory of terminal.
In a kind of possible realization method, the process registered in the memory of terminal includes:By the first view group
The memory address of part, the mark of the first page and at least one interface are registered to the preset interface of terminal offer;It should
The interior of the terminal is arrived in the mark of first page and at least one interface storage corresponding with the memory address of the first view component
In depositing.
Wherein, the mark of the first page and at least one interface is corresponding with the memory address of the first view component
The process stored in the memory of the terminal may comprise steps of a and b:
Step a, it is based respectively on the mark of each interface and the first page at least one interface, generates context
Information.
First page provide interface can have it is one or more, for first page provide each interface, terminal can
The mark of the interface and first page is spliced into a contextual information.In this way, for a variety of the connecing of first page offer
Mouthful, terminal can generate multiple contextual informations.
Step b, using at least one contextual information of generation as key, the memory address of the first view component is value, will
Key-value pair relationship between at least one contextual information and the memory address of the first view component, storage to the terminal
In memory.
For each contextual information, for terminal using the contextual information as key, the memory address of first view component is value
It is stored as a key-value pair relationship, and is stored to inside the memory of terminal.
By the memory address of first view component, the mark of first page and the method registration that will carry first page
To in the memory of terminal so that first can be found according to this memory address by carrying the second view component of second page
The memory block of view component in memory, and then the method provided to the first page is provided.
It should be noted that the embodiment of the present invention is with terminal by the memory address of first view component, the first page
Mark and the first page provide at least one interface registered in the memory of terminal for illustrate.In one kind
In possible realization method, if first page needs the interface for calling second page to provide, terminal can also be by the second view
At least one interface that the memory address of component, the mark of the second page and the second page provide in the memory of terminal into
Row registration so that the second view component can be found according to this memory address by carrying the first view component of first page
Memory block in memory, and then the interface provided to the second page is provided.
The registration process of the step 202 that is to say first page to the process in the channels endpoint registration web, which uses
The direct communication between first page and second page.Terminal can only have a channel web, which is used for each page
It is communicated between face, certainly, terminal can also have a plurality of channels web, for example, there is the need of secret communication between certain two page
It asks, then can have the channels web of a secret between the two pages, it is not limited in the embodiment of the present invention.
203, when receiving the call request of the second view component, the memory address of the first view component is searched, it should
The second page that call request is used to indicate second view component load needs the target interface for calling the first page to provide.
Wherein, which is the either interface at least one interface, for example, the click that first page provides
The interface of a button.
In the embodiment of the present invention, when the second page of the second view component carrying needs any for calling first page to provide
When kind interface, the second view component can send call request to terminal system, and system is when receiving this calling, Ke Yicha
Look for the memory address for the first view component registered in the memory of terminal.
For example, first page and second page before being communicated, can appoint the method that can respectively provide with
And corresponding mark, in this way, second page need call first page provide target interface when, can to terminal send pair
The call request of target interface, by the recalls informations such as the mark of the target interface and first page be filled into terminal provide it is pre-
If interface.
In a kind of possible realization method, when receiving the call request of the second view component, terminal search this first
The memory address of view component includes the following steps a to c:
Step a, when receiving the call request of the second view component, the first page is extracted from the call request
The target interface that mark and the first page provide.
In the call request that second view component is initiated, the mark and needs of the first page for needing to call can be carried
The target interface of calling so that terminal can extract these information from the call request.
Step b, based on the mark of the first page and the target interface, target context information is generated.
For the registration process in step 202, terminal, can basis when receiving the call request of the second view component
Second page needs the target interface for the first page called and the mark of first page, splices a contextual information, claims
For target context information.
Step c, according to the target context information and the key-value pair relationship, with determining the memory of the first view component
Location.
The key-value pair relationship that terminal can before be stored according to the target context information of generation, direct index, to find
Carry the memory address of the first view component of first page.
204, according to the memory address of the first view component, which is called by second view component.
In the embodiment of the present invention, after the memory address for finding first view component, the second view component of terminal can be with
By calling the memory address of first view component, the target interface provided to first page is called.
It should be noted that after the calling of the first page reception second page of first view component carrying, if needed
The result of calling is adjusted back to second page, then first view component can also pass through the second view component and call first page
Target interface this channel web, find corresponding second view component, and the result of calling is adjusted back to the second sets of views
Part.
Above-mentioned steps provide the scheme transmitted, be in communication with each other into row information between a kind of page, compared to server
The method of calling for carrying out protocol interaction, in scheme provided in an embodiment of the present invention, the calling between the page is more convenient and direct.
Communication process is transparent, can directly be communicated between first page and second page, reduce communication and interaction at
This.It is called through the above way, can reduce the band of uplink and downlink to avoid the process of protocol interaction is carried out with server
Wide flow reduces bandwidth cost, can also improve response speed, and being delivered in terminal for information carries out, and will not expose to net
Network improves the safety of communication.
Method provided in an embodiment of the present invention, by loading the memory address of first view component, first view component
First page mark and first page provide at least one interface registered in the memory of terminal so that second page
Face, can be by initiating call request when needing that any interface of first page is called to be communicated, and triggering terminal is searched
The memory address of registered first view component, and then realize the calling of interface.In said program, realized between two pages
The process that interface calls carries out in terminal, is not necessarily to reliance server, will not bring the flow of uplink and downlink, improves response speed
Degree, and whole process will not expose to network, improve safety.
Fig. 3 is a kind of structural schematic diagram of interface calling device provided in an embodiment of the present invention.With reference to Fig. 3, the device packet
It includes:
Registration module 301, the first page for loading the memory address of first view component, the first view component
Mark and the first page provide at least one interface registered in the memory of terminal;
Searching module 302, for when receiving the call request of the second view component, searching the first view component
Memory address, the second page which is used to indicate second view component load need that the first page is called to provide
Target interface, the target interface be at least one interface in either interface;
Calling module 303, for the memory address according to the first view component, being called by second view component should
Target interface.
In a kind of possible realization method, which is used for:
The memory address of the first view component, the mark of the first page and at least one interface are registered to the end
The preset interface provided is provided;
By the storage corresponding with the memory address of the first view component of the mark of the first page and at least one interface
Into the memory of the terminal.
In a kind of possible realization method, which is used for:
It is based respectively on the mark of each interface and the first page at least one interface, generates contextual information;
Using at least one contextual information of generation as key, the memory address of the first view component is value, at least by this
Key-value pair relationship between one contextual information and the memory address of the first view component, the memory of storage to the terminal
In.
In a kind of possible realization method, which is used for:
When receiving the call request of the second view component, extracted from the call request first page mark and
The target interface that the first page provides;
Based on the mark of the first page and the target interface, target context information is generated;
According to the target context information and the key-value pair relationship, the memory address of the first view component is determined.
In a kind of possible realization method, registration module 301 by the first view component for loading the first page
During face, when the first page initializes successfully, the step of being registered in the memory of terminal is executed.
Device provided in an embodiment of the present invention, by loading the memory address of first view component, first view component
First page mark and first page provide at least one interface registered in the memory of terminal so that second page
Face, can be by initiating call request when needing that any interface of first page is called to be communicated, and triggering terminal is searched
The memory address of registered first view component, and then realize the calling of interface.In said program, realized between two pages
The process that interface calls carries out in terminal, is not necessarily to reliance server, will not bring the flow of uplink and downlink, improves response speed
Degree, and whole process will not expose to network, improve safety.
It should be noted that:The interface calling device that above-described embodiment provides is when interface calls, only with above-mentioned each function
The division progress of module, can be as needed and by above-mentioned function distribution by different function moulds for example, in practical application
Block is completed, i.e., the internal structure of equipment is divided into different function modules, to complete all or part of work(described above
Energy.In addition, the interface calling device that above-described embodiment provides belongs to same design with interface call method embodiment, it is specific real
Existing process refers to embodiment of the method, and which is not described herein again.
Fig. 4 is a kind of structural schematic diagram of terminal 400 provided in an embodiment of the present invention.The terminal 400 can be:Intelligent hand
(Moving Picture Experts Group Audio Layer III, dynamic image are special for machine, tablet computer, MP3 player
Family's compression standard audio level 3), MP4 (Moving Picture Experts Group Audio Layer IV, dynamic image
Expert's compression standard audio level 4) player, laptop or desktop computer.Terminal 400 is also possible to be referred to as user to set
Other titles such as standby, portable terminal, laptop terminal, terminal console.
In general, terminal 400 includes:Processor 401 and memory 402.
Processor 401 may include one or more processing cores, such as 4 core processors, 8 core processors etc..Place
DSP (Digital Signal Processing, Digital Signal Processing), FPGA (Field- may be used in reason device 401
Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array, may be programmed
Logic array) at least one of example, in hardware realize.Processor 401 can also include primary processor and coprocessor, master
Processor is the processor for being handled data in the awake state, also referred to as CPU (Central Processing
Unit, central processing unit);Coprocessor is the low power processor for being handled data in the standby state.?
In some embodiments, processor 401 can be integrated with GPU (Graphics Processing Unit, image processor),
GPU is used to be responsible for the rendering and drafting of content to be shown needed for display screen.In some embodiments, processor 401 can also wrap
AI (Artificial Intelligence, artificial intelligence) processor is included, the AI processors are for handling related machine learning
Calculating operation.
Memory 402 may include one or more computer readable storage mediums, which can
To be non-transient.Memory 402 may also include high-speed random access memory and nonvolatile memory, such as one
Or multiple disk storage equipments, flash memory device.In some embodiments, the non-transient computer in memory 402 can
Storage medium is read for storing at least one instruction, at least one instruction is for performed to realize this Shen by processor 401
Please in embodiment of the method provide interface call method.
In some embodiments, terminal 400 is also optional includes:Peripheral device interface 403 and at least one peripheral equipment.
It can be connected by bus or signal wire between processor 401, memory 402 and peripheral device interface 403.Each peripheral equipment
It can be connected with peripheral device interface 403 by bus, signal wire or circuit board.Specifically, peripheral equipment includes:Radio circuit
404, at least one of display screen 405, camera 406, voicefrequency circuit 407, positioning component 408 and power supply 409.
Peripheral device interface 403 can be used for I/O (Input/Output, input/output) is relevant at least one outer
Peripheral equipment is connected to processor 401 and memory 402.In some embodiments, processor 401, memory 402 and peripheral equipment
Interface 403 is integrated on same chip or circuit board;In some other embodiments, processor 401, memory 402 and outer
Any one or two in peripheral equipment interface 403 can realize on individual chip or circuit board, the present embodiment to this not
It is limited.
Radio circuit 404 is for receiving and emitting RF (Radio Frequency, radio frequency) signal, also referred to as electromagnetic signal.It penetrates
Frequency circuit 404 is communicated by electromagnetic signal with communication network and other communication equipments.Radio circuit 404 turns electric signal
It is changed to electromagnetic signal to be sent, alternatively, the electromagnetic signal received is converted to electric signal.Optionally, radio circuit 404 wraps
It includes:Antenna system, RF transceivers, one or more amplifiers, tuner, oscillator, digital signal processor, codec chip
Group, user identity module card etc..Radio circuit 404 can be carried out by least one wireless communication protocol with other terminals
Communication.The wireless communication protocol includes but not limited to:Metropolitan Area Network (MAN), each third generation mobile communication network (2G, 3G, 4G and 5G), wireless office
Domain net and/or WiFi (Wireless Fidelity, Wireless Fidelity) network.In some embodiments, radio circuit 404 may be used also
To include the related circuits of NFC (Near Field Communication, wireless near field communication), the application is not subject to this
It limits.
Display screen 405 is for showing UI (User Interface, user interface).The UI may include figure, text, figure
Mark, video and its their arbitrary combination.When display screen 405 is touch display screen, display screen 405 also there is acquisition to show
The ability of the surface of screen 405 or the touch signal of surface.The touch signal can be used as control signal to be input to processor
401 are handled.At this point, display screen 405 can be also used for providing virtual push button and/or dummy keyboard, also referred to as soft button and/or
Soft keyboard.In some embodiments, display screen 405 can be one, and the front panel of terminal 400 is arranged;In other embodiments
In, display screen 405 can be at least two, be separately positioned on the different surfaces of terminal 400 or in foldover design;In still other reality
Apply in example, display screen 405 can be flexible display screen, be arranged on the curved surface of terminal 400 or fold plane on.Even, it shows
Display screen 405 can also be arranged to non-rectangle irregular figure, namely abnormity screen.LCD (Liquid may be used in display screen 405
Crystal Display, liquid crystal display), OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode)
Etc. materials prepare.
CCD camera assembly 406 is for acquiring image or video.Optionally, CCD camera assembly 406 include front camera and
Rear camera.In general, the front panel in terminal is arranged in front camera, rear camera is arranged at the back side of terminal.One
In a little embodiments, rear camera at least two is main camera, depth of field camera, wide-angle camera, focal length camera shooting respectively
Any one in head, to realize that main camera and the fusion of depth of field camera realize background blurring function, main camera and wide-angle
Camera fusion realizes that pan-shot and VR (Virtual Reality, virtual reality) shooting functions or other fusions are clapped
Camera shooting function.In some embodiments, CCD camera assembly 406 can also include flash lamp.Flash lamp can be monochromatic warm flash lamp,
It can also be double-colored temperature flash lamp.Double-colored temperature flash lamp refers to the combination of warm light flash lamp and cold light flash lamp, be can be used for not
With the light compensation under colour temperature.
Voicefrequency circuit 407 may include microphone and loud speaker.Microphone is used to acquire the sound wave of user and environment, and will
Sound wave, which is converted to electric signal and is input to processor 401, to be handled, or is input to radio circuit 404 to realize voice communication.
For stereo acquisition or the purpose of noise reduction, microphone can be multiple, be separately positioned on the different parts of terminal 400.Mike
Wind can also be array microphone or omnidirectional's acquisition type microphone.Loud speaker is then used to that processor 401 or radio circuit will to be come from
404 electric signal is converted to sound wave.Loud speaker can be traditional wafer speaker, can also be piezoelectric ceramic loudspeaker.When
When loud speaker is piezoelectric ceramic loudspeaker, the audible sound wave of the mankind can be not only converted electrical signals to, it can also be by telecommunications
Number the sound wave that the mankind do not hear is converted to carry out the purposes such as ranging.In some embodiments, voicefrequency circuit 407 can also include
Earphone jack.
Positioning component 408 is used for the current geographic position of positioning terminal 400, to realize navigation or LBS (Location
Based Service, location based service).Positioning component 408 can be the GPS (Global based on the U.S.
Positioning System, global positioning system), the dipper system of China, Russia Gray receive this system or European Union
The positioning component of Galileo system.
Power supply 409 is used to be powered for the various components in terminal 400.Power supply 409 can be alternating current, direct current,
Disposable battery or rechargeable battery.When power supply 409 includes rechargeable battery, which can support wired charging
Or wireless charging.The rechargeable battery can be also used for supporting fast charge technology.
In some embodiments, terminal 400 further include there are one or multiple sensors 410.The one or more sensors
410 include but not limited to:Acceleration transducer 411, gyro sensor 412, pressure sensor 413, fingerprint sensor 414,
Optical sensor 415 and proximity sensor 416.
The acceleration that acceleration transducer 411 can detect in three reference axis of the coordinate system established with terminal 400 is big
It is small.For example, acceleration transducer 411 can be used for detecting component of the acceleration of gravity in three reference axis.Processor 401 can
With the acceleration of gravity signal acquired according to acceleration transducer 411, control touch display screen 405 is regarded with transverse views or longitudinal direction
Figure carries out the display of user interface.Acceleration transducer 411 can be also used for game or the acquisition of the exercise data of user.
Gyro sensor 412 can be with the body direction of detection terminal 400 and rotational angle, and gyro sensor 412 can
To cooperate with acquisition user to act the 3D of terminal 400 with acceleration transducer 411.Processor 401 is according to gyro sensor 412
Following function may be implemented in the data of acquisition:When action induction (for example changing UI according to the tilt operation of user), shooting
Image stabilization, game control and inertial navigation.
The lower layer of side frame and/or touch display screen 405 in terminal 400 can be arranged in pressure sensor 413.Work as pressure
The gripping signal that user can be detected in the side frame of terminal 400 to terminal 400 is arranged in sensor 413, by processor 401
Right-hand man's identification or prompt operation are carried out according to the gripping signal that pressure sensor 413 acquires.When the setting of pressure sensor 413 exists
When the lower layer of touch display screen 405, the pressure operation of touch display screen 405 is realized to UI circle according to user by processor 401
Operability control on face is controlled.Operability control includes button control, scroll bar control, icon control, menu
At least one of control.
Fingerprint sensor 414 is used to acquire the fingerprint of user, collected according to fingerprint sensor 414 by processor 401
The identity of fingerprint recognition user, alternatively, by fingerprint sensor 414 according to the identity of collected fingerprint recognition user.It is identifying
When the identity for going out user is trusted identity, the user is authorized to execute relevant sensitive operation, the sensitive operation packet by processor 401
Include solution lock screen, check encryption information, download software, payment and change setting etc..Terminal can be set in fingerprint sensor 414
400 front, the back side or side.When being provided with physical button or manufacturer Logo in terminal 400, fingerprint sensor 414 can be with
It is integrated with physical button or manufacturer Logo.
Optical sensor 415 is for acquiring ambient light intensity.In one embodiment, processor 401 can be according to optics
The ambient light intensity that sensor 415 acquires controls the display brightness of touch display screen 405.Specifically, when ambient light intensity is higher
When, the display brightness of touch display screen 405 is turned up;When ambient light intensity is relatively low, the display for turning down touch display screen 405 is bright
Degree.In another embodiment, the ambient light intensity that processor 401 can also be acquired according to optical sensor 415, dynamic adjust
The acquisition parameters of CCD camera assembly 406.
Proximity sensor 416, also referred to as range sensor are generally arranged at the front panel of terminal 400.Proximity sensor 416
The distance between front for acquiring user and terminal 400.In one embodiment, when proximity sensor 416 detects use
When family and the distance between the front of terminal 400 taper into, touch display screen 405 is controlled from bright screen state by processor 401
It is switched to breath screen state;When proximity sensor 416 detects user and the distance between the front of terminal 400 becomes larger,
Touch display screen 405 is controlled by processor 401 and is switched to bright screen state from breath screen state.
It will be understood by those skilled in the art that the restriction of the not structure paired terminal 400 of structure shown in Fig. 4, can wrap
It includes than illustrating more or fewer components, either combine certain components or is arranged using different components.
In the exemplary embodiment, a kind of computer readable storage medium being stored with computer program, example are additionally provided
It is such as stored with the memory of computer program, above computer program realizes the interface in above-described embodiment when being executed by processor
Call method.For example, computer readable storage medium can be read-only memory (Read-Only Memory, ROM), arbitrary access
Memory (Random Access Memory, RAM), CD-ROM (Compact Disc Read-Only Memory, CD-
ROM), tape, floppy disk and optical data storage devices etc..
One of ordinary skill in the art will appreciate that realizing that all or part of step of above-described embodiment can pass through hardware
It completes, relevant hardware can also be instructed to complete by program, which can be stored in a kind of computer-readable storage
In medium, storage medium mentioned above can be read-only memory, disk or CD etc..
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all the present invention spirit and
Within principle, any modification, equivalent replacement, improvement and so on should all be included in the protection scope of the present invention.