Web prototype generation method, system, equipment and medium

By filling the virtual tree structure data TPage and generating API call paths using large language models, the problem of low efficiency in web prototype generation is solved, and a more efficient web prototype generation process is achieved.

CN119474579AActive Publication Date: 2025-02-18BEIHANG UNIV
View PDF 11 Cites 0 Cited by

Patent Information

Application Number
CN202410769709.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-14
Publication Date
2025-02-18
Estimated Expiration
2044-06-14

AI Technical Summary

Technical Problem

In the prior art, the web prototype generation method requires a lot of time and effort, resulting in low generation efficiency.

Method used

By filling in the virtual tree structure data TPage in the WP-API package, API parameters are extracted, and API calls are generated using a large language model for multiple iterations, and the API call path is finally generated.

Benefits of technology

The generation process of web prototypes has been reduced, the generation efficiency has been improved, and it has been optimized and improved through multiple times until the web page effect is satisfactory.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119474579A_ABST
    Figure CN119474579A_ABST
Patent Text Reader

Abstract

The invention provides a Web prototype generation method, system and device and a medium, and the method comprises the steps: filling virtual tree structure data TPage in WP-AP I packaging according to an input Web page demand text and current page data of a Web page, and obtaining current virtual tree structure data TPage; according to the current virtual tree structure data TPage, AP I parameters are extracted and obtained; inputting the AP I document, the AP I parameters and the current page data into a large language model, and performing multi-round iteration to generate an AP I calling path; the Web prototype is generated according to the AP I calling path, the method has the advantages that the process is improved, the efficiency is improved, and the labor cost is greatly saved, the Web prototype meeting the user requirement can be generated, and the problem that in an existing method, a large amount of time and energy need to be consumed, and consequently the Web prototype generation efficiency is low can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer software, relates to prototype generation technology, and specifically relates to a Web prototype generation method, system, device and medium. Background Art

[0002] A prototype is a preliminary version built during the system development process to demonstrate the design, functions, and concepts of the system. It is a common strategy in software development and product design that aims to quickly demonstrate the core features of a product in order to test, evaluate, and further iterate the software. In practical applications, many fields require rapid construction of prototype systems to verify ideas and concepts. For example, a Web prototype is a prototype model designed specifically for web applications and services. It is used to demonstrate and test the layout, design, functions, and user experience of a website or web application in the early stages of the web application and service design and development process.

[0003] However, the existing methods of generating Web prototypes require a lot of time and effort. Taking the Internet product development process as an example, the process of generating Web prototypes is: first, collect project requirements, then designers use hand-drawn sketches to make preliminary design plans, and then use professional prototyping tools to make prototypes. Finally, the prototype is modified and optimized for multiple iterations until the prototype achieves the expected effect. The process of building Web prototypes takes a long time and is inefficient.

[0004] Although in recent years, with the rapid development of artificial intelligence technology, large language models (LLM) can provide new ideas for prototype system generation solutions and improve the efficiency of prototype generation, but the current large language models also have some limitations, such as the "hallucination" problem, that is, the large model may generate seemingly reasonable but actually false, fabricated or outdated information, or erroneous and unstable code. Summary of the invention

[0005] In order to solve the problem that the Web prototype generation method in the prior art consumes a lot of time and energy, resulting in low efficiency of Web prototype generation, the present invention designs a Web prototype generation method, the method comprising:

[0006] S1. Fill the virtual tree structure data TPage in the WP-API package according to the input web page requirement text and the current page data of the web page to obtain the current virtual tree structure data TPage;

[0007] S2. Extracting and obtaining API parameters according to the current virtual tree structure data TPage;

[0008] S3, inputting the API document, the API parameters and the current page data into the large language model, and performing multiple rounds of iterations to generate an API call path;

[0009] S4. Generate a Web prototype according to the API call path.

[0010] Furthermore, in the above step S1, the virtual tree structure data TPage in the WP-API package is filled according to the input web page requirement text and the current page data of the web page to obtain the current virtual tree structure data TPage, including:

[0011] S11, parsing the input web page requirement text to obtain each target element and its related content in the web page to be developed;

[0012] S12, real-time monitoring of the Web page to be developed, and extraction of current page data;

[0013] S13. Fill the virtual tree structure data TPage stored in the globally shared WP-API package according to the current page data and each of the target elements and their related contents to obtain the current virtual tree structure data TPage, wherein the current virtual tree structure data TPage includes a node corresponding to each of the target elements, and the node includes the target element's own ID, item type and element attributes, as well as child nodes of the node.

[0014] Furthermore, in the above S11, the target element includes a basic element, a container element and a complex element, and the relevant content of the target element includes an operation type and an attribute value, and the operation type includes any one of deletion, addition and modification.

[0015] Furthermore, in the above step S2, extracting API parameters based on the current virtual tree structure data TPage includes:

[0016] S21, obtaining relevant information of each node in the current virtual tree structure data TPage, wherein the relevant information includes the target element's own ID, operation type, attribute value, child node ID, and parent node ID corresponding to each node;

[0017] S22: Extract and obtain API parameters according to the relevant information of each node.

[0018] Furthermore, in the above step S3, the API document, the API parameters and the current page data are input into the large language model, and multiple rounds of iterations are performed to generate the API call path, including:

[0019] S31, establishing an API document, wherein the API document includes an API name, an API description, and a parameter description;

[0020] S32, inputting the API document, API parameters and the current page data into a large language model, and generating a plurality of optional API call paths by prompting engineering guidance;

[0021] S33, extracting a check list from the Web page requirement text, evaluating and scoring each of the optional API call paths according to the check list, and selecting the optional API call path with a score ≥ a set threshold as the API call path, wherein the check list includes an operation type, a target element type, and a target element attribute.

[0022] Furthermore, in the above step S3, the step of inputting the API document and the API parameters into a large language model and performing multiple rounds of iterations to generate an API call path further includes:

[0023] S34, determining the number of the API call paths;

[0024] S341: if the number of the API call paths is 1, use the API call path as the final API call path;

[0025] S342: If the number of the API call paths is ≥ 2, select the API call path with the least number of API calls as the final API call path.

[0026] In an optional embodiment, the above-mentioned Web prototype generation method further includes:

[0027] S5. Parse the input supplementary requirement text to obtain each new target element and its related content in the Web page to be developed;

[0028] According to each of the new target elements and their related contents, the current virtual tree structure data TPage is updated, and the Web prototype is optimized through the updated virtual tree structure data TPage.

[0029] The present invention also designs a Web prototype generation system, which includes a user interaction window, a WP-API module, an API parameter extraction module, a WP-API call generation module, a WP-API implementation module and a Web prototype display interface.

[0030] Wherein, the user interaction window is used to input the demand text and API document, and the demand text includes the Web page demand text and the supplementary demand text;

[0031] The WP-API module is used to fill the virtual tree structure data TPage in the WP-API package according to the input web page requirement text and the current page data of the web page, and obtain the current virtual tree structure data TPage;

[0032] The API parameter extraction module is used to extract API parameters according to the current virtual tree structure data TPage;

[0033] The WP-API call generation module is used to input the API document, the API parameters and the current page data into the large language model, and perform multiple rounds of iterations to generate an API call path;

[0034] The WP-API implementation module is used to generate a Web prototype according to the API call path;

[0035] The Web prototype display interface is used to display the Web prototype.

[0036] The present invention also designs a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, any of the above-mentioned Web prototype generation methods is implemented to solve the problem that the Web prototype generation method in the prior art requires a lot of time and effort, resulting in low efficiency of Web prototype generation.

[0037] The present invention also designs a computer-readable storage medium, which stores a computer program for executing any of the above-mentioned Web prototype generation methods to solve the problem that the Web prototype generation method in the prior art requires a lot of time and effort, resulting in low efficiency of Web prototype generation.

[0038] Compared with the prior art, the beneficial effects that can be achieved by at least one of the above-mentioned technical solutions adopted in the embodiments of this specification include at least the following: the Web prototype generation method of the present invention first fills the virtual tree structure data TPage in the WP-API package according to the demand text and the current page data to obtain the current virtual tree structure data TPage, and extracts API parameters from the current virtual tree structure data TPage; secondly, through the established API document, the extracted API parameters and the current page data, a large language model is used to iteratively generate an API call path; finally, a Web prototype is generated through the API call path and displayed. The method of the present invention can shorten the generation process of the Web prototype and improve the generation efficiency.

[0039] At the same time, by inputting supplementary requirement texts multiple times, the current virtual tree structure data TPage can be continuously updated, thereby achieving multiple optimization and improvement of the Web prototype until a Web page effect that satisfies the user is obtained.

[0040] Furthermore, the method of the present invention is suitable for relatively simple user needs. For project teams that need to improve labor efficiency, the method of the present invention can be used to generate Web prototypes, which can improve processes, improve efficiency, and greatly save labor costs.

[0041] In addition, this method can also be used by enterprises and individuals with limited resources. When they have relevant needs, they can complete prototype generation without a professional team. It is a zero-threshold, high-efficiency prototype system generation platform, which is of great significance to relevant enterprises and individuals. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0043] Figure 1 A flowchart of a Web prototype generation method disclosed in an embodiment of the present invention;

[0044] Figure 2 A schematic diagram of generating an API call path through multiple rounds of iterations in an embodiment of the present invention;

[0045] Figure 3 A schematic diagram of a Web prototype generation system disclosed in an embodiment of the present invention;

[0046] Figure 4 A schematic diagram of a computer device disclosed in an embodiment of the present invention;

[0047] Among them, 301, user interaction window; 302, WP-API module; 303, API parameter extraction module; 304, WP-API call generation module; 305, WP-API implementation module; 306, Web prototype display interface; 401, memory; 402, processor. DETAILED DESCRIPTION

[0048] The embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0049] The following describes the implementation methods of the present application through specific specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The present application can also be implemented or applied through other different specific implementation methods, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and the features of the embodiments can be combined with each other in the absence of conflict. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work belong to the scope of protection of the present application.

[0050] The present invention provides a Web prototype generation method, which involves two aspects: Web prototype API (application program interface) encapsulation and API (application program interface) combination call based on a large language model. The Web prototype generation method is described in detail through a specific embodiment. Figure 1 As shown, the Web prototype generation method includes the following steps:

[0051] S1. Fill the virtual tree structure data TPage in the WP-API package according to the input web page requirement text and the current page data of the web page to obtain the current virtual tree structure data TPage;

[0052] S2. Extracting and obtaining API parameters according to the current virtual tree structure data TPage;

[0053] S3, inputting the API document, the API parameters and the current page data into the large language model, and performing multiple rounds of iterations to generate an API call path;

[0054] S4. Generate a Web prototype according to the API call path.

[0055] Before the specific implementation of step S1, the API, i.e., the application program interface, provides unified access specifications and standards to the outside world, which effectively guarantees the normal operation of the system and the correct transmission of data. This is a common method for large model projects. In order to meet the needs of Web prototype design, the present invention encapsulates a set of WP-API (WebPrototype API) interfaces applicable to the field of Web prototype design. The WP-API encapsulation is constructed by combining the practical experience of front-end technology and Web development, and has the characteristics of flexibility, high efficiency, and easy to use. It can provide convenient tools and powerful functions for subsequent processes. At the same time, this set of WP-API encapsulation not only has good scalability and compatibility, but also can meet the needs of web page loading speed and performance optimization, and can ensure that the Web runs smoothly and achieves the best results.

[0056] When WP-API is encapsulated in the design, API is a series of operation instructions related to the Web prototype page, which can perform operations such as adding, deleting, and modifying properties of target elements on the Web prototype page to be developed. Among them, for the addition and deletion operations, the target of the operation is the entire target element; while the modification operation is regarded as acting on the specific properties and content of the target element. Therefore, API can be divided into three types: adding elements, modifying properties, and deleting elements. Since API needs to be called in conjunction with real-time page data, recording and obtaining page data is a necessary part of realizing the complete functions of API. In actual use, the HTML DOM standard formulated by W3C (World Wide Web Consortium) is currently widely used. Although it can meet the above requirements, it also has obvious disadvantages. For example, the data recorded by DOM is too complex for API. In this regard, a layer of virtual tree structure data TPage is set in the WP-API package of the embodiment of the present invention, and the virtual tree structure data TPage is used to record and monitor the current page changes in real time, with TNode as the node, which is the abstraction of the target element involved in the API, and each TNode instance records the identification ID of a target element, the element type type and the attribute props, and the child nodes of the node, etc. Through the virtual tree structure data TPage, the parameter information required by the API can be displayed and recorded in the most concise way.

[0057] Furthermore, the designed WP-API can be encapsulated and stored in a globally shared store. When the API adds a target element, the system will dynamically render the corresponding modern front-end framework (such as Vue, React), such as the Vue component entering the actual web page, and add the corresponding node to TPage and start listening. After that, the changes to the API will only act on TPage, and each node in TPage will be listened to to complete the update of the corresponding target element.

[0058] When the above step S1 is specifically implemented, the virtual tree structure data TPage in the WP-API package is filled according to the input web page requirement text and the current page data of the web page to obtain the current virtual tree structure data TPage, including:

[0059] S11. Parse the input web page requirement text to obtain each target element and its related content in the web page to be developed.

[0060] In the specific implementation, in order to meet the basic requirements of designing Web prototypes, simplify the construction process as much as possible, and reuse common elements, the API needs to provide a series of diverse and extensible target elements as operation objects. The target elements include basic elements, container elements and complex elements, and the operation types include any one of deletion, addition and modification. Among them, basic elements include images, text, buttons, etc.; container elements include headers, footers, sidebars, main containers, simple containers, grids, etc.; complex elements can also be called specific components, including menu navigation bars, carousels, cards, etc. The relevant content of the target element includes operation types and attribute values. The operation types are several types of adding, deleting and modifying attributes of the target element. Attribute values ​​are common attribute values ​​such as font size FontSize, color Color, and margin Margin set for basic elements such as text. And specific attributes provided for container elements or complex elements, such as MenuData attributes set for Menu components, are used to represent the content and structure of the menu. By setting the properties of component elements, API can customize and adjust their appearance and functions to quickly realize customized requirements.

[0061] S12. Monitor the Web page to be developed in real time and extract the current page data.

[0062] In specific implementation, due to the particularity of progressive and interactive Web prototype design, APIs cannot be used alone and need to be called in combination with real-time current page data. For example, when you need to add a target element-button, you must specify the location to add it; when you need to modify a paragraph of text, you must locate the target text element. API is like a key, it needs to find the door to work. And these are the parameters that need to be filled in the API. For an API that adds a target element, you need to provide the parent element ID, the reference sibling element name ID, the target element ID, and the optional element creation options in the API parameters; for an API that modifies attributes, you need to provide the target element ID and the new value of the modified attribute in the parameters; for an API that deletes an element, you need to provide the target element ID.

[0063] S13. Fill the virtual tree structure data TPage stored in the globally shared WP-API package according to the current page data and each of the target elements and their related contents to obtain the current virtual tree structure data TPage, wherein the current virtual tree structure data TPage includes a node corresponding to each of the target elements, and the node includes the target element's own ID, item type and element attributes, as well as child nodes of the node.

[0064] In the embodiment of the present invention, the virtual tree structure data TPage in the WP-API package can be used to record and monitor the changes of the Web page to be developed, so that the information required by the API can be displayed and recorded in the most concise manner by the virtual tree structure data TPage, and the API parameters can be extracted. When the above step S2 is specifically implemented, the extraction of the API parameters based on the current virtual tree structure data TPage includes:

[0065] S21, obtaining relevant information of each node in the current virtual tree structure data TPage, wherein the relevant information includes the target element's own ID, operation type, attribute value, child node ID, and parent node ID corresponding to each node;

[0066] S22: Extract and obtain API parameters according to the relevant information of each node.

[0067] When the above step S3 is implemented, the API document, the API parameters and the current page data are input into the large language model, and multiple rounds of iterations are performed to generate the API call path, which specifically includes:

[0068] S31. Create an API document, which includes an API name, an API description, and parameter descriptions.

[0069] S32: Input the API document and API parameters into the large language model, and generate multiple optional API call paths by prompting engineering guidance.

[0070] Generally speaking, large language models perform extremely well in natural language processing, have strong understanding and reasoning capabilities, and can serve as a bridge to connect unstructured natural language and structured application data. However, due to the complexity and large scale of large language models, the results they generate are not always correct and accurate. For example, when providing an API to a large language model for calling, false, hallucinatory knowledge that affects the normal operation of the system may appear. Therefore, in an embodiment of the present invention, a prompt engineering is used to constrain. The prompt engineering has the characteristics of low cost and flexibility, and does not require additional training and a large amount of data. It can be used as a "soft constraint" to guide the large language model to generate an API call path to enhance the ability of the large model to call the API under multi-source input.

[0071] S33, extracting a check list from the Web page requirement text, evaluating and scoring each of the optional API call paths according to the check list, and selecting the optional API call path with a score ≥ a set threshold as the API call path, wherein the check list includes an operation type, a target element type, and a target element attribute.

[0072] In specific implementation, in order to further ensure that the effect of generating API combination calls by the large language model meets expectations, the present invention also uses the above steps S32, S33 and the following step S34 to perform multiple rounds of iterations to optimize the generation process, obtain diverse candidates through the first round, and then evaluate and verify each path through the original user needs in the second round to screen qualified ones, and finally, if there are two or more paths screened in the second round, the optimal path is selected as the final API call path through the third round.

[0073] Furthermore, in the above step S3, the step of inputting the API document, the API parameters and the current page data into a large language model and performing multiple rounds of iterations to generate an API call path further includes:

[0074] S34, determining the number of the API call paths;

[0075] S341: If the number of the API call path is one, use it as the final API call path;

[0076] S342: If the number of the API call paths is ≥ 2, select the API call path with the least number of API calls as the final API call path.

[0077] When the above steps S32 to S34 are specifically implemented, refer to Figure 2 As shown, first, collect the demand content, current page data, and API documents, add them to the prompt template of the large language model, and perform the first round of large model generation (gen1). Since there may be multiple implementation methods to achieve a certain user demand, the prompt of gen1 will require the large model to generate multiple different API optional call paths pathList. Secondly, the large language model returns a list pathList of a certain demand based on gen1. After obtaining the available list pathList, it is necessary to perform necessary inspections on each API optional call path in these list pathList to determine whether it meets the requirements. During the inspection, the necessary inspection rules are extracted from the original user demand, and the method list (pathList) is verified one by one to obtain the second round of large model generation (gen2). After gen2 generates the rule list (ruleList), it will check each API optional call path (path) in the list (pathList). The inspection content is the operation type, operation object type, and object attribute, and each inspection part is scored according to the different operation types. The threshold can be set to 0.6, and the path with a score lower than 0.6 is selected as the available API call path. Finally, the number of API call paths obtained after the second round of screening is determined. If there is only one, it is used as the final API call path. If there are two or more, it is necessary to screen them again according to the number of calls, and select the API call path with the least number of calls as the final API call path. Through the above multiple rounds of iterative processes, the quality and effect of the API call path can be ensured to reach the optimal level, so as to better meet the needs and improve the overall performance of the system.

[0078] In an optional embodiment, the above-mentioned Web prototype generation method further includes:

[0079] S5. Parse the input supplementary requirement text to obtain each new target element and its related content in the Web page to be developed; update the current virtual tree structure data TPage according to each new target element and its related content, and optimize the Web prototype through the updated virtual tree structure data TPage.

[0080] Based on the same inventive concept, a Web prototype generation system is also provided in the embodiments of the present invention, as described in the following embodiments. Since the principle of solving the problem by the Web prototype generation system is similar to that of the Web prototype generation method in the above-mentioned implementation, the implementation of the system can refer to the implementation of the above-mentioned Web prototype generation method, and the repeated parts will not be repeated. As used below, the term "unit" or "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0081] Figure 3 is a structural block diagram of a Web prototype generation system according to an embodiment of the present invention. Figure 3 As shown, the Web prototype generation system includes a user interaction window 301, a WP-API module 302, an API parameter extraction module 303, a WP-API call generation module 304, a WP-API implementation module 305 and a Web prototype display interface 306. The structure is described below.

[0082] The user interaction window 301 is a dialog window for users to input requirement text and API documents, wherein the requirement text includes Web page requirement text and supplementary requirement text.

[0083] The WP-API module 302 is used to fill the virtual tree structure data TPage in the WP-API package according to the input Web page requirement text and the current page data of the Web page, and obtain the current virtual tree structure data TPage.

[0084] The API parameter extraction module 303 is used to extract API parameters according to the current virtual tree structure data TPage.

[0085] The WP-API call generation module 304 is used to input the API document, the API parameters and the current page data into the large language model, and perform multiple rounds of iterations to generate an API call path.

[0086] The WP-API implementation module 305 is used to generate a Web prototype according to the API call path.

[0087] The Web prototype display interface 306 is used to display the Web prototype.

[0088] The user interaction window 301, WP-API module 302, API parameter extraction module 303, WP-API implementation module 305 and Web prototype display interface 306 are all located at the system front end, and the WP-API call generation module 304 is located at the system back end. Meanwhile, the system back end is also provided with a large language model access module, which is used to receive the API document, the API parameters and the current page data output by the system front end, and respond when the system back end receives the generation request, outputs the API document, the API parameters and the current page data to the WP-API call generation module 304 to generate an API call path, and returns the API call path to the WP-API implementation module 305 for Web prototype generation, and displays the generated Web prototype through the Web prototype display interface 306.

[0089] The embodiment of the present invention achieves the following technical effects: the Web prototype generation method of the present invention first fills the virtual tree structure data TPage in the WP-API package according to the demand text and the current page data to obtain the current virtual tree structure data TPage, and extracts API parameters from the current virtual tree structure data TPage; secondly, through the established API document and the extracted API parameters and the current page data, a large language model is used to iteratively generate an API call path; finally, a Web prototype is generated through the API call path and displayed. The method of the present invention can shorten the generation process of the Web prototype and improve the generation efficiency.

[0090] At the same time, by inputting supplementary requirement texts multiple times, the current virtual tree structure data TPage can be continuously updated, thereby achieving multiple optimization and improvement of the Web prototype until a Web page effect that satisfies the user is obtained.

[0091] Furthermore, the method of the present invention is suitable for relatively simple user needs. For project teams that need to improve labor efficiency, the method of the present invention can be used to generate Web prototypes, which can improve processes, improve efficiency, and greatly save labor costs.

[0092] In addition, this method can also be used by enterprises and individuals with limited resources. When they have relevant needs, they can complete prototype generation without a professional team. It is a zero-threshold, high-efficiency prototype system generation platform, which is of great significance to relevant enterprises and individuals.

[0093] In this embodiment, a computer device is provided, such as Figure 4As shown, it includes a memory 401, a processor 402, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, any of the above-mentioned Web prototype generation methods is implemented.

[0094] Specifically, the computer device may be a computer terminal, a server or a similar computing device.

[0095] In this embodiment, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program for executing any of the above-mentioned Web prototype generation methods.

[0096] Specifically, computer-readable storage media include permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer-readable storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable storage media does not include transitory media such as modulated data signals and carrier waves.

[0097] Obviously, those skilled in the art should understand that the modules or steps of the above-mentioned embodiments of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. In this way, the embodiments of the present invention are not limited to any specific combination of hardware and software.

[0098] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the embodiments of the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A Web prototype generation method, characterized in that: include: According to the input web page requirement text and the current page data of the web page, the virtual tree structure data TPage in the WP-API package is filled to obtain the current virtual tree structure data TPage; Extracting and obtaining API parameters according to the current virtual tree structure data TPage; Inputting the API document, the API parameters and the current page data into a large language model, and performing multiple rounds of iterations to generate an API call path; A Web prototype is generated according to the API call path.

2. The Web prototype generation method according to claim 1, characterized in that: The method of filling the virtual tree structure data TPage in the WP-API package according to the input web page requirement text and the current page data of the web page to obtain the current virtual tree structure data TPage includes: Parse the input web page requirement text to obtain each target element and its related content in the web page to be developed; Monitor the web page to be developed in real time and extract the current page data; Based on the current page data and each of the target elements and their related contents, the virtual tree structure data TPage stored in the globally shared WP-API package is filled to obtain the current virtual tree structure data TPage, wherein the current virtual tree structure data TPage includes nodes corresponding to each of the target elements, and the nodes include the target element's own ID, item type and element attributes, as well as child nodes of the nodes.

3. The Web prototype generation method according to claim 2, characterized in that: The target element includes a basic element, a container element and a complex element. The relevant content of the target element includes an operation type and an attribute value. The operation type includes any one of deletion, addition and modification.

4. The Web prototype generation method according to claim 1, characterized in that: The step of extracting API parameters based on the current virtual tree structure data TPage includes: Obtaining relevant information of each node in the current virtual tree structure data TPage, the relevant information including the target element's own ID, operation type, attribute value, child node ID and parent node ID corresponding to each node; API parameters are extracted based on the relevant information of each of the nodes.

5. The Web prototype generation method according to claim 1, characterized in that: The step of inputting the API document, the API parameters and the current page data into a large language model and performing multiple rounds of iterations to generate an API call path includes: Establishing API documentation, wherein the API documentation includes API name, API description, and parameter description; Input the API document, API parameters and the current page data into a large language model, and generate multiple optional API call paths by prompting engineering guidelines; A check list is extracted from the web page requirement text, each of the API optional call paths is evaluated and scored according to the check list, and the API optional call path with a score ≥ a set threshold is selected as the API call path, wherein the check list includes an operation type, a target element type, and a target element attribute.

6. The Web prototype generation method according to claim 5, characterized in that: Also includes: Determining the number of API call paths; If the number of the API call path is 1, the API call path is used as the final API call path; If the number of the API call paths is ≥ 2, the API call path with the least number of API calls is selected as the final API call path.

7. The Web prototype generation method according to claim 1, characterized in that: Also includes: Parse the input supplementary requirement text to obtain each new target element and its related content in the web page to be developed; According to each of the new target elements and their related contents, the current virtual tree structure data TPage is updated, and the Web prototype is optimized through the updated virtual tree structure data TPage.

8. A Web prototype generation system, characterized in that: include: A user interaction window, wherein the user interaction window is used to input a requirement text and an API document, wherein the requirement text includes a Web page requirement text and a supplementary requirement text; A WP-API module, wherein the WP-API module is used to fill the virtual tree structure data TPage in the WP-API package according to the input web page requirement text and the current page data of the web page, and obtain the current virtual tree structure data TPage; An API parameter extraction module, the API parameter extraction module is used to extract API parameters according to the current virtual tree structure data TPage; A WP-API call generation module, wherein the WP-API call generation module is used to input the API document, the API parameters and the current page data into a large language model, and perform multiple rounds of iterations to generate an API call path; A WP-API implementation module, wherein the WP-API implementation module is used to generate a Web prototype according to an API call path; A Web prototype display interface is used to display the Web prototype.

9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the Web prototype generation method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program for executing the Web prototype generation method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • System for generating virtual scenes of video images and method for constructing frame of system

    CN103679800A

  • Structural data processing method and device, storage medium and electronic device

    CN109445784A

  • Page restoration method and related equipment

    CN111309424A

  • Typesetting method and typesetting engine based on virtual tree

    CN114003841A

  • Webpage generation method and device, and storage medium

    CN114063996A