A use case generation method and a computer device

By using a method to automatically generate target test cases, and leveraging the location information of image descriptions within text descriptions, combined with semantic recognition and visual image recognition technologies, the problems of low efficiency and low accuracy in traditional software testing are solved, achieving efficient and accurate test case generation.

CN122220218APending Publication Date: 2026-06-16HENAN QINWEI DIGITAL TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HENAN QINWEI DIGITAL TECHNOLOGY CO LTD
Filing Date
2026-02-06
Publication Date
2026-06-16

AI Technical Summary

Technical Problem

In traditional software testing, manually writing test cases is inefficient, has insufficient coverage, high maintenance costs, and the accuracy of test cases generated from large models is not high.

Method used

By using a method to automatically generate target use cases, the positional information of image description information within text description information is utilized, combined with semantic recognition and visual image recognition technologies, to split and match text and image information to generate target use cases.

Benefits of technology

It improves the efficiency and accuracy of target use case generation, reduces maintenance costs, ensures text and image matching and content coverage, and reduces repetitive work.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122220218A_ABST
    Figure CN122220218A_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses a use case generation method and computer equipment, the method comprises the following steps: in response to receiving the demand information of the target use case of the terminal, determining the text information, image information and image position description information in the demand information, the image position description information is used for describing the position of the image information in the text information, determining the text description information, image description information and the position information of the image description information in the text description information based on the text information, image information and image position description information; determining the target use case based on the position information of the image description information in the text description information, the text description information and the image description information. The technical scheme can have high integration of text and image, can improve the content accuracy of the generated target use case, and prevent the problems of content deviation and poor matching.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a use case generation method and a computer device. Background Technology

[0002] In traditional software testing, test cases can be written manually. However, this method suffers from problems such as low efficiency, insufficient test coverage, high maintenance costs, and heavy repetitive work.

[0003] In related technologies, test case requirements information can be input into a large model to automatically generate test cases. However, the process of generating test cases from a large model has insufficient coverage of test case requirements information, resulting in low accuracy of the test cases. Summary of the Invention

[0004] The purpose of this application is to provide a use case generation method and computer device, so as to improve the efficiency of target use case generation, the coverage of use case requirements, and the accuracy of target use case generation by automatically generating target use cases.

[0005] In a first aspect, embodiments of this application provide a use case generation method, including: In response to receiving requirement information for a target use case from a terminal, the system determines text information, image information, and image location description information in the requirement information, wherein the image location description information is used to describe the position of the image information within the text information; Based on text information, image location description information, and image location description information, determine the position information of text description information, image description information, and image description information within text description information. Text description information is used to describe the text content in text information, and image description information is used to describe the image content in image information. Based on the location information of image description information within text description information, as well as text description information and image description information, the target use case is determined.

[0006] By adopting the above technical solution, the text information, image information, and image location description information in the requirement information of the target use case can be determined. The image location description information is used to describe the position of the image information in the text information. Therefore, based on the text information, image location description information, and image location description information, the position information of the text description information, image description information, and image description information in the text description information can be determined. Therefore, based on the position information of the image description information in the text description information, combined with the text description information and image description information, the target use case can be determined.

[0007] As can be seen, the method of this application embodiment can split the requirement information of the target use case according to the information modality type to obtain text information and image information, so that the generated target use case has high coverage of the requirement information of the target use case; moreover, it can also use the position information of the image description information in the text description information as a reference to improve the image-text matching of the target use case generated based on the text description information and image description information, and ensure the accuracy of the generated target use case. Therefore, the method of this application embodiment has high image-text integration, which can improve the content accuracy of the generated target use case and prevent the problems of content deviation and poor matching.

[0008] In addition, in the method of this application embodiment, the requirement information of the target use case is obtained from the terminal. That is, the target use case can be automatically determined based on the requirement information of the target use case. This can shorten the target use case generation process, improve the generation efficiency of the target use case, reduce maintenance costs and reduce repetitive work.

[0009] In one possible implementation, in response to receiving the target use case requirement information from the terminal, the text information, image information, and image location description information in the requirement information are determined, including: In response to receiving the requirement information of the target use case from the terminal, the requirement information is broken down into at least one sub-requirement information; The sub-requirement information is separated into text and image information.

[0010] In the method of this application embodiment, the requirement information of the target use case is split into at least one sub-requirement information, and then the text information and image information in each sub-requirement information are obtained through image-text separation. Therefore, the method of this application embodiment can interpret the requirement information of target use cases with a lot of content, without being limited by the number of words.

[0011] In one possible implementation, the embodiments of this application determine the text description information, image description information, and the position information of the image description information within the text description information based on the text information, image location description information, and image location description information, including: Determine image description information based on image information; Determine the location markers for image description information based on image location description information; Based on the location markers and text information, the text description information is determined, and the location markers are located at the positions of the image description information corresponding to the text description information; Based on the location markers of the corresponding image description information in the text description information, the position information of the image description information in the text description information is determined.

[0012] In the method of this application embodiment, the text description information can be determined by combining the positioning mark of the image description information and the text information, so that the positioning mark of the image description information is embedded in the position of the text description information corresponding to the image description information. Therefore, the position information of the image description information in the text description information can be determined by referring to the positioning mark of the position of the text description information corresponding to the image description information, which provides a basis for the subsequent matching of image description information and text description information, ensures the matching of image description information and text description information, improves the content accuracy of the target use case, and prevents content deviation.

[0013] In one possible implementation, the text description information is determined based on the location marker and text information, including: Based on the image location description information, a positioning mark is generated at the position of the image information corresponding to the text information, and the text information with the positioning mark is obtained; Based on the text information with added location markers, determine the text description information.

[0014] In the method of this application embodiment, a positioning mark for image description information is generated at the position of the text information corresponding to the image information, so as to ensure that after semantic recognition of the text with added positioning mark, the positioning mark can be transferred to the position of the text description information corresponding to the image description information. Since the positioning mark is the positioning mark for the image description information, the position information of the image description information in the text description information can be determined based on the positioning mark of the position of the text description information corresponding to the image description information.

[0015] In one possible implementation, the method of this application embodiment further includes: If the key information in the text is semantically unrelated to the image description information, it means that the image description information does not contribute to the generation of the target use case, and the image description information can be deleted. If the key information in the text is semantically related to the image description information, it means that the image description information contributes to the generation of the target use case, and the step of determining the position information of the image description information in the text description information based on the image location is executed.

[0016] In one possible implementation, the target use case is determined based on the location information of the image description information within the text description information, the text description information, and the image description information, including: If the image description information does not generate an initial use case corresponding to the image information through the use case generation model, the image description information is concatenated to the position of the corresponding image description information in the text description information based on the position information of the image description information in the text description information to obtain the requirement description information. This requirement description information describes the semantic content of the requirement information. Then, the requirement description information and the first prompt information are input into the use case generation model to obtain the target use case. The first prompt information can be used to provide prompt content for the use case generation model to generate the target use case.

[0017] In the method of this application embodiment, when the use case generation model cannot generate an initial use case corresponding to the image information, it indicates that the image description information does not meet the use case generation conditions. The position information of the image description information within the text description information can be used as a bridge to stitch the image description information to the corresponding position in the text description information, achieving a matching fusion of the image description information and the text description information to obtain the requirement description information, which can describe the requirement information. At this point, outputting the requirement information and the first prompt information to the use case generation model can obtain the target use case. Therefore, even if the first use case corresponding to the image cannot be generated normally, the target use case can be directly generated by fusing it with the text description information using the location information as a bridge, thereby ensuring the execution effect of the use case generation task (outputtability of the use case). Furthermore, the first prompt information can provide the use case generation model with prompts for generating the target use case, making the target use case generated by the use case generation model based on the requirement description information standardized.

[0018] In one possible implementation, determining the target use case based on the location information of the image description information within the text description information, the text description information, and the image description information further includes: Input the text description information into the use case generation model to obtain the first use case corresponding to the text information; If the image description information generates the initial use case corresponding to the image information through the use case generation model, the initial use case, text description information and second prompt information are input into the use case generation model to obtain the second use case corresponding to the image information. The first and second use cases are combined to determine the target use case. The second prompt information is used to provide prompts for generating the second use case for the use case generation model.

[0019] In the method of this application embodiment, text description information can be input into a use case generation model to determine the first use case corresponding to the text information. If the image description information generates an initial use case corresponding to the image information through the use case generation model, it indicates that the image description information meets the use case generation conditions. Therefore, when generating the second use case using the use case generation model, the use case generation model can use the text description information as background corpus and the second prompt information as prompt content for generating the second use case, further optimizing the already generated initial use case to ensure that the generated second use case corresponding to the image information is more accurate. Finally, the first use case and the second use case are concatenated to obtain the target use case.

[0020] In one possible implementation, the requirement information of the target use case carries the identity identifier of the product to which the target use case belongs. The method in this embodiment of the application further includes: Based on the identity identifier of the target product to which the target use case belongs, obtain the target database that matches the identity identifier of the target product; The first prompt information and the second prompt information are obtained from the target database.

[0021] In one possible implementation, the method of this application embodiment further includes: Send a display instruction for the target use case to the terminal, which instructs the terminal to display the target use case; Receive a target adjustment message from the terminal for the target use case; If the target adjustment message includes use case adjustment information in text format, the first prompt message is updated based on the use case adjustment information in text format. If the target adjustment message includes use case adjustment information with image information, the second prompt message is updated based on the use case adjustment information with image information.

[0022] As can be seen, the method in this application embodiment can integrate the target adjustment message for the target use case into a relatively mature prompt message through interactive means, ensuring that there will be no large errors in the use case generation process and guaranteeing that the output target use case meets the user's expectations.

[0023] In one possible implementation, the first and second prompt messages of this application embodiment are stored in a target database, which also stores historical adjustment messages for the target use case. The method may further include: In response to receiving evaluation information from the terminal for the target use case, if the evaluation information meets the confirmation conditions of the target use case, retrieve historical adjustment messages for the target use case from the target database; When the historical adjustment message includes historical use case adjustment information in text, based on the historical use case adjustment information in text, update the initial content of the first prompt message, and store the updated initial content of the first prompt message in the target database. When the historical adjustment message includes historical use case adjustment information of the target image, the initial content of the second prompt message is updated based on the historical use case adjustment information of the target image, and the updated initial content of the second prompt message is stored in the target database.

[0024] In the method of this application embodiment, when evaluation information for a target use case is received from the terminal, if the evaluation information meets the confirmation conditions of the target use case, it indicates that the target use case meets the user requirements. Therefore, historical adjustment messages for the target use case can be obtained from the target database, and fused with the first and second prompt information read from the target database according to the type of the historical adjustment messages, thereby achieving the purpose of optimizing the first and second prompt information. It can be seen that this application embodiment can integrate historical adjustment messages into the initial content of the optimized first and second prompt information based on whether the evaluation information for the target use case meets the confirmation conditions of the target use case, thereby ensuring that the test case generation process does not have large errors, which can reduce the number of subsequent test case adjustments for the same product.

[0025] In one possible implementation, the requirement information of the target use case carries the identity identifier of the target product to which the target use case belongs. The method also includes: Obtain a target database that matches the identity identifier of the target product. The target database stores prompt information belonging to the target product, including first prompt information and second prompt information. If no historical adjustment message matching the target adjustment message is found in the target database, the target adjustment message is stored in the target database. If a historical adjustment message matching the target adjustment message is found in the target database, the target adjustment message is updated based on the historical adjustment message.

[0026] As can be seen, when regenerating the target use case, this application embodiment can also query the target database to see if there is a historical adjustment message that matches the target adjustment message, so as to synchronously and incrementally store the newly added target adjustment message, thereby facilitating the optimization of the first prompt information and the second prompt information when the user is satisfied with the target use case.

[0027] In one possible implementation, the method of this application embodiment further includes: The system determines whether the image description information matches the test case generation conditions. If the image description information matches the test case generation conditions, it means that the image description information contains elements that can generate initial test cases. Therefore, the image description information is input into the test case generation model to obtain initial test cases. If the image description information does not match the test case generation conditions, it means that the image description information does not contain elements that can generate initial test cases. Therefore, it is confirmed that the image description information has not generated the initial test case corresponding to the image information through the test case generation model.

[0028] In the method of this application embodiment, by determining in advance whether the image description information matches the use case generation conditions, it is possible to estimate whether an initial use case can be generated based on the image description information and the use case generation model, thus reducing unnecessary operations.

[0029] In one possible implementation, the use case generation conditions of this application embodiment may include semantic information in the image description information that contains preconditions, test steps, and expected results. That is, if the image description information contains semantic information related to preconditions, test steps, and expected results, it means that the use case generation model cannot extract all the necessary elements for generating the initial use case from the image description information. Therefore, it can be considered that the image description information does not meet the use case generation conditions.

[0030] In one possible implementation, determining the target use case based on the location information of the image description information within the text description information, the text description information, and the image description information further includes: If the image description information is not related to the key information of the text information, delete the image description information. If the image description information is related to the key information of the text information, perform the operation of determining whether the image description information matches the test case generation conditions.

[0031] Before determining whether the image description information matches the test case generation conditions, it can be determined whether the image description information is related to the key information in the text information. If it is related, it means that the image description information contains information related to the generation of the target test case. Therefore, it can be determined whether the image description information matches the test case generation conditions. If it is not related, it means that the image description information does not contain information related to the generation of the target test case. The image description information can be filtered out to reduce unnecessary test case generation and improve the generation efficiency of the target test case.

[0032] Secondly, embodiments of this application provide a use case generation apparatus, comprising: The acquisition module is used to acquire the text and images in the requirement information in response to receiving the requirement information of the target use case from the terminal. The determination module is used to obtain the description information of the image and the description information of the text; and to determine the target use case based on the description information of the image and the description information of the text.

[0033] Thirdly, embodiments of this application also provide a computer storage medium storing computer instructions that, when executed on a processor, cause the processor to execute the method described in the first aspect of the embodiments of this application or any possible implementation thereof.

[0034] Fourthly, embodiments of this application also provide a computer program product, including a computer program, wherein the computer program, when executed by a processor, implements the method described in the first aspect or any possible implementation thereof.

[0035] Fifthly, embodiments of this application also provide a computer device, including: Processor; and, Memory for stored programs; The program includes instructions that, when executed by a processor, cause the processor to perform the method according to the first aspect of the embodiments of this application or any possible implementation thereof. Attached Figure Description

[0036] Further details, features, and advantages of this application are claimed in the following description of exemplary embodiments in conjunction with the accompanying drawings, in which: Figure 1 A schematic diagram of an example system framework in which various methods described herein can be implemented according to embodiments of this application is shown; Figure 2A A schematic diagram of the server architecture of an embodiment of this application is shown; Figure 2B This paper illustrates a schematic diagram of the server function implementation principle in an embodiment of this application. Figure 3 A flowchart illustrating the use case generation method according to an embodiment of this application is shown; Figure 4 A schematic diagram of a sub-document according to an embodiment of this application is shown; Figure 5 This illustration shows a text diagram after adding positioning markers according to an embodiment of this application; Figure 6 A schematic diagram of the generation process of the target use case in an embodiment of this application is shown; Figure 7 A flowchart illustrating the use case generation method using a sub-document as an example is shown. Figure 8 This illustration shows a test case formed by splicing test cases from multiple sub-documents according to an embodiment of this application; Figure 9 A flowchart illustrating an optimization method for a target use case according to an embodiment of this application is shown. Figure 10 A schematic flowchart of the method for optimizing the prompt information according to an embodiment of this application is shown; Figure 11 A schematic diagram of a use case demonstration interface according to an embodiment of this application is shown; Figure 12 A schematic diagram of the proposed submission interface according to an embodiment of this application is shown; Figure 13A This diagram illustrates the first prompt message of an embodiment of this application before the update; Figure 13B This illustration shows an updated diagram of the first prompt message according to an embodiment of this application. Figure 14A This illustration shows a fragment of the target use case in an embodiment of this application before the update; Figure 14B This illustration shows a fragment diagram of the target use case in an embodiment of this application after the update. Figure 15 A schematic block diagram of a functional module of a use case generation apparatus according to an exemplary embodiment of this application is shown; Figure 16 A structural block diagram of an exemplary computer device that can be used to implement embodiments of this application is shown. Detailed Implementation

[0037] Embodiments of this application will now be described in more detail with reference to the accompanying drawings. While some embodiments of this application are shown in the drawings, it should be understood that this application can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this application. It should be understood that the drawings and embodiments of this application are for illustrative purposes only and are not intended to limit the scope of protection of this application.

[0038] It should be understood that the steps described in the method embodiments of this application may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this application is not limited in this respect.

[0039] The term "comprising" and its variations as used herein are open-ended, meaning "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". Definitions of other terms will be given in the following description. It should be noted that the concepts of "first", "second", etc., mentioned in this application are used only to distinguish different devices, modules, or units, and are not intended to limit the order of functions performed by these devices, modules, or units or their interdependencies.

[0040] It should be noted that the terms "a" and "a plurality of" used in this application are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0041] Before introducing the embodiments of this application, the relevant terms involved in the embodiments of this application are first explained as follows: A use case is an important concept in software engineering and systems engineering. It describes how a system responds to external requests and captures requirements through user scenarios. By providing one or more scenarios, a use case demonstrates how the system interacts with end users or other systems to achieve a specific business objective.

[0042] Corpora are the fundamental materials for linguistic research, referring to collections of authentic language data that have been systematically collected and processed. In corpus linguistics, researchers use computer technology and mathematical statistics to conduct multidimensional analysis of corpora, supporting applications such as contrastive translation studies, language acquisition analysis, and lexicography.

[0043] Markdown is a lightweight markup language that allows people to write documents in an easy-to-read and easy-to-write plain text format, and then convert them into valid Hyper Text Markup Language (HTML) documents.

[0044] Grayscale conversion is the process of converting a color image to a grayscale image. Its core principle is to achieve color space conversion by unifying the R, G, and B component values ​​of each pixel. In this conversion process, each pixel only needs to store one byte (range 0-255) of grayscale value, which significantly reduces the storage and processing complexity of image data.

[0045] Denoising is a technique used to reduce noise (such as graininess and discoloration) in an image to improve its sharpness and quality. Noise is typically random variation that occurs during image acquisition, transmission, and processing. Denoising techniques aim to effectively remove this noise, resulting in a clearer and more realistic image.

[0046] Image enhancement is the process of improving images through various image processing methods to enhance their visual appeal and clarity, or to highlight useful information while compressing other useless information, making the image more suitable for human or computer analysis and processing.

[0047] The core goal of word embedding is to map discrete words to a continuous high-dimensional vector space, so that words with similar meanings are closer in space, and words with related meanings have interpretable vector operation relationships.

[0048] Word vector association refers to the semantic or syntactic association between different word vectors. This association is reflected through the distance, direction, or operational relationship between word vectors in a high-dimensional space.

[0049] Sentence embedding maps sentences of arbitrary length to continuous vectors of fixed dimensions. Sentences with similar semantics are closer in the vector space, while sentences with related semantics will exhibit computable vector association features.

[0050] Sentence vector association refers to the semantic association between the vector representations of different sentences in a high-dimensional space. Its core logic is the same as that of word vector association, but the granularity is raised from "vocabulary" to "sentence", which focuses more on capturing the semantic information of the whole sentence.

[0051] A token is the smallest semantic processing unit that is input into an artificial intelligence model after text data has been broken down by a tokenizer. It is the bridge connecting the original text and the model's vector computation, and it is the foundation for Large Language Models (LLM) and Natural Language Processing (NLP) models to understand and generate language.

[0052] This application provides a use case generation method to automatically generate target use cases, improve the efficiency of target use case generation and the coverage of use case requirements, and increase the accuracy of target use case generation.

[0053] Figure 1 A schematic diagram of an example system framework, according to embodiments of this application, in which various methods described herein can be implemented. For example... Figure 1 As shown, the system framework 100 of this application embodiment includes a terminal 101 and a server 102, which can communicate with each other. The server 102 can implement a use case generation method, and the following description takes the deployment of the use case generation method on the server 102 as an example.

[0054] like Figure 1 As shown, in this embodiment of the application, the terminal 101 can send the requirement information of the target use case to the server 102. The server 102 can decompose the requirement information of the target use case to obtain text information, image information, and image location description information. The image location description information can describe the position of the image in the text. Therefore, the target use case can be generated based on the text, image, and image location description information, and based on semantic recognition technology and visual image recognition technology.

[0055] like Figure 1 As shown, after obtaining the requirement information of the target use case, the server 102 in this embodiment of the application can decompose the requirement information of the target use case with reference to the information modality included in the requirement information of the target use case, so as to separate the text information and image information in the requirement information of the target use case. Then, without using a knowledge base, the accuracy of text and image content recognition is improved by semantic recognition technology and visual image recognition technology, ensuring the accuracy and image and text coverage of the final generated target use case, improving the generation efficiency of the target use case, reducing maintenance costs and reducing repetitive work.

[0056] Optional, such as Figure 1 As shown, the server 102 in this embodiment can be communicatively connected to the data storage system 103. The data storage system 103 can be a distributed storage system or a storage device integrated into the server 102. Databases can be established in the data storage system 103 according to product type, and each database can store prompt information belonging to the same product. These prompts can be categorized into first prompt information corresponding to text information and second prompt information corresponding to image information.

[0057] When the requirement information of the target use case carries the identity identifier of the target product to which the target use case belongs, the server 102 can obtain the target database that matches the identity identifier of the target product from the data storage system 103 based on the identity identifier of the target product. The target database can store the first prompt information and the second prompt information belonging to the target product. Therefore, the first prompt information and the second prompt information can be obtained from the target database and relevant prompt content can be provided for the generation of the target use case.

[0058] Optional, such as Figure 1 As shown, when server 102 generates a target use case, server 102 can also send a display instruction for the target use case to terminal 101, so as to instruct terminal 101 to display the target use case. After receiving the display instruction for the target use case, the terminal can display the target use case, and can also send an evaluation message for the target use case to server 102 in response to the evaluation operation for the target use case.

[0059] like Figure 1 As shown, server 102 can respond to receiving an evaluation message from terminal 101 for the target use case and confirm whether the evaluation message for the target use case meets the confirmation conditions of the target use case. If the confirmation conditions of the target use case are met, the target use case can be considered to meet the user requirements. If the confirmation conditions of the target use case are not met, the target use case can be considered to not meet the user requirements.

[0060] like Figure 1 As shown, when server 102 determines that the evaluation message does not meet the confirmation conditions of the target use case, it can send a hierarchical display instruction for the requirement information to the terminal, causing terminal 101 to display text and image information. The terminal can then refer to the preceding description to obtain the target adjustment message and upload it to the server. At this point, a hierarchical display instruction for the requirement information can also be sent to terminal 101, instructing terminal 101 to display text and image information.

[0061] like Figure 1 As shown, the terminal can determine the object to be adjusted in response to a selection operation for text information or image information. After selecting the object to be adjusted, the user can input the use case adjustment method for the object, and package the object to be adjusted and the adjustment method into a target adjustment message, which is then sent to server 102. Upon receiving the target adjustment message, server 102 can selectively obtain either a first prompt message or a second prompt message from the target database of data storage system 103 by identifying the type of the object to be adjusted, and optimize the target use case by combining the object to be adjusted and the use case adjustment method. For example, if the object to be adjusted is text information, the first prompt message can be obtained from the target database; if the object to be adjusted is image information, the second prompt message can be obtained from the target database.

[0062] To optimize the prompt messages stored in the target database, when optimizing target use cases using target adjustment messages, target adjustment messages are recorded in the target database. If the target use case meets user requirements, the target adjustment messages recorded in the target database are used as historical adjustment messages to optimize the prompt messages. In this way, even users with limited technical backgrounds can use server 102 to shorten the accuracy of other use cases within the same product and improve the generation speed of other use cases through optimization.

[0063] like Figure 1As shown, the target adjustment message can be recorded in the target database of the data storage system 103. Alternatively, one can first query the target database to see if a historical adjustment message matching the target adjustment message is stored. If no historical adjustment message matching the target adjustment message is stored, the target adjustment message can be directly recorded in the data storage system 103 as a historical adjustment message. If a historical adjustment message matching the target adjustment message is stored, the target adjustment message can be updated based on the historical adjustment message instead of being saved. This prevents differences in prompts due to user variations from affecting the accuracy of target use case generation.

[0064] like Figure 1 As shown, if server 102 determines that the evaluation message meets the confirmation conditions of the target use case, it can be considered that the target use case meets the user's requirements. At this time, the object to be adjusted in the historical adjustment message can be merged with the initial content of different types of prompt information. For example, if the object to be adjusted in the historical adjustment message includes image information, the historical use case adjustment information of the image information can be merged with the initial content of the second prompt information to achieve the purpose of updating the initial content of the second prompt information. If the object to be adjusted in the historical adjustment message includes text information, the historical use case adjustment information of the text information can be merged with the initial content of the first prompt information to achieve the purpose of updating the initial content of the first prompt information.

[0065] Optionally, when updating the initial content of the first prompt message, all historical test case adjustment information corresponding to the text information recorded during the current test case generation process in the target database can be collected. That is, if two historical adjustment messages are input for the text information, the historical test case adjustment information of the text information included in the two historical adjustment messages can be merged with the first prompt message.

[0066] Optionally, when updating the initial content of the second prompt message, all historical test case adjustment information corresponding to the image information recorded during the current test case generation process in the target database can be collected. That is, if two historical adjustment messages are input for the image information, the historical test case adjustment information of the image information included in the two historical adjustment messages can be merged with the second prompt message.

[0067] Figure 2A A schematic diagram of the server architecture according to an embodiment of this application is shown. Figure 2B A schematic diagram illustrating the server function implementation principle of an embodiment of this application is shown. Figure 2A and Figure 2B As shown, the server 102 in this embodiment may include a data decomposition module 1021, a use case generation module 1022, and a corpus optimization module 1023.

[0068] like Figure 2A and Figure 2BAs shown, the data decomposition module 1021 can obtain the requirement information of the target use case through the test case production interaction 201. Then, through document structure splitting 202, it decomposes the requirement information of the target use case into multiple levels, obtaining N texts represented as sub-documents (sub-document 1, sub-document 2, ...) and an image set including multiple images (which may include image 1, image 2, ...). There is a mapping relationship between the images and texts in the image set. For example, a text and at least one image that has a mapping relationship with the text can be decomposed from a sub-document. A text can be considered as text information, and an image can be considered as image information. Furthermore, based on the position information of the image information in the text information (i.e., the description information of the image position), a positioning mark can be generated at the position mark of the corresponding image information in the text information, and the image information can be marked by the positioning mark (e.g., renaming the image by the positioning mark).

[0069] like Figure 2A and Figure 2B As shown, the test case generation module 1022 can achieve image-text separation of sub-documents through background sub-document parsing 203. It then uses a visual model to recognize the image information of the obtained sub-documents, executing a visual image recognition workflow 204 to obtain image description information. Finally, it uses background sub-document parsing to execute a semantic recognition workflow 205 to obtain text description information. Since the text information corresponds to the image information with a location marker, and the image information is also marked with a location marker, the location marker is located at the position of the text description information corresponding to the image description information. The location marker on the image information can also be considered as a location marker for the image description information. Therefore, the location marker for the image description information can be determined based on the image location description information.

[0070] Because of the image location description information, the location marker of the image description information is determined, and the location marker is located at the position of the text description information corresponding to the image description information. Therefore, the text description information and the image description information can be matched by the correspondence between the location marker of the image description information and the location marker of the text description information corresponding to the image description information, thereby realizing the generation of sub-document use case 206.

[0071] Optionally, for N sub-documents, N iterations can be used to generate test cases for the sub-documents, and the test cases of the N sub-documents can be integrated into test cases 207. The test case table is then rendered in the background to form the target test cases.

[0072] Optional, such as Figure 2A and Figure 2BAs shown, during the sub-document use case generation process, corpus querying, updating, and maintenance (209) are required in the data storage system 103 to use the retrieved historical best corpus (the latest first prompt information and the latest second prompt information) as prompt information to provide a reference for sub-document use case generation (206), thereby ensuring the accuracy of the sub-document use cases. The corpus optimization module (1023) can obtain evaluation information through user evaluation (208) and determine whether the user is satisfied with the target use case.

[0073] like Figure 2A and Figure 2B As shown, if a user is not satisfied with the target use case, they can optimize it by executing a sub-document optimization workflow. For example, server 102 can obtain interaction corpus through test case production interactions, which can be used as use case adjustment information. If the interaction corpus is visual corpus (i.e., use case adjustment information in image information), the image information (one or more) in the sub-document corresponding to the iteration process can be specified by indexing the visual corpus. If the interaction corpus is semantic corpus (i.e., use case adjustment information in text information), the text information in the sub-document corresponding to the iteration process can be specified by indexing the semantic corpus, and then the next round of incremental corpus workflow can begin.

[0074] In the incremental corpus workflow, incremental corpus fusion can be performed with the historical best corpus based on the type of interactive corpus. The data storage system 103 can divide the historical best corpus into historical semantic corpus and historical visual corpus. When the interactive corpus is semantic corpus, it can be fused with the historical best semantic corpus (second prompt information) to form the latest semantic corpus, which is then provided to the semantic recognition workflow to update the target use case. When the interactive corpus is visual corpus, it can be fused with the historical best visual corpus (second prompt information) to form the latest visual corpus, which is then provided to the visual recognition image workflow to update the target use case. Optional, such as Figure 2A and Figure 2B As shown, when the interactive corpus is a semantic corpus, the semantic corpus can be a prompt corpus (such as prompt words) for the text information in the sub-document. The prompt corpus for the text information in the sub-document can be incrementally updated to the data storage system 103. The latest fused semantic corpus can be saved as a temporary optimal semantic corpus (incrementally updated) in the data storage system 103 for the next optimal corpus query, while the historical optimal semantic corpus is still stored in the data storage system 103.

[0075] Optional, such as Figure 2A and Figure 2BAs shown, when the interactive corpus is visual corpus, the visual corpus can be a cue corpus (such as cue words) for image information in the sub-document. The cue corpus for image information in the sub-document can be incrementally updated to the data storage system 103. The latest fused visual corpus can be saved as a temporary optimal semantic visual corpus (incrementally updated) in the data storage system 103 for the next optimal corpus query, while the historical optimal visual corpus is still stored in the data storage system 103.

[0076] After re-rendering the test case table in the background, the evaluation information can be retrieved again through user evaluation 208. If the evaluation information confirms that the user is satisfied with the regenerated target test case, the initial content of the prompt information can be retrieved from the data storage system 103 and merged with all historical interaction corpora to update the initial content of the prompt information. Then, the best historical best corpus is incrementally added to the database and used as the initial content of the prompt information.

[0077] The terminal 101 in this application embodiment can be a terminal with display function, such as a mobile phone, tablet computer, wearable device, in-vehicle device, laptop computer, ultra-mobile personal computer (UMPC), netbook, PDA, and wearable device based on augmented reality (AR) and / or virtual reality (VR) technology.

[0078] For example, when the terminal is a wearable device, the wearable device can also be a general term for devices that utilize wearable technology to intelligently design and develop everyday wearables, such as glasses, gloves, watches, clothing, and shoes. Wearable devices are portable devices that are worn directly on the body or integrated into the user's clothing or accessories.

[0079] Wearable devices are not merely hardware devices; they achieve powerful functionality through software support, data interaction, and cloud interaction. Broadly defined, wearable smart devices include those with comprehensive functions, large sizes, and the ability to perform complete or partial functions without relying on a smartphone, such as smartwatches or smart glasses. They also include devices focused on a specific application function that require interaction with other devices like smartphones, such as various smart bracelets and smart jewelry for vital sign monitoring.

[0080] This application provides a use case generation method, which can be executed by a computer device or a chip in the computer device. The computer device can be a terminal or a server. The use case generation method of this application embodiment is described below using a server or a chip in a server as the execution entity.

[0081] Figure 3A flowchart illustrating the use case generation method according to an embodiment of this application is shown. Figure 3 As shown, the use case generation method 300 of this application embodiment includes steps 301 to 303.

[0082] In step 301, in response to receiving the target use case requirement information from the terminal, the text information, image information, and image location description information in the requirement information are determined. The image location description information is used to describe the position of the image information in the text information.

[0083] Optionally, the terminal's display interface can provide a requirements document upload interface. The terminal can respond to the requirements document upload operation, obtain the requirements document of the target use case, and then send the requirements document of the target use case to the server.

[0084] Optionally, the server can perform a graphical decomposition of the target use case's requirement information according to the information modalities included in the requirement information, obtaining text information and image information. Here, the number of text information can be a single text message, while the number of image information can be one or more. The text information can be considered as the remaining content after removing the image information from the requirement information. Therefore, there are one or more corresponding positions of image information in the text information, and the position of the image information in the text information can be described by the image position description information.

[0085] In step 302, based on the text information, image information, and image location description information, the position information of the text description information, image description information, and image description information within the text description information is determined.

[0086] Optionally, image recognition methods can be used to identify image information to obtain image description information, and semantic recognition models can be used to identify text information to obtain text description information. Alternatively, multimodal models can be used to perform multimodal recognition on both image and text information to obtain image description information and text description information.

[0087] In one example, image information is preprocessed to reduce the impact of image noise on the image's descriptive information. For example, grayscale conversion, noise reduction, and image enhancement can be performed to improve the accuracy of the image's descriptive information. Then, multi-dimensional recognition is performed on the image to obtain multi-dimensional descriptive information. Based on this multi-dimensional descriptive information, the image's descriptive information is determined. This results in a more comprehensive image descriptive information, preventing the problem that target use cases based on image and text descriptive information may not fully cover the image content required by the information.

[0088] In one example, objects, scenes, text, and the relationship between text and visual elements in an image can be detected to obtain multi-dimensional descriptive information. This multi-dimensional descriptive information is then fused to obtain the image's descriptive information. This approach comprehensively collects the content of images within the use case generation scenario, preventing information omissions.

[0089] In one example, for a sub-document, text-image separation can generate a text document and at least one image. For example, for... Figure 4 After separating the text and images in the sub-document shown, the first image and the second image can be obtained. The first image and the second image are then preprocessed, and then multi-dimensional descriptions and fusions are performed on the first image and the second image respectively to obtain the descriptive information of the first image and the descriptive information of the second image.

[0090] In one example, image description information can be determined based on image information, and a location marker for the image description information can be determined based on the image location description information. Alternatively, the text description information can be determined based on the location marker and text information, where the location marker is located at the position of the text description information corresponding to the image description information. The position information of the image description information within the text description information can be determined based on the location marker at the position of the text description information corresponding to the image description information.

[0091] In the method of this application embodiment, the text description information can be determined by combining the positioning mark of the image description information and the text information, so that the position of the obtained text description information corresponding to the image description information is embedded with the positioning mark of the image description information. Therefore, the position information of the image description information in the text description information can be determined by referring to the positioning mark of the position of the text description information corresponding to the image description information, which provides a basis for the subsequent matching of image description information and text description information, ensures the matching of image description information and text description information, improves the content accuracy of the target use case, and prevents content deviation.

[0092] For example, determining the text description information based on location markers and text information includes: generating location markers at the positions of the text information and the corresponding image information based on the image location description information, obtaining text information with added location markers, and then determining the text description information based on the text information with added image location markers.

[0093] By generating a location marker for image description information at the location of the image information corresponding to the text information, it can be ensured that after semantic recognition of the text with the added location marker, the location marker can be transferred to the location of the image description information corresponding to the text description information. Since the location marker is the location marker for the image description information, the location information of the image description information in the text description information can be determined based on the location marker of the location of the image description information corresponding to the text description information.

[0094] In step 303, the target use case is determined based on the location information of the image description information in the text description information, the text description information, and the image description information.

[0095] In the method of this application embodiment, the position information of the image description information in the text description information can be used as a reference to improve the matching between the image description information and the text description information, and ensure the accuracy of the generated target use case. Therefore, the method of this application embodiment has high image and text integration, which can improve the content accuracy of the generated target use case and prevent problems such as content deviation and poor matching.

[0096] In addition, in the method of this application embodiment, the requirement information of the target use case is obtained from the terminal. That is, the target use case can be automatically determined based on the requirement information of the target use case. This can get rid of the dependence on the knowledge base. The user only needs to participate in the generation process of the target use case through interaction, which can reduce the complexity of the target use case generation process, shorten the target use case generation process, improve the generation efficiency of the target use case, reduce maintenance costs and reduce repetitive work.

[0097] Tests have shown that when the target use case requirements information uploaded by the terminal is obtained, the time cost of manually generating use cases can be reduced by more than 50% by conducting a comprehensive analysis of the target use case requirements information, thinking about the requirements, and generating use cases.

[0098] In one possible implementation, when obtaining text and image information from the requirement information, in response to receiving the requirement information of the target use case from the terminal, the requirement information can be split into at least one sub-requirement information, and the sub-requirement information can be separated into text and image information to obtain the text and image information.

[0099] Optionally, for target use case requirements documents with a lot of content, the requirements document can be split into N sub-documents (N is an integer greater than or equal to 1), and the sub-documents can be decomposed into text and images to obtain the corresponding text information and image information of the sub-document.

[0100] In one example, the required document can be split into N sub-documents according to preset rules. For example, each table can be set as a sub-document, or a certain number of paragraphs can be set as a sub-document.

[0101] In one example, for a sub-document, one text message and one or more image messages can be extracted from the sub-document. For N sub-documents, N text messages and multiple images can be obtained, and there is a mapping relationship between the text message and image message extracted from the same sub-document.

[0102] Optionally, for sub-documents containing nested tables, when performing text-image separation, the separated text from the sub-document is complex text containing nested tables, which can be saved in .md format.

[0103] When the requirement document of the target use case is split, the content of a single sub-document is relatively small. Therefore, the method of traversing the sub-documents can be used to perform textual and graphical decomposition and use case generation for each sub-document. Thus, the method of this application embodiment can also interpret the requirement information of target use cases with a lot of content, without being limited by the number of tokens.

[0104] Optionally, to improve the accuracy of the target use case, the position of image information within text information can be identified from the sub-requirement information. The image information's description can then be used to describe this position, and a location marker for the image description information can be generated based on this description. Simultaneously, a location marker can also be generated based on the image description information at the corresponding position in the text description information, thus obtaining text information with added location markers. In this way, the obtained text description information with added location markers through semantic recognition has the image description information's location markers at the corresponding positions. Therefore, based on these location markers, the position of the image description information within the text description information can be determined, providing a foundation for subsequent matching of image and text description information. This ensures the matching of image and text description information, improves the accuracy of the target use case content, and prevents content deviation.

[0105] In one example, for a given image, the location marker for the image description information can be the image name or the image's position marker in the text. For instance, when there are two images, the image's position in the text can be the image's order marker within the text.

[0106] Figure 4 A schematic diagram of a sub-document according to an embodiment of this application is shown. For example... Figure 4 As shown, the sub-document contains a first image 401 and a second image. After separating the text and images in the sub-document, we can obtain a text, the first image 401, the second image, the location description information of the first image 401 (such as the location information of the first image 401 in the text), and the location description information of the second image 402 (such as the location information of the second image 402 in the text). Here, "text" can refer to the text content in the sub-document excluding the first image 401 and the second image 402.

[0107] The first image 401 can be named based on its location description information to obtain a first image 401 carrying an image name, and an image name can be generated in the text corresponding to the location of the first image 401 based on its location description information. Similarly, the second image 402 can be named based on its location description information to obtain a second image 402 carrying an image name, and an image name can be generated in the text corresponding to the location of the second image 402 based on its location description information.

[0108] For example, Figure 5 This illustration shows a text diagram after adding positioning markers, according to an embodiment of this application. For example... Figure 4 and Figure 5 As shown, “Fig1” is added to the text corresponding to the position of the first image 401 to indicate the position of the first image 401, and the name of the first image 401 is also defined as “Fig1”; “Fig2” is added to the text corresponding to the position of the second image 402 to indicate the position of the second image 402, and the name of the second image 402 is also defined as “Fig2”.

[0109] When semantic recognition technology is used to Figure 5 After the problem is identified, the generated text description information contains "Fig1" and "Fig2". "Fig1" is located in the text description information corresponding to the description information of the first image 401, and "Fig2" is located in the text description information corresponding to the description information of the second image 402. Therefore, based on the position of the text description information corresponding to the description information of the first image 401, the position information of the description information of the first image 401 in the text description information can be determined. Based on the position of the text description information corresponding to the description information of the second image 402, the position information of the description information of the second image 402 in the text description information can be determined.

[0110] When fusing the description information of the first image 401, the description information of the second image 402, and the text description information, the position of the description information of the first image 401 in the text description information can be determined by detecting "Fig1" in the text description information. Then, "Fig1" is replaced with the description information of the first image 401 to achieve matching between the description information of the first image 401 and the text description information. Similarly, the position of the description information of the second image 402 in the text description information can be determined by detecting "Fig2" in the text description information. Then, "Fig2" is replaced with the description information of the second image 402 to achieve matching between the description information of the second image 402 and the text description information. This ensures that the final generated target use case has good image-text matching, thus improving the accuracy of the target use case.

[0111] To reduce unnecessary processes, we can determine whether the semantics of the image description information and the key information of the text information are related. If the semantics of the image description information and the key information of the text information are not related, it means that the image description information does not contribute to the generation of the target use case, and the image description information can be deleted to reduce unnecessary subsequent operations and improve the generation efficiency of the target use case. If the semantics of the image description information and the key information of the text information are related, it means that the image description information contributes to the generation of the target use case, and the image description information can be retained.

[0112] Optionally, the semantic similarity between the image description information and the key information of the text information can be determined. If the similarity is lower than the preset similarity, it can be considered that the image description information and the key information of the text information are semantically unrelated. If the semantic similarity is greater than or equal to the preset similarity, it can be considered that the image description information and the key information of the text information are semantically related.

[0113] For example, for text and images separated from a sub-document, if the text contains a title, the title in the text can be used as key information of the text, and then the semantic similarity between the image description information and the title in the text can be determined.

[0114] Optionally, for a given sub-document, if multiple images can be extracted from it, the semantics of the description information of each image and the key information of the text extracted from the sub-document can be determined to identify the useful images to be retained and the useless images to be filtered out, thereby reducing the data processing pressure.

[0115] In one possible implementation, when determining the target use case based on the location information of the image description information in the text description information, the text description information, and the image description information, the target use case can be generated in two ways depending on whether the image description information can generate an initial use case.

[0116] Optionally, the use case generation conditions can be defined according to the requirements of the elements needed in the use case, and it can be determined whether the image description information matches the use case generation conditions to determine whether the initial use case can be generated based on the image description information. When the initial use case can be generated, the image description information is input into the use case generation model to obtain the initial use case.

[0117] Figure 6 A schematic diagram illustrating the generation process of the target use case in an embodiment of this application is shown. For example... Figure 6 As shown, the method 600 for determining a target use case based on the location information of image description information in text description information, text description information, and image description information in this application embodiment includes steps 601 to 607.

[0118] In step 601, it is determined whether the image description information matches the test case generation conditions. If the image description information does not match the test case generation conditions, it means that the image description information does not contain elements that can generate initial test cases. It can be confirmed that the image description information has not generated initial test cases corresponding to the image information through the test case generation model. Therefore, steps 602 and 603 can be executed. If the image description information matches the test case generation conditions, it means that the image description information contains elements that can generate initial test cases. Therefore, steps 604 to 607 can be executed.

[0119] Optionally, for a use case, it needs to contain preconditions, test steps, and expected results. Therefore, the use case generation conditions can be defined to include semantic information in the image description information that includes preconditions, test steps, and expected results. In other words, if the image description information contains semantic information related to preconditions, test steps, and expected results, it means that the use case generation model cannot extract all the necessary elements for generating the initial use case from the image description information. Therefore, the image description information can be considered not to meet the use case generation conditions.

[0120] In step 602, based on the position information of the image description information in the text description information, the image description information is concatenated to the position of the corresponding image description information in the text description information to obtain the demand description information, which describes the semantic content of the demand information.

[0121] In this embodiment, the position information of the image description information in the text description information can be used as a bridge to splice the image description information to the position of the corresponding image description information in the text description information, thereby achieving image-text matching fusion of the image description information and the text description information to obtain the requirement description information, so that the requirement description information can describe the requirement information.

[0122] Optionally, for a given sub-document, if multiple images can be extracted from that sub-document, then descriptions of those images that cannot be used to generate the initial use case can be collected, and then these multiple image descriptions can be concatenated into the text description. For example, you can refer to... Figure 4 and Figure 5 The description information of the first image and the second image is fused with the text description information.

[0123] In step 603, the requirement description information and the first prompt information are input into the use case generation model to determine the target use case. The first prompt information can be used to provide prompt content for the use case generation model to generate the target use case. For example, the first prompt information can be providing prompt content (prompt corpus), prompting the display format or description content of the use case generation model. Therefore, the use case generation model can refer to the first prompt information to transform the requirement description information into the target use case.

[0124] As can be seen, when the image description information fails to generate an initial use case corresponding to the image information through the use case generation model, the positional information of the image description information within the text description information can be used as a bridge. The image description information can be concatenated to the corresponding position in the text description information, achieving a matching fusion of image and text description information to obtain the requirement description information, which can then describe the requirement information. Outputting the requirement information and the first prompt information to the use case generation model at this point yields the target use case. Therefore, even if the initial use case corresponding to the image information cannot be generated normally, the location information can be used as a bridge to directly generate the target use case by fusing it with the text description information, thus ensuring the execution effect of the use case generation task (outputtability of the use case). Furthermore, the first prompt information can provide the use case generation model with prompts for generating the target use case, standardizing the target use cases generated by the use case generation model based on the requirement description information.

[0125] In step 604, the image description information is input into the use case generation model to obtain initial use cases. This use case generation model can be a natural language processing model, which can fully extract information from the image description information to obtain initial use cases.

[0126] Optionally, an image may contain attributes of business fields, such as the length of a business field or its input requirements. The image may also contain a process for adding a new task. Therefore, when creating initial test cases, the attributes of the business fields in the image can be used as a basis, and the process for adding a new task can be referenced to create test points for the new task. These test points can then be input into the test case generation model to obtain the initial test cases.

[0127] In step 605, the text description information is input into the use case generation model to obtain the first use case corresponding to the text information. Optionally, the use case generation model can be a natural semantic model with use case generation functionality. Therefore, the text description information can be input into the natural semantic model so that the natural semantic model can output the target use case.

[0128] In step 606, the initial use case, text description information, and second prompt information are input into the use case generation model to obtain the second use case corresponding to the image information. The second prompt information is used to provide prompts for the use case generation model to generate the second use case.

[0129] The second prompt information corresponding to the image in this embodiment can be a prompt corpus for generating use cases from the image's description information. This corpus can control the content or presentation format of the use cases generated from the text description information. The second prompt information can serve as prompt corpus for the second use case, providing prompt corpus for the use case generation model. This ensures that the specific form of the second use case ultimately generated by the model better conforms to the use case requirements. Meanwhile, the text description information can serve as background corpus, providing a reference for the image description information, resulting in better coherence and accuracy between the content of the ultimately generated second use case and the content of the first use case.

[0130] In step 607, the first use case and the second use case are concatenated to determine the target use case. This can be achieved by simply concatenating the first and second use cases.

[0131] Optionally, for a given sub-document, if multiple images can be extracted from the sub-document, then collect all the image description information that can generate the initial use case, and then concatenate the second use case corresponding to all the image description information with the first use case.

[0132] For example, refer to Figure 4 and Figure 5 If the description information of the first image and the description information of the second image can both generate initial use cases through the use case generation model, the second use case corresponding to the first image can be appended to the first use case corresponding to the text, and the second use case corresponding to the second image can be appended to the second use case corresponding to the first image.

[0133] For example, refer to Figure 4 and Figure 5 If the description information of the first image generates initial use cases through the use case generation model, but the description information of the second image cannot generate initial use cases through the same model, the target use cases generated can be defined as the target use cases corresponding to the second image, based on the description information of the second image and referring to steps 602 and 603. Simultaneously, steps 604-606 can be referred to obtain the second use cases corresponding to the first image, and the first use cases can be updated based on the target use cases corresponding to the second image. Finally, the second use cases corresponding to the first image are concatenated with the first and second use cases.

[0134] As can be seen, in the method of this application embodiment, text description information is input into the use case generation model to obtain the first use case corresponding to the text information. If the image description information generates an initial use case corresponding to the image information through the use case generation model, it indicates that the image description information meets the use case generation conditions. Therefore, when using the use case generation model to generate the second use case, the use case generation model can use the text description information as background corpus and the second prompt information as prompt content for generating the second use case, further optimizing the already generated initial use case to ensure that the generated second use case corresponding to the image information is more accurate. Finally, the first use case and the second use case are concatenated to obtain the target use case.

[0135] Furthermore, by determining in advance whether the image description information matches the test case generation conditions, it is possible to predict whether an initial test case can be generated based on the image description information through the test case generation model, thus reducing unnecessary operations.

[0136] To understand the use case generation process in the embodiments of this application, Figure 7 The diagram illustrates a flowchart of a use case generation method using a sub-document as an example. Figure 7 As shown, the test case generation method 700 of this application embodiment, taking a sub-document as an example, includes steps 701 to 713.

[0137] In step 701, the sub-document is split into text and images. The number of images can be one or more. And you can refer to... Figure 4 and Figure 5 Insert image location markers into the text (such as adding the image name at the corresponding position in the text), and then use that image name to name the image.

[0138] In step 702, the text is input into the semantic recognition model to obtain text description information. This text description information can be represented in the form of sentence vectors and word vectors.

[0139] Since the image name is inserted at the position corresponding to the image in the text, the image name is also inserted at the position corresponding to the image description information in the text description information obtained based on the text.

[0140] Optionally, characters in the text can be parsed using a semantic recognition model to obtain textual description information represented in natural language. Since image names are inserted at the locations corresponding to images in the text, image names are inserted as location markers at the locations in the text description information corresponding to the image description information.

[0141] In step 703, the text description information is input into the test case generation model to obtain the first test case.

[0142] In step 704, the image is preprocessed. This preprocessing may include grayscale conversion, denoising, and image enhancement to reduce the interference of noise in the image on the visual model.

[0143] In step 705, multi-dimensional content recognition is performed on the image to obtain multi-dimensional descriptive information. This multi-dimensional descriptive information can be represented in natural language.

[0144] Optionally, object recognition, scene understanding, text recognition, and text-visual relationship recognition can be performed on the image to obtain object recognition results, scene understanding results, text recognition results, and text-visual relationship recognition results.

[0145] In step 706, the multi-dimensional descriptive information is fused into vectors to obtain image description information. Optionally, when each dimension of descriptive information is represented by sentence vectors and word vectors, the fusion of multi-dimensional descriptive information can be achieved by associating sentence vectors of different dimensions and word vectors of different dimensions.

[0146] The images have already been named using the image names corresponding to the text locations. Therefore, the image names can be considered as location markers for the image description information.

[0147] In step 707, it is determined whether the image description information is related to the text key information. Optionally, if the text key information may include the document name of the sub-document, it can be determined whether the semantic similarity between the image description information and the document name of the sub-document is less than a preset similarity. If so, it means that the image is a useful image and can continue with subsequent processing, i.e., step 708 is executed; otherwise, it means that the image is a useless image and the process can end directly.

[0148] In step 708, it is determined whether the image description information satisfies the semantic information of containing preconditions, test steps, and expected results.

[0149] If so, it means that the image description information can be used to independently generate initial test cases, and steps 709 to 711 can be executed; otherwise, it means that the image description information cannot be used to generate initial test cases, and steps 712 and 713 can be executed.

[0150] In step 709, the image description information is input into the test case generation model to obtain the initial test cases.

[0151] In step 710, the text description information, the second prompt information, and the initial test cases are input into the test case generation model to generate second test cases. The content of the second test cases can be represented in the form of sentence vectors and word vectors. For example, the second prompt corpus can indicate the content representation format of the second test cases. For instance, the second test cases can be represented in a table or other form according to the corpus requirements of the second prompt information, and the description method of the second test cases can also be indicated.

[0152] Optionally, the initial test cases can be used as input, the second prompt information as prompt corpus, and the text description information as background corpus. These are then input into the test case generation model. The test case generation model can associate the initial test cases with the content in the text description information through context understanding. This allows the test case generation model to supplement the content of the initial test cases with the text description information as a reference, and optimize the initial test cases with the second prompt information as prompt corpus, thereby generating the second test cases.

[0153] In step 711, the first test case and the second test case are concatenated to obtain the test cases for the sub-document. For example, the first test case can be placed before the second test case, or vice versa.

[0154] In one example, the content of the second test case can be appended to the content of the first test case. If there are multiple images in the subdocument, the content of the second test cases generated from the multiple images can be appended to the content of the first test case in the order in which the images appear in the subdocument.

[0155] In step 712, the sentence vectors included in the image description information and the sentence vectors included in the text description information are associated with the image name as the tag index, and the word vectors included in the image description information and the sentence vectors included in the text description information are associated with the image name as the tag index to obtain the description information of the sub-document.

[0156] In step 713, the description information and first prompt information of the sub-document are input into the test case generation model to obtain the test cases of the sub-document.

[0157] The first prompt message can specify the display format of the test cases in the sub-document. For example, the first prompt message can suggest that the test cases in the sub-document be output in a tabular or other format, and can also suggest how the test cases should be described.

[0158] When a subdocument is split into multiple images, it's possible to generate initial test cases based on a portion of the images, but not on a portion. In this case, for a subdocument, both a portion of the second test cases and a portion of the target test cases can be output. Therefore, the second test cases can be appended to the target test cases to update them.

[0159] As can be seen, in the method of this application embodiment, when the image description information cannot generate initial test cases, the image description information and text description information can be fused using a positioning marker (such as the image name) embedded at the location where the text description information corresponds to the image description information to obtain requirement description information. Then, based on the requirement description information and combined with the first prompt information corresponding to the text description information, test cases for the sub-document are generated. Therefore, even if the initial test cases corresponding to the image cannot be generated normally, the positioning marker embedded at the location where the text description information corresponds to the image description information can be used as a bridge to fuse the text description information and image description information into the requirement description information of the sub-document, and test cases for the sub-document can be directly generated based on this. Compared with directly using the test cases output by the test case generation model, the test cases generated by the method of this application embodiment have a significant improvement in terms of document content coverage, test case accuracy, and test case adoption rate.

[0160] When the number of sub-documents in this application embodiment is multiple Figure 8 This diagram illustrates a test case formed by concatenating test cases from multiple sub-documents according to an embodiment of this application. For example... Figure 8 As shown, test cases from different sub-documents can be combined and displayed in a table according to their order in the use case requirement document. For example, test cases from each sub-document can be combined in the order of test cases from sub-document 1, test cases from sub-document 2, and so on.

[0161] It should be noted that the requirement information of the target use case in this application embodiment may also carry the identity identifier of the target product to which the target use case belongs. In this case, a target database matching the identity identifier of the target product can be obtained. This target database stores prompt information belonging to the target product, including first prompt information and second prompt information.

[0162] Optionally, a client application can be deployed on the terminal, and the identity of users using the client can be verified through login. For example, the login information of different users belonging to the same target product can indicate whether different users belong to the same product development team.

[0163] A session is a special object created by the server for each user to store the user's session data. Each session has a unique identifier called JSESSIONID, which is sent to the client where the terminal is deployed via a cookie and carried back in subsequent requests so that the server can identify the user.

[0164] When a use case logs into a client, the client can include session information when uploading the requirements document for the target use case via the terminal. For example, this session information may include information about the user's product development team. Therefore, session information can be considered an identifier for the target product to which the target use case belongs. The server can use this session information to find the target database matching the user's product development team from the data storage system.

[0165] The first and second prompt information stored in the target database in this application embodiment can be considered as the optimal prompt information formed by other users belonging to the same product development team during the use case generation process, i.e., the optimal prompt information of historical users, which belongs to the same target product as the target use case.

[0166] It is evident that the first and second prompts determined in this way not only have good sustainability and inheritability, but can also serve as a mature and complete basic corpus, providing a relatively accurate reference for the generation process of target test cases and ensuring that the generated test cases do not have significant errors.

[0167] In one possible implementation, after determining the target use case, this embodiment of the application can also update the first prompt information and the second prompt information through user interaction while optimizing the target use case. Figure 9 A flowchart illustrating an optimization method for a target use case according to an embodiment of this application is shown. For example... Figure 9 As shown, the optimization method 900 for optimizing the target use case in this application includes steps 901 to 908.

[0168] In step 901, a display instruction for the target use case is sent to the terminal, which instructs the terminal to display the target use case.

[0169] The display instruction for the target use case in this embodiment may include detailed content of the target use case. When the terminal receives the display instruction for the target use case, it can display the target use case on the display interface. If the user is not satisfied with the target use case, they can directly input a target adjustment message on the display interface.

[0170] In step 902, a target adjustment message for the target use case is received from the terminal. This target adjustment information can be use case adjustment information for image information or use case adjustment information for text information. Therefore, after obtaining the target adjustment message for the target use case from the terminal, considering that the prompts for text information and image information are different, step 903 can be executed.

[0171] In step 903, the type of the target adjustment message is determined. For example, the type of the object to be adjusted in the target adjustment message can be determined. When the object to be adjusted includes text information, the target adjustment message includes use case adjustment information of text information. Therefore, steps 904 and 905 can be executed. When the object to be adjusted includes image information, the target adjustment message includes use case adjustment information of image information. Therefore, steps 906 to 908 can be executed.

[0172] In step 904, the first prompt information is updated based on the use case adjustment information in the text. Optionally, the use case adjustment information in the text can be merged with the first prompt information to achieve the purpose of updating the first prompt information.

[0173] The use case adjustment information in this text message can perform functions such as adding, deleting, and modifying the first prompt message. For example, when there is a conflict between the use case adjustment information in the target text and part of the content in the first prompt message, the use case adjustment information in the text message can replace that part of the content in the first prompt message to achieve the purpose of merging the use case adjustment information in the text message and the first prompt message. When the use case adjustment information in the text message is supplementary content to the first prompt message, the adjustment information in the text message can be appended to the first prompt message.

[0174] For any image information that has a mapping relationship with text information, it can belong to the same sub-document as the text information. If the image description information does not generate an initial use case corresponding to the image information through the use case generation model, step 905 can be re-executed after updating the first prompt information; if the image description information generates an initial use case corresponding to the image information through the use case generation model, step 905 does not need to be executed after updating the first prompt information.

[0175] In step 905, the requirement description information and the first prompt information are input into the use case generation model to obtain the target use case. Since the first prompt information is updated, the target use case can be updated based on the requirement description information and the first prompt information, and then the process returns to step 901.

[0176] In step 906, the second prompt information is updated based on the use case adjustment information of the image information. Optionally, the use case adjustment information of the image information can be merged with the second prompt information to achieve the purpose of updating the second prompt information.

[0177] The use case adjustment information for this image information can perform functions such as adding, deleting, and modifying the second prompt information. For example, when there is a conflict between the use case adjustment information of the image information and part of the content of the second prompt information, the use case adjustment information of the image information can replace that part of the content in the second prompt information to achieve the purpose of merging the use case adjustment information of the image information and the second prompt information. When the use case adjustment information of the image information is supplementary content to the second prompt information, the use case adjustment information of the image information can be spliced ​​into the second prompt information.

[0178] For this image information, if the use case generation model can generate an initial use case corresponding to the image information, step 907 can be executed after updating the second prompt information. If the use case generation model does not generate an initial use case corresponding to the image information, step 907 can be skipped after updating the second prompt information.

[0179] In step 907, the initial use case, text description information, and second prompt information are input into the use case generation model to determine the second use case corresponding to the image information. Since the second prompt information is the updated second prompt information, the purpose of updating the second use case can be achieved based on the initial use case, text description information, and second prompt information.

[0180] In step 908, the first use case and the second use case are concatenated to obtain the target use case. Afterwards, the process can return to step 901.

[0181] As can be seen, the method of this application embodiment can obtain the target adjustment message through interactive means, and determine the method of updating the first prompt message or the second prompt message according to the type of use case adjustment information included in the target adjustment message, so as to achieve continuous optimization of the prompt message. Then, the target use case is optimized by generating use cases through the use case generation model, so that the output target use case meets the user's expectations.

[0182] Optionally, when the server in this embodiment receives a target adjustment message, it can use large model engines such as gpt-4o-WestUS, qwen3, deepseek-r1-distill-qwen, and OpenGVLab / InternVL3 to determine the type of the target adjustment message, including the use case adjustment information, and then merge the use case adjustment information with different prompts to update the prompts.

[0183] In an optional embodiment, after sending the display instruction for the target use case to the terminal, the user can also evaluate the target use case through the terminal. Furthermore, when the first and second prompt messages are stored in the target database, if the target use case undergoes one or more updates, the historical adjustment information for the target use case can be incrementally stored in the target database each time the target use case is updated. In this case, Figure 10 A schematic flowchart illustrating the optimized prompting information method according to an embodiment of this application is shown. Figure 10 As shown, the method 1000 for optimizing the prompt information of the target use case in this application embodiment includes steps 1001 to 1006.

[0184] In step 1001, in response to receiving evaluation information from the terminal for the target use case, it is determined whether the evaluation information meets the confirmation conditions of the target use case.

[0185] Optionally, when the target use case is displayed on the terminal, the terminal can respond to the user's evaluation operation on the target use case, obtain the evaluation information for the target use case, and then send it to the server. After receiving the evaluation information for the target use case, the server can analyze the evaluation information of the target use case to determine whether the evaluation information of the target use case meets the confirmation conditions of the target use case.

[0186] When the evaluation information of the target use case meets the confirmation conditions of the target use case, it means that the target use case meets the user requirements. Therefore, step 1002 can be executed. When the evaluation information of the target use case does not meet the confirmation conditions of the target use case, steps 902 to 908 can be executed.

[0187] In one example, if the evaluation information of the target use case includes user satisfaction with the target use case, it can be considered that the evaluation information of the target use case meets the acceptance criteria of the target use case; if the evaluation information of the target use case includes user dissatisfaction with the target use case, it can be considered that the evaluation information of the target use case does not meet the acceptance criteria of the target use case.

[0188] In another example, the evaluation information of the target use case includes the user's rating of the target use case. The server can compare the user's rating of the target use case with a preset rating. If the user's rating of the target use case is higher than the preset rating, it can be considered that the evaluation information of the target use case meets the confirmation conditions of the target use case; otherwise, it means that the evaluation information of the target use case does not meet the confirmation conditions of the target use case.

[0189] In step 1002, historical adjustment messages for the target use case are retrieved from the target database. If the target use case is the first time the server returns it to the terminal, the target database may not yet store historical adjustment messages for that target use case. If the target use case is not the first time the server returns it, the target database stores historical adjustment messages for that target use case.

[0190] In step 1003, when the historical adjustment message includes historical use case adjustment information in text format, the initial content of the first prompt message is updated based on the historical use case adjustment information in text format. Here, the target text can be any text obtained from the use case requirements.

[0191] In this application embodiment, the initial content of the first prompt information can be the content of the first prompt information used during the server's initial generation of the target use case. This first prompt information content, as a basic corpus, can be integrated with historical use case adjustment information in the text information to achieve the purpose of updating the initial content of the first prompt information.

[0192] Optionally, the historical use case adjustment information of the text message can be filtered to remove useless information. Then, the initial content of the first prompt message can be merged with the historical use case adjustment information of the text message, which can reduce the interference of useless information. Here, the filtering conditions can be defined by the user through interactive means.

[0193] In step 1004, the initial content of the updated first prompt message is stored in the target database. This storage can be incremental or full storage.

[0194] In step 1005, when the historical adjustment message includes historical use case adjustment information for the target image, the initial content of the second prompt information is updated based on the historical use case adjustment information for the target image. Here, the target image can be any image obtained from the use case requirement information.

[0195] The initial content of the second prompt information in this embodiment can be the content of the second prompt information used by the server during the initial generation of the target use case. This content of the second prompt information, as a basic corpus, can be integrated with the historical use case adjustment information of the target text, thereby achieving the purpose of updating the initial content of the second prompt information.

[0196] Optionally, the historical use case adjustment information of the text message can be filtered to remove useless information. Then, the initial content of the second prompt message can be merged with the historical use case adjustment information of the text message, which can reduce the interference of useless information. Here, the filtering conditions can be defined by the user through interactive means.

[0197] In step 1006, the initial content of the updated second prompt message is stored in the target database. This storage can be incremental or full storage.

[0198] In the method of this application embodiment, when receiving evaluation information from the terminal for the target use case, if the evaluation information meets the confirmation conditions of the target use case, it indicates that the target use case meets the user requirements. Therefore, historical adjustment messages for the target use case can be obtained from the target database, and the historical adjustment messages can be fused with the first prompt information and the second prompt information read from the target database according to the type of the historical adjustment messages, thereby achieving the purpose of optimizing the first prompt information and the second prompt information.

[0199] As can be seen, the embodiments of this application can integrate historical adjustment messages into the initial content of the first prompt information and the initial content of the second prompt information based on whether the evaluation information for the target use case meets the confirmation conditions of the target use case. This ensures that there will be no large errors in the test case generation process, which can reduce the number of times test cases for the same product are adjusted in the future.

[0200] In an alternative embodiment, the method of this application may further include: sending a hierarchical display instruction for demand information to a terminal, the hierarchical display instruction being used to instruct the terminal to display text information and image information. In this case, when the target adjustment message includes the object to be adjusted and the use case adjustment method for the object to be adjusted, the object to be adjusted may include text information or image information.

[0201] Optionally, the terminal can display one or more texts, and one or more images, depending on the specific requirements. Here, the target text can be any selected text or any selected image.

[0202] When displaying text and images on the terminal, the terminal can respond to the selection operation of text information to determine the object to be adjusted, or it can respond to the selection operation of text information to determine the object to be adjusted, and then combine the use case adjustment method to generate the target adjustment message and send it to the server.

[0203] Figure 11 A schematic diagram illustrating a use case demonstration interface of an embodiment of this application is shown. For example... Figure 11As shown, in the target use case display interface 1100, users can select the required document for the target use case by clicking the "Upload" control in the document upload area 1100A. The document will be displayed in the display box 1101 of the document upload area 1100A. Finally, by clicking the "Submit" control, the required document for the target use case is uploaded to the server via the terminal. The server can generate the target use case based on the above description and send the display instructions for the target use case to the terminal. At this time, the terminal can display the target use case in the display box 1102 of the use case display area 1100B.

[0204] If the user is satisfied with the target use case, they can submit their evaluation by clicking the "Satisfied" control. If they need to download the target use case displayed in box 1102, they can click the "Download" control. If the user is not satisfied with the target use case, they can submit their evaluation by clicking the "Dissatisfied" control. At this point, a pop-up window will appear. Figure 12 The suggestion submission interface shown is 1200.

[0205] Optionally, after the evaluation information of the target use case is submitted through the terminal, the server can receive the evaluation information of the target use case. If the evaluation information of the target use case (such as the evaluation information of the target use case submitted via the "Dissatisfied" control) does not meet the confirmation conditions of the target use case, the server can send a hierarchical display instruction of the requirement information to the terminal. This hierarchical display instruction can instruct the terminal to... Figure 12 The suggestion submission interface shown is presented in the form of 1200.

[0206] exist Figure 12 The suggestion submission interface 1200 shown can be categorized by sub-documents, displaying text summaries and image summaries of different sub-documents in a hierarchical display area 1201. Users can select images or text from different sub-documents as the objects to be adjusted, fill in the use case adjustment method for the selected images or text in the suggestion submission box 1202, and then click the "Submit" control. The terminal can encapsulate the use case adjustment method and the objects to be adjusted into a target adjustment message and send it to the server, which can then optimize the target use cases by referring to the preceding text.

[0207] Figure 13A This diagram illustrates the first prompt message of an embodiment of this application before the update. Figure 13B A schematic diagram showing the updated version of the first prompt message from an embodiment of this application is provided. Figure 13A and Figure 13B As shown, in Figure 12After selecting the text of a sub-document, you can fill in "Test cases should present the identified sub-functions according to different test cases, and should not be aggregated into one output" in suggestion submission box 1202. After receiving the target adjustment message, the server can assume that the target adjustment message includes text information (in... Figure 12 The test case adjustment information (text of the selected sub-document) includes: "Test cases should present the identified sub-functions according to different test cases, and should not be output together." This is a constraint condition; therefore, "Test cases should present the identified sub-functions according to different test cases, and should not be output together" can be appended to the... Figure 13A Within the constraints of the first prompt information, thus obtaining Figure 13B The first message after the update.

[0208] Figure 14A This illustration shows a fragment of the target use case in an embodiment of this application before the update. Figure 14B A schematic diagram of the updated fragment of the target use case of an embodiment of this application is shown. For example... Figure 14A As shown, in the target test cases generated by the server, the sub-test case with test case number test_case_0101002_02 is named "Verify the editing and deletion operations of the process document when it is in draft status". Figure 13B Following the initial warning message, which states that "test cases should present the identified sub-functions as separate test cases, not aggregated together for output," the server can split the test case with test_case_0101002_02, named "Verify the editing and deletion operations of the process document in draft status," into separate test cases. Figure 14B The test case has sub-test cases numbered test_case_0101002_02 and test_case_0101002_03. The test case name for sub-test_case_0101002_02 is "Verify that the process file list supports editing operations," and the test case name for sub-test_case_0101002_03 is "Verify that the process file list supports deletion operations."

[0209] Combination Figure 13A and Figure 13B As can be seen, after the text test case adjustment method of submitting the sub-document through the interface interaction, the server can use this as a basis to adjust the already generated target test cases so that the regenerated target test cases meet the user requirements.

[0210] When the requirement information of the target use case carries the identity identifier of the target product to which the target use case belongs, the method of this application embodiment may further include: obtaining a target database that matches the identity identifier of the target product. The target database stores prompt information belonging to the target product. The prompt information includes first prompt information and second prompt information. Therefore, the first prompt information and second prompt information can be obtained from the target database.

[0211] Upon receiving a target adjustment message, a historical adjustment message matching the target adjustment message can be retrieved from the target database. If no historical adjustment message matching the target adjustment message is found in the target database, it indicates that the target adjustment message is a newly added adjustment message. This target adjustment message can be stored as a historical adjustment message in the target database, and the target use case update process can be executed, referring to steps 901-908 above. If a historical adjustment message matching the target adjustment message is found in the target database, the target adjustment message can be updated based on the historical adjustment message, and the target use case update process can be executed, referring to steps 901-908 above. Therefore, in this embodiment, when a new target use case is successfully generated, the existence of a historical adjustment message matching the target adjustment message can be queried in the target database to synchronously and incrementally store the newly added target adjustment message. This facilitates the optimization of the first and second prompt messages when the user is satisfied with the target use case.

[0212] In one example, if the target adjustment message includes use case adjustment information in text, and no historical adjustment message matching the text use case adjustment information is found in the target database, the text use case adjustment information can be stored in the target database; if a historical adjustment message matching the text use case adjustment information is found in the target database, the text use case adjustment information can be updated based on the historical adjustment message.

[0213] In one example, if the target adjustment message includes use case adjustment information for image information, and no historical adjustment message matching the use case adjustment information for the image information is found in the target database, the use case adjustment information for the image information can be stored in the target database; if a historical adjustment message matching the use case adjustment information for the image information is found in the target database, the use case adjustment information for the image information can be updated based on the historical adjustment message.

[0214] In other words, when different use cases are generated using the server, as long as these use cases belong to the same product, regardless of whether the users are the same, the optimized initial content of the first prompt message and the initial memory of the second prompt message can be stored in the database when the generated use cases meet the user's needs, so that they can be used in the generation of other use cases belonging to the same product.

[0215] For example, after executing steps 1004 and 1006, the generation of the target use case and the optimization of the prompt information have been completed. After other users upload the requirement information of other use cases for the same product to the server through the terminal, the server can generate other use cases based on the requirement information of other use cases and read the first prompt information and the second prompt information from the server. The server can also optimize the initial content of the first prompt information and the initial content of the second prompt information in the target database with reference to steps 1001 to 1006.

[0216] As can be seen, in the method of this application embodiment, the target database containing the identity identifier of the target product to which the target use case belongs can be determined from the product dimension (which can be considered as the default database of the product to which the target use case belongs). Then, the first and second prompts, which are the optimal prompts for historical users, can be obtained from it. This optimization method can introduce the front-end interface interaction into the prompt information optimization process, which is a user-directly involved, sustainable, closed-loop, inheritable, and easy-to-operate process. Furthermore, users can continuously debug the target use case through the interaction of the front-end interface, and specifically index the paragraphs or images in the requirement information of the target use case to optimize the corpus until they are satisfied. Therefore, in the method of this application embodiment, each paragraph or image in the requirement information of the target use case can be independently edited for prompt information, thereby greatly improving the content coverage, accuracy, and use case adoption rate of the generated target use case to the requirement information of the target use case.

[0217] In addition, such as Figure 12 As shown, in the hierarchical display area 1201 of the suggestion submission interface 1200, the object to be adjusted is selected, and the use case adjustment method of the object to be adjusted is entered. This allows the server to continuously optimize the first and second prompt information according to business characteristics and user habits. This not only improves the accuracy of the target use case, but also makes the target use case meet user requirements. Therefore, the method of this application embodiment can enable the natural semantic model in the server to better understand the requirement information of the target use case through the continuously automatically optimized use case adjustment method (prompt corpus), thereby improving the accuracy and reliability of the final target use case.

[0218] By dividing functional modules according to their respective functions, an exemplary embodiment of this application provides a use case generation apparatus. This use case generation apparatus can be a computer device or a chip applied to a computer device. Figure 15 A schematic block diagram of a functional module of a use case generation apparatus according to an exemplary embodiment of this application is shown. Figure 15 As shown, the use case generation device 1500 includes: The determination module 1501 is configured to, in response to receiving the requirement information of the target use case from the terminal, determine the text information, image information, and image location description information in the requirement information, wherein the image location description information is used to describe the position of the image information in the text information; and, based on the text information, image location description information, and image location description information, determine the position information of the text description information, image description information, and image description information in the text description information, wherein the text description information is used to describe the text content in the text information, and the image description information is used to describe the image content in the image information. The generation module 1502 is used to determine the target use case based on the location information of the image description information in the text description information, the text description information, and the image description information.

[0219] In one possible implementation, the determining module 1501 is used to determine image description information based on image information, determine the positioning marker of the image description information based on the image location description information, determine text description information based on the positioning marker and text information, wherein the positioning marker is located at the position of the image description information corresponding to the text description information, and determine the position information of the image description information in the text description information based on the positioning marker of the position of the image description information corresponding to the text description information.

[0220] In one possible implementation, the determining module 1501 is used to generate a positioning mark at the position of the image information corresponding to the text information based on the image location description information, and obtain text information with the positioning mark added; based on the text information with the positioning mark added, determine the text description information.

[0221] In one possible implementation, the generation module 1502 is used to, if the image description information does not generate an initial use case corresponding to the image information through the use case generation model, concatenate the image description information to the position of the corresponding image description information in the text description information based on the position information of the image description information in the text description information to obtain requirement description information, which is used to describe the semantic content of the requirement information; input the requirement description information and the first prompt information into the use case generation model to obtain the target use case, which is used to provide prompt content for the use case generation model to generate the target use case.

[0222] In one possible implementation, the generation module 1502 is further configured to input text description information into the use case generation model to obtain a first use case corresponding to the text information; if the image description information generates an initial use case corresponding to the image information through the use case generation model, the initial use case, text description information, and second prompt information are input into the use case generation model to obtain a second use case corresponding to the image information, and the second prompt information is used to provide prompt content for generating the second use case for the use case generation model; the first use case and the second use case are concatenated to obtain the target use case.

[0223] In one possible implementation, the device 1500 further includes an optimization module 1503, configured to send a display instruction for a target use case to a terminal, the display instruction for the target use case being used to instruct the terminal to display the target use case; receive a target adjustment message from the terminal for the target use case; if the target adjustment message includes use case adjustment information in text format, update the first prompt information based on the use case adjustment information in text format; if the target adjustment message includes use case adjustment information in image format, update the second prompt information based on the use case adjustment information in image format.

[0224] In one possible implementation, both the first and second prompt messages are stored in the target database, which also stores historical adjustment messages for the target use case.

[0225] The optimization module 1503 is also used to respond to receiving evaluation information from the terminal for the target use case. If the evaluation information meets the confirmation conditions of the target use case, it retrieves historical adjustment messages for the target use case from the target database. When the historical adjustment message includes historical use case adjustment information of text information, it updates the initial content of the first prompt information based on the historical use case adjustment information of text information and stores the updated initial content of the first prompt information in the target database. When the historical adjustment message includes historical use case adjustment information of image information, it updates the initial content of the second prompt information based on the historical use case adjustment information of image information and stores the updated initial content of the second prompt information in the target database.

[0226] In one possible implementation, the requirement information of the target use case carries the identity identifier of the target product to which the target use case belongs. The optimization module 1503 is further configured to obtain a target database matching the identity identifier of the target product. The target database stores prompt information belonging to the target product, including first prompt information and second prompt information. If no historical adjustment message matching the target adjustment message is found in the target database, the target adjustment message is stored in the target database. If a historical adjustment message matching the target adjustment message is found in the target database, the target adjustment message is updated based on the historical adjustment message.

[0227] This application also provides a computer device, including: at least one processor; and a memory communicatively connected to the at least one processor. The memory stores a computer program executable by the at least one processor, which, when executed by the at least one processor, causes the computer device to perform a use case generation method according to an embodiment of this application.

[0228] An exemplary embodiment of this application also provides a non-transitory computer-readable storage space storing a computer program, wherein the computer program, when executed by a computer's processor, is used to cause the computer to perform a use case generation method according to an embodiment of this application.

[0229] An exemplary embodiment of this application also provides a computer program product, including a computer program, wherein, when executed by a computer's processor, the computer program is used to cause the computer to perform a use case generation method according to an embodiment of this application.

[0230] refer to Figure 16 The present invention describes a structural block diagram of a computer device 1600 that can be used as an embodiment of the present application, which is an example of a hardware device that can be applied to various aspects of the embodiments of the present application. The term "computer device" is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. A computer device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the embodiments of the present application described and / or claimed herein.

[0231] like Figure 16 As shown, computer device 1600 includes a computing unit 1601, which can perform various appropriate actions and processes according to a computer program stored in read-only memory (ROM) 1602 or a computer program loaded into random access memory (RAM) 1603 from storage unit 1608. The RAM 1603 may also store various programs and data required for the operation of device 1600. The computing unit 1601, ROM 1602, and RAM 1603 are interconnected via bus 1604. Input / output (I / O) interface 1605 is also connected to bus 1604.

[0232] like Figure 16As shown, multiple components in computer device 1600 are connected to I / O interface 1605, including: input unit 1606, output unit 1607, storage unit 1608, and communication unit 1609. Input unit 1606 can be any type of device capable of inputting information to computer device 1600. Input unit 1606 can receive input numerical or character information and generate key signal inputs related to user settings and / or function control of the computer device. Output unit 1607 can be any type of device capable of presenting information and may include, but is not limited to, a monitor, speaker, video / audio output terminal, vibrator, and / or printer. Storage unit 1608 may include, but is not limited to, hard disks and optical disks. Communication unit 1609 allows computer device 1600 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers, and / or chipsets, such as Bluetooth™ devices, WiFi devices, WiMax devices, cellular communication devices, and / or the like.

[0233] like Figure 16 As shown, computing unit 1601 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of computing unit 1601 include, but are not limited to, central processing unit (CPU), graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Computing unit 1601 performs the various methods and processes described above. For example, in some embodiments, the methods of the embodiments of this application can be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as storage unit 1608. In some embodiments, part or all of the computer program can be loaded and / or installed on computer device 1600 via ROM 1602 and / or communication unit 1609. In some embodiments, computing unit 1601 can be configured to perform the methods of the embodiments of this application by any other suitable means (e.g., by means of firmware).

[0234] Program code used to implement the methods of the embodiments of this application may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0235] In the context of embodiments of this application, machine-readable space can be a tangible space that may contain or store programs for use by or in conjunction with an instruction execution system, apparatus, or device. Machine-readable space can be machine-readable signal space or machine-readable storage space. Machine-readable space can 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 machine-readable storage space include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0236] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0237] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or space (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0238] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other.

[0239] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed on a computer, the processes or functions described in the embodiments of this application are performed entirely or partially. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a terminal, a user equipment, or other programmable device. The computer program or instructions can be stored in computer-readable storage space or transmitted from one computer-readable storage space to another. For example, the computer program or instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The computer-readable storage space can be any available space that a computer can access or a data storage device such as a server or data center that integrates one or more available spaces. The available space can be magnetic space, such as a floppy disk, hard disk, or magnetic tape; it can also be optical space, such as a digital video disc (DVD); or it can be semiconductor space, such as a solid-state drive (SSD).

[0240] Although this application has been described in conjunction with specific features and embodiments, it is obvious that various modifications and combinations can be made thereto without departing from the spirit and scope of this application. Accordingly, this specification and drawings are merely exemplary illustrations of this application as defined by the appended claims, and are considered to cover any and all modifications, variations, combinations, or equivalents within the scope of this application. Clearly, those skilled in the art can make various alterations and modifications to this application without departing from the spirit and scope of this application. Thus, if such modifications and modifications of this application fall within the scope of the claims of this application and their equivalents, this application is also intended to include such modifications and modifications.

Claims

1. A test case generation method, characterized in that, include: In response to receiving the target use case requirement information from the terminal, the text information, image information, and image location description information in the requirement information are determined, wherein the image location description information is used to describe the position of the image information in the text information; Based on the text information, the image location description information, and the image location description information, the text description information, the image description information, and the image description information's position information within the text description information are determined. The text description information is used to describe the text content within the text information, and the image description information is used to describe the image content within the image information. Based on the location information of the image description information within the text description information, the text description information, and the image description information, the target use case is determined.

2. The method according to claim 1, characterized in that, Determining the text description information, image description information, and the position information of the image description information within the text description information based on the text information, the image location description information, and the image location description information includes: Image description information is determined based on the image information; Based on the image location description information, determine the positioning marker of the image description information; Based on the positioning marker and the text information, the text description information is determined, wherein the positioning marker is located at the position of the text description information corresponding to the image description information; Based on the positioning marker corresponding to the position of the image description information in the text description information, the position information of the image description information in the text description information is determined.

3. The method according to claim 2, characterized in that, The step of determining the text description information based on the location marker and the text information includes: Based on the description information of the image location, a positioning mark is generated at the position of the text information corresponding to the image information, and text information with the positioning mark added is obtained; Based on the text information with the added positioning marker, determine the text description information.

4. The method according to any one of claims 1 to 3, characterized in that, The step of determining the target use case based on the location information of the image description information in the text description information, the text description information, and the image description information includes: If the image description information does not generate an initial use case corresponding to the image information through the use case generation model, based on the position information of the image description information in the text description information, the image description information is concatenated to the position of the text description information corresponding to the image description information to obtain the requirement description information, which is used to describe the semantic content of the requirement information; The requirement description information and the first prompt information are input into the use case generation model to obtain the target use case. The first prompt information is used to provide prompts for the use case generation model to generate the target use case.

5. The method according to claim 4, characterized in that, The step of determining the target use case based on the position information of the image description information in the text description information, the text description information, and the image description information further includes: The text description information is input into the use case generation model to obtain the first use case corresponding to the text information; If the image description information is used to generate an initial use case corresponding to the image information through the use case generation model. The initial use case, the text description information, and the second prompt information are input into the use case generation model to obtain the second use case corresponding to the image information. The second prompt information is used to provide prompt content for the use case generation model to generate the second use case. The first use case and the second use case are combined to obtain the target use case.

6. The method according to claim 5, characterized in that, The method further includes: Send a display instruction for the target use case to the terminal, wherein the display instruction for the target use case is used to instruct the terminal to display the target use case; Receive a target adjustment message from the terminal for the target use case; If the target adjustment message includes use case adjustment information in text format, the first prompt information is updated based on the use case adjustment information in text format. If the target adjustment message includes use case adjustment information for image information, the second prompt information is updated based on the use case adjustment information for image information.

7. The method according to claim 6, characterized in that, Both the first and second prompt messages are stored in the target database, which also stores historical adjustment messages for the target use case. The method further includes: In response to receiving evaluation information from the terminal for the target use case, if the evaluation information meets the confirmation conditions of the target use case, historical adjustment messages for the target use case are retrieved from the target database; When the historical adjustment message includes historical use case adjustment information in text, the initial content of the first prompt message is updated based on the historical use case adjustment information in text, and the updated initial content of the first prompt message is stored in the target database. When the historical adjustment message includes historical use case adjustment information of image information, the initial content of the second prompt information is updated based on the historical use case adjustment information of the image information, and the updated initial content of the second prompt information is stored in the target database.

8. The method according to claim 6, characterized in that, The requirement information carries the identity identifier of the target product to which the target use case belongs, and the method further includes: Obtain a target database that matches the identity identifier of the target product. The target database stores prompt information belonging to the target product, and the prompt information includes first prompt information and second prompt information. If no historical adjustment message matching the target adjustment message is found in the target database, the target adjustment message is stored in the target database. If a historical adjustment message matching the target adjustment message is found in the target database, the target adjustment message is updated based on the historical adjustment message.

9. The method according to any one of claims 4 to 8, characterized in that, The method further includes: Determine whether the image description information matches the use case generation conditions; If the image description information matches the use case generation conditions, the image description information is input into the use case generation model to obtain the initial use case; If the image description information does not match the use case generation conditions, it is confirmed that the image description information has not generated an initial use case corresponding to the image information through the use case generation model.

10. A computer device, characterized in that, include: processor; as well as, Memory for stored programs; The program includes instructions that, when executed by a processor, cause the processor to perform the method according to any one of claims 1 to 9.