The relevant technologies the prior art has at least the following problems:
The method that the request retries within the set time at the same time with fixed number of retries to request into
Row retries, and requests the flexibility retried poor, success rate is low, thereby increases and it is possible to cause the load of called terminal to increase, and then cause to service
Quality vicious circle.
Apply for content
The embodiment of the present application provides a kind of method, apparatus, equipment and readable storage medium storing program for executing for requesting to retry, to solve phase
The flexibility that retries of pass technology request is poor, and success rate is low, thereby increases and it is possible to the problem of causing the load of called terminal to increase.The technology
Scheme is as follows:
On the one hand, a kind of method for requesting to retry is provided, which comprises
Send striding course request;
If not receiving the corresponding response of the request, the time offset that current request retries is obtained;
It is made requests and is retried according to the time offset that the current request retries;
Wherein, the time offset that the current request retries is the time interval of Twice requests, the time interval root
It is dynamically determined according to business scenario.
Optionally, the time offset retried according to the current request makes requests retry after, further includes:
If receiving the request retries corresponding response, ending request is retried.
Optionally, after the ending request retries, further includes:
The response retried is requested to store by described, the response that the request of storage retries is as subsequent same request
Response.
Optionally, the method, further includes: obtain number of retries threshold value;
If number of retries reaches number of retries threshold value, ending request is retried.
Optionally, the method, further includes: according to business scenario, dynamically adjust the number of retries threshold value.
Optionally, after the transmission striding course request, further includes:
It receives the striding course and requests corresponding response;
Corresponding response is requested to store the striding course, the response that the request of storage retries is as subsequent phase
With the response of request.
On the one hand, a kind of device for requesting to retry is provided, described device includes:
Sending module, for sending striding course request;
First obtains module, if it is inclined to obtain the time that current request retries for not receiving the corresponding response of the request
Shifting amount;
Module is retried, the time offset for retrying according to the current request, which makes requests, to be retried;
Wherein, the time offset that the current request retries is the time interval of Twice requests, the time interval root
It is dynamically determined according to business scenario.
Optionally, described to retry module, if being also used to receive the request retries corresponding response, ending request weight
Examination.
Optionally, described device further include:
First memory module, for requesting the response retried to store for described, the sound that the request of storage retries
It should be used as the response of subsequent same request.
Optionally, described device further include:
Second obtains module, for obtaining number of retries threshold value;
Described to retry module, if being also used to number of retries reaches number of retries threshold value, ending request is retried.
Optionally, described device further include:
Module is adjusted, for dynamically adjusting the number of retries threshold value according to business scenario.
Optionally, described device further include:
Second memory module requests corresponding response for receiving the striding course;The striding course is requested corresponding
Response is stored, response of the response that the request of storage retries as subsequent same request.
On the one hand, a kind of equipment for requesting to retry is provided, the equipment includes processor and memory, the memory
In be stored at least one instruction, described instruction is shown by the processor and is executed to realize what request as described above retried
Method.
On the one hand, a kind of computer readable storage medium is provided, at least one instruction is stored in the storage medium,
Described instruction is shown by processor and is executed to realize the method for requesting to retry as described above.
Technical solution bring beneficial effect provided by the present application includes at least:
After sending striding course request, if not receiving the corresponding response of request, by obtain that current request retries when
Between offset, make requests and retry, since the time offset is dynamically determined according to business scenario, thus avoid request solid
Interior batch of fixing time retries, and improves flexibility and success rate that request retries;And it avoids because service fault causes to be called
The load at end increases.
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.
The embodiment of the present application provides a kind of method for requesting to retry, and this method can be applied to implementation ring as shown in Figure 1
In border.In Fig. 1, including at least one terminal 11 and server 12, terminal 11 can be communicatively coupled with server 12, with from clothes
The time offset that acquisition request retries on business device 12.
Wherein, terminal 11 can be any one and can be handed over user by keyboard, touch tablet, touch screen, remote controler, voice
Mutually or one or more modes such as handwriting equipment carry out the electronic product of human-computer interaction, such as PC (Personal Computer,
Personal computer), it is mobile phone, smart phone, PDA (Personal Digital Assistant, personal digital assistant), wearable
Equipment, palm PC PPC (Pocket PC), tablet computer, intelligent vehicle device, smart television, intelligent sound box etc..
Server 12 can be a server, be also possible to the server cluster being made of multiple servers, either
One cloud computing service center.
Those skilled in the art will be understood that above-mentioned terminal 11 and server 12 are only for example, other are existing or from now on may be used
The terminal or server that can occur such as are applicable to the application, should also be included within the application protection scope, and herein to draw
It is incorporated herein with mode.
Based on above-mentioned implementation environment shown in FIG. 1, referring to fig. 2, the embodiment of the present application provides a kind of side for requesting to retry
Method, this method can be applied in terminal shown in FIG. 1.As shown in Fig. 2, this method comprises:
Step 201, striding course request is sent.
Distributed Services exploitation in, when client receive request after, can striding course send request, and wait request pair
The response answered.Wherein, striding course is for carrying out data exchange between different application.
For sending request to second service striding course from first service in same client, when first service is to second
When servicing striding course transmission request, i.e., when first service striding course calls second service, if calling is non-idempotent, i.e., repeatedly
When the influence of repetitive operation and once-through operation is different, need to guarantee the service-conformance called.
Optionally, after sending striding course request, if receiving striding course requests corresponding response, striding course is asked
It asks corresponding response to be stored, the striding course of the storage is requested into response of the corresponding response as subsequent same request.
That is, requesting corresponding sound when client receives striding course after client sends striding course request
At once, which terminates, and requests corresponding response to be stored in the memory of client striding course.To work as client
In subsequently received identical request, directly fed back the response in client's end memory as its corresponding response.
Wherein, it is contemplated that the limited storage space of memory, method provided by the embodiments of the present application can be to storing in memory
Response be ranked up by storage time length or be ranked up by the frequency of use of response, every some cycles, will sort
The response of reference quantity rearward is deleted, with the memory space of releasing memory.The period for deleting response can be rule of thumb
Setting, or be arranged according to business scenario, the embodiment of the present application is not limited this.After the period for deleting response is set, this
The method that application embodiment provides also is supported to be adjusted the deletion period.Once adjustment, then subsequent according to week adjusted
Phase periodically deletes response stored in memory.
For example, store 3 responses in memory, it is small to respond when the storage of A a length of 20 by respectively response A, response B and response C
When, it responds when the storage of B a length of 12 hours, responds when the storage of C a length of 1 hour, be 24 hours to be to delete the period of response
Example deleted the response of sequence rearward every 24 hours, due to the storage time longest of response A, sorted rearward, thus
After reaching the period, response A is deleted.
Optionally in addition, storage time in memory can also be reached certain after reaching the period for deleting response
The response that length or frequency of use are less than frequency of use threshold value is deleted.
Still to store 3 responses, respectively response A, response B and response C in memory, and the period for deleting response is 24 small
When for, if response A frequency of use be 20 times, respond B frequency of use be 2 times, respond C frequency of use be 0 time, use
Frequency threshold is 2, then after the period of deletion response for reaching 24 hours, since the frequency of use of response C is not up to frequency of use
Threshold value, thus response C is deleted.
Step 202, if not receiving the corresponding response of request, the time offset that current request retries is obtained.
When client do not receive request corresponding response when, from the memory of client obtain current request retry when
Between offset.Wherein, the time offset that current request retries is the time interval of Twice requests, and time interval is according to business field
Scape is dynamically determined.
It should be noted that illustrating to call serv-fail when client does not receive the corresponding response of request.Wherein,
Malloc failure malloc has following three kinds of situations:
Situation one
When first service calls second service, since network cause request is not delivered to second service, request fails, i.e.,
Malloc failure malloc.
Situation two
When first service calls second service, request is sent to second service, but second service is when carrying out business processing
It is abnormal in generation process, cause request to fail, i.e. malloc failure malloc.
Situation three
When first service calls second service, request is sent to second service, and business processing is being just in second service process
Often, and successfully transmit response causes response not to be sent to first service due to network problem;Or first service due to
Wait-for-response is overtime and disconnects, and does not receive response;Lead to malloc failure malloc.
No matter malloc failure malloc belongs to which kind of above-mentioned situation, after client, which does not receive, requests corresponding response, from client
The time offset that current request retries is obtained in the memory at end.Wherein, the time offset that current request retries is to ask twice
The time interval asked, i.e., sent the time interval of request apart from last time, and the request that last time sends can be asking for transmission for the first time
It asks, is also possible to the request sent when last time request retries.For example, if it is that request retries for the first time that current request, which retries, it should
Time interval is the time interval that distance sends request for the first time, should if it is that second of request retries that current request, which retries,
Time interval is the time interval that distance requests to retry for the first time.
For example, obtaining the time offset that current request retries from the memory of client is 5s, if last time sends request
Time be 10:10:08, then the time that current request retries be 10:10:13.
Further, according to business scenario, the time offset retried dynamic can also be requested to be adjusted to by next
10s, or according to current business scenario, request the time offset retried dynamic to be adjusted to 20s for next.It needs to illustrate
, request the dynamic retried to adjust for next, can be adjusted according to business scenario, or carry out based on experience value
Adjustment, the embodiment of the present application are not limited this.
Wherein business scenario include but is not limited to current client operation fluency or locating network state, example
Such as, when client does not receive the corresponding response of request, and the time offset that current request retries is obtained from memory, according to
Operation fluency, that is, payload size dynamic adjustment time offset size of client at present, the operating status of active client
It is not smooth, current time offset dynamic can be tuned up;The operating status of active client is smoother, can be by current time
Offset dynamic is turned down.Wherein.Judgement for the smooth degree of the operating status of active client, can be according to the hair of request
The reaction time for sending or receiving response is determined, or is determined based on experience value, and the embodiment of the present application is not subject to this
It limits.
Further, it is also possible to according to the size of current network state dynamic adjustment time offset, such as by network state
Five grades are divided into difference from good, are level-one, second level, three-level, level Four and Pyatyi respectively;When current network state is second level
When, current time offset dynamic can be adjusted to 10s;It, can be inclined by current time when current network state is level Four
Shifting amount dynamic is adjusted to 20s.Wherein, the embodiment of the present application is not limited the method for determination of network state, for example, can root
It is determined according to the power of network signal.It, can also be in addition, for the corresponding relationship between network state and current time offset
It is set based on experience value, the embodiment of the present application is not limited this.
Step 203, it is made requests and is retried according to the time offset that current request retries.
When client gets the time offset that current request retries from memory, time for being retried according to the request
Offset, which makes requests, to be retried.For example, it is 5s that the time offset that current request retries is obtained from the memory of client, if on
The secondary time for sending request is 10:10:08, it is determined that the time that current request retries is 10:10:13.Reach 10 when the time:
When 10:13, request is retransmitted.
Optionally, make requests retry when, the time migration for repeatedly requesting to retry can be successively obtained according to business scenario
Amount, it is subsequent according to the time for requesting the time offset retried to determine that current request retries every time, reach what current request retried
After time, request is retransmitted.If receiving request during request retries and retrying corresponding response, ending request retries.
For example, getting the time offset for repeatedly requesting to retry, is made requests and retried according to the time offset that current request retries
Afterwards, when client, which receives request, retries corresponding response, terminate subsequent request and retry.
Optionally, it receives after request retries corresponding response, method provided by the embodiments of the present application is supported will request weight
The response of examination is stored, response of the response that the request of storage retries as subsequent same request.
For example, after client makes requests and retries, if client receives request when retrying corresponding response, this is asked
It asks the task of retrying to terminate, and request is retried into corresponding response and is stored in the memory of client, when client is in receipt of subsequent
To when identical request, directly fed back the response in client's end memory as its corresponding response.
It wherein,, can also be with being stored in memory even the response that retries of request since memory storage space is limited
Response equally periodically deleted, deletion mode can be found in the related content of above-mentioned steps 201, no longer repeat one by one herein.
In a kind of optional embodiment, it is based on same idea, referring to Fig. 3, in method provided by the embodiments of the present application,
When client make requests retry when, further include following steps:
Step 204, number of retries threshold value is obtained;If number of retries reaches number of retries threshold value, ending request is retried.
After client gets the time offset that current request retries from memory, also gets and retry from memory
Frequency threshold value, make requests retry when, if number of retries reaches number of retries threshold value, asked no matter whether client receives
It asks and retries corresponding response, terminate this time request and retry task.
Wherein, number of retries threshold value can be 6 perhaps 10 or according to the actual situation or empirical value is set,
The embodiment of the present application is not limited this.
Optionally, according to business scenario, dynamic adjusts number of retries threshold value.
Wherein, basis in the mode and above-mentioned steps 202 of dynamic adjustment is carried out to frequency threshold value is retried according to business scenario
Business scenario is the same to the mode of the dynamic adjustment of time offset, and details are not described herein.
In a kind of optional embodiment, referring to fig. 4, by taking the prize in game is provided as an example.When user shares daily
When game, a game competition certificate can be obtained, click needs to send striding course request, do not have in client when getting the competition certificate
When receiving with the striding course corresponding response of request, in order to guarantee to take in competition, certificate is normally issued in the account of user, therefore, is being sent
The time offset that acquisition request retries after striding course request failure.
After user's associated play, due to the sharing operation of user, when first service striding course is asked to second service transmission
When asking, second service, which receives, to be requested and responds to the request, which is fed back to first service, user is according to the first clothes
The feedback of business gets competition certificate.However, not received any anti-after user's associated play when getting competition certificate
When feedback, starting request retries strategy.
Unsuccessfully occur for example, user gets competition certificate in 00:00, client can time migration that successively acquisition request retries
Amount 5,10,30,60,120,240,300,600,1200,3600,7200;Then request, which retries, understands in 00:00:05,00:00:15,
00:00:45,00:01:45,00:03:45,00:07:45,00:12:45,00:22:45,00:42:45,01:42:45,03:
42:45 is successively carried out.After user gets competition certificate success, it can stop retrying request;Or work as the number that request retries
When reaching number of retries threshold value, i.e., after retrying time 03:42:45 for the last time, stops request and retry task.
Technical solution bring beneficial effect provided by the embodiments of the present application includes at least:
After sending striding course request, if not receiving the corresponding response of request, by obtain that current request retries when
Between offset, make requests and retry, since the time offset is dynamically determined according to business scenario, thus avoid request solid
Interior batch of fixing time retries, and improves flexibility and success rate that request retries;And it avoids because service fault causes to be called
The load at end increases.
By requesting corresponding response and request to retry corresponding response and store striding course, in order to store
Response of the response as subsequent same request, and then response speed can be improved.
By obtaining number of retries threshold value, ending request retries task after number of retries reaches number of retries threshold value, and
By adjusting to the dynamic for retrying frequency threshold value, timely ending request retries, avoids client and carry out useless request weight
Examination.
The embodiment of the present application provides a kind of device for requesting to retry, and referring to Fig. 5, which includes:
Sending module 501, for sending striding course request;
First obtains module 502, if obtaining the time migration that current request retries for not receiving the corresponding response of request
Amount;
Module 503 is retried, the time offset for retrying according to current request, which makes requests, to be retried;
Wherein, striding course is for carrying out data exchange between different application;The time offset that current request retries
For the time interval of Twice requests, time interval is dynamically determined according to business scenario.
In a kind of optional embodiment, module 503 is retried, if retrying corresponding response for receiving request, knot
Beam request retries.
In a kind of optional embodiment, referring to Fig. 6, the device further include:
First memory module 504, the response for retrying request store, the response conduct that the request of storage retries
The response of subsequent same request.
In a kind of optional embodiment, referring to Fig. 7, the device further include:
Second obtains module 505, for obtaining number of retries threshold value;
Module 503 is retried, if being also used to number of retries reaches number of retries threshold value, ending request is retried.
In a kind of optional embodiment, referring to Fig. 8, the device further include:
Module 506 is adjusted, for according to business scenario, dynamic to adjust number of retries threshold value.
In a kind of optional embodiment, referring to Fig. 9, the device further include:
Second memory module 507 requests corresponding response for receiving striding course;By striding course request it is corresponding respond into
Row storage, response of the response that the request of storage retries as subsequent same request.
Technical solution bring beneficial effect provided by the embodiments of the present application includes at least:
After sending striding course request, if not receiving the corresponding response of request, by obtain that current request retries when
Between offset, make requests and retry, since the time offset is dynamically determined according to business scenario, thus avoid request solid
Interior batch of fixing time retries, and improves flexibility and success rate that request retries;And it avoids because service fault causes to be called
The load at end increases.
By requesting corresponding response and request to retry corresponding response and store striding course, in order to store
Response of the response as subsequent same request, and then response speed can be improved.
By obtaining number of retries threshold value, ending request retries task after number of retries reaches number of retries threshold value, and
By adjusting to the dynamic for retrying frequency threshold value, timely ending request retries, avoids client and carry out useless request weight
Examination.
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 Figure 10, it illustrates a kind of structural representations for the terminal 1000 for requesting to retry provided by the embodiments of the present application
Figure.The terminal 1000 can be portable mobile termianl, such as: smart phone, tablet computer, MP3 player (Moving
Picture Experts Group Audio Layer III, dynamic image expert's compression standard audio level 3), MP4
(Moving Picture Experts Group Audio Layer IV, dynamic image expert's compression standard audio level 4) is broadcast
Put device, laptop or desktop computer.Terminal 1000 be also possible to referred to as user equipment, portable terminal, laptop terminal,
Other titles such as terminal console.
In general, terminal 1000 includes: processor 1001 and memory 1002.
Processor 1001 may include one or more processing cores, such as 4 core processors, 5 core processors
Deng.Processor 1001 can use DSP (Digital Signal Processing, Digital Signal Processing), FPGA (Field-
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 1001 also may 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 1001 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 1001 can also be wrapped
AI (Artificial Intelligence, artificial intelligence) processor is included, the AI processor is for handling related machine learning
Calculating operation.
Memory 1002 may include one or more computer readable storage mediums, which can
To be non-transient.Memory 1002 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 1002 can
Storage medium is read for storing at least one instruction, at least one instruction performed by processor 1001 for realizing this Shen
Please in the method that retries of request that provides of embodiment of the method.
In some embodiments, terminal 1000 is also optional includes: peripheral device interface 1003 and at least one periphery are set
It is standby.It can be connected by bus or signal wire between processor 1001, memory 1002 and peripheral device interface 1003.It is each outer
Peripheral equipment can be connected by bus, signal wire or circuit board with peripheral device interface 1003.Specifically, peripheral equipment includes:
In radio circuit 1004, touch display screen 1005, camera 1006, voicefrequency circuit 1007, positioning component 1008 and power supply 1009
At least one.
Peripheral device interface 1003 can be used for I/O (Input/Output, input/output) is relevant outside at least one
Peripheral equipment is connected to processor 1001 and memory 1002.In some embodiments, processor 1001, memory 1002 and periphery
Equipment interface 1003 is integrated on same chip or circuit board;In some other embodiments, processor 1001, memory
1002 and peripheral device interface 1003 in any one or two can be realized on individual chip or circuit board, this implementation
Example is not limited this.
Radio circuit 1004 is for receiving and emitting RF (Radio Frequency, radio frequency) signal, also referred to as electromagnetic signal.
Radio circuit 1004 is communicated by electromagnetic signal with communication network and other communication equipments.Radio circuit 1004 is by telecommunications
Number being converted to electromagnetic signal is sent, alternatively, the electromagnetic signal received is converted to electric signal.Optionally, radio circuit
1004 include: antenna system, RF transceiver, one or more amplifiers, tuner, oscillator, digital signal processor, volume solution
Code chipset, user identity module card etc..Radio circuit 1004 can by least one wireless communication protocol come with it is other
Terminal is communicated.The wireless communication protocol includes but is not limited to: Metropolitan Area Network (MAN), each third generation mobile communication network (2G, 3G, 4G and
5G), WLAN and/or WiFi (Wireless Fidelity, Wireless Fidelity) network.In some embodiments, radio frequency electrical
Road 1004 can also include NFC (Near Field Communication, wireless near field communication) related circuit, the application
This is not limited.
Display screen 1005 is for showing UI (User Interface, user interface).The UI may include figure, text,
Icon, video and its their any combination.When display screen 1005 is touch display screen, display screen 1005 also there is acquisition to exist
The ability of the touch signal on the surface or surface of display screen 1005.The touch signal can be used as control signal and be input to place
Reason device 1001 is handled.At this point, display screen 1005 can be also used for providing virtual push button and/or dummy keyboard, it is also referred to as soft to press
Button and/or soft keyboard.In some embodiments, display screen 1005 can be one, and the front panel of terminal 1000 is arranged;Another
In a little embodiments, display screen 1005 can be at least two, be separately positioned on the different surfaces of terminal 1000 or in foldover design;
In still other embodiments, display screen 1005 can be flexible display screen, is arranged on the curved surface of terminal 1000 or folds
On face.Even, display screen 1005 can also be arranged to non-rectangle irregular figure, namely abnormity screen.Display screen 1005 can be with
Using LCD (Liquid Crystal Display, liquid crystal display), OLED (Organic Light-Emitting Diode,
Organic Light Emitting Diode) etc. materials preparation.
CCD camera assembly 1006 is for acquiring image or video.Optionally, CCD camera assembly 1006 includes front camera
And rear camera.In general, the front panel of terminal is arranged in front camera, the back side of terminal is arranged in rear camera.?
In some embodiments, rear camera at least two is that main camera, depth of field camera, wide-angle camera, focal length are taken the photograph respectively
As 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
Pan-shot and VR (Virtual Reality, virtual reality) shooting function or other fusions are realized in camera fusion in angle
Shooting function.In some embodiments, CCD camera assembly 1006 can also include flash lamp.Flash lamp can be monochromatic temperature flash of light
Lamp is also possible to double-colored temperature flash lamp.Double-colored temperature flash lamp refers to the combination of warm light flash lamp and cold light flash lamp, can be used for
Light compensation under different-colour.
Voicefrequency circuit 1007 may include microphone and loudspeaker.Microphone is used to acquire the sound wave of user and environment, and
It converts sound waves into electric signal and is input to processor 1001 and handled, or be input to radio circuit 1004 to realize that voice is logical
Letter.For stereo acquisition or the purpose of noise reduction, microphone can be separately positioned on the different parts of terminal 1000 to be multiple.
Microphone can also be array microphone or omnidirectional's acquisition type microphone.Loudspeaker is then used to that processor 1001 or radio frequency will to be come from
The electric signal of circuit 1004 is converted to sound wave.Loudspeaker can be traditional wafer speaker, be also possible to piezoelectric ceramics loudspeaking
Device.When loudspeaker is piezoelectric ceramic loudspeaker, the audible sound wave of the mankind can be not only converted electrical signals to, can also be incited somebody to action
Electric signal is converted to the sound wave that the mankind do not hear to carry out the purposes such as ranging.In some embodiments, voicefrequency circuit 1007 may be used also
To include earphone jack.
Positioning component 1008 is used for the current geographic position of positioning terminal 1000, to realize navigation or LBS (Location
Based Service, location based service).Positioning component 1008 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 1009 is used to be powered for the various components in terminal 1000.Power supply 1009 can be alternating current, direct current
Electricity, disposable battery or rechargeable battery.When power supply 1009 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 1000 further includes having one or more sensors 1010.One or more sensing
Device 1010 includes but is not limited to: acceleration transducer 1011, gyro sensor 1012, pressure sensor 1013, fingerprint sensing
Device 1014, optical sensor 1015 and proximity sensor 1016.
Acceleration transducer 1010 can detecte the acceleration in three reference axis of the coordinate system established with terminal 1000
Size.For example, acceleration transducer 1011 can be used for detecting component of the acceleration of gravity in three reference axis.Processor
The 1001 acceleration of gravity signals that can be acquired according to acceleration transducer 1011, control touch display screen 1005 with transverse views
Or longitudinal view carries out the display of user interface.Acceleration transducer 1011 can be also used for game or the exercise data of user
Acquisition.
Gyro sensor 1012 can detecte body direction and the rotational angle of terminal 1000, gyro sensor 1012
Acquisition user can be cooperateed with to act the 3D of terminal 1000 with acceleration transducer 1011.Processor 1001 is according to gyro sensors
The data that device 1012 acquires, following function may be implemented: action induction (for example changing UI according to the tilt operation of user) is clapped
Image stabilization, game control and inertial navigation when taking the photograph.
The lower layer of side frame and/or touch display screen 1005 in terminal 1000 can be set in pressure sensor 1013.When
When the side frame of terminal 1000 is arranged in pressure sensor 1013, user can detecte to the gripping signal of terminal 1000, by
Reason device 1001 carries out right-hand man's identification or prompt operation according to the gripping signal that pressure sensor 1013 acquires.Work as pressure sensor
1013 when being arranged in the lower layer of touch display screen 1005, is grasped by processor 1001 according to pressure of the user to touch display screen 1005
Make, realization controls the operability control on the interface UI.Operability control include button control, scroll bar control,
At least one of icon control, menu control.
Fingerprint sensor 1014 is used to acquire the fingerprint of user, is collected by processor 1001 according to fingerprint sensor 1014
Fingerprint recognition user identity, alternatively, by fingerprint sensor 1014 according to the identity of collected fingerprint recognition user.Knowing
Not Chu the identity of user when being trusted identity, authorize the user to execute relevant sensitive operation by processor 1001, which grasps
Make to include solving lock screen, checking encryption information, downloading software, payment and change setting etc..Fingerprint sensor 1014 can be set
Set the front, the back side or side of terminal 1000.When being provided with physical button or manufacturer Logo in terminal 1000, fingerprint sensor
1014 can integrate with physical button or manufacturer Logo.
Optical sensor 1015 is for acquiring ambient light intensity.In one embodiment, processor 1001 can be according to light
The ambient light intensity that sensor 1015 acquires is learned, the display brightness of touch display screen 1005 is controlled.Specifically, work as ambient light intensity
When higher, the display brightness of touch display screen 1005 is turned up;When ambient light intensity is lower, the aobvious of touch display screen 1005 is turned down
Show brightness.In another embodiment, the ambient light intensity that processor 1001 can also be acquired according to optical sensor 1015, is moved
The acquisition parameters of state adjustment CCD camera assembly 1006.
Proximity sensor 1016, also referred to as range sensor are generally arranged at the front panel of terminal 1000.Proximity sensor
1016 for acquiring the distance between the front of user Yu terminal 1000.In one embodiment, when proximity sensor 1016 is examined
When measuring the distance between the front of user and terminal 1000 and gradually becoming smaller, by processor 1001 control touch display screen 1005 from
Bright screen state is switched to breath screen state;When proximity sensor 1016 detect the distance between front of user and terminal 1000 by
When gradual change is big, touch display screen 1005 is controlled by processor 1001 and is switched to bright screen state from breath screen state.
It, can be with it will be understood by those skilled in the art that the restriction of the not structure paired terminal 1000 of structure shown in Figure 10
Including than illustrating more or fewer components, perhaps combining certain components or being arranged using different components.
In the exemplary embodiment, a kind of computer equipment is additionally provided, computer equipment includes processor and memory,
At least one instruction is stored in memory.At least one instruction is configured to be executed by one or more than one processor,
To realize method that above-mentioned request retries.
In the exemplary embodiment, a kind of computer readable storage medium is additionally provided, is stored at least in storage medium
The method that above-mentioned request retries is realized in one instruction, at least one instruction when being executed by the processor of computer equipment.
All the above alternatives can form the alternative embodiment of the disclosure, herein no longer using any combination
It repeats one by one.
Above is only an example of the present application, all in spirit herein and principle not to limit the application
Within, any modification, equivalent replacement, improvement and so on should be included within the scope of protection of this application.