The content of the invention
In view of this, a kind of terminal of present invention offer and its record screen method of running, external equipment, storage device,The integrality of logout can be embodied, is advantageous to the reproduction of event.
The record screen method of the terminal operating process of one embodiment of the invention, including:
A buffer area is opened up, the buffer area allows the video for caching scheduled duration;
Uninterrupted record screen, and the storehouse based on first in first out and last-in, last-out are performed to terminal in the running of terminalMechanism is by the video cache of admission to buffer area;
When monitoring that preset trigger event occurs in the running of terminal, the generation of the trigger event is recordedMoment;
Continue to perform terminal uninterrupted record screen, obtain before the moment occurs the first scheduled duration to occurring after the moment theThe video of two scheduled durations, and preserving to the memory block beyond buffer area, wherein the first scheduled duration and the second scheduled duration itWith less than or equal to the scheduled duration.
Alternatively, the first scheduled duration and the second scheduled duration are equal, and are the half of the scheduled duration.
Alternatively, terminal or external equipment open up buffer area and perform uninterrupted record screen.
Alternatively, while performing uninterrupted record screen to terminal in the running of terminal, methods described also includes:
Detect the viewing area of predetermined information on a terminal screen;
Viewing area where the predetermined information is blocked.
Alternatively, while the generation moment of the trigger event is recorded, methods described also includes:
Obtain trigger event and the frame picture at moment is occurring;
The video of the second scheduled duration after the first scheduled duration to the generation moment before the moment occurs is obtained, and is preserved extremelyMemory block beyond buffer area, including:
Second scheduled duration after the frame picture extremely into the moment occur as the first scheduled duration before the moment occursThe preview front cover of video.
One embodiment of the invention have record screen function external equipment, including processor and with the processor connectThe memory and camera connect,
Memory is used for the buffer area for opening up the video for allowing to store scheduled duration;
Camera is used in the running of terminal perform terminal uninterrupted record screen;
The memory is additionally operable to the Stack mechanism based on first in first out and last-in, last-out and delays the video that camera is enrolledDeposit to the buffer area;
Processor is used to monitor preset trigger event whether occurs in the running of terminal, and described in generationThe generation moment of trigger event is recorded during trigger event;
The camera is additionally operable to obtain before the moment occurs the second pre- timing after the first scheduled duration to the generation momentLong video, wherein the first scheduled duration is less than or equal to scheduled duration with the second scheduled duration sum;
The second scheduled duration after the moment extremely occurs for the first scheduled duration before the memory is additionally operable to that the moment will occurVideo preserve memory block to beyond buffer area.
Alternatively, the duration of the first scheduled duration and the second scheduled duration is equal, and is the half of the scheduled duration.
Alternatively, external equipment also includes the transceiver that be connected with processor, the transceiver for will occur the moment itThe video of the second scheduled duration is sent to terminal after preceding first scheduled duration to the generation moment.
The terminal of one embodiment of the invention, including processor and the memory that is connected with processor,
Memory is used for the buffer area for opening up the video for allowing to store scheduled duration;
Processor is used to call record screen thread and performs uninterrupted record screen, Yi Jiji to terminal in the running of terminalIn the Stack mechanism of first in first out and last-in, last-out by the video cache of admission to the buffer area;
The processor is additionally operable to whether monitoring occurs preset trigger event in the running of terminal, and is sending outThe generation moment of trigger event is recorded during raw trigger event;
The processor is further used for obtaining the moment occurs before the first scheduled duration it is second pre- after the moment to occurringThe long video of timing, wherein the first scheduled duration is less than or equal to the scheduled duration with the second scheduled duration sum;
The second scheduled duration after the moment extremely occurs for the first scheduled duration before the memory is additionally operable to that the moment will occurVideo preserve to the memory block beyond the buffer area.
The storage device of one embodiment of the invention, have program stored therein data, and described program data can be performed above-mentioned endHold the record screen method of running.
Beneficial effect:The present invention carries out record screen to the period before and after the trigger event generation moment, and record triggering is obtained with thisFront and rear complete video occurs for event, can embody the integrality of logout, be advantageous to the reproduction of event;Also, the present inventionThe video related to trigger event generation is only cached and preserved based on caching technology, can avoid the waste of memory space, is reducedTo hardware store requirement.
Embodiment
The main object of the present invention is:The period record screen before and after the moment occurs to trigger event in terminal, obtains triggering thingFront and rear complete video occurs for part, to embody the integrality of logout, is advantageous to the reproduction of event;Also, based on caching skillArt only caches and preserved the video related to trigger event generation, and the waste of memory space is avoided with this, is reduced to hardware storeIt is required that.
It can be that the terminal of trigger event occurs that the present invention, which performs record screen and associated video caching with the main body preserved,It can be the external equipment beyond terminal, can also be that both terminal and external equipment perform jointly certainly.Wherein, the terminalIncluding but not limited to smart mobile phone, PC (Personal Computer, personal computer), PDA (Personal DigitalAssistant, personal digital assistant or tablet personal computer) etc. mobile terminal, and be worn on limbs or be embedded in clothing, headThe wearable device with display function in decorations, accessory.And external equipment can also be above-mentioned one kind, it should be noted thatThe main body for performing record screen is also needed to camera function.
As can be seen here, the present invention adds an automatic record screen function equivalent to for terminal/external equipment, and the function includesDouble implication:First, to the video of this period after the generation moment before the generation moment for enrolling each trigger event;TwoThat admission video is subjected to dynamic buffering in buffer area during uninterrupted record screen, due to buffer area can only cache it is pre-The long video of timing, the video council first enrolled are covered by the video of rear admission, i.e. side admission edge contract.
In practical application scene, realize that the mode of the automatic record screen function includes but is not limited to:By taking smart mobile phone as an example,The test script of preprogramming one, the test script can actually appear a software or application program, be then installed onIn the operating system of smart mobile phone, thus the setting interface of smart mobile phone can increase " automatic record screen " option, and user passes through slipSliding block is turned on and off the option, you can corresponding to be turned on and off the function.After the function is opened, smart mobile phone can ejectOne page of one dialog box or switching, to allow tester self-defined or set trigger event and setting by selection modeBuffer area allows the duration of buffered video.After the completion of setting, smart mobile phone can perform the record of various embodiments below automaticallyScreen method.
Below in conjunction with the accompanying drawing in the embodiment of the present invention, to the skill of each exemplary embodiment provided by the present inventionArt scheme is clearly and completely described.In the case where not conflicting, following each embodiments and its technical characteristic can be mutualCombination.
Fig. 1 is the schematic flow sheet of the record screen method first embodiment of terminal operating process of the present invention.Referring to Fig. 1, thisThe record screen method of embodiment includes step S11~S14.
S11:A buffer area is opened up, the buffer area allows the video for caching scheduled duration.
The buffer area is used to cache the video that record screen obtains, and in this, opens up buffer area and that perform record screen is same masterBody, it is terminal or external equipment.It is a kind of permanent or permanent different from the memory block of terminal or external equipment (hardware store)Memory space, the buffer area of the present embodiment is a kind of spatial cache, and for example, the spatial cache can be that memory block is opened temporarilyWard off, it can be automatically left out after automatic record screen function is closed, and now memory block is still present.
The present embodiment allows user to carry out self-defined setting to the capacity of buffer area, i.e. user can freely set caching and regardThe scheduled duration of frequency.Specifically, virtual key is shown in the display page of the setting interface of main body or execution record screen, usedThe virtual key is clicked at family, and executive agent switches another picture so that user is set, and executive agent is not still in this processInterruption record screen.
S12:Perform uninterrupted record screen to terminal in the running of terminal, and based on first in first out and last-in, last-outStack mechanism is by the video cache of admission to buffer area.
The Stack mechanism of so-called first in first out and last-in, last-out is substantially exactly a kind of dynamic video of side admission edge contractBuffer technology.So that buffer area allows the scheduled duration of buffered video to be T as an example, if from moment T01Start record screen, when record is shielded extremelyMoment T02And (T02- T01During)=T, represent that buffer area is full, then in moment T02The video council enrolled afterwards is to from moment T01The video for starting admission is covered, in moment T02A length of T during the video enrolled afterwardsx, it is capped (deleted)For from moment T01To moment (T01+Tx) this duration video.
S13:When monitoring that preset trigger event occurs in the running of terminal, the trigger event is recordedThe generation moment.
For different types of trigger event, the monitoring mode of the present embodiment is different.For example, for APP(Application, application program), which dodges, moves back this trigger event, and executive agent can be with video monitoring to judge current display interfaceWhether belong to APP runnable interface, if current display interface belongs to APP runnable interface, judge trigger event does not occur, ifCurrent display interface is not belonging to APP runnable interface, then judges trigger event occurs, and records it and the moment occurs.And for surveyingThis trigger event of this operation exception of training, executive agent can be examined by background system ccf layer (System Framework)The operation conditions of test script is surveyed, when there is Bug (leak), executive agent judges trigger event occurs, and system framework layer is certainlyIt is dynamic to record its generation moment.
S14:Continue to perform terminal uninterrupted record screen, obtain before the moment occurs the first scheduled duration to occur the moment itThe video of second scheduled duration afterwards, and preserve to the memory block beyond buffer area, wherein the first scheduled duration and the second pre- timingLong sum is less than or equal to the scheduled duration.
After trigger event generation, executive agent continues to perform the running of terminal uninterrupted record screen, but now instituteThe screen duration of admission must can not cover video duration nearest before the moment occurs for trigger event.Allow to cache with buffer areaThe scheduled duration of video is T, the generation moment of trigger event is T1Exemplified by, moment T is occurring1Afterwards, record screen is continued to the momentT12, now the second scheduled duration is (T12- T1), moment T occurs if chosen1Before to moment T11, now the first scheduled durationFor (T1- T11), then the first scheduled duration (T1- T11) and the second scheduled duration be (T12- T1) sum (T12- T11) must be smallIn or equal to scheduled duration be T.
In the present embodiment, the first scheduled duration and the second scheduled duration can be with equal, can also be unequal, and equalWhen both be the scheduled duration half, such as (T1- T11)=(T12- T1When)=T/2, now buffered video startingCarve as (T1- T/2, T1+T/2)。
The present embodiment can preserve the video that buffer area caches to the memory block of executive agent, or be uploaded to high in the clouds.And after tester closes automatic record screen function, executive agent can remove all video counts of caching in buffer area automaticallyAccording to, while the buffer area can also be deleted.
From the foregoing, executive agent carries out record screen to the period before and after the trigger event generation moment, what is obtained is recordFront and rear complete video occurs for trigger event, and in this, the present embodiment can embody the integrality of trigger records, be advantageous to touchThe reproduction of hair event.Also, the present embodiment is only cached and preserved the video related to trigger event generation, energy based on caching technologyThe waste of memory space is enough avoided, is reduced to hardware store requirement.In addition, the present embodiment performs record screen automatically based on programmed scriptsAnd the moment occurs for record, manually operated caused synchronous error problem can be avoided.
The present embodiment goes for the automatic test of product development stage, and specifically, when terminal produces Bug, this is touchedDuring hair event, the operation note video of each one section of duration before and after Bug occurs is extracted from buffering area, and is stored, testerOr application developer can carry out the quick confirmation of problem by watching video, so as to be advantageous to repair lacking for tested programSunken or leak.
Certainly, the present embodiment is readily applicable to other application scene.For example, for the remote diagnosis of terminal problem, whenUser passes through record when occurring flower screen during using terminal, picture show that incomplete, APP sudden strains of a muscle such as move back at any trigger eventVideo help engineer carry out problem quick analysis with solve, also can be used as current problem complaint voucher.It is for another example rightIn this kind of trigger event of the feature operation of the applications such as wechat, by its operating process of video record, and it is supplied to far away from familyOld man and child grasp in order to which it is directly perceived, so as to be advantageously implemented remote teaching.In another example disappear for power consumption exception, noticeBreath frequently lights the application such as screen and monitors this kind of trigger event, can be favourable by the faster process of videograph power consumption and operationIn power supply management.
The privacy information of user can be shown in the process of running in view of terminal, in order to avoid the video council that record screen obtains is let outReveal the privacy information, the present invention also provides the record screen method shown in Fig. 2.As shown in Fig. 2 the record screen method of the present embodiment includes stepRapid S21~S24.
S21:A buffer area is opened up, the buffer area allows the video for caching scheduled duration.
S22:Perform uninterrupted record screen to terminal in the running of terminal, and based on first in first out and last-in, last-outStack mechanism by the video cache of admission to buffer area, wherein, detect predetermined information on a terminal screen during record is shieldedViewing area, and the viewing area where predetermined information is blocked.
S23:When monitoring that preset trigger event occurs in the running of terminal, the trigger event is recordedThe generation moment.
S24:Continue to perform terminal uninterrupted record screen, obtain before the moment occurs the first scheduled duration to occur the moment itThe video of second scheduled duration afterwards, and preserve to the memory block beyond buffer area, wherein the first scheduled duration and the second pre- timingLong sum is less than or equal to the scheduled duration, and the viewing area of predetermined information on a terminal screen is detected during record is shieldedDomain, and the viewing area where predetermined information is blocked.
On the basis of the description of previous embodiment, but it is different from, the present embodiment is during uninterrupted record screenViewing area where being related to privacy, such as the predetermined information such as bank account information, associated person information is blocked, makes it notAppear in the video finally recorded, can either ensure that privacy of user is not compromised, also do not interfere with video in each applicationUse in scene.
Certainly, the present embodiment can also be after video is extracted from buffer area and before preservation to memory block, by userThe viewing area where being related to the predetermined information of privacy is blocked manually, such as adds mosaic, ensures that user is hidden with thisIt is private not compromised.
Fig. 3 is the schematic flow sheet of the record screen method 3rd embodiment of terminal operating process of the present invention.Referring to Fig. 3, thisThe record screen method of embodiment includes step S31~S34.
S31:A buffer area is opened up, the buffer area allows the video for caching scheduled duration.
S32:Perform uninterrupted record screen to terminal in the running of terminal, and based on first in first out and last-in, last-outStack mechanism is by the video cache of admission to buffer area.
S33:When monitoring that preset trigger event occurs in the running of terminal, the trigger event is recordedThe generation moment, and obtain trigger event and the frame picture at moment is occurring.
S24:Continue to perform terminal uninterrupted record screen, obtain before the moment occurs the first scheduled duration to occur the moment itThe video of second scheduled duration afterwards, and preserve to the memory block beyond buffer area, and using the frame picture as the generation momentBefore the first scheduled duration to occur the moment after the second scheduled duration video preview front cover, wherein the first scheduled duration withSecond scheduled duration sum is less than or equal to the scheduled duration.
On the basis of the description of foregoing embodiment illustrated in fig. 1, but it is different from, it is more for being preserved in memory blockThe actual scene of individual video, the present embodiment obtain trigger event and the frame picture at moment are occurring and is being sealed as video previewFace so that related personnel can quickly determine the video corresponding to a certain certain trigger events by frame picture, be easy to search.
Fig. 4 is the structural representation of the terminal of one embodiment of the invention.As shown in figure 4, the terminal 40 of the present embodiment includesProcessor 41 and the memory 42 being connected with the processor 41, memory 42 can pass through communication bus 43 and processor 41Connection.
Memory 42 is used for the buffer area for opening up the video for allowing to store scheduled duration.
Processor 41 is used for the record screen thread for calling terminal 40 and terminal 40 is performed not in the running of terminal 40Interruption record screen, and the Stack mechanism based on first in first out and last-in, last-out open up the video cache of admission to memory 42Buffer area.
Processor 41 is additionally operable to whether monitoring occurs preset trigger event in the running of terminal 40, and is sending outThe generation moment of trigger event is recorded during raw trigger event, and further obtains the first scheduled duration before the moment occurs and extremely occursThe video of second scheduled duration after moment, wherein the first scheduled duration and the second scheduled duration sum be less than or equal to it is described pre-Timing is long., can also be unequal in addition, the duration of the first scheduled duration and the second scheduled duration can be with equal, and when equalBoth are the half of the scheduled duration.
Memory 42 is additionally operable to the second scheduled duration after the first scheduled duration before the generation moment to generation momentVideo is preserved to the memory block beyond the buffer area.
The said structure element of the terminal 40 of the present embodiment correspondingly performs the automatic record screen method of above-described embodiment, have withIts identical technique effect.
Fig. 5 is the structural representation of the external equipment of one embodiment of the invention.As shown in figure 5, external equipment 50 includes placeReason device 51 and the memory 52 and camera 53 being connected with processor 51, memory 52 and camera 53 can pass through communicationBus 54 is connected with processor 51.
Memory 52 is used for the buffer area for opening up the video for allowing to store scheduled duration.
Camera 53 is used in the running of terminal perform terminal uninterrupted record screen.
Memory 52 is additionally operable to the Stack mechanism based on first in first out and last-in, last-out and delays the video that camera 53 is enrolledDeposit to the buffer area.
Processor 51 is used to monitor preset trigger event whether to occur in the running of terminal, and institute is occurringThe generation moment of trigger event is recorded when stating trigger event, and controls camera 53 to obtain the first scheduled duration before the moment occursThe video of second scheduled duration after to the generation moment, wherein the first scheduled duration is less than or equal to the second scheduled duration sumScheduled duration.In addition, the duration of the first scheduled duration and the second scheduled duration can be with equal, can also be unequal, and equalWhen both be the scheduled duration half.
Memory 52 is additionally operable to the second scheduled duration after the first scheduled duration before the generation moment to generation momentVideo preserves the memory block to beyond buffer area.
Further, the external equipment 50 of the present embodiment is also provided with transceiver 55, and the transceiver 55 can pass throughCommunication bus 54 is connected with processor 51.The transceiver 55 is used to make a reservation for before generation moment that memory 52 preserves firstThe video of the second scheduled duration is sent to terminal after duration to the generation moment.
The said structure element of the external equipment 50 of the present embodiment correspondingly performs the automatic record screen method of above-described embodiment, toolThere is same technique effect.
It should be understood that can be combined with each other between above-mentioned each embodiment, and if above-mentioned function with the shape of software functionFormula is realized and is used as stand-alone product to sell or taken in use, being storable in an electronic device-readable in storage medium, i.e. this hairBright also to provide a kind of storage device for the data that have program stored therein, described program data can be performed to realize above-mentioned each implementationThe method of example, the storage device can be such as USB flash disk, CD, server.That is, each embodiment of the present invention can be withEmbodied in the form of software product, it includes some instructions to cause an intelligent terminal to perform described in each embodimentThe all or part of step of method.
Embodiments of the invention are the foregoing is only, are not intended to limit the scope of the invention, it is every to utilize this hairThe equivalent structure or equivalent flow conversion that bright specification and accompanying drawing content are made, for example, between each embodiment technical characteristic it is mutualWith reference to, or other related technical areas are directly or indirectly used in, it is included within the scope of the present invention.