Summary of the invention
For the defect of prior art existence, the invention provides a kind of interpolation storage means, system and back method of screen picture, in order to address the above problem.
The technical solution used in the present invention is as follows:
The interpolation storage means that the invention provides a kind of screen picture, comprises the following steps:
S1, arranges initial parameter value, and described initial parameter value comprises frame number m and overall frame number z in group totalframes L, group sequence number n, group; Wherein, L, n, m and z are natural number;
Establishment associated data table, described associated data table is for frame number, overall frame number, picture frame attribute information in association store picture frame group sequence number, group and organize the corresponding relation of interior picture frame in the memory location of document flow;
S2, initialization, makes n=1, m=1, z=1;
S3, in the time meeting the trigger condition that screen obtains, obtains current full-screen image frame, and deposits described full-screen image frame in document flow n and organize m frame position, and in the group of described full-screen image frame, frame number is that m, overall frame number are z;
S4, judges whether m equals L, if equaled, makes n=n+1, z=z+1, and m is initialized as 1, then returns and carries out S3;
If be not equal to, make m=m+1, z=z+1; Then carry out S5;
S5, in the time meeting the trigger condition that screen obtains, obtain the variation diagram picture frame of current full-screen image frame compared with last picture frame, and the n that described variation diagram picture frame is deposited in document flow organizes m frame position; The overall frame number of described variation diagram picture frame is z; Obtain the positional information of described variation diagram picture frame on screen, this positional information, as the attribute information of described variation diagram picture frame, stores the corresponding relation of this attribute information and overall frame number z, the interior frame number m of group and group sequence number n into described associated data table simultaneously; Judge whether to reach the end condition that screen picture obtains, if reached, process ends; If do not reached, return to S4.
Preferably, group totalframes L value is 10~100.
Preferably, L value is 50.
Preferably, described variation diagram picture frame is h limit shape, and h is natural number, and, h >=3.
Preferably, in S5, the positional information of described variation diagram picture frame on screen is: the coordinate information of Xing Ge summit, h limit on screen.
Preferably, in S3, operation behavior occurs as the trigger condition that screen picture obtains; Or time predefined interval meets the trigger condition that screen picture obtains in the time reaching interval time.
The present invention also provides a kind of interpolation storage system of screen picture, comprising:
Initial parameter value arranges module, and for initial parameter value is set, described initial parameter value comprises frame number m and overall frame number z in group totalframes L, group sequence number n, group; Wherein, L, n, m and z are natural number;
Associated data table memory module, for the corresponding relation of frame number, overall frame number and picture frame attribute information in association store picture frame group sequence number, group;
Trigger condition detection module, for detection of whether occurring the trigger condition that screen obtains;
Numeration module, for recording frame number m and overall frame number z in group sequence number n, group; When initialization, n=1, m=1, z=1; And in the time that m is increased to group totalframes L, m counts again since 1;
Full-screen image frame acquisition module, for in the time receiving the testing result of described trigger condition detection module, group sequence number n, the interior frame number m of group and the overall frame number z that record based on described numeration module, in the time of m=1, obtain current full-screen image frame, and deposit described full-screen image frame in document flow n and organize m frame position;
Variation diagram picture frame acquisition module, for in the time receiving the testing result of described trigger condition detection module, group sequence number n, the interior frame number m of group and the overall frame number z that record based on described numeration module, in the time of 1 < m < L, obtain the variation diagram picture frame of current full-screen image frame compared with last picture frame, and the n that described variation diagram picture frame is deposited in document flow organizes m frame position; Obtain the positional information of described variation diagram picture frame on screen simultaneously, store the corresponding relation of this attribute information and overall frame number z, the interior frame number m of group and group sequence number n into described associated data table;
Associated data table, the corresponding relation for association store picture frame group sequence number, the interior frame number of group, overall frame number, picture frame attribute information and the interior picture frame of group in the memory location of document flow.
The present invention also provides a kind of back method of screen picture, comprises the following steps:
Step 1, in the time that the specify image frame that need to be x from overall frame number starts in order view screen image, with x, divided by group totalframes L, the integer-bit numeral of establishing acquired results is a, decimal place numeral is b; A is the designated groups sequence number at specify image frame place;
Step 2, the designated groups sequence number a calculating based on step 1 searches associated data table, obtains the memory location of designated groups in document flow;
Step 3, the memory location obtaining based on step 2 directly navigates to designated groups in document flow; If b=1, directly reads and play the full-screen image frame of designated groups, then, constantly read in order the picture frame being positioned at after this full-screen image frame; If picture frame is variation diagram picture frame, the positional information on screen according to the variation diagram picture frame of storing in associated data table, is updated to variation diagram picture frame the correspondence position of screen in order; If picture frame is full-screen image frame, directly output on screen, start view screen image in order thereby realize the specify image frame that is x from overall frame number;
If b ≠ 1, the full-screen image frame of designated groups is outputed to screen buffer, and constantly read the variation diagram picture frame being positioned at after this full-screen image frame, and according to the variation diagram picture frame of storing in associated data table the positional information on full-screen image frame, variation diagram picture frame is updated in order to the correspondence position of full-screen image frame, until when b is opened to variation diagram picture frame and is updated to screen buffer, i.e. reduction obtains target image; Then the full-screen image frame after upgrading is shown on screen, then, constantly reads in order the picture frame after the full-screen image frame being positioned at after this renewal; If picture frame is variation diagram picture frame, the positional information on screen according to the variation diagram picture frame of storing in associated data table, is updated to variation diagram picture frame the correspondence position of screen in order; If picture frame is full-screen image frame, directly output on screen, start view screen image in order thereby realize the specify image frame that is x from overall frame number.
Interpolation storage means, system and the back method of screen picture provided by the invention, have the following advantages:
(1) because screen map picture frame is by group storage, in each group, only store a full-screen image frame, other are variation diagram picture frame, because variation diagram picture frame occupies memory space much smaller than full-screen image frame, therefore, compared with all adopting full-screen image storage mode with all images in prior art, the effectively less on the whole situation that takies of memory space;
(2) in addition, the interpolation storage mode that the present invention adopts, owing to all there is a full-screen image frame in each group, therefore, can also play to Subgraph picture frame by quick indexing, has advantages of that picture frame locating speed is fast, improves user's playback experience;
(3) also to have advantages of that CPU and memory source use less in the present invention.
Embodiment
Below in conjunction with accompanying drawing, the present invention is described in detail:
As shown in Figure 1, the invention provides a kind of interpolation storage means of screen picture, comprise the following steps:
S1, arranges initial parameter value, and described initial parameter value comprises frame number m and overall frame number z in group totalframes L, group sequence number n, group; Wherein, L, n, m and z are natural number; Group totalframes L is constant is determined group totalframes L size according to the size of the physical memory space and CPU situation, can be selected between 10~100, is preferably 50.In group sequence number n, group, frame number m and overall frame number z are variable;
Establishment associated data table, described associated data table is for frame number, overall frame number, picture frame attribute information in association store picture frame group sequence number, group and organize the corresponding relation of interior picture frame in the memory location of document flow;
S2, initialization, makes n=1, m=1, z=1;
S3, in the time meeting the trigger condition that screen obtains, obtains current full-screen image frame, and deposits described full-screen image frame in document flow n and organize m frame position, and in the group of described full-screen image frame, frame number is that m, overall frame number are z;
In the present invention, the trigger condition that screen obtains arranges according to the actual requirements flexibly, for example, in the time that interpolation storage means provided by the invention is applied to operation behavior audit field, operation behavior is the trigger condition that screen picture obtains,, every generation once-through operation behavior is just notified and is obtained a screen picture; In the time interpolation storage means provided by the invention be applied to screen picture record field, can time predefined interval, in the time reaching interval time, meet the trigger condition that screen picture obtains.
S4, judges whether m equals L, if equaled, makes n=n+1, z=z+1, and m is initialized as 1, then returns and carries out S3;
If be not equal to, make m=m+1, z=z+1; Then carry out S5;
S5, in the time meeting the trigger condition that screen obtains, obtain the variation diagram picture frame of current full-screen image frame compared with last picture frame, and the n that described variation diagram picture frame is deposited in document flow organizes m frame position; The overall frame number of described variation diagram picture frame is z; Obtain the positional information of described variation diagram picture frame on screen, this positional information, as the attribute information of described variation diagram picture frame, stores the corresponding relation of this attribute information and overall frame number z, the interior frame number m of group and group sequence number n into described associated data table simultaneously; Judge whether to reach the end condition that screen picture obtains, if reached, process ends; If do not reached, return to S4.
For simple computation, variation diagram picture frame can be set as triangle or polygon, and the positional information of variation diagram picture frame on screen is polygon or the each summit of the triangle coordinate information on screen.
According to above-mentioned flow process, to obtain altogether 500 picture frames, L=50 is example, with reference to figure 2, is interpolation image storage organization schematic diagram, introduces a kind of concrete example:
First obtain the full-screen image frame of z=1, deposited in the 1st group of the 1st frame position;
Then obtain the variation diagram picture frame of z=2, deposited in the 1st group of the 2nd frame position;
Obtain the variation diagram picture frame of z=3, deposited in the 1st group of the 3rd frame position;
…
Obtain the variation diagram picture frame of z=50, deposited in the 1st group of the 50th frame position;
That is to say, for the 1st group of image, only having the 1st image is full-screen image frame, and other 49 images are the variation diagram picture frame with respect to last image;
Same:
Again obtain the full-screen image frame of z=51, deposited in the 2nd group of the 1st frame position;
Obtain the variation diagram picture frame of z=52, deposited in the 2nd group of the 2nd frame position;
Obtain the variation diagram picture frame of z=53, deposited in the 2nd group of the 3rd frame position;
…
Obtain the variation diagram picture frame of z=100, deposited in the 2nd group of the 50th frame position;
The rest may be inferred:
When obtaining the full-screen image frame of z=451, deposited in the 10th group of the 1st frame position;
Obtain the variation diagram picture frame of z=452, deposited in the 10th group of the 2nd frame position;
Obtain the variation diagram picture frame of z=452, deposited in the 10th group of the 3rd frame position;
…
Obtain the variation diagram picture frame of z=500, deposited in the 10th group of the 50th frame position.
As can be seen here, the interpolation storage means of screen picture provided by the invention, essence is a kind of by the method for group storing image data, the number of image frames capable of regulating of each group.And every group of image sequence is by the variation diagram picture frame composition that is positioned at the first full-screen image frame and follow-up location; Full-screen image frame is the image information of whole screen, the image-region that variation diagram picture frame is screen change; In addition, for convenience of retrieval, also set up associated record table, record each picture frame attribute information.Modified-image frame data are much larger than full-screen image number of frames thus, therefore, in the sequence of image frames that each group image forms, full-screen image frame can be understood as interpolated frame, intert between each variation diagram picture frame, can also play to Subgraph picture frame by quick indexing, have advantages of that picture frame locating speed is fast, improve user's playback experience.
The present invention also provides a kind of interpolation storage system of screen picture, comprising:
Initial parameter value arranges module, and for initial parameter value is set, described initial parameter value comprises frame number m and overall frame number z in group totalframes L, group sequence number n, group; Wherein, L, n, m and z are natural number;
Associated data table memory module, for the corresponding relation of frame number, overall frame number and picture frame attribute information in association store picture frame group sequence number, group;
Trigger condition detection module, for detection of whether occurring the trigger condition that screen obtains;
Numeration module, for recording frame number m and overall frame number z in group sequence number n, group; When initialization, n=1, m=1, z=1; And in the time that m is increased to group totalframes L, m counts again since 1;
Full-screen image frame acquisition module, for in the time receiving the testing result of described trigger condition detection module, group sequence number n, the interior frame number m of group and the overall frame number z that record based on described numeration module, in the time of m=1, obtain current full-screen image frame, and deposit described full-screen image frame in document flow n and organize m frame position;
Variation diagram picture frame acquisition module, for in the time receiving the testing result of described trigger condition detection module, group sequence number n, the interior frame number m of group and the overall frame number z that record based on described numeration module, in the time of 1 < m < L, obtain the variation diagram picture frame of current full-screen image frame compared with last picture frame, and the n that described variation diagram picture frame is deposited in document flow organizes m frame position; Obtain the positional information of described variation diagram picture frame on screen simultaneously, store the corresponding relation of this attribute information and overall frame number z, the interior frame number m of group and group sequence number n into described associated data table;
Associated data table, the corresponding relation for association store picture frame group sequence number, the interior frame number of group, overall frame number, picture frame attribute information and the interior picture frame of group in the memory location of document flow.
The interpolation storage system of screen picture provided by the invention, can be applicable to, in operation behavior auditing system, be installed on server end, for storing audit view data.
For example: in the time that client accesses the audit operation system of remote server, remote server is installed interpolation storage system, in the time that client has the valid function behavior of keyboard or mouse to occur, server calls interpolation storage system is carried out screen record, and the totalframes of group can be set as 50 frames.
Further, can also windows session be the storage that unit carries out an image storage sequence.Image acquisition and image storage are segmented in two programs and carry out, and a server can the multiple session storage sequences of concurrent support.As, 10 sessions of a startup of server, each session all adopts the mode of storing and obtain screen frame by group provided by the invention, is equivalent to a server and uses hardware to carry out recording of 10 screens simultaneously, can further reduce server CPU and EMS memory occupation situation.
The present invention also provides a kind of back method of screen picture, comprises the following steps:
Step 1, in the time that the specify image frame that need to be x from overall frame number starts in order view screen image, with x, divided by group totalframes L, the integer-bit numeral of establishing acquired results is a, decimal place numeral is b; A is the designated groups sequence number at specify image frame place;
Step 2, the designated groups sequence number a calculating based on step 1 searches associated data table, obtains the memory location of designated groups in document flow;
Step 3, the memory location obtaining based on step 2 directly navigates to designated groups in document flow; If b=1, directly reads and play the full-screen image frame of designated groups, then, constantly read in order the picture frame being positioned at after this full-screen image frame; If picture frame is variation diagram picture frame, the positional information on screen according to the variation diagram picture frame of storing in associated data table, is updated to variation diagram picture frame the correspondence position of screen in order; If picture frame is full-screen image frame, directly output on screen, start view screen image in order thereby realize the specify image frame that is x from overall frame number;
If b ≠ 1, the full-screen image frame of designated groups is outputed to screen buffer, and constantly read the variation diagram picture frame being positioned at after this full-screen image frame, and according to the variation diagram picture frame of storing in associated data table the positional information on full-screen image frame, variation diagram picture frame is updated in order to the correspondence position of full-screen image frame, until when b is opened to variation diagram picture frame and is updated to screen buffer, i.e. reduction obtains target image; Then the full-screen image frame after upgrading is shown on screen, then, constantly reads in order the picture frame after the full-screen image frame being positioned at after this renewal; If picture frame is variation diagram picture frame, the positional information on screen according to the variation diagram picture frame of storing in associated data table, is updated to variation diagram picture frame the correspondence position of screen in order; If picture frame is full-screen image frame, directly output on screen, start view screen image in order thereby realize the specify image frame that is x from overall frame number.
With the 10 groups of images of storage that coexist, every group is 50 picture frames, and one to have 500 picture frames be example, establishes group sequence number and be respectively 1,2 ... 10; Introduce the back method of screen picture provided by the invention:
If need to be since the 251st picture frame playback, 251/50=5, remainder is 1, that is: a=5, b=1; Show that the 251st picture frame is at the 5th group; By searching associated data table, obtain the 5th group of memory location in document flow; Then, directly in document flow, navigate to the 5th group; Due to b=1 in this example, therefore, the 251st picture frame is full-screen image frame, can directly read and play; And then continuous reading is in order positioned at this full-screen image frame picture frame afterwards;
If need to be since the 253rd picture frame playback, 253/50=5, remainder is 3, that is: a=5, b=3; Show that the 253rd picture frame is at the 5th group; By searching associated data table, obtain the 5th group of memory location in document flow; Then, directly in document flow, navigate to the 5th group; Due to b=3 ≠ 1 in this example, therefore, the 253rd picture frame is variation diagram picture frame, need to first the full-screen image frame of the 5th group be outputed to screen buffer, then read the variation diagram picture frame that in the 5th group of group, sequence number is 2 and output to screen buffer, then continue read the variation diagram picture frame that in the 5th group of group, sequence number is 3 and output to screen buffer, obtain thus the 253rd picture frame, then data in screen buffer are outputed to screen, processing procedure is identical with b=1 afterwards, does not repeat them here.
Visible, the present invention can locate and playback target image fast, improves user's playback experience.
The above is only the preferred embodiment of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications also should be looked protection scope of the present invention.