CN112819924B - Picture editing method and device, electronic equipment and storage medium - Google Patents

Picture editing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112819924B
CN112819924B CN202110115004.4A CN202110115004A CN112819924B CN 112819924 B CN112819924 B CN 112819924B CN 202110115004 A CN202110115004 A CN 202110115004A CN 112819924 B CN112819924 B CN 112819924B
Authority
CN
China
Prior art keywords
editing
picture
trace
file
edited
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.)
Active
Application number
CN202110115004.4A
Other languages
Chinese (zh)
Other versions
CN112819924A (en
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.)
Wuhan Yuexuebang Network Technology Co Ltd
Original Assignee
Wuhan Yuexuebang Network Technology 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 Wuhan Yuexuebang Network Technology Co Ltd filed Critical Wuhan Yuexuebang Network Technology Co Ltd
Priority to CN202110115004.4A priority Critical patent/CN112819924B/en
Publication of CN112819924A publication Critical patent/CN112819924A/en
Application granted granted Critical
Publication of CN112819924B publication Critical patent/CN112819924B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/51Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9566URL specific, e.g. using aliases, detecting broken or misspelled links

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Library & Information Science (AREA)
  • Software Systems (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the application provides a method, a device, electronic equipment and a storage medium for editing pictures, wherein the method comprises the following steps: acquiring a picture to be edited; acquiring an editing trace input by an operation object on the picture to be edited; acquiring a target format of the editing trace according to a predefined format, recording the target format and the position of the editing trace, and generating an editing file, wherein the predefined format is used for defining a display format of a graph corresponding to the editing trace; and independently storing the editing file, recording the association relation between the editing file and the picture to be edited, and re-editing the editing trace can be realized, so that the experience of a user is improved.

Description

Picture editing method and device, electronic equipment and storage medium
Technical Field
The embodiment of the application relates to the field of picture processing, in particular to a picture editing method, a picture editing device, electronic equipment and a storage medium.
Background
In the related art, with the continuous development of online office, the demands of users for online annotation work files are continuously increasing. At present, many working documents are displayed in a picture form, and when an operation object annotates the displayed online processing picture document, the related technology can directly solidify annotation marks of the picture document into a new picture to be stored, so that when the operation object needs to edit the picture document again, the operation object can only edit the picture document in the original marks of last modification, and the user experience is poor.
Therefore, how to improve the editing effect of the on-line office operation object on the picture is a problem to be solved.
Disclosure of Invention
The embodiment of the application provides a method, a device, electronic equipment and a storage medium for editing pictures, which can at least realize the reediting of editing traces by some embodiments of the application, thereby improving the user experience of online office.
In a first aspect, a method of picture editing, the method comprising: acquiring a picture to be edited; acquiring an editing trace input by an operation object on the picture to be edited; acquiring a target format of the editing trace according to a predefined format, recording the target format and the position of the editing trace, and generating an editing file, wherein the predefined format is used for defining a display format of a graph corresponding to the editing trace; and independently storing the editing file, and recording the association relationship between the editing file and the picture to be edited.
Therefore, the embodiment of the application can restore the editing trace on the picture to be edited according to the association relation by independently storing the editing file generated in the predefined format, thereby realizing the continuous editing of the editing trace and improving the user experience of the user in online office.
With reference to the first aspect, in one implementation manner, the picture to be edited is a picture with an editing trace obtained by synthesizing a history editing file and an original file; the method for obtaining the edit trace input by the operation object on the picture to be edited comprises the steps of obtaining an update edit trace of the operation object for re-editing the historical edit trace; the step of obtaining the target format of the editing trace according to the predefined format, recording the target format and the position of the editing trace, and generating an editing file comprises the following steps: and determining the target format of the updated editing trace according to the predefined format, recording the target format of the updated editing trace and the position of the updated editing trace, and generating the editing file.
Therefore, the embodiment of the application independently stores the editing file with the editing trace picture through the predefined format, and can restore all the editing traces before the picture to be edited according to the association relation, so that all the editing traces can be continuously edited, and the user experience of a user in online office is improved.
With reference to the first aspect, in an implementation manner, the obtaining a picture to be edited includes: searching the history editing file according to the association relation between the history editing file and the original file; analyzing the historical editing file to obtain positions and formats of all editing marks, and drawing the editing marks in the original file according to the positions and formats to obtain the picture to be edited.
Therefore, the embodiment of the application obtains all the positions and formats of the editing marks by analyzing the historical editing file and draws the positions and formats of the editing marks in the original file to obtain the picture to be edited, and can restore all the editing marks on the original file, so that the editing marks can be continuously edited when the picture to be edited is opened again.
With reference to the first aspect, in an implementation manner, before the independently saving the editing file and recording an association relationship between the editing file and the picture to be edited, the method further includes: and confirming receipt of a save instruction, wherein the save instruction is triggered by an action of switching pictures or closing a program.
Therefore, the embodiment of the application can trigger the save action by confirming that the save instruction is received.
With reference to the first aspect, in one embodiment, the types of the editing trace include lines, circles, rectangles, icons, and annotation boxes; the predefined format includes: the lines, circles, rectangles, icons and annotating boxes are of size, angle, coordinates and color.
The embodiment of the application can accurately store different presentation forms of the editing trace in the storage process by predefining the format of the editing trace, thereby accurately restoring the editing trace in the restoring process.
With reference to the first aspect, in an embodiment, the URL address records an association relationship between the editing file and the picture to be edited through a uniform resource locator Uniform Resource Locator.
According to the embodiment of the application, the association relation is recorded through the URL address, so that the edited file and the picture to be edited can be accurately connected in time, and the edited file and the picture to be edited can be accurately corresponding in the restoring process.
With reference to the first aspect, in an implementation manner, after the independently storing the editing file and recording an association relationship between the editing file and the picture to be edited, the method further includes: confirming that a restoring instruction is received, wherein the restoring instruction is triggered by an action of opening a picture; searching the editing file and the picture to be edited according to the association relation; analyzing the editing file to obtain the positions and the formats of all the editing marks, and restoring the editing marks in the picture to be edited according to the positions and the formats to obtain a restored picture.
In a second aspect, an apparatus for editing a picture, the apparatus comprising: the picture to be edited obtaining module is configured to obtain a picture to be edited; the editing trace acquisition module is configured to acquire an editing trace input by an operation object on the picture to be edited; the editing file generation module is configured to acquire a target format of the editing trace according to a predefined format, record the target format and the position of the editing trace, and generate an editing file, wherein the predefined format is used for defining a display format of a graph corresponding to the editing trace; the storage module is configured to independently store the editing file and record the association relationship between the editing file and the picture to be edited.
With reference to the second aspect, in one embodiment, the picture to be edited is a picture with an editing trace obtained by synthesizing a history editing file and an original file; the editing trace obtaining module is configured to obtain updated editing traces of the historical editing traces reedited by the operation object; the editing file generation module is configured to determine the target format of the updating editing trace according to the predefined format, record the target format of the updating editing trace and the position of the updating editing trace, and generate the editing file.
With reference to the second aspect, in one embodiment, the to-be-edited picture obtaining module is configured to search the history editing file according to an association relationship between the history editing file and the original file; analyzing the historical editing file to obtain positions and formats of all editing marks, and drawing the editing marks in the original file according to the positions and formats to obtain the picture to be edited.
With reference to the second aspect, in one implementation manner, the saving module is configured to confirm receipt of a saving instruction, where the saving instruction is triggered by an action of switching a picture or closing a program.
With reference to the second aspect, in one embodiment, the types of the editing trace include lines, circles, rectangles, icons, and annotation boxes; the predefined format includes: the lines, circles, rectangles, icons and annotating boxes are of size, angle, coordinates and color.
With reference to the second aspect, in one implementation manner, the association relationship between the editing file and the picture to be edited is recorded through a URL address.
With reference to the second aspect, in one implementation manner, the saving module is configured to confirm that a restore instruction is received, where the restore instruction is triggered by an action of opening the picture; searching the editing file and the picture to be edited according to the association relation; analyzing the editing file to obtain the positions and the formats of all the editing marks, and restoring the editing marks in the picture to be edited according to the positions and the formats to obtain a restored picture.
In a third aspect, an electronic device includes a processor, a memory, and a bus; the processor is connected to the memory via the bus, the memory storing computer readable instructions which, when executed by the processor, are adapted to carry out the method according to any one of the first aspect and the embodiments of the first aspect.
In a fourth aspect, a computer readable storage medium has stored thereon a computer program for implementing the method according to any of the first aspect and the embodiments of the first aspect when the computer program is executed by a server.
Drawings
Fig. 1 is a flow chart of a method for editing pictures according to an embodiment of the present application;
Fig. 2 is a flowchart of a method for saving a picture according to an embodiment of the present application;
Fig. 3 is a flowchart of a method for picture restoration according to an embodiment of the present application;
FIG. 4 is a schematic diagram illustrating an internal structure of a device for editing pictures according to an embodiment of the present application;
Fig. 5 is an electronic device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, but not all embodiments of the present application. The components of the embodiments of the present application generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the application, as presented in the figures, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by a person skilled in the art without any inventive effort, are intended to be within the scope of the present application based on the embodiments of the present application.
The method steps in the embodiments of the present application are described in detail below with reference to the drawings.
The embodiment of the application can be applied to various scenes for editing the on-line pictures, for example, the scenes comprise the scenes for editing and annotating the student homework in the process of on-line correction of the student homework by a teacher, for example, the scenes for inputting editing marks to a picture document displayed on-line by the teacher are required to be guided. The problem of the picture document editing method of the related art is exemplarily described by taking the online teaching field as an example. Specifically, demands of online tutoring teachers and students for homework correction are continuously increased, and related technologies can directly solidify the corrected trace of the picture document displayed on the online education platform by an operation object (for example, the tutoring teacher) into a new picture, so that when the tutoring teacher and the students open the picture again for editing, editing traces can only be added on the basis of the fixed editing trace, and experience of the tutoring teacher and the students on the link of homework correction is poor.
At least to solve the above-mentioned problems, some embodiments of the present application provide a method for independently saving an editing file and restoring the independently saved editing file to an original picture, so that a user can continue editing an editing trace. For example, in some embodiments of the present application, by independently storing the editing trace according to a predefined format, re-editing of the editing trace can be achieved, so as to enhance the experience of the user. It can be appreciated that the application scenario of the embodiment of the present application is not limited thereto.
In view of the above problems, embodiments of the present application provide a method, an apparatus, an electronic device, and a storage medium for editing a picture, where the method for editing a picture includes: acquiring a picture to be edited; acquiring an editing trace input by an operation object on the picture to be edited; acquiring a target format of the editing trace according to a predefined format, recording the target format and the position of the editing trace, and generating an editing file, wherein the predefined format is used for defining a display format of a graph corresponding to the editing trace; and independently storing the editing file, recording the association relation between the editing file and the picture to be edited, and re-editing the editing trace can be realized, so that the experience of a user is improved.
It should be noted that, the method for editing a picture according to the embodiment of the present application may be applied to an electronic device having a display, for example, the electronic device includes: a cell phone, a tablet computer, a notebook computer, etc.
An embodiment of acquiring a picture to be edited performed by the electronic apparatus will be described below.
S110, obtaining a picture to be edited.
In one embodiment of the present application, the picture to be edited obtained in S110 is a picture corresponding to an original file without any editing trace (for example, the picture is a file which is uploaded by a student for the first time after the completion of the homework and is not edited or approved by a tutor).
In other embodiments of the present application, the picture to be edited of S110 is a picture in which an edit trace exists. For example, the electronic device searches the history editing file according to the association relation between the history editing file and the original file; analyzing the historical editing file to obtain positions and formats of all editing marks, and drawing the editing marks in the original file according to the positions and formats to obtain a picture to be edited so that the operation object edits the picture to be edited.
It should be noted that, the picture to be edited having the editing trace is a picture having the editing trace obtained by synthesizing a history editing file (for example, a first or non-first modified file of a picture corresponding to the homework uploaded by the student by a teacher) and an original file, the history editing file is a file composed of all editing traces before the current editing, and the original file is an original picture which has not been edited (for example, a picture uploaded by the student by photographing for the first time after the homework is completed).
S120, acquiring an editing trace input by the operation object on the picture to be edited.
In one embodiment, the picture to be edited is a picture with editing marks synthesized by the historical editing file and the original file; s120, acquiring an updated editing trace of the operation object for re-editing the historical editing trace.
When the picture to be edited is a picture with an editing trace, the electronic device acquires an updated editing trace for re-editing the historical editing trace, for example, the historical editing trace is a straight line drawn in a third row, when the operation object acquires the picture to be edited, the operation object extends the straight line of the third row by a distance, and then the electronic device acquires the distance of the extended picture (i.e. the updated editing trace).
In one embodiment, when the picture to be edited is an original file without any editing trace, S120 includes: the edit trace input by the operation object to the original file is obtained, for example, the operation object draws a circle on the picture to be edited, and the electronic device obtains the circle.
The operation object may be a natural person such as a teacher or a student, or a robot or an artificial intelligent terminal for editing the picture to be edited, and the embodiment of the application is not limited thereto.
The embodiment of S130 is exemplarily set forth below.
S130, acquiring a target format of the editing trace according to a predefined format, recording the target format and the position of the editing trace, and generating an editing file.
In one embodiment, S120 includes obtaining updated edit trails for re-editing historical edit trails by the operation object; s130 includes: and determining the target format of the updated editing trace according to the predefined format, recording the target format of the updated editing trace and the position of the updated editing trace, and generating the editing file.
In one embodiment, when the picture to be edited is a picture with an editing trace, after the electronic device obtains the updating editing trace in S120, the target format of the updating editing trace is obtained according to a predefined format (for example, the target format is obtained according to the type of updating editing), so that the storage positions of the updating editing trace and the historical editing trace are the same, and an updating editing file formed by the target format of the updating editing trace and the position of the updating editing trace is stored together with the historical editing trace file to form an editing file, so that when the picture to be edited is opened again, the historical editing trace and the updating editing trace are restored in the original file together, and the operation object can continuously edit the editing trace.
For example, the obtained edit trace of the picture to be edited exists in the third row is a short line (i.e. a history edit trace), the operation object then draws a long line (i.e. an update edit trace) along the short line, in the process of editing the operation object, the electronic device records the point where the long line passes (i.e. obtains the update edit trace), determines the target format corresponding to the long line according to the width and the color format of the predefined line, records the target format of the long line and the position of the long line in the picture to be edited, stores the update edit file formed by the target format of the long line and the position of the long line in the picture to be edited in the same position as the history edit file containing the short line in the database, and forms an edit file, wherein the update edit file and the history edit file are contained in the edit file, so that when the picture to be edited is opened again, the long line and the short line are restored together in the original file.
It should be noted that the type of the edit trace indicates which type the edit trace belongs to, for example, the edit trace is a circle, and then the type of the edit trace is a circle; the target format of the edit trace represents its properties, such as: the color of the circle, the location of the circle, etc.
In one embodiment, when the picture to be edited is a picture with an editing trace, after the electronic device obtains the updating editing trace in S120, S130 obtains a target format of the updating editing trace according to a predefined format, forms an updating editing file from the target format of the updating editing trace and a position of the updating editing trace in the picture to be edited, and separately stores the updating editing file different from the historical editing file, so that when the picture to be edited is opened again, only the updating editing file is restored in the original file, and the operation object can obtain the latest editing result and generate a new editing trace based on the latest editing result for editing.
For example, the obtained edit trace of the picture to be edited exists in the third row is a short line (i.e. a history edit trace), the operation object then draws a long line (i.e. an update edit trace) along the short line, the electronic device records the passing point of the long line (i.e. obtains the update edit trace) during the process of editing the operation object, determines the target format of the long line according to the width and color format of the predefined line, records the position of the long line in the picture to be edited, stores the update edit file formed by the target format of the long line and the position of the long line in the picture to be edited in the database, and only restores the long line in the original file when the picture to be edited is opened again.
In one embodiment, when the picture to be edited is an original file without editing trace, after the electronic device obtains the editing trace in S120, S130 includes: according to the predefined format, the target format of the editing trace is obtained, the position of the editing trace in the file to be edited is determined, the target format of the editing trace and the position of the editing trace in the file to be edited are formed into the editing file, so that when the picture to be edited is opened again, the editing file is restored in the original file, and the operation object can continuously edit the editing trace.
For example, the types of edit marks include lines, circles, rectangles, icons, and annotation boxes, and the predefined formats of the corresponding settings include: the lines, circles, rectangles, icons and annotating boxes are of size, angle, coordinates and color. Specifically, for example, the position (i.e., the coordinates in the original picture), the angle, the width, and the color corresponding to the line may be; the position, radius, line width and color corresponding to the circle; the position, the angle, the side length and the color corresponding to the rectangle, and the size, the position and the angle corresponding to the icon; the position, size, color, font, angle, etc. of the text in the annotation frame correspond to the annotation frame.
As a specific embodiment, the editing trace can be any trace of the operation object edited on the picture to be edited, the editing trace can also be a mark trace of character strokes, opposite hooks and the like, the corresponding predefined formats include, but are not limited to, text strokes and color, thickness, etc. of the opposite hooks.
Therefore, the embodiment of the application independently stores the editing file with the editing trace picture through the predefined format, and can restore all the editing traces before the picture to be edited according to the association relation, so that all the editing traces can be continuously edited, and the user experience of a user in online office is improved. By predefining the format of the editing trace, different display forms of the editing trace can be accurately stored in the storage process, so that the editing trace is accurately restored in the restoration process.
The embodiment of S130 is described above, and the embodiment of S140 will be described below.
And S140, independently storing the editing file, and recording the association relationship between the editing file and the picture to be edited.
In one embodiment, receipt of a save instruction is acknowledged, wherein the save instruction is triggered by an action to switch pictures or shut down a program.
Before saving the editing file, the electronic equipment needs to confirm a saving instruction triggered by an operation object, the operation object triggers the saving instruction under the condition of switching pictures or closing programs, after confirming that the saving instruction is received, the electronic equipment independently saves the editing file, and the association relationship between the editing file and the pictures to be edited is recorded through the URL address.
Of course, the save operation may be initiated by clicking a save button by the operation object, or triggering a save gesture, and the like, which is not limited in any way.
It should be noted that, independently storing the editing file is to distinguish the existing method of storing the editing trace and the picture to be edited into one file, the application stores the editing file and the picture to be edited respectively and establishes the association relation, so that the editing trace is independent of the picture to be edited in the process of restoring the editing trace, and therefore, the operation object can continuously edit the editing trace.
The above describes the implementation of one picture editing method, and the following describes the implementation of another picture editing method.
In one embodiment, a restoration instruction is confirmed to be received, wherein the restoration instruction is triggered by an action of opening a picture; searching an editing file and a picture to be edited according to the association relation; analyzing the editing file to obtain the positions and the formats of all the editing marks, and restoring the editing marks in the picture to be edited according to the positions and the formats to obtain a restored picture.
After receiving an instruction of opening a picture of an operation object, the electronic equipment searches a picture to be edited and an editing file corresponding to the picture to be edited from a database according to the association relation, analyzes the format and the position of an editing trace in the editing file in the picture to be edited, restores the editing trace in the picture to be edited according to the format and the position obtained by analysis, and obtains a restored picture, so that the operation object can continuously edit the editing trace on the restored picture.
The method of the electronic device for restoring the editing trace is described above, and a specific embodiment of the picture editing method will be described below.
As shown in fig. 2, as one of various scenarios of the present application, fig. 2 shows a method for editing a save job picture, in which an operation object is a tutor, and an electronic device used by the tutor is a computer, and specific embodiments are as follows:
After the computer of the tutor acquires the operation picture to be corrected (i.e. the picture to be edited), the tutor corrects the operation on the operation picture to be corrected, in the correction process, the computer acquires the corrected trace (i.e. the edit trace, for example, the process of acquiring the corrected trace comprises the steps of starting from the mouse to moving until the mouse is lifted, forming the graph in the process, including all points passed by the mouse), the computer needs to define the common attributes of the graph such as the type, the line width, the color, the position and the rotation angle relative to the operation picture to be corrected (i.e. the format corresponding to various types of edit traces) in advance, and in the correction process of the tutor, the computer records the set and the attribute of the points passed by the mouse to generate the edit file. After the correction is completed, the instruction of the tutor to trigger the switching of the picture 210 or the closing of the program 211, in other words, the tutor to trigger the timing of saving the edit mark, includes: switching the displayed picture to be edited (the operation correcting tool is to be switched to the next display, the current picture to be edited and the editing trace need to be saved before the program exits), and after confirming that a save instruction is received, executing the process of traversing all editing traces 220 (the acquired target format comprises line width, color, position, rotation angle, editing trace sequence and the like of the editing trace) in the picture to be edited, wherein the process of traversing the editing trace refers to the process of starting to lift up when a mouse is pressed down during each time of editing, each pen of editing trace can be recorded in the memory of the computer, and all recorded editing traces can be taken out during the traversing process to obtain the editing file; and then executing the steps of storing the editing file into a database 230, independently storing the editing file into the database, and executing the step of establishing an association relation 240 between the picture to be edited and the editing file in the database, wherein the association is carried out in the database by using the URL of the picture to be edited.
In another embodiment, when the computer obtains the edited trace after the tutor changes, the manual intelligence can be used for making a decision on the edited trace. For example: the teacher is instructed to correct the homework of the students, the first question picture is hooked, the second question picture is hooked, and the third question picture is hooked, so that only the editing trace of the picture yoke is saved, and only the editing trace of the picture yoke is restored during restoration, and therefore students can clearly see the wrong questions.
As shown in fig. 3, fig. 3 illustrates a method of job edit trace restoration, as one of various scenarios of the present application.
When the tutor needs to correct the operation, the instruction of opening the picture 310 (i.e. the restoration instruction) is triggered on the computer, the computer re-opens the picture to be edited after confirming that the restoration instruction is received, at this time, the computer executes the editing file 320 associated with the picture to be edited, the editing file corresponding to the picture to be edited is found in the database according to the URL address of the picture to be edited, then executes the restoration 330 of the editing trace in the editing file to the picture to be edited, and redraws the editing trace on the picture to be edited according to the data of type, position, line width, color, rotation angle and the like according to the sequence of the editing trace, so as to obtain the restoration picture, the editing trace on the restoration picture after drawing is the editing trace before the preservation, and each pen of the editing trace can continue the editing operation, for example, because the restoration picture is independently preserved and restored according to the editing trace: move, erase, extend, etc.
According to the application, a mode of separating the editing trace from the picture to be edited is adopted, the editing trace is abstracted and stored independently, the editing trace can be stored, restored, displayed and edited on different platforms and different clients, when the editing trace is stored, the original file to be edited is unchanged, the editing trace is independently stored and is associated with the picture to be edited, the corresponding editing trace is found according to the association during restoration, and is restored to the picture to be edited for display (namely, the picture to be edited is opened again), and the editing trace can be edited again, so that the experience of coaching teachers and students in the link of the correction operation is greatly improved, the correction quality and the experience of the online education operation are greatly improved, the improvement of the teaching quality is promoted, and the user experience is improved.
The above describes a specific embodiment of a method of picture editing, and a device of picture editing will be described below.
As shown in fig. 4, an apparatus 400 for editing a picture includes: a to-be-edited picture acquisition module 410, an editing trace acquisition module 420, an editing file generation module 430 and a saving module 440.
In one embodiment, an apparatus for editing a picture, the apparatus comprising: the picture to be edited obtaining module is configured to obtain a picture to be edited; the editing trace acquisition module is configured to acquire an editing trace input by an operation object on the picture to be edited; the editing file generation module is configured to acquire a target format of the editing trace according to a predefined format, record the target format and the position of the editing trace, and generate an editing file, wherein the predefined format is used for defining a display format of a graph corresponding to the editing trace; the storage module is configured to independently store the editing file and record the association relationship between the editing file and the picture to be edited.
In one embodiment, the picture to be edited is a picture with editing marks obtained by synthesizing the historical editing file and the original file; the editing trace obtaining module is configured to obtain updated editing traces of the historical editing traces reedited by the operation object; the editing file generation module is configured to determine the target format of the updating editing trace according to the predefined format, record the target format of the updating editing trace and the position of the updating editing trace, and generate the editing file.
In one embodiment, the to-be-edited picture obtaining module is configured to search the history editing file according to an association relationship between the history editing file and the original file; analyzing the historical editing file to obtain positions and formats of all editing marks, and drawing the editing marks in the original file according to the positions and formats to obtain the picture to be edited.
In one embodiment, the saving module is configured to acknowledge receipt of a saving instruction, wherein the saving instruction is triggered by an action of switching pictures or closing a program.
In one embodiment, the types of the editing trace include lines, circles, rectangles, icons, and annotation boxes; the predefined format includes: the lines, circles, rectangles, icons and annotating boxes are of size, angle, coordinates and color.
In one embodiment, the association relationship between the editing file and the picture to be edited is recorded through a uniform resource locator URL address.
In one embodiment, the saving module is configured to confirm receipt of a restore instruction, wherein the restore instruction is triggered by an action to open the picture; searching the editing file and the picture to be edited according to the association relation; analyzing the editing file to obtain the positions and the formats of all the editing marks, and restoring the editing marks in the picture to be edited according to the positions and the formats to obtain a restored picture.
In an embodiment of the present application, the module shown in fig. 4 can implement the respective processes in the embodiments of the methods of fig. 1,2 and 3. The operation and/or function of the individual modules in fig. 4 are for the purpose of realizing the respective flows in the method embodiments in fig. 1,2 and 3, respectively. Reference is specifically made to the description in the above method embodiments, and detailed descriptions are omitted here as appropriate to avoid repetition.
As shown in fig. 5, an embodiment of the present application provides an electronic device 500, including: a processor 510, a memory 520 and a bus 530, the processor being connected to the memory by means of the bus, the memory storing computer readable instructions which, when executed by the processor, are adapted to carry out the method according to any one of the above-mentioned embodiments, in particular with reference to the description of the above-mentioned method embodiments, and detailed descriptions are omitted here as appropriate to avoid redundancy.
Wherein the bus is used to enable direct connection communication of these components. The processor in the embodiment of the application can be an integrated circuit chip with signal processing capability. The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, abbreviated as CPU), a network processor (Network Processor, abbreviated as NP), etc.; but may also be a Digital Signal Processor (DSP), application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The Memory may be, but is not limited to, random access Memory (Random Access Memory, RAM), read Only Memory (ROM), programmable Read Only Memory (Programmable Read-Only Memory, PROM), erasable Read Only Memory (Erasable Programmable Read-Only Memory, EPROM), electrically erasable Read Only Memory (Electric Erasable Programmable Read-Only Memory, EEPROM), etc. The memory has stored therein computer readable instructions which, when executed by the processor, perform the method described in the above embodiments.
It will be appreciated that the configuration shown in fig. 5 is illustrative only and may include more or fewer components than shown in fig. 5 or have a different configuration than shown in fig. 5. The components shown in fig. 5 may be implemented in hardware, software, or a combination thereof.
Embodiments of the present application also provide a computer readable storage medium, on which a computer program is stored, which when executed by a server, implements a method according to any one of the foregoing embodiments, and specifically reference may be made to the description in the foregoing method embodiments, and detailed descriptions are omitted herein as appropriate for avoiding repetition.
The above description is only of the preferred embodiments of the present application and is not intended to limit the present application, but various modifications and variations can be made to the present application by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application. It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method of picture editing, the method comprising:
Acquiring a picture to be edited;
Acquiring an editing trace input by an operation object on the picture to be edited;
acquiring a target format of the editing trace according to a predefined format, recording the target format and the position of the editing trace, and generating an editing file, wherein the predefined format is used for defining a display format of a graph corresponding to the editing trace;
Independently storing the editing file and recording the association relationship between the editing file and the picture to be edited;
the step of obtaining the edit trace input by the operation object on the picture to be edited comprises the following steps:
Acquiring an update editing trace input by the operation object on the picture to be edited;
When the picture to be edited is a picture with an editing trace, after the updated editing trace input by the operation object on the picture to be edited is obtained, the method further comprises:
According to a predefined format, acquiring a target format of the updated editing trace, enabling storage positions of the updated editing trace and the historical editing trace to be the same, storing an updated editing file composed of the target format of the updated editing trace and the position of the updated editing trace and the historical editing trace file together to form the editing file, and enabling the historical editing trace and the updated editing trace to be restored in an original file together when the picture to be edited is opened again, so that the operation object can continuously edit the editing trace.
2. The method according to claim 1, wherein the picture to be edited is a picture with an edit trace obtained by synthesizing a history editing file and an original file;
The step of obtaining the edit trace input by the operation object on the picture to be edited comprises the following steps:
acquiring an updated editing trace of the operation object for re-editing the historical editing trace;
the step of obtaining the target format of the editing trace according to the predefined format, recording the target format and the position of the editing trace, and generating an editing file comprises the following steps:
and determining the target format of the updated editing trace according to the predefined format, recording the target format of the updated editing trace and the position of the updated editing trace, and generating the editing file.
3. The method of claim 2, wherein the step of determining the position of the substrate comprises,
The obtaining the picture to be edited includes:
Searching the history editing file according to the association relation between the history editing file and the original file;
Analyzing the historical editing file to obtain positions and formats of all editing marks, and drawing the editing marks in the original file according to the positions and formats to obtain the picture to be edited.
4. The method according to claim 1 or 2, wherein before the independently saving the editing file and recording the association relationship between the editing file and the picture to be edited, the method further comprises:
and confirming receipt of a save instruction, wherein the save instruction is triggered by an action of switching pictures or closing a program.
5. The method according to claim 1 or 2, wherein the types of edit marks include lines, circles, rectangles, icons, and annotation boxes;
the predefined format includes: the lines, circles, rectangles, icons and annotating boxes are of size, angle, coordinates and color.
6. A method according to claim 1 or 2, wherein the association between the edit file and the picture to be edited is recorded by means of a URL address.
7. The method according to claim 1, wherein after the independently storing the editing file and recording the association relationship between the editing file and the picture to be edited, the method further comprises:
Confirming that a restoring instruction is received, wherein the restoring instruction is triggered by an action of opening a picture;
searching the editing file and the picture to be edited according to the association relation;
analyzing the editing file to obtain the positions and the formats of all the editing marks, and restoring the editing marks in the picture to be edited according to the positions and the formats to obtain a restored picture.
8. An apparatus for editing a picture, the apparatus comprising:
The picture to be edited obtaining module is configured to obtain a picture to be edited;
The editing trace acquisition module is configured to acquire an editing trace input by an operation object on the picture to be edited;
The editing file generation module is configured to acquire a target format of the editing trace according to a predefined format, record the target format and the position of the editing trace, and generate an editing file, wherein the predefined format is used for defining a display format of a graph corresponding to the editing trace;
The storage module is configured to independently store the editing file and record the association relationship between the editing file and the picture to be edited;
wherein the edit trace obtaining module is further configured to:
Acquiring an update editing trace input by the operation object on the picture to be edited;
Wherein when the picture to be edited is a picture with an editing trace, the editing file generating module is further configured to:
According to a predefined format, acquiring a target format of the updated editing trace, enabling storage positions of the updated editing trace and the historical editing trace to be the same, storing an updated editing file composed of the target format of the updated editing trace and the position of the updated editing trace and the historical editing trace file together to form the editing file, and enabling the historical editing trace and the updated editing trace to be restored in an original file together when the picture to be edited is opened again, so that the operation object can continuously edit the editing trace.
9. An electronic device, comprising: a processor, a memory, and a bus;
The processor is connected to the memory via the bus, the memory storing computer readable instructions which, when executed by the processor, are adapted to carry out the method of any one of claims 1-7.
10. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a server, implements the method according to any of claims 1-7.
CN202110115004.4A 2021-01-27 2021-01-27 Picture editing method and device, electronic equipment and storage medium Active CN112819924B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110115004.4A CN112819924B (en) 2021-01-27 2021-01-27 Picture editing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110115004.4A CN112819924B (en) 2021-01-27 2021-01-27 Picture editing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112819924A CN112819924A (en) 2021-05-18
CN112819924B true CN112819924B (en) 2024-05-14

Family

ID=75860067

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110115004.4A Active CN112819924B (en) 2021-01-27 2021-01-27 Picture editing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112819924B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116107472A (en) * 2021-11-10 2023-05-12 北京字节跳动网络技术有限公司 Display method, display device, electronic equipment and storage medium
CN114390045B (en) * 2022-01-07 2023-10-31 北京思明启创科技有限公司 Interactive file transmission method and system

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11232299A (en) * 1998-02-18 1999-08-27 Fujitsu Ltd Information adding device and its program storage medium
CN1838111A (en) * 2006-02-14 2006-09-27 北京北大方正电子有限公司 Method for editing file and recording modification mark
CN101441644A (en) * 2007-11-19 2009-05-27 英福达科技股份有限公司 Web page annotation system and method
CN102136153A (en) * 2010-01-22 2011-07-27 腾讯科技(深圳)有限公司 Method and device for processing picture for instant communication tool
CN102541825A (en) * 2010-12-23 2012-07-04 北京大学 Method and device for recording trace information of electronic file
CN102609401A (en) * 2011-12-26 2012-07-25 北京大学 Webpage annotation method
CN105957542A (en) * 2016-04-25 2016-09-21 青岛海信移动通信技术股份有限公司 Audio file editing method and audio file editing device
CN106845913A (en) * 2015-12-07 2017-06-13 四川效率源信息安全技术股份有限公司 Outlook express receive and dispatch the extracting method of vestige
CN107831980A (en) * 2017-10-23 2018-03-23 广州视源电子科技股份有限公司 A kind of method, apparatus, electronic equipment and storage medium for closing annotation pattern
CN110263303A (en) * 2018-03-12 2019-09-20 北大方正集团有限公司 The retroactive method and device of text modification history
CN110597806A (en) * 2019-08-13 2019-12-20 上海建桥学院 Wrong question set generation and answer statistics system and method based on reading and amending identification

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4317334B2 (en) * 2000-09-08 2009-08-19 株式会社リコー Image forming apparatus and document management system
AU2013354454A1 (en) * 2012-12-07 2015-04-16 Sicpa Holding Sa Non-periodic tiling document security element
CN103218765A (en) * 2013-03-21 2013-07-24 无锡曼荼罗软件有限公司 Method and system for retaining medical document modifying traces
CN106815185B (en) * 2017-03-10 2018-09-18 茂名市公安局 One kind investigating report automatic generation method and system on the spot
CN107870895A (en) * 2017-11-15 2018-04-03 苏州三星电子电脑有限公司 Mobile device document picture editing method and editing device
CN111263211B (en) * 2018-12-03 2022-02-08 深圳市炜博科技有限公司 Method for caching video data and terminal equipment
CN111382561B (en) * 2020-03-13 2022-11-01 北大方正集团有限公司 File verification method, device, equipment and storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11232299A (en) * 1998-02-18 1999-08-27 Fujitsu Ltd Information adding device and its program storage medium
CN1838111A (en) * 2006-02-14 2006-09-27 北京北大方正电子有限公司 Method for editing file and recording modification mark
CN101441644A (en) * 2007-11-19 2009-05-27 英福达科技股份有限公司 Web page annotation system and method
CN102136153A (en) * 2010-01-22 2011-07-27 腾讯科技(深圳)有限公司 Method and device for processing picture for instant communication tool
CN102541825A (en) * 2010-12-23 2012-07-04 北京大学 Method and device for recording trace information of electronic file
CN102609401A (en) * 2011-12-26 2012-07-25 北京大学 Webpage annotation method
CN106845913A (en) * 2015-12-07 2017-06-13 四川效率源信息安全技术股份有限公司 Outlook express receive and dispatch the extracting method of vestige
CN105957542A (en) * 2016-04-25 2016-09-21 青岛海信移动通信技术股份有限公司 Audio file editing method and audio file editing device
CN107831980A (en) * 2017-10-23 2018-03-23 广州视源电子科技股份有限公司 A kind of method, apparatus, electronic equipment and storage medium for closing annotation pattern
CN110263303A (en) * 2018-03-12 2019-09-20 北大方正集团有限公司 The retroactive method and device of text modification history
CN110597806A (en) * 2019-08-13 2019-12-20 上海建桥学院 Wrong question set generation and answer statistics system and method based on reading and amending identification

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于EXT3系统的文件内容操作痕迹提取软件设计;徐国天;;《信息网络安全》;20141231(第12期);第53-56页 *

Also Published As

Publication number Publication date
CN112819924A (en) 2021-05-18

Similar Documents

Publication Publication Date Title
CN112819924B (en) Picture editing method and device, electronic equipment and storage medium
US9977580B2 (en) Easy-to-use desktop screen recording application
CN109685870B (en) Information labeling method and device, labeling equipment and storage medium
CN111125598A (en) Intelligent data query method, device, equipment and storage medium
CN108109453A (en) Work correction device
CN110765995A (en) Answer sheet generation method, answer sheet identification device and storage medium
CN113807308A (en) Job correction method, device, equipment, storage medium and computer program product
CN111159975B (en) Display method and device
CN109064810A (en) A kind of operation notification method and device based on education operating system
US20140281948A1 (en) Information displaying apparatus, information editing method and non-transitory computer-readable storage medium
CN110162301B (en) Form rendering method, form rendering device and storage medium
CN111985467A (en) Chat record screenshot processing method and device, computer equipment and storage medium
CN113934876B (en) Web-based job approval method, device and system
CN111475699B (en) Website data crawling method and device, electronic equipment and readable storage medium
CN117111817B (en) Annotation information erasing method and device, electronic equipment and storage medium
CN113705816B (en) Flow chart generation method, electronic device, device and readable storage medium
CN117671459B (en) Guided RPA artificial intelligence deep learning method and system
CN113065318B (en) Electronic point reading material manufacturing method and device, electronic equipment and storage medium
CN113177995B (en) Text reorganization method of CAD drawing and computer readable storage medium
CN114363311B (en) Message reporting method and system for simulation tool of intelligent operation and maintenance monitoring system of turnout
CN115390853B (en) Structured analysis method, system, terminal and storage medium for multi-source process file
CN110309703B (en) Method and system for intelligently adaptively identifying and cutting answer area of test paper
CN112699887B (en) Method and device for obtaining mathematical object annotation model and mathematical object annotation
CN113473223B (en) Material processing method, device, electronic equipment and storage medium
CN117408233A (en) Shared document processing method and device and electronic equipment

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
GR01 Patent grant
GR01 Patent grant