Search

CN-121996245-A - Design page generation method based on workflow

CN121996245ACN 121996245 ACN121996245 ACN 121996245ACN-121996245-A

Abstract

The invention provides a workflow-based design page generation method, which is characterized in that an intelligent agent and an intelligent model are set, and prompt words are designed for flow nodes of a workflow. The method comprises the steps of S1, S2, S3, analyzing the image and feeding back the result to the intelligent body, S4, S5, feeding back the component codes to the intelligent body by the intelligent model, S6, integrating the component codes to form page codes, and sending the page codes to the intelligent model for code quality inspection, and S7, forming the component codes into a design page by the intelligent body according to the inspection result. The method has the advantages that the prompting effect is better, and each node in the flow can be traced back later.

Inventors

  • ZHANG YUTONG
  • ZHU JUNHAO
  • Gong Qinglu

Assignees

  • 上海东方传媒技术有限公司

Dates

Publication Date
20260508
Application Date
20251230

Claims (9)

  1. 1. The method is characterized by setting an intelligent body facing a user and an intelligent model connected with the intelligent body, wherein the intelligent body is internally preformed with workflows related to the method for generating the design pages and prompt words corresponding to different flow nodes in the workflows; The method for generating the design page based on the workflow comprises the following steps: step S1, the intelligent agent receives a task image input by a user; Step S2, the intelligent agent forms an image to be processed according to the task image, and sends the image to be processed and a corresponding prompt word to the intelligent model so as to trigger the intelligent model to analyze the task image; step S3, the intelligent model feeds back an analysis result obtained after analyzing the task image to the intelligent agent; step S4, the intelligent agent sends the analysis result and the corresponding prompt word to the intelligent model so as to trigger the intelligent model to generate a corresponding component code according to the analysis result; Step S5, the intelligent model feeds back the component codes to the intelligent agent; S6, the intelligent agent integrates the component codes to form page codes, and sends the page codes to the intelligent model for code quality inspection; And S7, the intelligent agent forms a design page corresponding to the task image based on the combination of the component codes according to the checking result of the code quality check fed back by the intelligent model.
  2. 2. The design page generation method according to claim 1, wherein in the step S2, the analysis result includes a layout, a component, and a style of the image to be processed.
  3. 3. The design page generating method according to claim 1, wherein in the step S7, the agent performs the following operations according to the inspection result fed back by the smart model: step S71a, the agent determines the inspection result: if the check result shows that the page code passes the code quality check, the intelligent agent forms the design page according to the page code; And if the check result indicates that the page code fails the code quality check, returning to the step S4, wherein the intelligent agent sends the analysis result and the corresponding prompt word to the intelligent model so as to trigger the intelligent model to generate a corresponding component code according to the analysis result, so that the intelligent model can generate the corresponding component code again according to the analysis result.
  4. 4. The design page generation method according to claim 1, wherein a private component library including a plurality of preset components is preset in the agent; before executing the step S2, the method further includes: step A1, for each component in the image to be processed, the agent judges whether the matched preset component exists in the private component library: If yes, the agent outputs the matched preset component as the candidate component; if not, turning to the step S2; In the step S2, the intelligent model analyzes the unmatched components in the image to be processed, so as to output the analysis result.
  5. 5. The design page generating method according to claim 4, wherein in the step S7, the agent performs the following operations according to the inspection result fed back by the smart model: step S71b, the agent determines the inspection result: If the check result indicates that the page code passes the code quality check, the intelligent agent combines the page code and the candidate component to form the design page; And if the check result indicates that the page code fails the code quality check, returning to the step S4, wherein the intelligent agent sends the analysis result and the corresponding prompt word to the intelligent model so as to trigger the intelligent model to generate a corresponding component code according to the analysis result, so that the intelligent model can generate the corresponding component code again according to the analysis result.
  6. 6. The design page generation method according to claim 1, wherein a private component library including a plurality of preset components is preset in the agent; before executing the step S2, the method further includes: Step B1, for each component in the image to be processed, the agent judges whether the matched preset component exists in the private component library or not: If yes, the agent outputs the matched preset component as the candidate component, and then the step B2 is performed; if not, the intelligent agent takes the unmatched component as a component to be generated, and then the step S2 is performed; Step B2, the intelligent agent determines whether to select the candidate component according to an input instruction of a user, takes a component corresponding to the unselected candidate component as the component to be generated, and then turns to the step S2; In the step S2, the intelligent model analyzes the component to be generated in the image to be processed, so as to output the analysis result.
  7. 7. The design page generating method according to claim 6, wherein in the step S7, the agent performs the following operations according to the inspection result fed back by the smart model: step S71c, the agent determines the inspection result: If the check result shows that the page code passes the code quality check, the intelligent agent combines the page code and the selected candidate component to form the design page; if the check result indicates that the page code fails the code quality check, turning to step S72c; Step S72c, for the component to be generated in the page code, the agent searches whether there is the candidate component that is not selected and matched with the candidate component: if so, selecting the candidate component to replace the component to be generated, and then turning to step S73c; If not, turning to step S73c; Step S73c, the agent determines whether all components in the page code are replaced with the candidate components selected for use: if yes, the agent combines the selected candidate components to form the design page; If not, returning to the step S4, the intelligent agent sends the analysis result and the corresponding prompt word to the intelligent model so as to trigger the intelligent model to generate a corresponding component code according to the analysis result, so that the intelligent model can generate the corresponding component code again according to the analysis result.
  8. 8. The method according to claim 1, wherein in step S7, the intelligent model performs a structured check and a normalized check of codes on the page code to implement a code quality check on the page code.
  9. 9. The method according to claim 1, wherein in the step S2, the process of forming the image to be processed by the agent according to the task image includes: step S21, the agent judges whether the task image contains different page areas according to the image attribute of the task image: if yes, the agent takes the single page area as the image to be processed; If not, the intelligent agent takes the whole task image as the image to be processed; in the step S7, the agent forms a design page corresponding to the task image based on the combination of the component codes corresponding to all the images to be processed.

Description

Design page generation method based on workflow Technical Field The invention relates to a front-end interface generation technology, in particular to a design page generation method based on workflow. Background The design page is a front-end visual interface and comprises a plurality of components such as texts, pictures and patterns, the components with different functions are combined into the front-end design page, the rear-end data can be transmitted to a front-end user interface, and a user can interact with the rear-end data through visual information such as icons and buttons of the user interface. A workflow is a flow framework that includes a plurality of flow nodes that arrange each step of an event in order and logic. The existing method for generating the design page comprises the steps that a user firstly prepares the design page and prompt words which are not filled with any components, the design page and a text which expresses the requirements of the user are sent to a large model for generating component codes, then the large model automatically generates the component codes according to the text, each component corresponding to the component codes is combined into the design page, and then the design page is returned to a client. However, redundancy or ambiguity of expression may occur in the text manually input by the user, and the large model directly parses the image according to the text and generates the code, which often results in the generated code not conforming to the user's expectation and even deviating completely from the direction required by the user, and meanwhile, the result obtained by directly generating the code through the large model may result in unstable and irreproducible result. Disclosure of Invention Aiming at the problems existing in the prior art, the invention provides a design page generation method based on a workflow, which is characterized in that an intelligent body facing a user and an intelligent model connected with the intelligent body are arranged, wherein the intelligent body is internally preformed with a workflow related to the design page generation method and prompt words corresponding to different flow nodes in the workflow; The method for generating the design page based on the workflow comprises the following steps: step S1, the intelligent agent receives a task image input by a user; Step S2, the intelligent agent forms an image to be processed according to the task image, and sends the image to be processed and a corresponding prompt word to the intelligent model so as to trigger the intelligent model to analyze the task image; step S3, the intelligent model feeds back an analysis result obtained after analyzing the task image to the intelligent agent; step S4, the intelligent agent sends the analysis result and the corresponding prompt word to the intelligent model so as to trigger the intelligent model to generate a corresponding component code according to the analysis result; Step S5, the intelligent model feeds back the component codes to the intelligent agent; S6, the intelligent agent integrates the component codes to form page codes, and sends the page codes to the intelligent model for code quality inspection; And S7, the intelligent agent forms a design page corresponding to the task image based on the combination of the component codes according to the checking result of the code quality check fed back by the intelligent model. Preferably, in the step S2, the analysis result includes a layout, a component, and a style of the image to be processed. Preferably, in the step S7, the agent performs the following operations according to the inspection result fed back by the smart model: step S71a, the agent determines the inspection result: if the check result shows that the page code passes the code quality check, the intelligent agent forms the design page according to the page code; And if the check result indicates that the page code fails the code quality check, returning to the step S4, wherein the intelligent agent sends the analysis result and the corresponding prompt word to the intelligent model so as to trigger the intelligent model to generate a corresponding component code according to the analysis result, so that the intelligent model can generate the corresponding component code again according to the analysis result. Preferably, a private component library comprising a plurality of preset components is preset in the intelligent body; before executing the step S2, the method further includes: step A1, for each component in the image to be processed, the agent judges whether the matched preset component exists in the private component library: If yes, the agent outputs the matched preset component as the candidate component; if not, turning to the step S2; In the step S2, the intelligent model analyzes the unmatched components in the image to be processed, so as to output the analysis result. Preferably, in the step S7