Detailed description of the invention
It is more fully described the exemplary embodiment of the disclosure below with reference to accompanying drawings.Although it is aobvious in accompanying drawing
Show the exemplary embodiment of the disclosure, it being understood, however, that may be realized in various forms the disclosure
And should not limited by embodiments set forth here.On the contrary, it is provided that these embodiments are able to more
Thoroughly understand the disclosure, and can be by the technology conveying to this area complete for the scope of the present disclosure
Personnel.
Embodiments provide a kind of key Mus script processing method, as it is shown in figure 1, the method bag
Include:
101, according to the sequencing recorded, the event in key Mus script is detected successively, it is judged that be
No there is the event that at least three is continuous and identical.
Key Mus script is will to repeat playback for computer in the operation note of keyboard and mouse to script,
Realize a kind of script file that same operation performs automatically.In the present embodiment, key Mus script is with thing
The form journal user of part to keyboard or the operation each time of mouse, and record adjacent events it
Between time interval, constituting a storage has the aggregation of event and time interval.Wherein, key Mus foot
Event in Ben is the operation of each keyboard or mouse to be decomposed, it is thus achieved that can not decompose again
Operation.Such as, for the operation of a keypad key, this operation can be resolved into one and press this
The event of key and the combination operation of an event decontroling this key.Equally, for the movement of a mouse,
Just can resolve into what the coordinate points that multiple light is marked on this shiftable haulage line moved to adjacent coordinates point
Event.Meanwhile, between each two adjacent events, in script, also record has a time interval, in order to
The time difference that record the two adjacent events triggers.
In key Mus script, the detection to event refers to the event detected is carried out Classification and Identification, and
The type of mouse and keyboard operation is specifically divided, event and the keyboard of mouse action can be divided into
The event of operation.Wherein, the event of mouse action includes again event that mouse moves and click
Event, the event of click can also be subdivided into the event of left mouse button click, click by mouse right button
Event and mouse roller roll event etc.;The event of keyboard operation includes the thing that button is pressed
The event that part and button are decontroled, it is also possible to be further subdivided into event of pressing and the relieving thing of different key
Part.
In the present embodiment, the event type of event in detection key Mus script successively, and judge whether to deposit
In the event that at least three is continuous and identical, concrete mode can be first thing in detection key Mus script
The event type of part, records the event type of this event and to define this event is event 1, detect second
The event type of event, compares with the event type of first event, if the same defines this event
For event 2, and detect the event type of the 3rd event;If difference, record the event class of this event
Type replaces the event type of first event and to define second event be event 1, then detects the 3rd thing
The event type of part.By that analogy, continuous and identical event number is more than or equal to the event of three
Set carries out extracting or labelling.
If 102 exist the event that described at least three is continuous and identical, it is determined that described at least three is even
Continuous and the identical initiation event in event and the event of termination.
In the event sets of said extracted or labelling, by event sets first event detected,
Event 1 will be defined as initiation event, be defined as last event in this event sets terminating
Event.
103, the intermediate event in the event that described at least three is continuous and identical is deleted, it is thus achieved that after process
Key Mus script, wherein, described intermediate event is to remove in the event that described at least three is continuous and identical
Other events outside described initiation event and described termination event.
After determining initiation event and termination event, other event in event sets is referred to as centre
Event, owing to event sets is combined by least three continuous events, therefore, removes initial
Outside event and termination event, the most at least an event is intermediate event.
By these, the intermediate event of at least one is deleted, the new key Mus script obtained, owing to reducing
Intermediate event, thus total memory space that new key Mus script is compared with original key Mus script is subtracted
Little.It should be noted that the simply intermediate event deleted, and in event sets between adjacent events time
Between be spaced and do not delete.
New key Mus script after processing for acquisition, while reducing memory space, it is ensured that
The operating result as original key Mus script can be reached in use.Because normal keyboard,
In mouse action, if the multiple continuous appearance of same event, from final execution result
See the exercising result being an event within a period of time, therefore, key Mus script is being carried out at simplification
During reason, this situation just can only be retained first event and last event, i.e. initiation event
With the event of termination, retain the time interval in the middle of the two event, it is possible to reach clear key Mus simultaneously
The effect of operating result.
Key Mus script processing method in the embodiment of the present invention, by carrying out the event in key Mus script
Detection, processes continuous and identical event sets, only retain initiation event in this set and
Termination event, deletes intermediate event, obtains new key Mus script, and this key Mus script is maintaining former key
Outside the function of Mus script, also reach to reduce the purpose of key Mus script memory capacity, thus easily facilitated
This key Mus script carries out propagating on network to be shared.
Additionally, be directed in online game the key Mus script used, in order to further compress this key
The memory space of Mus script, the embodiment of the present invention additionally provides a kind of key Mus script processing method, such as Fig. 2
Shown in, the method includes:
201, according to the sequencing recorded, the event in key Mus script is detected successively, it is judged that be
No there is the event that at least three is continuous and identical.
In the present embodiment, the event type of event is carried out concrete division, include mouse and move
Event, each button of mouse press event, each button of mouse decontrol event, each button of keyboard by
Under event.Combination by above-mentioned event can form the operation of existing mouse and keyboard, such as,
The left button of mouse clicks on the operation dragged, it is possible to regards the event that left mouse button is pressed as, adds mouse
The event of movement, then add the combination of the event that left mouse button is decontroled;The button " A " of keyboard and " B "
Press the operation of relieving, it is also possible to regard the event that button " A " presses as and add button " B " and press simultaneously
Under event, then decontrol the combination of the event of button " A " after adding the event that button " B " is decontroled again.
In the operation of real network game, most commonly seen mouse action is the movement of mouse, and key
The operation of dish be singly-bound length by with repeat click on.The movement of mouse is the set of mouse moving event,
The length of keyboard singly-bound presses the set of the event of pressing being this key multiple, and the repeating of keyboard singly-bound is clicked on permissible
It is by event of pressing and the combination of the event of relieving organizing this key more.Keyboard singly-bound is repeated to click on,
May be considered a kind of repetition of game player and unnecessary operation, for this operation, record
In script, really work is all to click on for the first time or click on for the last time.Therefore, judging
When whether there is the continuous and identical event of at least three, except determining whether continuous and identical Mus
Outside the event that the event of mark movement or button are pressed, it is also possible to determine whether continuously and event type
Corresponding identical composition of matter.Wherein, composition of matter can be that singly-bound presses event and the event of relieving
Combination, it is also possible to be multiple key combination combination of pressing and decontroling event.
If 202 exist the event that at least three is continuous and identical, it is determined that described at least three continuously and
The identical initiation event in event and the event of termination.
This step difference from step 102 is, continuous and identical event also includes institute in 201
The composition of matter mentioned, the initiation event determined or termination event are also composition of matter.
203, the intermediate event in the event that at least three is continuous and identical is deleted, it is thus achieved that the key after process
Mus script, wherein, described intermediate event is except described in the event that described at least three is continuous and identical
Other events outside initiation event and described termination event.
Deletion intermediate event, in addition to single event, also includes composition of matter.Institute in relative to 103
The new key Mus script obtained, the key Mus script of the present embodiment further eliminates unnecessary event group
Close, thus decrease the memory space shared by key Mus script.
Further, after event in deleting key Mus script or composition of matter, former adjacent events
Between time interval yet suffer from, for the record of time interval, due in script file when one
Between be spaced shared memory space and be not dependent on the duration of record time, i.e. a time interval
Memory space is fixing.Therefore, the quantity of time interval the most just determines shared by time interval
Amount of storage.For reason given above, the present embodiment can proceed detection to the new key Mus script obtained,
Search continuous recording time interval in this key Mus script, and calculate the duration of each time interval,
Continuous print time interval is merged into a time interval, it is ensured that the time interval after merging time a length of
The duration sum of each continuous time interval before merging.Key Mus is reduced by the quantity reducing time interval
The memory space of script.
Further, as the another kind of implementation of the present embodiment, two adjacent events can be read
Between time interval, it is judged that whether the duration of this time interval more than the duration threshold value preset, if greatly
In then deleting this time interval.In actual online game, player typically will not leave for a long time
Game, especially when making the key Mus script of game, if two phases of record in key Mus script
The duration of the time interval between adjacent event is long, in a period of time between the two event is described, and key
Dish and mouse did not had other any operations, and this belongs to improper time interval in the operation of game,
Such as, leaving in the middle of player, computer is in operatorless state, or mouse, keyboard occur
Fault, program card is waited indefinitely reason.For this improper time interval, can be deleted, this
Sample does the memory space i.e. reducing key Mus script, it is often more important that can avoid using the use of this script
Family carries out meaningless waiting.The duration that it is pointed out that this threshold value is an empirical value, according to tool
This threshold value can be adjusted arranging by the needs of body.The duration of this threshold value is not limited by the present embodiment.
Further, it is also possible to above-mentioned intermediate event is carried out deletion action on the basis of, employing accounts for
Event in key Mus script is replaced by the event identifier less with space.In key Mus script, one
Individual event is recorded the information being described this event, and such as, the event that mouse moves needs record to have shifting
Moving axes information, window coordinate information etc., the event that button is pressed needs record to have the letter of concrete button
Breath etc..And the memory space required for recording the event that these bands are described information is greater than record one
Space needed for individual mark.So, before key Mus script is processed, one can be pre-set
Event identifier mapping table, it is stipulated that event and the corresponding relation of mark, then to the event in key Mus script
Detect, search to should the mark of event, replace the description information of event with this mark, so,
Just can reduce the memory space of event in key Mus script, compress the capacity of whole key Mus script further.
In actual applications, described event identifier mapping table can be arranged on key Mus script record, process with
And and the software of playback in, shortest key Mus script recording, process and replayed section have unified right
Answer standard.Also, it should be noted the process replacing event description information can be thing in the middle of deleting
Carry out before part, it is also possible to performing after deleting interlude, the present embodiment is without limitation again.
204, the key Mus script after described process is carried out data compression.
The process of above-mentioned steps, is that the content to key Mus script is deleted, is not affecting use result
On the premise of, carry out the compression of content, reduce the memory space of this key Mus script.After acquisition processes
Key Mus script file after, it is also possible to this key Mus script is carried out data compression, wherein, conventional
The compressed softwares such as WinRAR, ZIP can carry out data compression to key Mus script, obtains a storage
The key Mus script file of the compressed format that space is less.
Further, as the realization to said method, embodiments provide a kind of key Mus foot
Present treatment device, as it is shown on figure 3, this device includes:
Detector unit 301, for carrying out successively the event in key Mus script according to the sequencing recorded
Detection.
Judging unit 302, for judging whether exist at least in the event that described detector unit 301 detects
Three continuous and identical events.
Determine unit 303, for judging to exist at least three continuously and phase when described judging unit 302
With event time, determine initiation event in the event that described at least three is continuous and identical and terminate thing
Part.
Delete unit 304, for deleting the middle thing in the event that described at least three is continuous and identical
Part, it is thus achieved that the key Mus script after process, wherein, described intermediate event is described to determine that unit 303 is true
In the event that fixed described at least three is continuous and identical except described initiation event and described termination event it
Other outer events.
Further, the detector unit 301 of described device is used for detecting the event type of described event,
Described event type is for characterizing the action type of key Mus operation corresponding to described event.
Further, the judging unit 302 of described device is used for judging whether that at least three is continuous
And event type is the event that mouse moves.
Further, the judging unit 302 of described device is used for judging whether that at least three is continuous
And event type is the event pressed.
Further, the judging unit 302 of described device is used for judging whether that at least three is continuous
And the corresponding identical composition of matter of event type.
Further, as shown in Figure 4, described device also includes:
First searches unit 305, for described deletion unit 304 delete described at least three continuously and
After the identical intermediate event in event, search continuous recording time interval in described key Mus script.
Combining unit 306, described continuous recording for what described first lookup unit 305 was found
Time interval merges into a time interval, and the duration of the time interval after merging respectively connects equal to before merging
The duration sum of continuous time interval.
Further, as shown in Figure 4, described device also includes:
Read unit 307, for reading the time interval between two adjacent events.
Described deletion unit 304 is additionally operable to, and deletes the duration reading unit 307 reading more than when presetting
The time interval of long threshold value.
Further, as shown in Figure 4, described device also includes:
Second searches unit 308, in default event identifier mapping table, searches corresponding described inspection
Survey the mark of the event of unit 301 detection.
Replacement unit 309, the mark found for searching unit 308 by described second replaces described thing
The description information of part, recorded in described key Mus script.
Further, as shown in Figure 4, described device also includes:
Compression unit 310, for deleting described intermediate event at described deletion unit 304, it is thus achieved that processes
After key Mus script after, the key Mus script after described process is carried out data compression.
Key Mus script processing method of the present invention and device, by the event in key Mus script
Detect, continuous and similar events event sets is processed, only retain rising in this set
Beginning event and the event of termination, delete intermediate event, obtain the new key Mus script that memory space is less, this
Outward, it is also possible to time interval between adjacent events in key Mus script is merged, suppressing exception time
Between be spaced, and event identifier synopsis is set, to identify the description information of replacement event, further
Reduce the memory space shared by key Mus script, make key Mus script in the function maintaining former key Mus script
Outward, also reached to reduce the purpose of key Mus script memory capacity, thus easily facilitated this key Mus script and exist
Carry out on network propagating and share.
In the above-described embodiments, the description to each embodiment all emphasizes particularly on different fields, and does not has in certain embodiment
The part being described in detail, may refer to the associated description of other embodiments.
It is understood that the correlated characteristic in said method and device can mutually reference.It addition,
" first ", " second " in above-described embodiment etc. are for distinguishing each embodiment, and do not represent each enforcement
The quality of example.
Those skilled in the art is it can be understood that arrive, for convenience and simplicity of description, above-mentioned
The system described, the specific works process of device and unit, it is referred in preceding method embodiment
Corresponding process, does not repeats them here.
Provided herein algorithm and display not with any certain computer, virtual system or miscellaneous equipment
Intrinsic relevant.Various general-purpose systems can also be used together with based on teaching in this.According to above
Describe, construct the structure required by this kind of system and be apparent from.Additionally, the present invention is also not for
Any certain programmed language.It is understood that, it is possible to use various programming languages realize described here
The content of invention, and the description above done language-specific is to disclose the optimal real of the present invention
Execute mode.
In description mentioned herein, illustrate a large amount of detail.It is to be appreciated, however, that
Embodiments of the invention can be put into practice in the case of not having these details.In some instances,
It is not shown specifically known method, structure and technology, in order to do not obscure the understanding of this description.
Similarly, it will be appreciated that in order to simplify the disclosure and help to understand in each inventive aspect
Individual or multiple, above in the description of the exemplary embodiment of the present invention, each feature of the present invention
Sometimes it is grouped together in single embodiment, figure or descriptions thereof.But, should be by
The method of the disclosure is construed to reflect an intention that i.e. the present invention for required protection requires that ratio is each
The more feature of feature being expressly recited in claim.More precisely, as following right is wanted
As asking book to be reflected, inventive aspect is all features less than single embodiment disclosed above.
Therefore, it then follows claims of detailed description of the invention are thus expressly incorporated in this detailed description of the invention,
The most each claim itself is as the independent embodiment of the present invention.
Those skilled in the art are appreciated that and can carry out the module in the equipment in embodiment
Adaptively change and they are arranged in one or more equipment different from this embodiment.
Module in embodiment or unit or assembly can be combined into a module or unit or assembly, and
In addition multiple submodule or subelement or sub-component can be put them into.Except such feature and/or
Outside at least some in process or unit excludes each other, any combination can be used this explanation
All features disclosed in book (including adjoint claim, summary and accompanying drawing) and the openest
Any method or all processes of equipment or unit be combined.Unless expressly stated otherwise, originally
Each feature disclosed in description (including adjoint claim, summary and accompanying drawing) can be by carrying
Alternative features for identical, equivalent or similar purpose replaces.
Although additionally, it will be appreciated by those of skill in the art that embodiments more described herein include
Some feature included in other embodiments rather than further feature, but the feature of different embodiment
Combination mean to be within the scope of the present invention and formed different embodiments.Such as, under
In the claims in face, embodiment required for protection one of arbitrarily can be in any combination
Mode uses.
The all parts embodiment of the present invention can realize with hardware, or with at one or more
The software module run on reason device realizes, or realizes with combinations thereof.Those skilled in the art
Should be appreciated that and microprocessor or digital signal processor (DSP) can be used in practice to realize
Some in denomination of invention (as determined the device of website internal chaining grade) according to embodiments of the present invention
Or all some or all functions of parts.The present invention is also implemented as performing institute here
Part or all the equipment of method described or device program (such as, computer program and
Computer program).The program of such present invention of realization can be stored in computer-readable medium
On, or can be to have the form of one or more signal.Such signal can be from the Internet net
Upper download of standing obtains, or provides on carrier signal, or provides with any other form.
The present invention will be described rather than limits the present invention to it should be noted above-described embodiment
Make, and those skilled in the art can design without departing from the scope of the appended claims
Alternative embodiment.In the claims, any reference marks that should not will be located between bracket is configured to
Limitations on claims.Word " comprises " and does not excludes the presence of the element or step not arranged in the claims
Suddenly.Word "a" or "an" before being positioned at element does not excludes the presence of multiple such element.The present invention
And can come real by means of properly programmed computer by means of including the hardware of some different elements
Existing.If in the unit claim listing equipment for drying, several in these devices can be logical
Cross same hardware branch specifically to embody.Word first, second and third use do not indicate that
Any order.Can be title by these word explanations.
The invention also discloses following scheme:
A1, a kind of key Mus script processing method, described method includes:
According to the sequencing recorded, the event in key Mus script is detected successively, it may be judged whether deposit
In the event that at least three is continuous and identical;
If there is the event that described at least three is continuous and identical, it is determined that described at least three continuously and
The identical initiation event in event and the event of termination;
Delete the intermediate event in the event that described at least three is continuous and identical, it is thus achieved that the key after process
Mus script, wherein, described intermediate event is except described in the event that described at least three is continuous and identical
Other events outside initiation event and described termination event.
A2, according to the method described in A1, described according to the sequencing recorded in key Mus script
Event detects successively, including:
Detecting the event type of described event, described event type is for characterizing the key that described event is corresponding
The action type of Mus operation.
A3, according to the method described in A2, described in judge whether that at least three is continuous and identical
Event, including:
Judge whether that continuously and event type is the event that mouse moves at least three.
A4, according to the method described in A2, described in judge whether that at least three is continuous and identical
Event, including:
Judge whether that continuously and event type is the event pressed at least three.
A5, according to the method described in A2, described in judge whether that at least three is continuous and identical
Event, including:
Judge whether that at least three is continuous and the corresponding identical composition of matter of event type.
A6, according to the method described in A1, in the thing that the described at least three of described deletion is continuous and identical
After intermediate event in part, described method also includes:
Search continuous recording time interval in described key Mus script;
Described continuous recording time interval is merged into a time interval, the time interval after merging
Duration equal to the duration sum of each continuous time interval before merging.
A7, according to the method described in A1, described method also includes:
Read the time interval between two adjacent events;
Delete the duration time interval more than preset duration threshold value.
A8, according to the method described in A1, described method also includes:
In default event identifier mapping table, search the mark of corresponding described event;
The mark found is replaced the description information of described event, recorded in described key Mus script.
A9, according to the method described in A1, after the key Mus script after described acquisition processes, described side
Method also includes:
Key Mus script after described process is carried out data compression.
B10, a kind of key Mus script processing means, described device includes:
Detector unit, for examining successively the event in key Mus script according to the sequencing recorded
Survey;
Judging unit, for judging whether there is at least three in the event that described detector unit detects even
Continuous and identical event;
Determine unit, for judging to there is the thing that at least three is continuous and identical when described judging unit
During part, determine the initiation event in the event that described at least three is continuous and identical and termination event;
Delete unit, for deleting the intermediate event in the event that described at least three is continuous and identical,
Acquisition process after key Mus script, wherein, described intermediate event is that described to determine that unit determines described
Other in addition to described initiation event and described termination event in the event that at least three is continuous and identical
Event.
B11, according to the device described in B10, described detector unit is for detecting the event class of described event
Type, described event type is for characterizing the action type of key Mus operation corresponding to described event.
B12, according to the device described in B11, described judging unit is used for judging whether at least three
Continuous and event type is the event that mouse moves.
B13, according to the device described in B11, described judging unit is used for judging whether at least three
Continuous and event type is the event pressed.
B14, according to the device described in B11, described judging unit is used for judging whether at least three
The corresponding identical composition of matter of continuous and event type.
B15, according to the device described in B10, described device also includes:
First searches unit, for continuous and identical at least three described in described deletion element deletion
After intermediate event in event, search continuous recording time interval in described key Mus script;
Combining unit, for searching described first between the described continuous recording time that unit finds
Every merging into a time interval, the duration of the time interval after merging is equal to each continuous time before merging
The duration sum at interval.
B16, according to the device described in B10, described device also includes:
Read unit, for reading the time interval between two adjacent events;
Described deletion unit is additionally operable to, and deletes the duration of described reading unit reading more than preset duration threshold
The time interval of value.
B17, according to the device described in B10, described device also includes:
Second searches unit, in default event identifier mapping table, searches corresponding described event
Mark;
Replacement unit, the mark found for searching unit by described second replaces retouching of described event
State information, recorded in described key Mus script.
B18, according to the device described in B10, described device also includes:
Compression unit, at intermediate event described in described deletion element deletion, it is thus achieved that the key after process
After Mus script, the key Mus script after described process is carried out data compression.