Method and device for auxiliary generation of demand case based on large model
Through large models, the combination of multimodal and text big models solves the problems of low efficiency and high cost of traditional manual writing requirements using low demand use cases, and achieves rapid and accurate demand use cases generation, improving the efficiency and quality of software development .
Patent Information
- Application Number
- CN202410956622.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-17
- Publication Date
- 2024-11-22
AI Technical Summary
Traditional demand use cases writing relies on manual writing, resulting in high labor costs and low writing efficiency, especially in medium and large projects that require a lot of time and manpower.
Using a big model-based method, by obtaining content screenshots and page element information of the web prototype page, using a multimodal model for page content analysis, and combining text model to generate demand use case points, crawling page element information through crawlers, reducing The dependence of manual writing improves writing efficiency and quality.
It significantly improves the efficiency and quality of the writing of demand use cases, reduces labor costs and writing time, and achieves the rapid and accurate generation of complete demand use cases.
Smart Images

Figure CN119002866A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of big data technology, and in particular to a method and device for assisting in generating demand use cases based on a big model. Background Art
[0002] Traditional demand use cases are written manually, requiring software developers to deeply analyze and understand business requirements and then manually write use cases, which places high requirements on software developers. At the same time, depending on the complexity of the business, a medium or large project often contains hundreds to thousands of demand use cases, which requires a lot of time and manpower to write.
[0003] Therefore, the existing method of manually writing demand use cases has the problems of high labor cost and low writing efficiency. Summary of the invention
[0004] In order to solve the above problems in the prior art, the present invention provides a method and device for assisting in generating demand use cases based on a large model, which solves the problems existing in manually writing demand use cases.
[0005] In order to achieve the above object, the technical solution adopted by the present invention is:
[0006] In a first aspect, the present invention provides a method for assisting in generating demand use cases based on a large model, comprising the steps of:
[0007] Obtain a web prototype page, extract a page content screenshot of the web prototype page, and crawl page element information through a crawler, input the page content screenshot, the page element information, and a page description prompt into a multimodal large model, and obtain a page content analysis result generated by the multimodal large model;
[0008] The page content analysis results and use case point identification prompts are input into the text big model to obtain a set of demand use case points generated by the text big model, and each demand use case point in the demand use case point set is added with a use case generation prompt and input into the text big model one by one to obtain the business demand use case corresponding to the web prototype page.
[0009] The beneficial effects of the present invention are: in the process of developing web business functions, conventional page element information is captured by crawlers, and page content screenshots are identified by multimodal large models to extract complex page information that is difficult for crawlers to obtain, thereby obtaining richer and more comprehensive page information; then, demand use cases are generated through two interactions of the text large model, which can significantly reduce the illusion problem during long output of the large model, and make the context length not exceed the limit of the large model, thereby quickly and accurately generating complete demand use cases. Different from the existing manual writing of demand use cases in the industry, the present invention can greatly improve the writing efficiency and writing quality of demand use cases, reduce the writing time of demand use cases, and reduce labor costs, thereby solving the problems existing in manually writing demand use cases.
[0010] Optionally, the page description prompt includes encapsulating the page element information, supplementing the table elements, preset business elements and preset interaction rules according to the page content screenshot, and limiting the output format.
[0011] According to the above description, it can be seen that by limiting the multimodal large model in the page description prompt, it is necessary to supplement the table elements, preset business elements and preset interaction rules in the page content screenshot, so as to obtain complex page information that is difficult for crawlers to obtain.
[0012] Optionally, the method further comprises the steps of:
[0013] The page content analysis result is stored, and in the process of software life cycle iteration, the difference of the web prototype pages under each requirement version is obtained by comparing the page content analysis result generated by the web prototype page under each requirement version.
[0014] According to the above description, the update changes of each version can be identified through the page content analysis results.
[0015] Optionally, the page content analysis result includes a page control list, a page table description, and a page operation step set.
[0016] Optionally, the method is implemented by installing a large model use case conversion plug-in on the browser.
[0017] Optionally, the page element information includes a drop-down box, an input box, a radio button, a check box and a standard button.
[0018] Optionally, the use case point identification prompt includes requiring the text big model to output the requirement use case points in the form of user stories.
[0019] Optionally, the method further comprises the steps of:
[0020] The manually reviewed and corrected requirement use case points and business requirement use cases are stored.
[0021] Optionally, the web prototype page is a standard HTML file, and the page content analysis result is in JSON format.
[0022] In a second aspect, the present invention provides an apparatus for generating demand use cases based on a large model, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, a method for generating demand use cases based on a large model is implemented in the first aspect.
[0023] Among them, the technical effect corresponding to the device for assisting in generating demand use cases based on a large model provided in the second aspect refers to the relevant description of the method for assisting in generating demand use cases based on a large model provided in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 A schematic diagram of the main process of a method for assisting in generating demand use cases based on a large model according to an embodiment of the present invention;
[0025] Figure 2 A schematic diagram of a coordination process of a method for assisting in generating demand use cases based on a large model according to an embodiment of the present invention;
[0026] Figure 3 A schematic diagram of a specific process of a method for assisting in generating demand use cases based on a large model according to an embodiment of the present invention;
[0027] Figure 4 A schematic diagram of the framework of an apparatus for assisting in generating demand use cases based on a large model according to an embodiment of the present invention.
[0028] Description of reference numerals:
[0029] 1. A device for assisting in generating demand use cases based on a large model;
[0030] 2. Processor;
[0031] 3. Memory. DETAILED DESCRIPTION
[0032] In order to better understand the above technical solution, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to enable a clearer and more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.
[0033] Embodiment 1
[0034] This embodiment is suitable for application scenarios where demand use cases need to be written, especially when there are many demand use cases. If written manually, there are problems of high labor cost and low writing efficiency. This embodiment can automatically extract information from the web prototype page to assist demand personnel to quickly generate complete demand use cases, thereby improving the production efficiency of software requirements and reducing labor costs.
[0035] The method involved in this embodiment is applicable to mainstream prototype development tools in the industry including Axure, Sketch, and Modao. The main principle is that when previewing the prototype, the web prototype page information is parsed through the browser plug-in crawler and the visual big model, and then the formatted requirement use case is generated through the interaction of pre-packaged prompts and the big language model, and version management is performed.
[0036] See the following description for details.
[0037] Please refer to Figure 1 and Figure 3 , a method for generating demand use cases based on a large model, comprising the steps of:
[0038] S1. Obtain a web prototype page, extract a page content screenshot of the web prototype page, and crawl the page element information through a crawler, input the page content screenshot, page element information, and page description prompts into a multimodal large model, and obtain a page content analysis result generated by the multimodal large model;
[0039] like Figure 2 As shown, before step S1, the software developer develops the prototype using a prototype development tool, and uses the prototype development tool to convert the prototype into a previewable standard HTML file, i.e., a web prototype page. Then, a large model use case conversion plug-in is installed on the browser, and the large model use case conversion plug-in is opened in the browser. The browser may be Chrome / Edge browser.
[0040] In this embodiment, the browser crawler js code is integrated in the large model use case conversion plug-in to obtain page element information. The page element information obtained here is standard interactive elements, including basic HTML elements such as drop-down boxes, input boxes, radio buttons, check boxes, and standard buttons. Among them, the crawler belongs to the basic technology and is not explained in detail.
[0041] Combination Figure 2 and Figure 3It can be seen that the page content screenshot is extracted in the large model use case conversion plug-in, and sent to the multimodal large model together with the above-mentioned page standard interaction elements to generate page content analysis results. The page description prompt in this step includes encapsulating the page element information, supplementing the table elements, preset business elements and preset interaction rules according to the page content screenshot, and limiting the output format, which is in json format, so as to obtain complex page information that is difficult for crawlers to obtain through the page description prompt, thereby obtaining richer and more comprehensive page information. This method is highly versatile and portable, laying the foundation for the automated construction of demand use cases.
[0042] In this embodiment, the page description prompt is generally divided into two parts: a system prompt SystemPrompt and a user prompt UserPrompt, as shown below:
[0043] SystemPrompt:
[0044] You need to act as a tool that analyzes and outputs json results based on web page screenshots.
[0045] UserPrompt:
[0046] Please extract the web page elements on the image in detail according to the order of the page elements in the image, including query conditions, list fields, special controls and buttons.
[0047] The output requirements are as follows:
[0048] - Please strictly follow the given sample JSON format and output it in a format based on what you recognize.
[0049] -You only need to output the JSON information. Do not add any information that I do not provide to the JSON data. Do not output any description other than the JSON text.
[0050] -If there are clear query conditions on the interface that require user input, please list them in the results, otherwise leave the query condition list empty.
[0051] -The button list contains clickable links and operable buttons on the page. Please identify the icons on the page according to the icon type. If no icon is identified, the button list will be empty.
[0052] -The table list contains the tables displayed on the page. Please identify the table title and column name. If not identified, the table list will be left blank.
[0053] -Special control types include: time control (a control that requires the user to click to pop up a date selection box) and page turning control (a control that requires the user to click to turn pages forward or backward in the table).
[0054] -Please do not fabricate web page elements that do not exist in the images I provided. Please confirm and check before output.
[0055] - Output example format:
[0056]
[0057]
[0058] -According to the html element, the page element information identified is: {input}
[0059] Therefore, the page content analysis result obtained in step S1 includes: a page control list, a page table description, and a page operation step set.
[0060] In this embodiment, after obtaining the page content analysis result, the following steps are further included:
[0061] The page content analysis results are stored. During the software life cycle iteration process, the differences between the web prototype pages under each requirement version are obtained by comparing the page content analysis results generated by the web prototype page under each requirement version.
[0062] Therefore, the update changes of each version can be identified through the page content analysis results.
[0063] S2. Input the page content analysis results and use case point identification prompts into the text big model to obtain the demand use case point set generated by the text big model. After adding the use case generation prompts to each demand use case point in the demand use case point set, input them into the text big model one by one to obtain the business demand use case corresponding to the web prototype page.
[0064] In this embodiment, the use case point identification prompt includes requiring the text big model to output the requirement use case points in the form of user stories.
[0065] Combination Figure 2 and Figure 3 It can be seen that step S2 converts the page content analysis results generated by the multimodal large model through the text large model, identifies the demand use case points, and then generates standard format business demand use cases through the demand use case points. This step generates demand use cases through two interactions, so that the large model can focus on the single business scenario referred to by the demand use case point for detailed business analysis, which can significantly reduce the illusion problem when the large model is output for a long time, and ensure that the context length does not exceed the large model limit. Among them, this step can be implemented in many ways such as multi-agent technology, large model application process orchestration or plug-in code solidification.
[0066] It should be noted that the multimodal large model and the text large model can use the existing large language model, which will not be elaborated in this embodiment.
[0067] S3. Store the manually reviewed and corrected demand use case points and business demand use cases.
[0068] In this embodiment, the demand points and demand use cases are manually reconfirmed and modified manually as needed. By introducing a manual link in this step, the content automatically generated by the large model is reviewed and confirmed for the second time, further improving the availability of the generated demand use cases.
[0069] Afterwards, the complete requirement use case is formatted and stored in various databases or file media for subsequent R&D links such as development and testing, such as driving code generation based on requirement use cases or driving automated testing based on requirement use cases.
[0070] Therefore, this embodiment has important significance in the modern software development process based on prototype. In the process of research and development of web business functions, through the highly automated and intelligent demand use case generation tool driven by large models, demand personnel can focus their work on web prototyping, improve the efficiency and quality of writing demand use cases, reduce the working time of writing demand use cases, and reduce labor costs, thereby solving the problems existing in manually writing demand use cases, so that the efficiency and quality of software development can be further improved.
[0071] Embodiment 2
[0072] Please refer to Figure 4 A device 1 for assisting in generating demand use cases based on a large model comprises a memory 3, a processor 2 and a computer program stored in the memory 3 and executable on the processor 2. When the processor 2 executes the computer program, the steps in the above-mentioned embodiment 1 are implemented.
[0073] Since the system / device described in the above embodiments of the present invention is a system / device used to implement the method of the above embodiments of the present invention, a person skilled in the art can understand the specific structure and deformation of the system / device based on the method described in the above embodiments of the present invention, and thus will not be described in detail here. All systems / devices used in the method of the above embodiments of the present invention belong to the scope of protection of the present invention.
[0074] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, devices or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0075] The present invention is described with reference to the flowcharts and / or block diagrams of the methods, devices (apparatus) and computer program products according to the embodiments of the present invention. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions.
[0076] It should be noted that in the claims, any reference numerals placed between brackets shall not be construed as limiting the claims. The word "comprising" does not exclude the presence of components or steps not listed in the claims. The word "a" or "an" preceding a component does not exclude the presence of a plurality of such components. The invention may be implemented by means of hardware comprising several different components and by means of a suitably programmed computer. In the claims enumerating several means, several of these means may be embodied by the same hardware. The use of the words first, second, third, etc., is for convenience of expression only and does not indicate any order. These words may be understood as part of the component name.
[0077] In addition, it should be noted that, in the description of this specification, the description of the terms "one embodiment", "some embodiments", "embodiment", "example", "specific example" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.
[0078] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments after knowing the basic creative concept. Therefore, the claims should be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present invention.
[0079] Obviously, those skilled in the art can make various modifications and variations to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention should also include these modifications and variations.
Claims
1. A method for generating demand use cases based on a large model. It is characterized in that Includes steps: Obtain a web prototype page, extract a page content screenshot of the web prototype page, and crawl page element information through a crawler, input the page content screenshot, the page element information, and a page description prompt into a multimodal large model, and obtain a page content analysis result generated by the multimodal large model; The page content analysis results and use case point identification prompts are input into the text big model to obtain a set of demand use case points generated by the text big model, and each demand use case point in the demand use case point set is added with a use case generation prompt and input into the text big model one by one to obtain the business demand use case corresponding to the web prototype page.
2. According to claim 1, a method for generating demand use cases based on a large model, It is characterized in that The page description prompt includes encapsulating the page element information, supplementing the table elements, preset business elements and preset interaction rules according to the page content screenshot, and limiting the output format.
3. According to claim 1, a method for generating demand use cases based on a large model, It is characterized in that Also includes the steps: The page content analysis result is stored, and in the process of software life cycle iteration, the difference of the web prototype pages under each requirement version is obtained by comparing the page content analysis result generated by the web prototype page under each requirement version.
4. According to claim 1, a method for generating demand use cases based on a large model, It is characterized in that The page content analysis results include a page control list, a page table description, and a page operation step set.
5. According to claim 1, a method for generating demand use cases based on a large model, It is characterized in that The method is achieved by installing a large model use case conversion plug-in on the browser.
6. According to claim 1, a method for generating demand use cases based on a large model, It is characterized in that The page element information includes a drop-down box, an input box, a radio button, a check box, and a standard button.
7. According to claim 1, a method for generating demand use cases based on a large model, It is characterized in that The use case point identification prompt includes requiring the text big model to output the requirement use case points in the form of user stories.
8. A method for generating demand use cases based on a large model according to any one of claims 1 to 7, It is characterized in that Also includes the steps: The manually reviewed and corrected requirement use case points and business requirement use cases are stored.
9. A method for generating demand use cases based on a large model according to any one of claims 1 to 7, It is characterized in that The web prototype page is a standard HTML file, and the page content analysis result is in JSON format.
10. A device for assisting in generating demand use cases based on a large model, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, it implements the method for assisted generation of demand use cases based on a large model as described in any one of claims 1 to 9.
Citation Information
Cited By
Document processing method and device
CN120371263A
