CN112650483A - Method and device for restoring design draft, computer equipment and storage medium - Google Patents

Method and device for restoring design draft, computer equipment and storage medium Download PDF

Info

Publication number
CN112650483A
CN112650483A CN202011582375.5A CN202011582375A CN112650483A CN 112650483 A CN112650483 A CN 112650483A CN 202011582375 A CN202011582375 A CN 202011582375A CN 112650483 A CN112650483 A CN 112650483A
Authority
CN
China
Prior art keywords
draft
design
generated
difference
manuscript
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
CN202011582375.5A
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.)
JD Digital Technology Holdings Co Ltd
Original Assignee
JD Digital Technology Holdings 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 JD Digital Technology Holdings Co Ltd filed Critical JD Digital Technology Holdings Co Ltd
Priority to CN202011582375.5A priority Critical patent/CN112650483A/en
Publication of CN112650483A publication Critical patent/CN112650483A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • 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/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Mining & Analysis (AREA)
  • Human Computer Interaction (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The application provides a method, a device, computer equipment and a storage medium for restoring a design draft, wherein the method comprises the following steps: overlapping the generated draft and the design draft, wherein the layer arranged on the upper layer is a first layer, and the layer arranged on the lower layer is a second layer; adjusting the transparency of the first layer to a preset transparency; acquiring the difference between the generated draft and the design draft; acquiring a code corresponding to the difference so as to modify the code corresponding to the difference; updating the generated draft according to the modified codes; and acquiring the difference between the updated generated draft and the design draft, and modifying codes corresponding to the difference until the generated draft and the design draft are not different. The method of the embodiment of the application can improve the efficiency of restoring the design draft.

Description

Method and device for restoring design draft, computer equipment and storage medium
Technical Field
The present application relates to the field of data processing, and in particular, to a method and an apparatus for restoring a design draft, a computer device, and a storage medium.
Background
The page design of the web page is usually that a software engineer writes code according to a manuscript provided by the designer, and the generated web page is generated from the written code, which may be referred to as a generation draft.
In the process of writing the code, a software engineer cannot directly see the generated result, so that whether the written code is wrong or not cannot be known.
Most of methods for detecting web pages and design manuscripts in the prior art compare design drawings and web pages directly by manual work after the pages are generated, and the work may not be the responsibility of software engineers. If the two are different, the code string needs to be fed back to the software engineer again, the software engineer searches the corresponding code string in the code according to different points, and the generated webpage is made to be consistent with the design manuscript by modifying the code string.
The above method needs to be compared after the web page is completely generated. In addition, according to the difference between the page and the design manuscript, the problems existing in the code need to be traced back, and multiple round trips between a software engineer and a designer may be needed, so that the method for restoring the design manuscript in the prior art is very inefficient.
Disclosure of Invention
In order to solve the technical problems or at least partially solve the technical problems, the present application provides a method, an apparatus, a computer device, and a storage medium for restoring a design draft, which can improve the efficiency of restoring the design draft.
In a first aspect, the present application provides a method for restoring a design draft, including:
overlapping the generated draft and the design draft, wherein the layer arranged on the upper layer is a first layer, and the layer arranged on the lower layer is a second layer;
adjusting the transparency of the first layer to a preset transparency;
acquiring the difference between the generated draft and the design draft;
acquiring a code corresponding to the difference so as to modify the code corresponding to the difference;
updating the generated draft according to the modified codes;
and acquiring the difference between the updated generated draft and the design draft, and modifying codes corresponding to the difference until the generated draft and the design draft are not different.
In an embodiment of the application, the first layer is the generated draft, and the second layer is the design draft; or
The first layer is the design draft, and the second layer is the generation draft.
In this embodiment of the present application, the overlapping the generated document and the design document includes:
overlapping the main image of the generated manuscript and the main image of the design manuscript; or
Overlapping the edge of the generated draft and the edge of the design draft; or
Overlapping the center of the generated draft and the center of the design draft; or
And overlapping the keywords in the generated draft and the keywords in the design draft.
In this embodiment of the present application, overlapping the keywords in the generated draft and the keywords in the design draft includes:
acquiring characters in the generated draft;
taking any character in the generated manuscript as a first keyword;
acquiring characters in the design draft;
acquiring characters in the design draft, which are the same as the first keywords, as second keywords;
overlapping the first keyword and the second keyword.
In the embodiment of the application, the overlapped generated draft and the design drawing are deployed in a first area on a visual interface, the code corresponding to the generated draft is deployed in a second area on the visual interface, the generated draft of the first area corresponds to the code of the second area,
wherein the first and second regions do not overlap;
the first region and the second region are arranged laterally in parallel, or the first region and the second region are arranged vertically in parallel.
In this embodiment of the present application, the generating a draft of the first area corresponds to a code of the second area, and the method includes:
the generated draft is divided into a plurality of display units, the codes are divided into a plurality of functional units, and each display unit corresponds to at least one functional unit.
In the embodiment of the application, the design draft is divided into a plurality of design units,
acquiring the difference between the generated draft and the design draft, including:
acquiring a first difference between the display unit and the corresponding design unit, wherein the difference comprises one or more of color difference, size difference and interval difference.
In an embodiment of the present application, the obtaining a code corresponding to the difference includes:
acquiring a functional unit corresponding to the first difference so as to modify codes in the functional unit;
the updating and generating of the draft according to the modified codes comprises the following steps:
and only updating the display unit corresponding to the modified code.
In this embodiment of the present application, the obtaining a difference between the design draft and the generated draft, and modifying codes corresponding to the difference until there is no difference between the generated draft and the design draft, the method further includes:
regenerating a manuscript setting generation manuscript according to the code which enables the generation manuscript not to be different from the design manuscript;
and judging whether a difference exists between the manuscript finalization generation manuscript and the design manuscript or not.
In a second aspect, an apparatus for restoring a design manuscript is provided, the apparatus comprising:
the overlapping unit is used for overlapping the generated draft and the design draft, wherein the layer arranged on the upper layer is a first layer, and the layer arranged on the lower layer is a second layer;
the transparency adjusting unit is used for adjusting the transparency of the first image layer to a preset transparency;
a difference acquisition unit that acquires a difference between the generated manuscript and the design manuscript;
a code acquiring unit which acquires a code corresponding to the difference so that the code corresponding to the difference is modified;
the generating unit updates the generated draft according to the modified codes;
the difference acquiring unit is further configured to acquire a difference between the updated generated manuscript and the design manuscript, and modify a code corresponding to the difference until the generated manuscript is not different from the design manuscript.
In a third aspect, a computer device is provided, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the above method when executing the computer program.
In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the above-mentioned method.
The application provides a method for restoring a design draft, which comprises the following steps: overlapping the generated draft and the design draft, wherein the layer arranged on the upper layer is a first layer, and the layer arranged on the lower layer is a second layer; adjusting the transparency of the first layer to a preset transparency; acquiring the difference between the generated draft and the design draft; acquiring a code corresponding to the difference so as to modify the code corresponding to the difference; updating the generated draft according to the modified codes; and acquiring the difference between the updated generated draft and the design draft, and modifying codes corresponding to the difference until the generated draft and the design draft are not different. In the method of the embodiment of the application, the generated draft and the design draft are overlapped, and the corresponding codes are modified according to the difference between the generated draft and the design draft until the generated draft and the design draft are not different, that is, the generated draft can be restored. According to the method, the difference between the generated draft and the design draft is acquired by adopting a more visual method, codes corresponding to the difference can be directly modified, the process of restoring the design draft is simplified, and the efficiency is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
Fig. 1 is an application environment diagram of a method for restoring a design draft in an embodiment of the present application;
fig. 2 is a schematic flow chart of a method for restoring a design draft in an embodiment of the present application;
fig. 3 is a schematic diagram illustrating that a generated manuscript and a design manuscript are overlapped in the embodiment of the present application;
fig. 4 is a schematic diagram illustrating that a generated manuscript and a design manuscript are overlapped in the embodiment of the present application;
FIG. 5 is a schematic view of a visualization interface in an embodiment of the present application;
FIG. 6 is a schematic view of a visualization interface in an embodiment of the present application;
FIG. 7 is a schematic view of a visualization interface in an embodiment of the present application;
fig. 8 is a schematic diagram of an apparatus for restoring a design in an embodiment of the present application;
fig. 9 is an internal structural diagram of a computer device in the embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Fig. 1 is an application environment diagram of a method for restoring a design draft in one embodiment. Referring to fig. 1, the method for restoring a design manuscript is applied to a system for restoring a design manuscript. The system for restoring the design draft includes a terminal 110 and a server 120. The terminal 110 and the server 120 are connected through a network. The terminal 110 may specifically be a desktop terminal or a mobile terminal, and the mobile terminal may specifically be at least one of a mobile phone, a tablet computer, a notebook computer, and the like. The server 120 may be implemented as a stand-alone server or a server cluster composed of a plurality of servers.
In this embodiment, the terminal 110 may be configured to execute the method for restoring the design draft, the server 120 may be configured to receive a code capable of restoring the design draft, or the method may also be applied to the server 120.
The design draft in the embodiment of the application may be a hand-drawn draft or a document formed by splicing materials. The generated draft in the embodiment of the application is a webpage, an APP page or other display pages generated according to the codes.
In the embodiment of the present application, the generation draft generated from the code is the same as the design draft.
As shown in FIG. 2, in one embodiment, a method of restoring a design is provided. The embodiment is mainly illustrated by applying the method to the terminal 110 (or the server 120) in fig. 1. Referring to fig. 2, the method for restoring the design draft specifically includes the following steps:
step 210, overlapping the generated draft and the design draft, wherein the layer arranged on the upper layer is a first layer, and the layer arranged on the lower layer is a second layer;
in an embodiment of the application, the first layer is the generated draft, and the second layer is the design draft; or
The first layer is the design draft, and the second layer is the generation draft.
That is, in the embodiments of the present application, design or creation may be written on.
Step 220, adjusting the transparency of the first layer to a preset transparency;
in the embodiment of the application, the transparency represents the transparency degree of the first layer, 100% transparency represents full transparency, and 0% transparency represents opacity.
In this embodiment of the application, the preset transparency may be different according to different designs, for example, if all the designs are characters, and the difference between the characters and the second layer can be seen through the first layer if the transparency is set to be slightly lower, for example, 80%, because the difference between the characters is easily recognized. If the picture is a relatively fine picture, the preset transparency may be slightly higher, for example, 50%, so as to facilitate the identification of the difference.
Step 230, acquiring the difference between the generated draft and the design draft;
step 240, acquiring a code corresponding to the difference, so that the code corresponding to the difference is modified;
step 250, updating the generated draft according to the modified codes;
step 260, acquiring the difference between the updated generated draft and the design draft, and modifying the codes corresponding to the difference until the generated draft and the design draft are not different.
The application discloses a method for restoring a design draft, which comprises the following steps: overlapping the generated draft and the design draft, wherein the layer arranged on the upper layer is a first layer, and the layer arranged on the lower layer is a second layer; adjusting the transparency of the first layer to a preset transparency; acquiring the difference between the generated draft and the design draft; acquiring a code corresponding to the difference so as to modify the code corresponding to the difference; updating the generated draft according to the modified codes; and acquiring the difference between the updated generated draft and the design draft, and modifying codes corresponding to the difference until the generated draft and the design draft are not different. In the method of the embodiment of the application, the generated draft and the design draft are overlapped, and the corresponding codes are modified according to the difference between the generated draft and the design draft until the generated draft and the design draft are not different, that is, the generated draft can be restored. According to the method, the difference between the generated draft and the design draft is acquired by adopting a more visual method, codes corresponding to the difference can be directly modified, the process of restoring the design draft is simplified, and the efficiency is improved.
In this embodiment of the present application, in step 210, the overlapping the generated manuscript and the design manuscript includes:
overlapping the main image of the generated manuscript and the main image of the design manuscript; or
Overlapping the edge of the generated draft and the edge of the design draft; or
Overlapping the center of the generated draft and the center of the design draft; or
And overlapping the keywords in the generated draft and the keywords in the design draft.
In this embodiment of the present application, overlapping the keywords in the generated draft and the keywords in the design draft includes:
acquiring characters in the generated draft;
taking any character in the generated manuscript as a first keyword;
acquiring characters in the design draft;
acquiring characters in the design draft, which are the same as the first keywords, as second keywords;
overlapping the first keyword and the second keyword.
The design draft and the generation draft may include a plurality of characters, and after the characters are extracted, any character may be selected as the first keyword. However, since the characters in the generated manuscript may be repeated, and the repeated characters also need to determine the corresponding second keyword in the generated manuscript according to the context or the general position, the characters which are not repeated are preferably used as the first keyword, so that the time for acquiring the corresponding second keyword can be saved.
If all the words are repeated, then the keywords need to be identified based on the context, as well as the general location of the words, as described above. The general location may be location information near the top edge, near the center, etc.
In the embodiment of the application, in order to display the difference between the generated manuscript and the design manuscript more intuitively, the generated manuscript and the design manuscript are overlapped. There are various ways to overlap the generated manuscript and the design manuscript, and the embodiments may be included, but are not limited to the embodiments.
Fig. 3 is a schematic diagram illustrating overlapping of a generated document and a design document according to an embodiment of the present application, and fig. 3 is a schematic diagram illustrating overlapping of centers of the generated document and the design document. As can be seen in fig. 3, there is a difference between the circle in the generated manuscript and the circle in the design manuscript.
Fig. 4 is a schematic diagram illustrating overlapping of a generated manuscript and a design manuscript according to an embodiment of the present application, and fig. 4 is a schematic diagram illustrating overlapping of a keyword in the design manuscript and a keyword in the generated manuscript. As can be seen from fig. 4, the keyword "one" in the design draft and the keyword "one" in the generated draft overlap, but the remaining words are different in that the space between the words in the generated draft and the space between the words in the design draft are different.
In the embodiment of the present application, there are various methods for acquiring differences, and generally, the generated draft and the design drawing are divided into a plurality of blocks, which may be divided according to types, for example, a text portion, an image portion, and a link portion, and then comparison is performed according to different types.
The text portion may be extracted first and then compared in font, size, color, spacing, etc.
The image parts can be compared by various image processing methods in the prior art, or can be compared by an image comparison model and a neural network model.
In the link section, since the link may not be directly displayed in the design drawing, after the comparison between the text included in the link section in the generated draft and the text included in the link section in the design draft is completed, the comparison needs to be performed according to the parameter added to the design draft. Additional parameters of the design may be used to indicate other pages to which the link is to jump, or may be user-operated, selected, confirmed. This part may not be directly exposed in the design but may be embodied by additional parameters of the design.
The additional parameters may refer to parameters, or may be other design files, such as a style of the design file after jumping, a design file requiring user confirmation, a design file after user confirmation, and the like.
In the embodiment of the present application, the link part, the text part, and the graphic part may include additional parameters. Therefore, the part with the additional parameters can be specially separated, or can be combined with a link part, a text part and a graphic part. If the two parts are combined, the additional parameters of the design draft need to be extracted and compared with the corresponding parts in the generated draft to judge whether the difference exists.
In the embodiment of the present application, the generated draft and the design draft may also be obtained by directly using various algorithms, comparison models, and the like in the prior art without dividing, and details are not described herein.
In the embodiment of the application, the overlapped generated draft and the design drawing are deployed in a first area on a visual interface, the code corresponding to the generated draft is deployed in a second area on the visual interface, the generated draft of the first area corresponds to the code of the second area,
wherein the first and second regions do not overlap;
the first region and the second region are arranged laterally in parallel, or the first region and the second region are arranged vertically in parallel.
Fig. 5 is a schematic view of a visualization interface according to an embodiment of the present application. As shown in FIG. 5, the left side 510 is a first region and the right side 520 is a second region. The overlapped generation draft and design draft are set in the first area, and the corresponding codes are set in the second area.
The first and second regions may be laterally arranged in parallel as shown in fig. 5, or may be vertically arranged in parallel as shown in fig. 6.
In the embodiment of the application, the first area and the second area are set, and the first area and the second area are not overlapped, so that the process of restoring the design draft is more visual.
In this embodiment of the present application, the generating a draft of the first area corresponds to a code of the second area, and the method includes:
the generated draft is divided into a plurality of display units, the codes are divided into a plurality of functional units, and each display unit corresponds to at least one functional unit.
The generated manuscript can be divided into a plurality of display units according to functions, display modes, attributes and the like of the generated manuscript, as shown in fig. 5, the content of the upper part 511 is a picture and is set as a first display unit; the middle part is a character description part and is provided as a second display unit 512; the lower portion is a user-operable portion, such as a selectable color, size, kit, etc., provided as the third display unit 513. According to the specific content of each display unit, the display unit can be further divided into a plurality of sub-display units, such as a text description part, and the general text of each webpage can be a first sub-display unit; the characters aiming at the commodity can be a second sub-display unit; the linked text can be a third sub-display unit. The sub-display unit is not shown in the figure.
Elements in fig. 6 that are the same as those in fig. 5 have the same or similar functions and are not described in detail herein.
The code is also divided into a plurality of functional units, which may be codes, code segments, or character strings that perform specific functions.
Each display unit in the generated draft may correspond to one or more functional units, as shown in fig. 5, a first display unit 511 corresponds to a functional unit 521, a second display unit 512 corresponds to functional units 522 and 523, and a third display unit 513 corresponds to a functional unit 524.
In the embodiment of the present application, the correspondence between the display unit and the function unit may be indicated by a link manner/an arrow manner as shown in fig. 5. In practical applications, the number of lines of code included in a functional unit may be too large to be fully expanded in an interface of the functional unit, where the code may be displayed in a folded manner, or may be displayed in a simplified manner, or may be displayed after being reduced. The correspondence between the display unit and the functional unit may also be indicated by highlighting, foreground display, or enlarged display, or the like.
For example, as shown in fig. 7, as shown in the upper schematic view of fig. 7, the first region is 710, and the second region is 720, where the first region includes display units 711, 712, and 713, and the second region includes function units 721, 722, 723, and 724. The code in the functional unit is folded.
Clicking the display unit 711 in the first area of fig. 7, the corresponding function unit 721 in the second area is enlarged in the second area, and is placed on the upper layer of the second area, and the folded codes are all unfolded, so as to facilitate the modification of the codes, as shown in the lower schematic diagram of fig. 7.
In the embodiment of the application, the design draft is divided into a plurality of design units,
acquiring the difference between the generated draft and the design draft, including:
acquiring first differences between the display units and the corresponding design units, wherein the differences comprise color differences, size differences, font differences, interval differences or attribute differences.
The attribute difference refers to attributes such as link skip, user operation and user confirmation, and the part of the attributes may not be directly shown in the design draft but can be embodied through additional parameters of the design draft. The additional parameters are as described in the above embodiments and will not be described herein.
In an embodiment of the present application, the obtaining a code corresponding to the difference includes:
acquiring a functional unit corresponding to the first difference so as to modify codes in the functional unit;
the updating and generating of the draft according to the modified codes comprises the following steps:
and only updating the display unit corresponding to the modified code.
In the embodiment of the application, after the code in a certain functional unit is updated, the whole generated draft is not required to be updated only according to the display unit corresponding to the modified code, so that the frequency of updating the whole generated draft can be saved, the system resource is saved, and the efficiency is improved.
In this embodiment of the present application, the obtaining a difference between the design draft and the generated draft, and modifying codes corresponding to the difference until there is no difference between the generated draft and the design draft, the method further includes:
regenerating a manuscript setting generation manuscript according to the code which enables the generation manuscript not to be different from the design manuscript;
and judging whether a difference exists between the manuscript finalization generation manuscript and the design manuscript or not.
In the embodiment of the present application, after a code is modified, only a corresponding generated draft is updated, after the generated draft and a design draft have no difference, a complete generated draft is generated again according to the code, the generated draft is called a finalized generated draft, and then a next difference judgment is performed, so that a change of a non-corresponding display unit in the generated draft due to a certain code modification can be reduced, for example, as shown in fig. 5, a first display unit 511 corresponds to a function unit 521, a second display unit 512 corresponds to function units 522 and 523, after the function unit 521 is modified, only the first display unit 511 is updated, but due to an irregular code writing, or mutual reference of parameters and results between codes, an update of the second display unit 512 may be caused. In the embodiment of the present application, after the first display unit 511 and the second display unit 512 are not different from the design draft, the first display unit 511 and the second display unit 512 are regenerated according to the functional units 521, 522, and 523, and whether the first display unit 511 and the second display unit 512 are different from the design draft is determined again.
In the embodiment of the application, the design draft is divided into at least one design unit, the generated draft is divided into at least one display unit, the codes are divided into at least one functional unit, comparison can be performed according to the display units and the corresponding design units when comparison between the design draft and the generated draft is performed, if a plurality of display units and a plurality of design units exist, comparison can be performed in parallel, and therefore comparison time can be reduced.
Fig. 2 is a schematic flow chart of a method for restoring a design draft in one embodiment. It should be understood that, although the steps in the flowchart of fig. 2 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in fig. 2 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
Corresponding to the method for restoring the design draft, the application also provides a device for restoring the design draft. In one embodiment, as shown in fig. 8, the apparatus comprises:
an overlapping unit 810, configured to overlap the generated draft and the design draft, where the layer disposed on the upper layer is a first layer, and the layer disposed on the lower layer is a second layer;
a transparency adjusting unit 820, configured to adjust a transparency of the first layer to a preset transparency;
a difference acquisition unit 830 that acquires a difference between the generated manuscript and the design manuscript;
a code acquiring unit 840 that acquires a code corresponding to the difference so that the code corresponding to the difference is modified;
a generating unit 850 for updating the generated draft according to the modified codes;
the difference acquiring unit 830 is further configured to acquire a difference between the updated generated manuscript and the design manuscript, and modify a code corresponding to the difference until the generated manuscript is not different from the design manuscript.
In an embodiment of the application, the first layer is the generated draft, and the second layer is the design draft; or
The first layer is the design draft, and the second layer is the generation draft.
In this embodiment of the application, the overlapping unit 810 is further configured to:
overlapping the main image of the generated manuscript and the main image of the design manuscript; or
Overlapping the edge of the generated draft and the edge of the design draft; or
Overlapping the center of the generated draft and the center of the design draft; or
And overlapping the keywords in the generated draft and the keywords in the design draft.
In this embodiment of the application, the overlapping unit 810 is further configured to:
acquiring characters in the generated draft;
taking any character in the generated manuscript as a first keyword;
acquiring characters in the design draft;
acquiring characters in the design draft, which are the same as the first keywords, as second keywords;
overlapping the first keyword and the second keyword.
In the embodiment of the application, the overlapped generated draft and the design drawing are deployed in a first area on a visual interface, the code corresponding to the generated draft is deployed in a second area on the visual interface, the generated draft of the first area corresponds to the code of the second area,
wherein the first and second regions do not overlap;
the first region and the second region are arranged laterally in parallel, or the first region and the second region are arranged vertically in parallel.
In this embodiment of the present application, the generating a draft of the first area corresponds to a code of the second area, and the method includes:
the generated draft is divided into a plurality of display units, the codes are divided into a plurality of functional units, and each display unit corresponds to at least one functional unit.
In the embodiment of the application, the design draft is divided into a plurality of design units,
acquiring the difference between the generated draft and the design draft, including:
acquiring a first difference between the display unit and the corresponding design unit, wherein the difference comprises one or more of color difference, size difference and interval difference.
In this embodiment of the present application, the difference obtaining unit 830 is further configured to:
acquiring a functional unit corresponding to the first difference so as to modify codes in the functional unit;
the updating and generating of the draft according to the modified codes comprises the following steps:
and only updating the display unit corresponding to the modified code.
In this embodiment of the present application, the generating unit 850 is further configured to: after acquiring the difference between the design draft and the generated draft and modifying codes corresponding to the difference until no difference exists between the generated draft and the design draft:
regenerating a manuscript setting generation manuscript according to the code which enables the generation manuscript not to be different from the design manuscript;
and judging whether a difference exists between the manuscript finalization generation manuscript and the design manuscript or not.
The device for restoring the design draft can improve the efficiency of restoring the design draft.
FIG. 9 is a diagram illustrating an internal structure of a computer device in one embodiment. The computer device may specifically be the terminal 110 (or the server 120) in fig. 1. As shown in fig. 9, the computer apparatus includes a processor, a memory, a network interface, an input device, and a display screen connected through a system bus. Wherein the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program that, when executed by the processor, causes the processor to implement a method of restoring a design. The internal memory may also store a computer program, and the computer program, when executed by the processor, may cause the processor to perform a method of restoring the design. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 9 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program: overlapping the generated draft and the design draft, wherein the layer arranged on the upper layer is a first layer, and the layer arranged on the lower layer is a second layer; adjusting the transparency of the first layer to a preset transparency; acquiring the difference between the generated draft and the design draft; acquiring a code corresponding to the difference so as to modify the code corresponding to the difference; updating the generated draft according to the modified codes; and acquiring the difference between the updated generated draft and the design draft, and modifying codes corresponding to the difference until the generated draft and the design draft are not different. The method of the embodiment of the application can improve the efficiency of restoring the design draft.
In an embodiment, the processor executes the computer program to implement the steps of the above method, which are not described herein again.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: overlapping the generated draft and the design draft, wherein the layer arranged on the upper layer is a first layer, and the layer arranged on the lower layer is a second layer; adjusting the transparency of the first layer to a preset transparency; acquiring the difference between the generated draft and the design draft; acquiring a code corresponding to the difference so as to modify the code corresponding to the difference; updating the generated draft according to the modified codes; and acquiring the difference between the updated generated draft and the design draft, and modifying codes corresponding to the difference until the generated draft and the design draft are not different. The method of the embodiment of the application can improve the efficiency of restoring the design draft.
In an embodiment, the computer program, when executed by the processor, further implements the steps of the above method, which are not described herein again.
In one embodiment, a computer program product or computer program is provided that includes computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the steps of: overlapping the generated draft and the design draft, wherein the layer arranged on the upper layer is a first layer, and the layer arranged on the lower layer is a second layer; adjusting the transparency of the first layer to a preset transparency; acquiring the difference between the generated draft and the design draft; acquiring a code corresponding to the difference so as to modify the code corresponding to the difference; updating the generated draft according to the modified codes; and acquiring the difference between the updated generated draft and the design draft, and modifying codes corresponding to the difference until the generated draft and the design draft are not different. The method of the embodiment of the application can improve the efficiency of restoring the design draft.
In an embodiment, the computer program product or the computer program when executed further implements the steps of the above method, which are not described herein again.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is merely exemplary of the present application and is presented to enable those skilled in the art to understand and practice the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (12)

1. A method for restoring a design draft, the method comprising:
overlapping the generated draft and the design draft, wherein the layer arranged on the upper layer is a first layer, and the layer arranged on the lower layer is a second layer;
adjusting the transparency of the first layer to a preset transparency;
acquiring the difference between the generated draft and the design draft;
acquiring a code corresponding to the difference so as to modify the code corresponding to the difference;
updating the generated draft according to the modified codes;
and acquiring the difference between the updated generated draft and the design draft, and modifying codes corresponding to the difference until the generated draft and the design draft are not different.
2. The method according to claim 1, wherein the first layer is the generated design, and the second layer is the design; or
The first layer is the design draft, and the second layer is the generation draft.
3. The method of claim 1, wherein overlapping the generated manuscript and the design manuscript comprises:
overlapping the main image of the generated manuscript and the main image of the design manuscript; or
Overlapping the edge of the generated draft and the edge of the design draft; or
Overlapping the center of the generated draft and the center of the design draft; or
And overlapping the keywords in the generated draft and the keywords in the design draft.
4. The method of claim 3, wherein overlapping the keywords in the generated draft and the keywords in the design draft comprises:
acquiring characters in the generated draft;
taking any character in the generated manuscript as a first keyword;
acquiring characters in the design draft;
acquiring characters in the design draft, which are the same as the first keywords, as second keywords;
overlapping the first keyword and the second keyword.
5. The method of claim 1, wherein the overlapped generated draft and the design drawing are deployed in a first area on a visual interface, wherein the code corresponding to the generated draft is deployed in a second area on the visual interface, wherein the generated draft of the first area corresponds to the code of the second area,
wherein the first and second regions do not overlap;
the first region and the second region are arranged laterally in parallel, or the first region and the second region are arranged vertically in parallel.
6. The method of claim 5, wherein the generation of the first region corresponds to the code of the second region, comprising:
the generated draft is divided into a plurality of display units, the codes are divided into a plurality of functional units, and each display unit corresponds to at least one functional unit.
7. The method of claim 6, wherein the design is divided into a plurality of design units,
acquiring the difference between the generated draft and the design draft, including:
acquiring a first difference between the display unit and the corresponding design unit, wherein the difference comprises one or more of color difference, size difference and interval difference.
8. The method of claim 7, wherein the obtaining the code corresponding to the difference comprises:
acquiring a functional unit corresponding to the first difference so as to modify codes in the functional unit;
the updating and generating of the draft according to the modified codes comprises the following steps:
and only updating the display unit corresponding to the modified code.
9. The method of claim 1, wherein obtaining the difference between the design and the generated design and modifying the code corresponding to the difference until no difference exists between the generated design and the design, the method further comprises:
regenerating a manuscript setting generation manuscript according to the code which enables the generation manuscript not to be different from the design manuscript;
and judging whether a difference exists between the manuscript finalization generation manuscript and the design manuscript or not.
10. An apparatus for restoring a design, the apparatus comprising:
the overlapping unit is used for overlapping the generated draft and the design draft, wherein the layer arranged on the upper layer is a first layer, and the layer arranged on the lower layer is a second layer;
the transparency adjusting unit is used for adjusting the transparency of the first image layer to a preset transparency;
a difference acquisition unit that acquires a difference between the generated manuscript and the design manuscript;
a code acquiring unit which acquires a code corresponding to the difference so that the code corresponding to the difference is modified;
the generating unit updates the generated draft according to the modified codes;
the difference acquiring unit is further configured to acquire a difference between the updated generated manuscript and the design manuscript, and modify a code corresponding to the difference until the generated manuscript is not different from the design manuscript.
11. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 9 are implemented when the computer program is executed by the processor.
12. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 9.
CN202011582375.5A 2020-12-28 2020-12-28 Method and device for restoring design draft, computer equipment and storage medium Pending CN112650483A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011582375.5A CN112650483A (en) 2020-12-28 2020-12-28 Method and device for restoring design draft, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011582375.5A CN112650483A (en) 2020-12-28 2020-12-28 Method and device for restoring design draft, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112650483A true CN112650483A (en) 2021-04-13

Family

ID=75363481

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011582375.5A Pending CN112650483A (en) 2020-12-28 2020-12-28 Method and device for restoring design draft, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112650483A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113407461A (en) * 2021-07-20 2021-09-17 北京达佳互联信息技术有限公司 Interface test method and device, electronic equipment and storage medium
CN114185531A (en) * 2021-12-17 2022-03-15 北京字节跳动网络技术有限公司 Interface code generation method and device, computer equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105740364A (en) * 2016-01-26 2016-07-06 腾讯科技(深圳)有限公司 Page processing method and related apparatus
CN106648571A (en) * 2015-11-03 2017-05-10 百度在线网络技术(北京)有限公司 Application interface correction method and apparatus
CN108536467A (en) * 2018-04-08 2018-09-14 中国联合网络通信集团有限公司 Location processing method, device, terminal device and the storage medium of code
CN109857398A (en) * 2018-11-08 2019-06-07 深圳壹账通智能科技有限公司 A kind of generation method of front end page, device, storage medium and computer equipment
CN109871205A (en) * 2018-12-15 2019-06-11 中国平安人寿保险股份有限公司 GUI code method of adjustment, device, computer installation and storage medium
CN109960772A (en) * 2019-03-13 2019-07-02 北京三快在线科技有限公司 A kind of method and device identifying front end page design mistake
CN110333862A (en) * 2019-06-17 2019-10-15 深圳壹账通智能科技有限公司 UI page code generation method, device and server

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106648571A (en) * 2015-11-03 2017-05-10 百度在线网络技术(北京)有限公司 Application interface correction method and apparatus
CN105740364A (en) * 2016-01-26 2016-07-06 腾讯科技(深圳)有限公司 Page processing method and related apparatus
CN108536467A (en) * 2018-04-08 2018-09-14 中国联合网络通信集团有限公司 Location processing method, device, terminal device and the storage medium of code
CN109857398A (en) * 2018-11-08 2019-06-07 深圳壹账通智能科技有限公司 A kind of generation method of front end page, device, storage medium and computer equipment
CN109871205A (en) * 2018-12-15 2019-06-11 中国平安人寿保险股份有限公司 GUI code method of adjustment, device, computer installation and storage medium
CN109960772A (en) * 2019-03-13 2019-07-02 北京三快在线科技有限公司 A kind of method and device identifying front end page design mistake
CN110333862A (en) * 2019-06-17 2019-10-15 深圳壹账通智能科技有限公司 UI page code generation method, device and server

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113407461A (en) * 2021-07-20 2021-09-17 北京达佳互联信息技术有限公司 Interface test method and device, electronic equipment and storage medium
CN114185531A (en) * 2021-12-17 2022-03-15 北京字节跳动网络技术有限公司 Interface code generation method and device, computer equipment and storage medium
CN114185531B (en) * 2021-12-17 2024-03-29 抖音视界有限公司 Interface code generation method, device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
US20220236866A1 (en) Method and system for section-based editing of a website page
CA2773152C (en) A method for users to create and edit web page layouts
Nguyen et al. Reverse engineering mobile application user interfaces with remaui (t)
CN102693280B (en) Webpage browsing method, WebApp framework, method and device for executing JavaScript, and mobile terminal
CN112650483A (en) Method and device for restoring design draft, computer equipment and storage medium
CN112965645B (en) Page dragging method and device, computer equipment and storage medium
JP2020027524A (en) Character recognition device, character recognition method, and character recognition program
CN111694493A (en) Webpage screenshot method, computer equipment and readable storage medium
CN105512096B (en) A kind of optimization method and device based on font embedded in document
CN117875288A (en) Form page generation method and device and electronic equipment
CN111191174A (en) Method, system and device for integrating Spanish Bitums
JP7230439B2 (en) Information processing device and program
CN117055987A (en) Webpage display method and device, electronic equipment and computer readable storage medium
CN111079382A (en) Form rendering method and system based on MVVM (multifunction virtual machine) mode
CN108388463B (en) Icon processing method and device, computer equipment and storage medium
JP7448132B2 (en) Handwritten structural decomposition
CN112558957B (en) Method and device for generating webpage form, electronic equipment and readable storage medium
JP2020027598A (en) Character recognition device, character recognition method, and character recognition program
CN114168875A (en) Page program generation method and device, computer equipment and storage medium
CN109871214B (en) Program code generation method, program code generation device, computer device, and storage medium
CN109032476B (en) Method for displaying big data set in graphical user interface
CN108228115B (en) A kind of browser shows the Method of printing and device of the page
JP2015203919A (en) information processing apparatus, information processing method, and program
CN116204267B (en) Method and device for generating intellectual property flow form
JP5950309B2 (en) Image region dividing apparatus, method and program thereof

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant after: Jingdong Technology Holding Co.,Ltd.

Address before: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant before: Jingdong Digital Technology Holding Co., Ltd