Page code generation method and device, medium and electronic equipment

By using the first model to process the page design image and input text in the guidance information, and generate page code, the automatic conversion problem of UI design draft to code is solved, and the page development efficiency is improved.

CN120215906APending Publication Date: 2025-06-27DOUYIN VISION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311814312.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-26
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

When designing a user interface, designers need to manually convert the UI design draft into the corresponding code, resulting in low page development efficiency and unreasonable design points require feedback and adjustments to extend the development link.

Method used

Through the first model, the prompt words determined by the guidance information are processed, and the page code that meets the user's specified page design needs are generated, so as to realize the automatic conversion of UI design draft to code.

Benefits of technology

It improves the efficiency of page development, reduces the communication and adjustment links between designers and developers, and shortens the time-consuming of the entire page development link.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120215906A_ABST
    Figure CN120215906A_ABST
Patent Text Reader

Abstract

The invention relates to a page code generation method and device, a medium and electronic equipment, the method comprises the steps that in response to a code generation operation triggered by a user, a page code is generated, the page code is obtained by processing a first cue word determined by guide information through a first model, the guide information is used for representing a page design requirement, and the first cue word is used for representing the page design requirement; the guide information comprises a page design image and an input text, and the input text is used for representing a user intention; the page code is displayed, the page code meeting the page design requirement specified by the user is automatically generated, and the page development efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technologies, and in particular, to a method, an apparatus, a medium, and an electronic device for generating page code. Background Art

[0002] When designing a user interface (UI), a designer needs to create a UI design draft according to user requirements and design specifications. After the designer completes the design draft, a technician is required to convert it into corresponding code, resulting in low page development efficiency. Summary of the Invention

[0003] This Summary of the Invention section is provided to introduce concepts in a brief form, which will be described in detail in the following Detailed Implementation section. This Summary of the Invention section is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0004] In a first aspect, the present disclosure provides a method for generating page code, including:

[0005] responding to a code generation operation triggered by a user, generating page code, where the page code is obtained by processing a first prompt word determined by guiding information through a first model, the guiding information is used to represent page design requirements, the guiding information includes a page design image and input text, and the input text is used to represent the user's intention;

[0006] displaying the page code.

[0007] In a second aspect, the present disclosure provides a page code generation apparatus, including:

[0008] a first response module, configured to respond to a code generation operation triggered by a user and generate page code, where the page code is obtained by processing a first prompt word determined by guiding information through a first model, the guiding information is used to represent page design requirements, the guiding information includes a page design image and input text, and the input text is used to represent the user's intention;

[0009] a first display module, configured to display the page code.

[0010] In a third aspect, the present disclosure provides a computer-readable medium, on which a computer program is stored, and when the program is executed by a processing device, the steps of the method described in the first aspect are implemented.

[0011] In a fourth aspect, the present disclosure provides an electronic device, including:

[0012] a storage device, on which a computer program is stored;

[0013] A processing device for executing the computer program in the storage device to implement the steps of the method in the first aspect.

[0014] Through the above technical solution, by using the text understanding ability of the first model for the input text and the image understanding ability of the first model for the page design image, page code that meets the page design requirements specified by the user is generated, completing the automatic conversion from the UI design draft to code, and improving the efficiency of page development.

[0015] Other features and advantages of the present disclosure will be described in detail in the following specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In combination with the accompanying drawings and with reference to the following specific implementation, the above and other features, advantages and aspects of the embodiments of the present disclosure will become more obvious. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the original elements and elements are not necessarily drawn to scale. In the drawings:

[0017] Figure 1 is a flowchart of a method for generating page code according to an embodiment of the present disclosure.

[0018] Figure 2 is a schematic diagram showing the addition of business logic according to an exemplary embodiment of the present disclosure.

[0019] Figure 3 is a comparison schematic diagram of a page before modification and a page after modification according to an exemplary embodiment of the present disclosure.

[0020] Figure 4 is another flowchart of a method for generating page code according to an exemplary embodiment of the present disclosure.

[0021] Figure 5 is a block diagram of a page code generation device according to an exemplary embodiment of the present disclosure.

[0022] Figure 6 is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0023] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. On the contrary, these embodiments are provided to more thoroughly and completely understand the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not used to limit the protection scope of the present disclosure.

[0024] It should be understood that the various steps described in the method embodiments of the present disclosure may be executed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this regard.

[0025] As used herein, the term "comprising" and its variations are open-ended, i.e., "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0026] It should be noted that the concepts such as "first", "second", etc. mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0027] It should be noted that the modifications of "one" and "plural" mentioned in the present disclosure are illustrative rather than restrictive. Those skilled in the art should understand that, unless otherwise clearly specified in the context, it should be understood as "one or more".

[0028] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only for illustrative purposes and are not used to limit the scope of these messages or information.

[0029] It can be understood that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, usage scopes, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0030] For example, when responding to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested by the user will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, an application program, a server or a storage medium that performs the operations of the technical solutions of the present disclosure according to the prompt message.

[0031] As an optional but non-limiting implementation manner, the manner of sending a prompt message to the user in response to receiving an active request from the user may be, for example, in the form of a pop-up window, and the prompt message may be presented in text in the pop-up window. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0032] It is understandable that the above-mentioned notification and the process of obtaining user authorization are only illustrative and do not limit the implementation manner of the present disclosure. Other manners that comply with relevant laws and regulations can also be applied to the implementation manner of the present disclosure.

[0033] Meanwhile, it is understandable that the data involved in the present technical solution (including but not limited to the data itself, the acquisition or use of the data) should comply with the requirements of the corresponding laws, regulations and related provisions.

[0034] When designing the user interface, the designer needs to create a UI design draft according to the user requirements and design specifications. After the designer completes the design draft, the technical personnel need to convert it into corresponding code. When there are some unreasonable design points, the technical personnel need to feedback to the designer. After the designer gives an adjustment plan, the technical personnel make code adjustments again. As a result, the development link of the entire page takes a long time, which leads to low page development efficiency.

[0035] In view of this, the embodiments of the present disclosure provide a page code generation method, device, medium and electronic device.

[0036] The following further explains and illustrates the present disclosure with reference to the accompanying drawings.

[0037] Figure 1 is a flowchart of a page code generation method provided according to an embodiment of the present disclosure. The page code generation method can be executed by an electronic device, specifically by a page code generation device, and the device can be implemented in a software and / or hardware manner. Referring to Figure 1 , the page code generation method may include the following steps:

[0038] Step 110, in response to a code generation operation triggered by a user, generate page code, where the page code is obtained by a first model processing a first prompt determined by guiding information, and the guiding information is used to characterize page design requirements, and the guiding information includes a page design image and input text, and the input text is used to characterize the user intention;

[0039] Step 120, display the page code.

[0040] Among them, the page design image characterizes the page design requirements through image information. The page design image can be the original design draft or original hand-drawn sketch of the designer, or a screenshot of the original design draft or a screenshot of the original hand-drawn sketch.

[0041] Among them, the input text represents the user's intention through text information. The input text can be the text information input by the designer. The user's intention can be used to describe the designer's requirements for the page attributes and page content of the page. Page attributes include, for example, page style and page size, etc. Page styles include, for example, anime style and technological sense style, etc. The page content is the content included in the page, for example, the text in the page and the images in the page, etc. In other embodiments, the designer can achieve the input of the input text through voice input. The electronic device analyzes the voice input by the user and converts the voice into the input text. Determining the input text through voice input can simplify the operation of the designer to input the user's intention.

[0042] Among them, the first model is a multi-modal model capable of processing multi-modal information. In this embodiment, the multi-modal information includes image information corresponding to the page design image and text information corresponding to the input text. As an example, the first model can be GPT (Generative Pre-Trained Transformer).

[0043] It should be noted that the prompt is text that conforms to the laws of natural language to guide or stimulate the model to complete the task of generating page code. As an example, the user's intention can be "the font is small four and the page is in anime style". On this basis, the first prompt determined by the guiding information can be "You are now my code assistant. I need a page code. Please generate a page code according to the following content. Specific requirements: Generate a page code according to the given page design image, the font is small four, and the page is in anime style".

[0044] Among them, the user can trigger the code generation operation through a voice command. For example, when the user says "Please generate code", the electronic device detects the user's voice input and correspondingly triggers the code generation operation; the user can also trigger the code generation operation by performing a click operation on the electronic device. The click operation can be, for example, a single click operation or a double click operation, etc.

[0045] It should be noted that before the user triggers the code generation operation, the user can configure the guiding information through the electronic device, and then trigger the code generation operation; for another example, after the user triggers the code generation operation, when the first model does not obtain the guiding information, the electronic device can display a prompt message and provide a configuration interface for the guiding information to prompt the user to configure the guiding information. Here, the configuration interface is an interface that supports human-computer interaction.

[0046] In the above manner, by utilizing the text understanding ability of the first model for the input text and the image understanding ability of the first model for the page design image, the page code that meets the page design requirements is generated, completing the automatic conversion from the UI design draft to the code and improving the efficiency of page development.

[0047] In some embodiments, the above method may further include: in response to a first modification operation triggered by a user, generating page code obtained by modifying the page code, where the page code is obtained by processing a second prompt word determined by an annotation image through the first model, and the annotation image is obtained by annotating the page corresponding to the page code last generated by the first model, and the annotation image is used to describe the page modification requirements related to the layout style; displaying the page code corresponding to the first modification operation.

[0048] Among them, the first modification operation may be triggered by the user through an electronic device. For example, after the user browses the page corresponding to the page code and there is a need to modify the page, at this time, the user can trigger the first modification operation through the electronic device. Similar to the trigger of the code generation operation, the user can trigger the first modification operation through a voice command, or the user can also trigger the first modification operation by performing a click operation on the electronic device.

[0049] It should be noted that the page code corresponding to the first modification operation is the page code obtained by modifying the page code last generated by the first model.

[0050] At the same time, the user can obtain an annotation image by annotating the page corresponding to the page code last generated by the first model. Further, the annotation image may be obtained by annotating a screenshot image of the page corresponding to the page code. As an example, the annotation image can be obtained in the following manner: in response to a first running operation triggered by the user, displaying the page corresponding to the page code; in response to a screenshot operation triggered by the user, generating and displaying a screenshot image, where the screenshot image includes the page; in response to an annotation operation on the screenshot image triggered by the user, displaying the annotation image.

[0051] Among them, the triggering methods of the user's screenshot operation and the first running operation can refer to the triggering method of the above code generation operation, which will not be elaborated in this embodiment.

[0052] It should be noted that the annotated image is the result of overlaying annotation operations on the screenshot image. As an example, the annotation operations can be area selection operations, text editing operations, etc. Through the area selection operation, the position of the code that the user needs to modify can be located, and through the text editing operation, the direction of the user's modification can be determined. The area selection operation can enhance the display of the selected area through a geometric frame with a special display style. The geometric frame can be a rectangular frame, a circular shape, etc. The special display style can be the color of the geometric frame display or the thickness of the outline of the geometric frame.

[0053] Similar to the first prompt, the second prompt can be obtained based on the annotated image. For example, the constructed second prompt can be "Modify the previously generated page code according to the information provided in the annotated image."

[0054] Among them, the annotated image can be used to describe the page modification requirements related to the layout style. The layout style includes, for example, the size and position of the areas corresponding to each component on the page, the color of the page text, etc.

[0055] In the above manner, the modification of the code is implemented through the model until the user's page development requirements are met, without the need for designers and developers to communicate the modification requirements multiple times, thereby reducing the time-consuming of the entire page development link and improving the page development efficiency.

[0056] In some embodiments, the above method may further include: in response to a second modification operation triggered by the user, generating page code obtained by modifying the page code, where the page code is obtained by processing a third prompt determined by the extended information through a second model, and the extended information is used to describe the page modification requirements related to the business processing logic of the business corresponding to the page code; displaying the page code corresponding to the second modification operation.

[0057] Among them, the second model can also be GPT, that is, the first model and the second model can be the same model.

[0058] Among them, the page modification requirements related to the business processing logic of the business corresponding to the page code can be page modification requirements for adding business logic outside the current business processing logic, or page modification requirements for modifying the current business processing logic.

[0059] It should be noted that the business processing logic is the basis for implementing the business. The business processing logic can include business states and the transfer conditions of the states. With the adjustment of business requirements, the business processing logic can be continuously modified. Figure 2 It is a schematic diagram of adding business logic shown according to an exemplary embodiment of the present disclosure. Taking Figure 2 the business processing logic of the order business shown as an example, Figure 2The various business states of an order and the conditions for transitioning between different business states are exemplified. The starting state of the business processing logic is pending payment. After the user makes a payment, it enters the pending shipment state. After the user confirms the logistics information, it enters the shipped state. After the user confirms receipt of the goods, the order is completed; after the user cancels the payment or cancels the order, the order ends ( Figure 2 as shown in the cancelled state).

[0060] With the adjustment of business requirements, based on the business processing logic of the above order business, a user evaluation state can also be derived. When mapped to the page, a page interface for the user to fill in the user evaluation needs to be provided. Therefore, the page code needs to be extended so that the page code can support the user to fill in the user evaluation, that is, to achieve the purpose of adding business logic. That is Figure 2 shows a comparison diagram between the business process corresponding to adding user evaluation and the business process corresponding to not adding user evaluation.

[0061] Similar to the first prompt word and the second prompt word, the third prompt word can be obtained based on the extended information. Continuing with the example of the above order business, the extended information can be, for example, the code logic for adding user evaluation. Based on this extended information, the constructed third prompt word can be "Modify the previously generated page code, and the direction of modification is to add code logic to support users to evaluate the order".

[0062] Figure 3 is a comparison schematic diagram of a page before modification and a page after modification shown according to an exemplary embodiment of the present disclosure. In Figure 3 it, the page code only supports single selection of pictures, while the page modification requirement is to change the single selection to support multiple selection, so as to achieve the modification of the business processing logic.

[0063] Through the above method, the second model is used to implement the modification related to the business processing logic of the business corresponding to the page code, so as to perform fine-grained processing on the page code, and thus obtain a page that can meet more diverse requirements.

[0064] In some embodiments, the above method may further include: in response to a second running operation triggered by the user for the page code corresponding to the target version number, display the page corresponding to the page code, where the version number is assigned by the user when determining to record the page code generated by the target model.

[0065] Wherein, the target model includes the first model and / or the second model.

[0066] Among them, the version number is an identifier corresponding to the page code. It is worth noting that during the process of developing a page, multiple modifications to the page may be involved. However, the requirements are also constantly changing. To facilitate the user's management or browsing of the page codes generated historically, when the user determines to record the page code generated by the target model, a corresponding version number can be assigned to the page code. On this basis, based on the version number, quick browsing of the corresponding page code and the page corresponding to the page code can be realized.

[0067] Figure 4 is another flowchart of a page code generation method shown according to an exemplary embodiment of the present disclosure. First of all, it is worth noting that the first target prompt word can be the above-mentioned first prompt word or second prompt word, the second target prompt word can be the above-mentioned second prompt word, the multimodal large model can be the above-mentioned first model, and the code large model can be the above-mentioned second model. For branch 1, the first requirement corresponds to the first modification operation, and for branch 2, the first requirement corresponds to the second modification operation.

[0068] Refer to Figure 4 , first, obtain the first target prompt word, process the first target prompt word using the multimodal large model to obtain the page code; determine whether the first requirement is met. For branch 1, when the first requirement is met, end; when the first requirement is not met, the modification points of the image corresponding to the page corresponding to the page code can be marked, that is, the marked image is obtained, so as to re-obtain the first target prompt word until the first requirement is met. It is worth noting that here, determining whether the first requirement is met can be specifically determined by whether the first modification operation is triggered. For example, if the user triggers the first modification operation, it is determined that the first requirement is not met; if the user does not trigger the second modification operation, it is determined that the first requirement is met.

[0069] For branch 2, when the first requirement is not met, obtain the second target prompt word, process the second target prompt word using the code large model to obtain the page code, and determine whether the second requirement is met. It is worth noting that here, determining whether the first requirement and whether the second requirement is met can be determined by whether the second modification operation is triggered. For example, if the user triggers the second modification operation, it is determined that the first requirement or the second requirement is not met; if the user does not trigger the second modification operation, it is determined that the first requirement or the second requirement is met.

[0070] It can be understood that since the first modification operation and the second modification operation are triggered by the user, and if the page code meets the user's requirements, the user does not need to trigger the first modification operation and the second modification operation. Therefore, through the above method, the generation of the page code is iteratively realized until the user's requirements are met.

[0071] Based on the same concept, embodiments of the present disclosure further provide a page code generation device. Figure 5 It is a block diagram of a page code generation device shown according to an exemplary embodiment of the present disclosure. Refer to Figure 5 , the page code generation device 500 includes:

[0072] A first response module 501, configured to generate page code in response to a code generation operation triggered by a user. The page code is obtained by processing a first prompt word determined by guiding information through a first model. The guiding information is used to characterize page design requirements, and the guiding information includes a page design image and input text. The input text is used to characterize the user's intention;

[0073] A first display module 502, configured to display the page code.

[0074] In some embodiments, the device 500 further includes:

[0075] A second response module, configured to generate page code obtained by modifying the page code in response to a first modification operation triggered by the user. The page code is obtained by processing a second prompt word determined by an annotation image through the first model. The annotation image is obtained by annotating the page corresponding to the page code last generated by the first model. The annotation image is used to describe page modification requirements related to layout styles;

[0076] A second display module, configured to display the page code corresponding to the first modification operation.

[0077] In some embodiments, the device 500 further includes:

[0078] A third response module, configured to generate page code obtained by modifying the page code in response to a second modification operation triggered by the user. The page code is obtained by processing a third prompt word determined by extension information through a second model. The extension information is used to describe page modification requirements related to the business processing logic of the business corresponding to the page code;

[0079] A third display module, configured to display the page code corresponding to the second modification operation.

[0080] In some embodiments, the device 500 further includes:

[0081] A fourth response module, configured to display the page corresponding to the page code in response to a first running operation triggered by the user;

[0082] A fifth response module, configured to generate and display a screenshot image in response to a screenshot operation triggered by the user. The screenshot image includes the page;

[0083] A sixth response module, configured to display the annotated image in response to the annotation operation triggered by the user for the screenshot image.

[0084] In some embodiments, the apparatus 500 further includes:

[0085] A seventh response module, configured to display a page corresponding to the page code in response to a second running operation triggered by the user for the page code corresponding to the target version number, where the version number is assigned by the user to the page code when determining to record the page code generated by the target model.

[0086] Among them, the implementation manners of the modules in the above apparatus 500 may refer to the above embodiments, and are not described herein again in this embodiment.

[0087] Based on the same concept, an embodiment of the present disclosure further provides a computer-readable medium, on which a computer program is stored, and when the program is executed by a processing device, the steps of the above information display method are implemented.

[0088] Based on the same concept, an embodiment of the present disclosure further provides an electronic device, including:

[0089] A storage device, on which a computer program is stored;

[0090] A processing device, configured to execute the computer program in the storage device to implement the steps of the above information display method.

[0091] Next, refer to Figure 6 , which shows a schematic structural diagram of an electronic device 600 suitable for implementing an embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Tablet Computers), PMPs (Portable Multimedia Players), in-vehicle terminals (such as in-vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and usage scopes of the embodiments of the present disclosure.

[0092] As Figure 6As shown, the electronic device 600 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 601, which may perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 602 or the program loaded from the storage device 608 into the random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. The input / output (I / O) interface 605 is also connected to the bus 604.

[0093] Generally, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or wiredly to exchange data. Although Figure 6 the electronic device 600 with various devices is shown, it should be understood that it is not required to implement or have all the shown devices. Instead, more or fewer devices may be implemented or had.

[0094] Specifically, according to an embodiment of the present disclosure, the process described above with reference to the flowchart may be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes program codes for performing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above functions defined in the method of the embodiment of the present disclosure are executed.

[0095] It should be noted that the above-mentioned computer-readable medium in the present disclosure may be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program, which can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on a computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0096] In some embodiments, the electronic device can communicate using any currently known or future-developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include local area networks ("LAN"), wide area networks ("WAN"), the Internet (e.g., the Internet), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any currently known or future-developed networks.

[0097] The above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or it may exist separately without being assembled into the electronic device.

[0098] The above computer-readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: generate page code in response to a code generation operation triggered by a user, where the page code is obtained by processing a first prompt determined by guidance information for characterizing page design requirements, the guidance information including a page design image and input text for characterizing a user intention; and display the page code.

[0099] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or combinations thereof. The programming languages include, but are not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0100] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions noted in the blocks may occur in a different order than noted in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, may be implemented by a dedicated hardware-based system for performing the specified functions or operations, or by a combination of dedicated hardware and computer instructions.

[0101] The modules described in the embodiments of the present disclosure may be implemented in software or in hardware. In some cases, the name of the module does not constitute a limitation on the module itself.

[0102] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. By way of example, and without limitation, the types of hardware logic components that may be used include: Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), Systems on Chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.

[0103] In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0104] The foregoing description is only a preferred embodiment of the present disclosure and an illustration of the applied technical principles. Those skilled in the art should understand that the scope of the disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above technical features, and should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosure concept. For example, the technical solutions formed by mutually replacing the above features with the technical features (but not limited to) having similar functions disclosed in the present disclosure.

[0105] Moreover, although the operations are depicted in a particular order, this should not be construed as requiring that the operations be performed in the particular order shown or in sequential order. In certain environments, multitasking and parallel processing may be advantageous. Likewise, although several specific implementation details are included in the foregoing discussion, these should not be construed as limitations on the scope of the present disclosure. Certain features described in the context of separate embodiments may also be implemented combinatorially in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented separately or in any suitable sub-combination in multiple embodiments.

[0106] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. On the contrary, the specific features and acts described above are merely example forms for implementing the claims. Regarding the apparatus in the above embodiments, the specific manner in which each module performs operations has been described in detail in the embodiments related to the method, and will not be elaborated here.

Claims

1. A method for generating page code, characterized in that, including: In response to a code generation operation triggered by a user, generate page code, where the page code is obtained by processing a first prompt word determined by guiding information through a first model. The guiding information is used to represent page design requirements, and the guiding information includes a page design image and input text, and the input text is used to represent the user's intention; Display the page code.

2. The method according to claim 1, characterized in that The method further includes: In response to a first modification operation triggered by the user, generate page code obtained by modifying the page code, where the page code is obtained by processing a second prompt word determined by an annotation image through the first model. The annotation image is obtained by annotating the page corresponding to the page code last generated by the first model, and the annotation image is used to describe page modification requirements related to layout styles; Display the page code corresponding to the first modification operation.

3. The method according to claim 1, characterized in that, The method further includes: In response to a second modification operation triggered by the user, generate page code obtained by modifying the page code, where the page code is obtained by processing a third prompt word determined by extension information through a second model. The extension information is used to describe page modification requirements related to the business processing logic of the business corresponding to the page code; Display the page code corresponding to the second modification operation.

4. The method according to claim 2, characterized in that The method further includes: In response to a first running operation triggered by the user, display the page corresponding to the page code; In response to a screenshot operation triggered by the user, generate and display a screenshot image, where the screenshot image includes the page; In response to an annotation operation on the screenshot image triggered by the user, display the annotation image.

5. The method according to claim 2 or 3, characterized in that, The method further includes: In response to a second running operation on the page code corresponding to a target version number triggered by the user, display the page corresponding to the page code, where the version number is assigned by the user in the case of determining to record the page code generated by the target model.

6. A page code generation device, characterized in that, including: A first response module, configured to generate page code in response to a code generation operation triggered by a user, where the page code is obtained by processing a first prompt word determined by guiding information through a first model. The guiding information is used to represent page design requirements, and the guiding information includes a page design image and input text, and the input text is used to represent the user's intention; A first display module, configured to display the page code.

7. The device according to claim 6, characterized in that The apparatus further includes: A second response module, configured to generate page code obtained by modifying the page code in response to a first modification operation triggered by the user, where the page code is obtained by processing a second prompt word determined by an annotation image through the first model. The annotation image is obtained by annotating the page corresponding to the page code last generated by the first model, and the annotation image is used to describe page modification requirements related to layout styles; A second display module, configured to display the page code corresponding to the first modification operation.

8. The device according to claim 6, characterized in that, The apparatus further includes: A third response module, configured to generate page code obtained by modifying the page code in response to the second modification operation of the user, where the page code is obtained by processing a third prompt word determined by extended information through a second model, and the extended information is used to describe page modification requirements related to the business processing logic of the business corresponding to the page code; A third display module, configured to display the page code corresponding to the second modification operation.

9. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by a processing device, it implements the steps of the method according to any one of claims 1-5.

10. An electronic device, characterized in that, Comprising: A storage device, on which a computer program is stored; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1-5.