CN117370104A - Operation record processing method and device, computer equipment and storage medium - Google Patents

Operation record processing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN117370104A
CN117370104A CN202311154256.3A CN202311154256A CN117370104A CN 117370104 A CN117370104 A CN 117370104A CN 202311154256 A CN202311154256 A CN 202311154256A CN 117370104 A CN117370104 A CN 117370104A
Authority
CN
China
Prior art keywords
difference
data
record
node
similar
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311154256.3A
Other languages
Chinese (zh)
Inventor
谭顺
谭朗明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
PAX Computer Technology Shenzhen Co Ltd
Original Assignee
PAX Computer Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by PAX Computer Technology Shenzhen Co Ltd filed Critical PAX Computer Technology Shenzhen Co Ltd
Priority to CN202311154256.3A priority Critical patent/CN117370104A/en
Publication of CN117370104A publication Critical patent/CN117370104A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • G06F11/3072Monitoring arrangements determined by the means or processing involved in reporting the monitored data where the reporting involves data filtering, e.g. pattern matching, time or event triggered, adaptive or policy-based reporting
    • G06F11/3082Monitoring arrangements determined by the means or processing involved in reporting the monitored data where the reporting involves data filtering, e.g. pattern matching, time or event triggered, adaptive or policy-based reporting the data filtering being achieved by aggregating or compressing the monitored data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3438Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment monitoring of user actions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/86Event-based monitoring
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/865Monitoring of software

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Computing Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Mathematical Physics (AREA)
  • Computer Hardware Design (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides an operation record processing method, an operation record processing device, computer equipment and a storage medium, which are applicable to the technical field of computers and comprise the following steps: executing a first operation on the first data displayed in the visual interface to obtain second data; acquiring a first difference between the first data and the second data, and storing the first difference into an operation record table as a first record node; executing a second operation on the second data to obtain third data, and acquiring a second difference between the third data and the second data; if the second difference is similar operation data of the first difference, combining the second difference and the first difference; storing the obtained target difference into an operation record table to replace the first difference as a new first record node; or if the second difference is not similar operation data of the first difference, storing the second difference into an operation record table as a second record node. And further, a great amount of nonsensical record redundant data in the drawing tool software operation record list can be avoided, and the memory consumption is reduced.

Description

Operation record processing method and device, computer equipment and storage medium
Technical Field
The application belongs to the technical field of computers, and particularly relates to an operation record processing method, an operation record processing device, computer equipment and a storage medium.
Background
Most of the current drawing tool software has a drawing operation withdrawal function, the drawing tool software records historical drawing operation instructions of a user, if the user performs drawing error operation in the drawing process by using the drawing tool software, and the user wants to return a result A of the current drawing to a drawing result B of a previous drawing operation stage, the user can withdraw the previous operation instruction in sequence by using the withdrawal instructions, so that the current drawing can be returned to the result B by the result A;
however, as each drawing operation instruction is generated by the user, the drawing tool software generates an operation record, which causes a great number of redundant operation records of the drawing tool software; that is, there may be a large number of user operation records between the withdrawal of drawing result a and drawing result B, which is detrimental to the user operation experience.
Disclosure of Invention
The embodiment of the application provides an operation record processing method, an operation record processing device, computer equipment and a storage medium, which can solve the technical problem that a great amount of data redundancy exists in the historical operation record of a graphic software tool used by a user at present.
In a first aspect, an embodiment of the present application provides an operation record processing method, which is applicable to a graphics software tool, and the method includes:
executing a first operation on the first data displayed in the visual interface to obtain second data;
acquiring a first difference between the first data and the second data, and storing the first difference into an operation record table as a first record node;
performing a second operation on the second data to obtain third data, and acquiring a second difference between the third data and the second data;
if the second difference is similar operation data of the first difference, combining the second difference and the first difference to obtain a target difference; storing the target difference into the operation record table to replace the first difference as a new first record node;
or (b)
And if the second difference is not similar operation data of the first difference, storing the second difference into the operation record table as a second record node.
In an example, the method further comprises:
recording a second time length required for executing the second operation to obtain the third data;
And if the second difference is similar operation data of the first difference, combining the second difference and the first difference, including:
and if the second duration meets a preset time condition and the second difference is similar operation data of the first difference, combining the second difference and the first difference.
In an example, if the second duration satisfies a preset time condition and the second difference is similar operation data of the first difference, merging the second difference and the first difference specifically includes:
comparing the second duration with a preset time threshold;
if the second duration is smaller than the preset time threshold, judging whether the second difference is similar operation data of the first difference or not; if the second difference is similar operation data of the first difference, combining the second difference and the first difference;
or (b)
And if the second time length is not smaller than the preset time threshold, storing the second difference into the operation record table as a second record node.
In an example, if the second duration satisfies a preset time condition and the second difference is similar operation data of the first difference, merging the second difference and the first difference includes:
Judging whether the second difference is similar operation data of the first difference or not;
if the second difference is similar operation data of the first difference, comparing the second duration with a preset time threshold; if the second duration is smaller than the preset time threshold, combining the second difference and the first difference;
or (b)
And if the second time length is not smaller than the preset time threshold, storing the second difference into the operation record table as a second record node.
In an example, the manner of determining whether the second discrepancy is similar operational data to the first discrepancy comprises:
judging whether the first data, the second data and the third data are identical in drawing components and paths of the drawing components;
and if the paths of the drawing component and the drawing component are identical, judging that the second difference is similar operation data of the first difference if the difference between the second difference and the first difference is a position change difference, wherein the position change difference is the change difference of the dimension and/or the position coordinate of the drawing component in the visual interface.
In an example, the operation record processing method includes:
responding to a withdrawal instruction of a user, and acquiring current operation content in the visual interface;
traversing the operation record table when the current operation content is the third data:
if the operation record table comprises the second record node, the current operation content is rolled back to the second data from the third data according to a second difference corresponding to the second record node;
or (b)
And if the operation record table only comprises the first record node, returning the current operation content from the third data to the first data according to the target difference corresponding to the first record node.
In an example, the operation record processing method further includes:
responding to a redo instruction of a user, and acquiring current operation content in the visual interface;
traversing the operation record table when the current operation content is the first data:
if the operation record table comprises the first record node and the second record node, recovering the current operation content from the first data to the second data according to a first difference corresponding to the first record node;
Or (b)
And if the operation record table only comprises the first record node, recovering the current operation content from the first data to the third data according to the target difference corresponding to the first record node.
The operation record processing method has the beneficial effects that: by judging the difference data generated by the operation of the previous and subsequent users, if the two difference data belong to similar operation data, merging the previous difference data with the next difference data, and taking the merged difference data as the operation record node, and if the two difference data do not belong to similar operation data, not merging, so that if the user wants to cancel (or redo) the latest drawing operation, the previous drawing result is restored only by the next difference data of the operation record node, and compared with the conventional technology, the method only stores the target difference after merging the similar operation data, thereby avoiding a great amount of meaningless record redundant data in the drawing tool software operation record table, greatly saving the storage space and reducing the consumption of the memory.
In a second aspect, the present application also proposes an operation record processing device, including:
the first acquisition module is used for executing a first operation on the first data displayed in the visual interface to obtain second data;
the first recording module is used for acquiring a first difference between the first data and the second data, and storing the first difference into an operation recording table as a first recording node;
the second acquisition module is used for executing a second operation on second data to obtain third data and acquiring a second difference between the third data and the second data;
the data processing module is used for merging the second difference and the first difference to obtain a target difference if the second difference is similar operation data of the first difference; storing the target difference into the operation record table to replace the first difference as a new first record node; or if the second difference is not similar operation data of the first difference, storing the second difference into the operation record table as a second record node.
In a third aspect, the present application also proposes a computer device comprising a memory, a processor and a computer program stored in said memory and executable on said processor, said processor implementing the steps of the method as described above when said computer program is executed.
In a fourth aspect, the present application also proposes a computer readable storage medium storing a computer program which, when executed by a processor, implements a method as described in the above first aspect or in the above second aspect.
It will be appreciated that the advantages of the second to fourth aspects may be found in the relevant description of the first aspect and are not repeated here.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following description will briefly introduce the drawings that are needed in the embodiments or the description of the prior art, it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a first embodiment of an operation record processing method provided in the present application;
FIG. 2 is a schematic diagram of a visual interface of a graphical software tool provided herein;
FIG. 3 is a flow chart of a second embodiment of an operation record processing method according to the present application, wherein the flow chart is related to a first data merging condition;
FIG. 4 is a flow chart of a second embodiment of an operation record processing method according to the present application, wherein the flow chart is related to a second data merging condition;
fig. 5 is a schematic structural diagram of an embodiment of a computer device for performing the operation record processing method provided in the present application.
Fig. 6 is a block diagram of an operation record processing device provided in the present application.
Detailed Description
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having" and any variations thereof in the description and claims of the present application and in the description of the figures above are intended to cover non-exclusive inclusions.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in this specification and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
In the description of the embodiments of the present application, the term "plurality" refers to two or more (including two) unless specifically defined otherwise.
In addition, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used merely to distinguish between descriptions and are not to be construed as indicating or implying relative importance.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
The applicant of the present invention notes that when a user draws using a graphic software tool, the graphic software tool records the historical drawing operation instructions of the user in real time, and because each time the user generates a drawing operation instruction, the graphic software tool generates an operation record, for example, when the user calls a drawing component (which may be a button component or other drawing design components) to draw a picture, each time generates a drawing operation instruction, attribute data of the drawing component may change, each time the drawing component changes, the drawing tool software records the operation once, so that a great amount of redundant operation records exist in the graphic software tool, and unnecessary memory space is occupied.
The function of recording the historical drawing operation instruction of the user is that: the drawing operation withdrawal function of the current graphic software tool is convenient to realize, namely if a user makes drawing error operation in the drawing process using the graphic software tool, and the user wants to return the drawing result A of the current drawing to the drawing result B of a certain previous drawing operation stage, the user can use withdrawal instructions to withdraw the last operation instruction in sequence according to each recorded historical operation record of the user, so that the current drawing is returned to the result B by the result A, but in the historical operation records of the user recorded by the graphic software tool, a lot of redundant data records belong to, if a computer executes the withdrawal function according to the redundant historical data records, the working efficiency is affected, the user experience is poor, and the memory consumption is increased.
Example 1
In order to solve the above-mentioned technical problems, the present application provides an operation record processing method, referring to fig. 1, fig. 1 is a flowchart of a first embodiment of the operation record processing method provided in the present application, where the operation record processing method in the embodiment of the present application may be applied to graphic software tools such as drawing tool software, graphic operation software, design tool, and mind map editing tool, and the method includes:
step S01, executing a first operation on first data displayed in a visual interface to obtain second data;
in a specific application, the embodiment will be described by taking a visual interface of drawing tool software as an example. The drawing tool software can be a programming aided design tool, for example, when the POS machine application is developed, because the man-machine interaction interface of the POS machine needs to be realized by a code by a developer, and a plurality of attributes such as the size, the position, the color and the like of a corresponding visual component are correspondingly set in the code, the drawing tool software can provide a drawing component for the POS machine application program to realize drawing of the man-machine interaction interface, can provide the visual interface, and preset the attributes such as the size, the position and the like of the component to generate the corresponding code for the developer, so that development work is greatly reduced.
The main execution body of each step of the method of the present embodiment is a computer device loaded with a graphic software tool, and the computer device responds to drawing operations when a user uses the graphic software tool.
It can be understood that the first data in this embodiment may be current drawing content displayed in the visual interface of the drawing tool software, and the computer device may send the first data to a preset cache area as a current cache.
If a user performs a drawing operation (i.e., a first operation) on the current drawing content when using the drawing tool software, the drawing tool software responds to the first operation of the user and performs the first operation on the first data displayed in the visual interface of the drawing tool software, so that the current drawing content is changed from the first data into second data generated after the first operation; the computer device then obtains second data when the first operation is monitored, wherein the second data is current drawing content presented in the visual interface after the first operation. In a specific implementation, the listening function may be implemented by setting a listening function or a listening event.
Step S02, a first difference between the first data and the second data is obtained, and the first difference is stored in an operation record table as a first record node;
In a specific implementation, a preset algorithm may be invoked to obtain a first difference between the first data and the second data, for example, the preset algorithm may be difference comparison algorithm, that is, a method for comparing differences between two tree structure data. In addition, when the first difference is stored in the operation record table as the first record node, the computer device further sends the first data into the preset buffer area as the current buffer for the next operation.
Step S03, performing a second operation on the second data to obtain third data, and obtaining a second difference between the third data and the second data;
it is understood that when the computer device monitors the second operation (the second operation may be a second drawing operation), then third data generated through the second operation is acquired, and similarly, the third data is current drawing content presented in the visual interface after the second operation. And a second difference between the third data and the second data may be obtained by invoking a preset algorithm, such as a diff algorithm.
Step S04, if the second difference is similar operation data of the first difference, combining the second difference and the first difference to obtain a target difference; storing the target difference into the operation record table to replace the first difference as a new first record node;
In a specific implementation, the manner of determining whether the second difference is similar operation data of the first difference may include:
judging whether the paths of the drawing components among the first data, the second data and the third data are the same;
and if the paths of the drawing component and the drawing component are identical, judging that the second difference is similar operation data of the first difference if the difference between the second difference and the first difference is a position change difference, wherein the position change difference is the change difference of the dimension and/or the position coordinate of the drawing component in the visual interface.
Specifically, the similar operation data of the present embodiment can be understood as:
in recording the user's drawing operations, the data relating to the changes are within a certain range of one or several attributes, such as fig. 2, in the visual graphical interface of the drawing tool software, the upper left corner coordinates x and y, the width w, the height h of the component, which may change after being subjected to the user's drawing operations, and the specific change results may include: x, y, w, x, y, h, and x, y, w, h, etc., we call the data change attributes contained in x, y, w, h, i.e., the data are considered similar. The present embodiment refers to the difference in dimensional/coordinate change generated after such drawing operation as similar operation data.
As shown in FIG. 2, the drawing area is a rectangular canvas in which a plurality of components for drawing images are included, the position of a component in the canvas (drawing area) is described as defined by the distance (i.e., coordinates) of the upper left corner of the component relative to the upper left corner of the canvas, and the width height refers to the length and width of the component, which is used to describe the size of the component.
The user-generated first/second operations may be:
operation mode one: the user selects the right lower corner of the drawing component to drag downwards and rightwards by using the mouse, the drawing component is enlarged, and the relative position of the left upper corner of the drawing component is not changed at the moment, so that the x and y properties of the drawing component are not changed, and only the width and the height of the drawing component are changed;
and the second operation mode is as follows: the user drags the upper left corner of the drawing component to the upper left by using the mouse, and enlarges the drawing component, at the moment, the drawing component is changed in width and height, and meanwhile, the position of the upper left corner of the drawing component is also changed, namely, the x and y properties of the drawing component are also changed.
And the operation mode is three: the user selects the drawing component by using the mouse, and modifies the reference address of the picture, namely, the picture is replaced.
As can be seen from the above three operations, the first operation mode and the second operation mode both generate a variation difference between the size or the coordinates of the selected drawing component and belong to similar operation data;
The third operation mode belongs to modification of the drawing component and the path of the drawing component, and the result generated by the third operation mode and the result generated by the first/second operation mode are not similar operation data.
Therefore, in order to achieve the purpose of reducing a large number of redundant operation records in the drawing tool software, if a difference (similar operation data) between the first operation and the second operation belongs to the second difference between the second difference and the first difference, combining the second difference and the first difference to obtain a target difference;
in one embodiment, all of the drawing design components shown in the component area are associated with a data record in which the data structures are in a nested tree structure, as follows:
the above data describes a text component nested within a button component. When the element attributes in the drawing area change, the associated data records also change simultaneously.
When the data record changes, the difference before and after the change is calculated first and recorded. For example, modifying the size of a text component from 100 to 150 in width results in a piece of discrepancy data containing a discrepancy node:
The "method" may be "edit", "add" and "delete", and indicates an edit component attribute, an add component and a delete component, respectively, and the "path" indicates a location where the data changes.
When editing the attribute of the drawing component in the drawing area, only one operation is usually performed on one attribute, but some operations are related to a plurality of changes of the attribute, for example, when the drawing component is moved, the coordinate attributes "x" and "y" of the drawing component are changed at the same time. I.e. a change may result in a piece of discrepancy data comprising one or more discrepancy nodes.
A user may drag a drawing component from a position of coordinates (0, 0) to a position of coordinates (10, 10) in a drawing area, and a plurality of changes may be generated in the middle of the drawing, and the changes generated in a similar drag operation may be referred to as data-like changes in this embodiment. I.e., one drag operation may produce one or more changes, which if produced are all similar changes.
And finally, the computer equipment sends the third data into a preset cache area to serve as a current cache.
Or (b)
And step S04', if the second difference is not similar operation data of the first difference, storing the second difference into the operation record table as a second record node.
It can be understood that if the second difference does not belong to the similar operation data of the first difference, the second difference is stored in the operation record table as a second record node to be separately recorded, so as to avoid that when the user needs different data positions corresponding to two operations when using the redo or undo function in the later period, the computer automatically combines the two operations.
The beneficial effects of this embodiment lie in: the data record before the change can be calculated according to the difference data and the data record after the change, the difference data is stored in the operation record table in the form of the operation record according to the occurrence sequence, a plurality of history record nodes can be obtained, and the history data record can be restored through the history record nodes in the operation record table. The previous difference data and the next difference data are combined, and the combined difference data is used as the operation record node (if the two difference data do not belong to similar operation data, the two difference data are not combined), so that if a user wants to cancel the latest drawing operation, the previous drawing result is restored only according to the next difference data of the operation record node, and compared with the conventional technology, when one drawing operation instruction is generated, one operation record is generated, the embodiment only stores the target difference after the similar operation data are combined, thereby avoiding a great amount of meaningless record redundant data in a drawing tool software operation record table, greatly saving the storage space and reducing the consumption of the memory.
Example two
It can be understood that the operation record processing method of the first embodiment is to determine whether two adjacent changes are similar changes by comparing the drawing modes and paths in the difference nodes of two adjacent pieces of difference data. Specifically, the difference data generated by similar changes are combined to obtain the difference data of the change before and after one operation, but when two adjacent operations are very similar or identical, the situation of transitional combination of the difference data is easy to be caused. For example, it takes 2 seconds for a user to drag a component from point a to point B, then 8 seconds for the user to drag from point B to point C, both of which belong to similar changes in data, but the last operation time is long (the user has a stay, and the user has a stay time for other drawing purposes), and if two operations are eventually combined into one operation, excessive combining may occur.
Therefore, to prevent the transition merge, the present embodiment introduces a time factor (i.e., a preset time condition) to make the adjustment, by recording a second time period required to perform the second operation to obtain the third data; accordingly, step S40 of the first embodiment further includes: if the second duration satisfies the preset time condition and the second difference is similar operation data of the first difference, the second difference and the first difference are combined, that is, the premise of combining the second difference and the first difference must satisfy the two conditions.
In this embodiment, it can be determined whether the above two conditions are satisfied in two ways, referring to fig. 3, fig. 3 is a flow chart of a first data merging condition (determining whether the operation time is too long and then determining whether the operation time is similar) of a second embodiment of an operation record processing method provided in this application, which includes the following steps:
step S041, comparing the second time length T with a preset time threshold T, if the second time length T is smaller than the preset time threshold T, executing step S042, otherwise executing step S044; in a specific implementation, the preset time threshold T is generally obtained according to an empirical evaluation of the user using drawing tool software;
step S042, judging whether the second difference is similar operation data of the first difference, if the second difference is similar operation data of the first difference, executing step S043, otherwise executing step S044;
step S043, combining the second difference and the first difference to obtain the target difference.
Step S044, the second difference is stored in the operation record table as a second record node.
In a specific implementation, a first example of a first data merge condition: if the preset time threshold t=0.8s, the operation time from the first data s1 to the third data s3 is 0.95s, if the operation time t=0.5 s between the second data s2 and the third data s3 (i.e. the second duration t=0.5 s), where T is greater than T, which indicates that the operation control time of the user from s2 to s3 is shorter, the computer may consider that the operation from s1 to s2 (i.e. the first operation corresponds to the first difference T1 between s1 and s 2) and the operation from s2 to s3 (i.e. the second operation corresponds to the second difference T2 between s3 and s 2) may be similar data change operations, that is, data may be combined, but if the combination computer may also need to make a second judgment: whether it is a similar data change; judging whether the change of similar data is mainly based on whether the difference of the change between t1 and t2 is the same attribute, such as color, displacement and line difference, so that if the change is the same attribute, the computer equipment can combine t1 and t2 and store the same into a historical operation record table to improve the data redundancy condition; if not the same attribute, the computer device will consider the user to have changed to a different aspect, and if the subsequent user uses the redo or retirement function, it may be necessary to revert back to this step, thus saving it in the history list.
Accordingly, a second example of the first data merge condition: if the preset time threshold t=0.8s, the operation time from the first data s1 to the third data s3 is 1.5s, the operation time t=1.1s between the second data s2 and the third data s3 is smaller than T, so that the user is proved to have longer operation control time from s2 to s3, and the computer can consider that the user has a long stay time in the operations from s2 to s3, so that the difference T2 is reserved in the history operation record table.
Optionally, referring to fig. 4, fig. 4 is a flow chart showing a second data merging condition (whether similar operation data is first determined and then whether the operation time is too long) according to a second embodiment of an operation record processing method provided in the present application, which includes the following steps:
step S401, judging whether the second difference is similar operation data of the first difference; if the second difference is similar operation data of the first difference, executing step S402, otherwise executing step S404;
step S402, comparing the second duration T with a preset time threshold T; if the second time period T is less than the preset time threshold T, executing step S403, otherwise executing step S404;
step S403, combining the second difference and the first difference to obtain a target difference;
Step S404, storing the second difference into the operation record table as a second record node;
in a specific implementation, the embodiment first determines whether the operation data is similar or not, and then determines whether the operation time is too long or not:
if the first difference T1 and the second difference T2 are similar, comparing the operation time (i.e. the second duration) from the second data s2 to the third data s3 with the preset time T, and if the preset time T is greater than the operation time T, proving that the operation control time of the user from s2 to s3 is shorter, wherein the computer equipment considers that T1 and T2 can be combined; if T is less than T, proving that the user has long stay time in the operation control of s2 to s3, and the computer equipment considers that T2 is necessary to be independently put into a history record for storage;
t1 and t2 are not similar changes, and the computer device will consider that the user has changed from one aspect to another, and that it may be necessary to revert back to this step when the user subsequently uses the redo or undo function, so t2 is stored separately in the history list.
It should be noted that, in this embodiment, the order of the second record node in the operation record table is located after the first record node, so that when the undo or redo operation occurs, the computer device undoes or restores the result of the drawing operation from the operation record table in sequence according to the order of the record nodes.
The second embodiment has the beneficial effects that: and introducing a preset time condition (a preset time threshold T) to adjust the merging condition of the difference data, and merging the second difference and the first difference to obtain a target difference when the second duration meets the preset time condition and the second difference is similar operation data of the first difference, so that the technical problem of transition merging of the difference data is solved.
It should be emphasized that, in this embodiment, by presetting the "duration time interval threshold" (i.e. the preset time threshold T), it is determined whether two operation records need to be merged into one record, and one operation record that needs to be merged may also be a record after the previous merging of several similar operations, so that the number of drawing operations triggered by the user is not limited, i.e. no matter how many times the user performs the drawing operations, the operation record processing scheme of this embodiment is continuously executed, so as to reduce redundancy of operation records and prevent transitional merging.
Example III
On the basis of the operation record processing method provided in the first embodiment or the second embodiment, a third embodiment is provided, where the drawing tool software of the present embodiment can execute the user initiated undo and redo function instruction according to the first record node and/or the second record node in the operation record table.
In one embodiment, to implement the revocation function of the operation record, the operation record processing method includes:
step A1: responding to a withdrawal instruction of a user, and acquiring current drawing content in a visual interface;
step A2: if the current drawing content is the third data, a first recording node is found from an operation recording table;
step A3: and backing the current drawing content from the third data to the first data according to the target difference corresponding to the first recording node.
According to the embodiment, the revocation function of the operation record is realized, the design state of the last component in the drawing area is restored, and the revocation function can be realized without sequentially passing through a plurality of historical record redundancies according to the sequence from back to front in the operation record table in the restoration process.
In one embodiment, to implement the redo function of the operation record, the operation record processing method includes:
step B1: responding to a redo instruction of a user, and acquiring current drawing content in a visual interface;
step B2: if the current drawing content is the first data, a first recording node is found from an operation recording table;
step B3: and recovering the current drawing content from the first data to third data according to the target difference corresponding to the first recording node.
The embodiment realizes the redoing function of the operation record, restores the design state of the next component in the drawing area, and can realize the redoing function without redundancy of a plurality of history records from front to back in the restoring process.
In a specific implementation, taking an example of implementing the revocation function, if the first operation and the second operation of the user in the foregoing embodiment are the component deformation operations like the operation one and the operation two, but the attribute of the change of the drawing component is different, when the conventional revocation mode is to perform the revocation operation, the four attributes of the change x, y, width and height need to be restored, that is, the operation two is needed to be restored first, then the operation one is needed to be restored twice, and in this embodiment, similar operation data of the operation one and the operation two are combined in advance, when the user performs the revocation operation, the user only needs to restore according to the combined target difference, and the final revocation result can be obtained only by restoring once.
For example, in the process of dragging the deformed component, the user may first go right and then down, that is, in the same operation, the change of the component attribute value may not occur simultaneously, when the deformed operation is cancelled, the conventional manner needs to restore the wide, high, x and y attributes of the attribute, and the change of the four attributes is called similar change, and the embodiment combines the data of the similar changes in advance, so that the user only needs to restore according to the combined target difference when the user does the cancellation operation, and the final cancellation result can be obtained only by restoring once.
It should be noted that, if one of the first operation and the second operation of the user belongs to the operation three, that is, the reference address of the picture is modified, that is, the picture is replaced, and when the undoing operation is performed, the single attribute value of the reference address of the picture needs to be restored.
According to the embodiment, the undo/redo function of the operation record is realized, the design state of one component/next component in the drawing area is restored, the undo/redo function can be realized without redundancy of a plurality of historical records in the operation record table in the restoration process of a user, the operation time of the user is shortened, and the operation experience of the user using drawing tool software is provided.
Referring to fig. 5, fig. 5 is a schematic structural diagram of an embodiment of a computer device for executing an operation record processing method provided in the present application, and as shown in fig. 5, the computer device 1 of this embodiment includes: at least one processor 10 (only one is shown in fig. 1), a processor 10, a memory 11 and a computer program 12 stored in the memory 11 and executable on the at least one processor 10, the processor 10 implementing the steps in the embodiments of the operation recording processing method when executing the computer program 12.
The computer device may be a desktop computer, notebook, smart phone, palm computer, etc. computing device loaded with drawing tool software.
The computer device shown in fig. 5 may include, but is not limited to, a processor 10, a memory 11. It will be appreciated by those skilled in the art that fig. 5 is merely an example of the computer device 1 and is not meant to be limiting of the computer device 1, and may include more or fewer components than shown, or may combine certain components, or different components, such as may also include input-output devices, network access devices, etc.
The processor 10 may be a central processing unit (Central Processing Unit, CPU), and the processor 10 may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 11 may in some embodiments be an internal storage unit of the computer device 1, such as a hard disk or a memory of the computer device 1. The memory 11 may in other embodiments also be an external storage device of the computer device 1, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card) or the like, which are provided on the computer device 1. Further, the memory 11 may also include both an internal storage unit and an external storage device of the computer device 1. The memory 11 is used for storing an operating system, application programs, boot loader (BootLoader), data, other programs etc., such as program codes of the computer program etc. The memory 11 may also be used for temporarily storing data that has been output or is to be output.
Further, in an embodiment, as shown in fig. 6, the present invention further provides an operation record processing device, including:
the first obtaining module 10 is configured to perform a first operation on the first data displayed in the visual interface to obtain second data;
a first recording module 20, configured to obtain a first difference between the first data and the second data, and store the first difference into the operation record table as a first recording node;
a second obtaining module 30, configured to perform a second operation on the second data, obtain third data, and obtain a second difference between the third data and the second data;
the data processing module 40 is configured to combine the second difference and the first difference to obtain a target difference if the second difference is similar operation data of the first difference; storing the target difference into an operation record table to replace the first difference as a new first record node; or alternatively, the first and second heat exchangers may be,
and if the second difference is not similar operation data of the first difference, storing the second difference into an operation record table as a second record node.
It should be noted that, the operation record processing device may be understood as a virtual device, which may be installed in the computer device in the foregoing embodiment, and the computer device invokes the operation record processing device through the processor, so as to further execute the specific implementation manner in the foregoing operation record processing method embodiment.
The content of information interaction, execution process and the like between the devices/units is based on the same conception as the method embodiment of the application, and specific functions and technical effects brought by the content can be specifically found in the method embodiment section.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
Embodiments of the present application also provide a computer readable storage medium storing a computer program which, when executed by a processor, implements steps that may implement the various method embodiments described above.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application implements all or part of the flow of the method of the above embodiments, and may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, where the computer program, when executed by a processor, may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a photographing device/terminal apparatus, recording medium, computer Memory, read-Only Memory (ROM), random access Memory (RAM, random Access Memory), electrical carrier signals, telecommunications signals, and software distribution media. Such as a U-disk, removable hard disk, magnetic or optical disk, etc. In some jurisdictions, computer readable media may not be electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (10)

1. An operation record processing method, characterized in that the method comprises:
executing a first operation on the first data displayed in the visual interface to obtain second data;
acquiring a first difference between the first data and the second data, and storing the first difference into an operation record table as a first record node;
performing a second operation on the second data to obtain third data, and acquiring a second difference between the third data and the second data;
If the second difference is similar operation data of the first difference, combining the second difference and the first difference to obtain a target difference; storing the target difference into the operation record table to replace the first difference as a new first record node;
or (b)
And if the second difference is not similar operation data of the first difference, storing the second difference into the operation record table as a second record node.
2. The method of claim 1, wherein the method further comprises:
recording a second time length required for executing the second operation to obtain the third data;
and if the second difference is similar operation data of the first difference, combining the second difference and the first difference, including:
and if the second duration meets a preset time condition and the second difference is similar operation data of the first difference, combining the second difference and the first difference.
3. The method of claim 2, wherein if the second duration satisfies a predetermined time condition and the second difference is similar operation data of the first difference, combining the second difference and the first difference, specifically includes:
Comparing the second duration with a preset time threshold;
if the second duration is smaller than the preset time threshold, judging whether the second difference is similar operation data of the first difference or not; if the second difference is similar operation data of the first difference, combining the second difference and the first difference;
or (b)
And if the second time length is not smaller than the preset time threshold, storing the second difference into the operation record table as a second record node.
4. The method of claim 2, wherein if the second duration satisfies a predetermined time condition and the second difference is similar operation data of the first difference, combining the second difference and the first difference comprises:
judging whether the second difference is similar operation data of the first difference or not;
if the second difference is similar operation data of the first difference, comparing the second duration with a preset time threshold; if the second duration is smaller than the preset time threshold, combining the second difference and the first difference;
or (b)
And if the second time length is not smaller than the preset time threshold, storing the second difference into the operation record table as a second record node.
5. The method of claim 1, wherein the manner of determining whether the second discrepancy is similar operational data to the first discrepancy comprises:
judging whether the first data, the second data and the third data are identical in drawing components and paths of the drawing components;
and if the paths of the drawing component and the drawing component are identical, judging that the second difference is similar operation data of the first difference if the difference between the second difference and the first difference is a position change difference, wherein the position change difference is the change difference of the dimension and/or the position coordinate of the drawing component in the visual interface.
6. The method according to any one of claims 1 to 5, wherein the operation record processing method includes:
responding to a withdrawal instruction of a user, and acquiring current operation content in the visual interface;
traversing the operation record table when the current operation content is the third data:
if the operation record table comprises the second record node, the current operation content is rolled back to the second data from the third data according to a second difference corresponding to the second record node;
Or (b)
And if the operation record table only comprises the first record node, returning the current operation content from the third data to the first data according to the target difference corresponding to the first record node.
7. The method according to any one of claims 1 to 5, wherein the operation record processing method further comprises:
responding to a redo instruction of a user, and acquiring current operation content in the visual interface;
traversing the operation record table when the current operation content is the first data:
if the operation record table comprises the first record node and the second record node, recovering the current operation content from the first data to the second data according to a first difference corresponding to the first record node;
or (b)
And if the operation record table only comprises the first record node, recovering the current operation content from the first data to the third data according to the target difference corresponding to the first record node.
8. An operation record processing apparatus, characterized by comprising:
the first acquisition module is used for executing a first operation on the first data displayed in the visual interface to obtain second data;
The first recording module is used for acquiring a first difference between the first data and the second data, and storing the first difference into an operation recording table as a first recording node;
the second acquisition module is used for executing a second operation on second data to obtain third data and acquiring a second difference between the third data and the second data;
the data processing module is used for merging the second difference and the first difference to obtain a target difference if the second difference is similar operation data of the first difference; storing the target difference into the operation record table to replace the first difference as a new first record node; or if the second difference is not similar operation data of the first difference, storing the second difference into the operation record table as a second record node.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 7 when the computer program is executed.
10. A storage medium being a computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor realizes the steps of the method according to any one of claims 1 to 7.
CN202311154256.3A 2023-09-07 2023-09-07 Operation record processing method and device, computer equipment and storage medium Pending CN117370104A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311154256.3A CN117370104A (en) 2023-09-07 2023-09-07 Operation record processing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311154256.3A CN117370104A (en) 2023-09-07 2023-09-07 Operation record processing method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117370104A true CN117370104A (en) 2024-01-09

Family

ID=89397247

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311154256.3A Pending CN117370104A (en) 2023-09-07 2023-09-07 Operation record processing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117370104A (en)

Similar Documents

Publication Publication Date Title
US8839142B2 (en) Desktop system object removal
US8825615B2 (en) Simplifying implementation of custom atomic transactions in a programming environment
JP6220079B2 (en) Display control apparatus, display control method, and display control program
US20100295869A1 (en) System and method for capturing digital images
CN112596845A (en) Page switching method, device, server and storage medium
WO2015055087A1 (en) Method and device for selecting solid in drawing
US20030197715A1 (en) Method and a computer system for displaying and selecting images
CN108153454B (en) Multi-touch switching method and device, storage medium and terminal equipment
CN111782114B (en) Element display method, device, equipment and medium in manuscript editing application
CN110471700B (en) Graphic processing method, apparatus, storage medium and electronic device
WO2023051009A1 (en) Method and apparatus for determining 3d model printing position, a device, and a storage medium
CN111580905A (en) Negative one-screen card management method, terminal and computer readable storage medium
CN117370104A (en) Operation record processing method and device, computer equipment and storage medium
CN106354381B (en) Image file processing method and device
CN110231909B (en) Writing operation processing method and device
CN114610201A (en) Interface display method and device, terminal equipment and storage medium
CN114265530A (en) Button construction and response method, device and terminal based on iOS system
CN113902841A (en) Image drawing method and device, electronic equipment and readable storage medium
CN111708500A (en) Drawing printing method and device, electronic equipment and storage medium
CN114125555B (en) Editing data preview method, terminal and storage medium
WO2023006024A1 (en) Image processing method and apparatus, and electronic device and readable storage medium
CN113542872B (en) Image processing method and device and electronic equipment
CN112004160B (en) Interface interaction method, device and medium based on page list control
US20240037124A1 (en) Transforming data visualizations during page transitions
CN115113775A (en) Input device selection method and device, storage medium and terminal device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination