Demand risk analysis method and device, medium, electronic equipment and program product
By acquiring and analyzing the target requirements in software development, and using large language models to generate risk conclusions, the problem of resource waste in the existing technology is solved, and efficient allocation of resources and testing decisions are achieved.
Patent Information
- Application Number
- CN202411786838.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-03-21
AI Technical Summary
During software development, some demands have low risk, resulting in waste of resources, because existing technologies are difficult to effectively analyze and allocate test resources.
By obtaining target requirements, identifying the information on the requirements in at least one requirement dimension and code dimension, and using large language models to generate risk conclusions, thereby guiding resource allocation and testing decisions.
Accurate analysis of demand risks is achieved, resource allocation is optimized, resource waste is avoided, and overfitting is avoided through the use of large language models.
Smart Images

Figure CN119668556A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular, to a demand risk analysis method, device, medium, electronic device and program product. Background Art
[0002] In the process of software development, in order to ensure product quality, it is often necessary to test requirements. However, in practice, some requirements actually bring lower risks and fewer code defects. Investing too much manpower cost in testing these requirements will lead to serious waste of resources. Therefore, it is urgent to provide a method for analyzing requirements to provide a basis for allocating test resources to requirements. Summary of the invention
[0003] This summary is provided to introduce concepts in a brief form that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0004] In a first aspect, the present disclosure provides a demand risk analysis method, comprising: Obtain target requirements; Based on the target demand, determining demand information of the target demand in at least one demand dimension and / or code information of the target demand in at least one code dimension; According to the demand information and / or the code information, a risk conclusion corresponding to the target demand is obtained through the large language model.
[0005] In a second aspect, the present disclosure provides a demand risk analysis device, comprising: an acquisition module, configured to acquire target requirements; A determination module is configured to determine, based on the target requirement, requirement information of the target requirement in at least one requirement dimension and / or code information of the target requirement in at least one code dimension; The obtaining module is configured to obtain the risk conclusion corresponding to the target requirement through the large language model according to the requirement information and / or the code information.
[0006] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the method described in the first aspect.
[0007] In a fourth aspect, the present disclosure provides an electronic device, including: a storage device having a computer program stored thereon; A processing device is used to execute the computer program in the storage device to implement the steps of the method described in the first aspect.
[0008] In a fifth aspect, the present disclosure provides a computer program product, including a computer program, which implements the steps of the method described in the first aspect when executed by a processor.
[0009] Based on the above technical solution, based on the target demand, the demand information of the target demand in at least one demand dimension and / or the code information of the target demand in at least one code dimension are determined, and then the risk conclusion corresponding to the target demand is obtained through the large language model according to the demand information and / or code information. The demand information and / or code information of at least one dimension can make the obtained risk conclusion have sufficient information support, and ensure that an accurate risk conclusion is obtained, so that the user can perceive the risk situation of the target demand according to the risk conclusion, and make a judgment on whether the target demand needs to be tested. Moreover, by using the large language model, there is no need to tune the weight of the large language model to avoid overfitting.
[0010] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale. In the drawings: Figure 1 is a flow chart of a method for demand risk analysis according to some embodiments.
[0012] Figure 2 is a schematic diagram of a requirement card according to some embodiments.
[0013] Figure 3 is a schematic diagram of obtaining risk conclusions according to some embodiments.
[0014] Figure 4 is a schematic diagram of a demand risk analysis report according to some embodiments.
[0015] Figure 5 It is a schematic diagram of the structure of a demand risk analysis device according to some embodiments.
[0016] Figure 6 is a schematic diagram of the structure of an electronic device according to some embodiments. DETAILED DESCRIPTION
[0017] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0018] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0019] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0020] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0021] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0022] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0023] Figure 1 FIG. 1 is a flow chart of a method for analyzing demand risk according to some embodiments. Figure 1 As shown, the embodiment of the present disclosure provides a demand risk analysis method, which can be executed by an electronic device, specifically by a demand risk analysis device, which can be implemented by software and / or hardware and configured in the electronic device. Figure 1 As shown, the method may include the following steps.
[0024] In step 110, target requirements are obtained.
[0025] Here, demand refers to the user's expectations and requirements for software products or systems in terms of functions, performance, design, constraints, etc. Target demand can refer to the demand to be analyzed.
[0026] Exemplarily, a robot in a group chat may receive a demand card sent by a user, wherein the demand card includes a link corresponding to the target demand, so that the target demand can be obtained through the link.
[0027] Group chat refers to a virtual space composed of multiple users in instant messaging applications, social media platforms or other online communication tools, which allows real-time text, voice, video communication and file sharing among group members. Robots can be users in group chats. Other users can send demand cards in group chats, and robots can obtain target demands through demand cards in group chats.
[0028] Figure 2 FIG. 1 is a schematic diagram of a requirement card according to some embodiments. Figure 2 As shown, the user can send a demand card 201 in a group chat. The demand card 201 carries a link to the target demand. The robot obtains the link to the target demand through the demand card 201 in the group chat, and obtains the target demand through the link.
[0029] In step 120 , based on the target requirement, requirement information of the target requirement in at least one requirement dimension and / or code information of the target requirement in at least one code dimension is determined.
[0030] Here, the requirement information of the target requirement in the requirement dimension refers to the information related to the target requirement obtained by analyzing the target requirement in the dimension of the target requirement itself. The code information of the target requirement in the code dimension refers to the information obtained by analyzing the code in the dimension of the code corresponding to the target requirement.
[0031] In some embodiments, the demand information of the target demand in at least one demand dimension includes at least one of the following: Semantic information of documents related to the target requirement, description information of the business corresponding to the target requirement, functional points affected by the target requirement, error information of historical requirements similar to the target requirement, and requirement attribute information of the target requirement.
[0032] The documents related to the target requirements include the requirement documents and / or technical documents of the target requirements. The requirement documents are documents that record the user requirements, system requirements and business requirements in detail, and the technical documents are documents that describe the software system architecture, design, implementation and operation. The semantic information of the documents related to the target requirements can be the information obtained by semantically understanding and summarizing the documents.
[0033] Exemplarily, semantic information can be obtained from documents related to the target requirement through a document understanding service. For example, the document understanding service can obtain semantic information of documents related to the target requirement through a model for processing natural language tasks.
[0034] The description information of the business corresponding to the target demand may refer to information explaining the business line and / or business-specific name corresponding to the target demand, so that the large language model can understand the business-related information included in the target demand.
[0035] Exemplarily, the description information of the business corresponding to the target demand can be obtained through the business understanding service. For example, the business understanding service can interpret the business line to which the target demand belongs and / or the business terms included in the target demand through a preset dictionary to obtain the description information of the business corresponding to the target demand.
[0036] It should be noted that there will be some business-specific nouns in the target requirements, and the business developers can directly understand the meaning of these business-specific nouns, but for the large language model, business-specific nouns have special meanings in specific scenarios, and the meaning of these business-specific nouns cannot be understood. By obtaining the description information of the business corresponding to the target requirements, the large language model can understand the business line to which the target requirements belong and / or the meaning of the business-specific nouns.
[0037] The function points affected by the target requirements refer to the function points of the existing system or product that the target requirements will affect. For example, if the existing system or product has 100 function points, the function points affected by the target requirements may be 5.
[0038] Exemplarily, the function points affected by the target requirements can be obtained through the function tree reasoning service. Among them, the function tree is a hierarchical structure used to describe various functions in a system or product. For example, a video conferencing product has an interaction bar, and the interaction bar has functions such as microphone, camera, recording, screen sharing, etc., then the microphone, camera, recording, screen sharing, etc. functions are the lower structure of the interaction bar.
[0039] In some embodiments, the function points affected by the target requirement can be determined from the function tree corresponding to the business to which the target requirement belongs through a large language model based on the semantic information of the document related to the target requirement and the description information of the business to which the target requirement corresponds.
[0040] Among them, the semantic information and the description information can be input into the large language model. The large language model fully understands the target requirements based on the semantic information and the description information, and based on the understanding of the target requirements, determines the function points affected by the target requirements from the function tree corresponding to the business to which the target requirements belong.
[0041] It should be understood that the function tree corresponding to the business to which the target requirement belongs refers to the function tree corresponding to the business targeted by the target requirement. For example, if the target requirement is the requirement of business A, then the function tree corresponding to the target requirement is the function tree of business A, which includes all functions of business A. By determining the function points affected by the target requirement from the function tree corresponding to the target requirement, it is possible to avoid full testing of all function points of the business, and instead analyze the function points that may be affected by the target requirement, thereby guiding developers to test the function points that may be affected.
[0042] Historical requirements refer to requirements that are similar to target requirements, and error information about historical requirements refers to errors (bugs) that have occurred in requirements that are similar to target requirements.
[0043] In some embodiments, error information of historical requirements can be obtained through historical requirements analysis services. For example, related requirements similar to the target requirements can be searched through keywords in the target requirements, and then the large language model can be used to determine whether the searched related requirements belong to historical requirements similar to the target requirements. After the historical requirements are determined, error information of the historical requirements can be obtained through the historical requirements.
[0044] The demand attribute information of the target demand may include the demand name of the target demand, the development process status corresponding to the target demand, the demand type, the number of people required for scheduling the demand, and the number of days required for scheduling the demand.
[0045] In some embodiments, the code information of the target requirement in at least one code dimension includes at least one of the following: The repository information of the code repository corresponding to the target requirement, the merge request information of the code associated with the target requirement, the pipeline information of the code associated with the target requirement, the call chain information of the code associated with the target requirement, and the historical information of the code associated with the target requirement.
[0046] The repository information of the code repository corresponding to the target requirement refers to the information of the code repository targeted by the target requirement, for example, it may include repository description information, repository name, repository version information, repository submission history, repository dependencies, and other information.
[0047] The merge request information of the code associated with the target requirement refers to the merge request (MR) information of the code related to the target requirement. A merge request is a request for submitting code changes to a project in a version control system (such as GitLab, GitHub, Git, etc.). The merge request information can be used to understand the code bound to the target requirement.
[0048] The CI / CD Pipeline information of the code associated with the target requirement refers to the information that the code changes related to the target requirement are managed and automatically processed through the pipeline. The pipeline information can be used to determine the test status corresponding to the code change, such as whether the code change is subject to unit testing or other inspection methods.
[0049] The call chain information of the code associated with the target requirement refers to the information of the execution path of the code related to the target requirement. The call chain is a sequence of function or method calls, which are arranged in the order of execution in the program. Through the call chain information, the impact of code changes on existing functions can be analyzed.
[0050] The historical information of the code associated with the target requirement can refer to the bugs that have occurred in the code in the past, the code fixes, etc. By tracing the history of the code, you can understand the risks implied in each functional module. For example, if a functional module has been repaired many times and has many bugs in the past, then the functional module will have a higher risk.
[0051] In the disclosed embodiment, the code associated with the target requirement can be analyzed through the basic analysis service to obtain warehouse information, merge request information, and pipeline information. The code can be analyzed at a deeper level through the advanced analysis service to obtain call chain information and historical information. Exemplarily, the basic analysis service and the advanced analysis service can obtain the corresponding code information through the model.
[0052] It is worth noting that, through the demand information of the target demand in at least one demand dimension and / or the code information in at least one code dimension, the information used for analyzing and obtaining risk conclusions can be made more sufficient and well-founded.
[0053] It should be understood that, in response to obtaining the target requirement, all code changes related to the target requirement and all historical requirements similar to the target requirement can be retrieved using the target requirement as a key. Then, based on the retrieved information, the requirement information of the target requirement in at least one requirement dimension and / or the code information of the target requirement in at least one code dimension can be obtained.
[0054] In step 130, based on the requirement information and / or code information, a risk conclusion corresponding to the target requirement is obtained through a large language model.
[0055] Here, the requirement information and / or code information can be input into the large language model, which integrates the requirement information of all requirement dimensions and / or the code information of all code dimensions, and uses the requirement information and / or code information as context to generate risk conclusions corresponding to the target requirements.
[0056] Among them, the risk conclusion corresponding to the target demand can refer to risk levels such as low risk, medium risk, and high risk. Of course, the risk conclusion corresponding to the target demand can also be expressed by a score. For example, the lower the score, the higher the risk.
[0057] It is worth noting that the large language model can be understood as an expert model in the field of risk analysis. The large language model is based on the demand information of the target demand in at least one demand dimension and / or the code information of the target demand in at least one code dimension, and uses prompt words to think from the demand information and / or code information to obtain risk conclusions. The prompt words are used to indicate how the large language model analyzes and thinks to obtain risk conclusions.
[0058] Figure 3 FIG. 1 is a schematic diagram of obtaining risk conclusions according to some embodiments. Figure 3 As shown, the large language model obtains the risk conclusion corresponding to the target requirement based on the requirement information of at least one requirement dimension and / or the code information of at least one code dimension.
[0059] After the risk conclusion is obtained, a requirement risk analysis report including the risk conclusion may be returned to the user, so that the user can decide whether to test the target requirement based on the requirement risk analysis report.
[0060] Exemplarily, a demand risk analysis report may be sent through a robot in a group chat, so that users may obtain risk conclusions corresponding to target demands through the demand risk analysis report in the group chat.
[0061] Therefore, based on the target demand, the demand information of the target demand in at least one demand dimension and / or the code information of the target demand in at least one code dimension are determined, and then the risk conclusion corresponding to the target demand is obtained through the large language model according to the demand information and / or code information. The demand information and / or code information of at least one dimension can make the obtained risk conclusion have sufficient information support, and ensure that an accurate risk conclusion is obtained, so that the user can perceive the risk situation of the target demand according to the risk conclusion, and make a judgment on whether the target demand needs to be tested. Moreover, by using the large language model, there is no need to tune the weight of the large language model to avoid overfitting.
[0062] In some feasible implementations, in step 130, prompt words for instructing the large language model to generate risk conclusions can be constructed based on the demand information and / or code information, and the weight of the prompt words can be adjusted according to the first business rule corresponding to the business to which the target demand belongs to obtain the adjusted prompt words. The risk conclusion can be obtained through the large language model based on the demand information and / or code information in combination with the adjusted prompt words.
[0063] Here, the prompt words are used to instruct the large language model how to analyze and think about the requirement information and / or code information, so as to draw risk conclusions from the context.
[0064] For each requirement dimension, the large language model can construct a prompt word corresponding to the requirement information of the requirement dimension. For each code information of the code dimension, the large language model can construct a corresponding prompt word based on the code information of the code dimension. Of course, corresponding prompt words can also be constructed for the requirement information of at least one requirement dimension and / or the code information of at least one code dimension.
[0065] The first business rule corresponding to the business to which the target demand belongs may refer to a personalized rule designed for the business to which the target demand belongs, and is used to adjust the weight of the prompt word. For different businesses, the corresponding first business rules may be different.
[0066] For example, for some conventional businesses, the requirements for security are higher, so the weight of the prompt words related to security will be higher. For some security businesses, since the requirements for security are higher, the sensitivity to security is lower, so the weight of the prompt words related to security will be lower.
[0067] Therefore, by adjusting the weight of the prompt word through the first business rule, the attention of the large language model to the prompt word can be weakened or strengthened.
[0068] Accordingly, the large language model considers and generates risk conclusions and reasoning processes based on the adjusted prompt words combined with contextual information consisting of requirement information and / or code information.
[0069] It is worth noting that the demand information of all demand dimensions and / or the code information of all code dimensions can be compressed to obtain compressed information, and then the compressed information is input into the large language model. The large language model constructs prompt words based on the compressed information and generates risk conclusions and reasoning processes based on the prompt words.
[0070] It should be understood that the prompt words can be understood as words used to ask questions to the large language model, so as to instruct the large language model to think about and obtain corresponding risk conclusions through the prompt words.
[0071] Therefore, through the first business rule, the risk conclusion generated by the large language model can be adjusted according to the different businesses to which the target demand belongs, so as to obtain a risk conclusion that meets the business needs.
[0072] In some feasible implementations, in step 130, a reasoning template related to the business can be obtained according to the business to which the target demand belongs, and a prompt word for instructing the large language model to obtain a risk conclusion can be constructed based on the demand information and / or code information in combination with the reasoning template. Through the large language model, based on the demand information and / or code information, in combination with the prompt word, a risk conclusion is obtained.
[0073] Here, the reasoning template is used to instruct the large language model to obtain the prompt words corresponding to the business through the preset reasoning logic. Different reasoning templates can be used for different businesses. It should be noted that the reasoning template can be understood as an example given by the business to instruct the large language model to construct prompt words through the preset reasoning logic to analyze and obtain risk conclusions when facing specific problems.
[0074] Exemplarily, the reasoning template related to the business may be retrieved through a keyword search corresponding to the business to which the target demand belongs.
[0075] For each requirement dimension, the large language model can construct the prompt words corresponding to the requirement information of the requirement dimension through the inference template. For each code dimension, the large language model can construct the prompt words corresponding to the code information of the code dimension through the inference template.
[0076] The large language model generates risk conclusions and reasoning processes corresponding to target requirements by combining prompt words with the context consisting of requirement information and / or code information.
[0077] It is worth noting that, in the embodiment of the present disclosure, the weight of the prompt word can also be adjusted by the first business rule.
[0078] Therefore, through the reasoning template, the large language model can be instructed to obtain corresponding risk conclusions through business-related reasoning logic when facing specific problems, so as to ensure the accuracy of risk conclusions and reasoning process.
[0079] In some feasible implementations, in step 130, based on the requirement information and / or code information, a risk conclusion corresponding to the target requirement can be obtained through a large language model, as well as a reasoning process for obtaining the risk conclusion using the large language model and / or a test suggestion corresponding to the target requirement, wherein the test suggestion includes at least a missed test point corresponding to the target requirement.
[0080] Here, the reasoning process of the large language model to obtain risk conclusions refers to the thinking process of the large language model to obtain risk conclusions from requirement information and / or code information. Through the reasoning process output by the large language model, users can better understand how the large language model draws risk conclusions, so as to guide better user decisions through the reasoning process.
[0081] The large language model can also output test suggestions corresponding to the target requirements, and the test suggestions at least include the missed test points corresponding to the target requirements.
[0082] Among them, missed test points refer to test points that are easily overlooked during the software development process. By outputting test suggestions including missed test points corresponding to target requirements, developers can be guided to test the target requirements to ensure that the test can fully cover the target requirements.
[0083] It is worth mentioning that the large language model uses requirement information and / or code information as context information, and analyzes the risk conclusions, reasoning processes and / or testing suggestions of the target requirements from the context information, so that before testing the target requirements, it can integrate enough information, summarize the missed test points that are easy to be missed, and give suggestions to developers as an expert for their reference.
[0084] Figure 4 FIG. 1 is a schematic diagram of a demand risk analysis report according to some embodiments. Figure 4 As shown in the figure, the demand risk analysis report includes the business description of the target demand (requirement name 1), demand summary, development schedule information, risk conclusion (risk level: [high]) and reasoning process. Figure 4 As shown, a test suggestion can be output through a requirement risk analysis report, and the test suggestion includes missed test points to instruct developers to test the target requirements.
[0085] Therefore, through the above implementation, by outputting the reasoning process, sufficient basis can be provided for the determination of risk conclusions, so that users can make decisions based on the reasoning process. The large language model can guide developers to test target requirements by outputting test suggestions, which can not only ensure that the test of target requirements can be comprehensive and without omissions, but also improve the test efficiency.
[0086] In some feasible implementations, the risk conclusion corresponding to the target requirement and the reasoning process of the large language model for obtaining the risk conclusion can be obtained based on the requirement information and / or code information through a large language model, and then a matching second business rule can be obtained based on the requirement information and / or code information in combination with the risk conclusion, and a test suggestion corresponding to the target requirement can be obtained and the reasoning process can be adjusted through the large language model based on the requirement information and / or code information in combination with the second business rule.
[0087] Here, the second business rule is used to instruct the large language model to generate a test suggestion for the target requirement through the second business rule. The large language model can retrieve the second business rule matching the requirement information and / or code information and the risk conclusion from the database through the risk conclusion and the context information consisting of the requirement information and / or code information.
[0088] It should be noted that the second business rule can be understood as the business rule corresponding to the business to which the target demand belongs, which is used to guide the large language model to generate test suggestions related to the business. For example, for some businesses, some test points do not need to be tested, so these test points will not be presented in the test suggestions.
[0089] The large language model generates corresponding test suggestions by combining the context information consisting of requirement information and / or code information through the second business rule. Moreover, in this process, the generated reasoning process can be adjusted to make the reasoning process more accurate.
[0090] Therefore, through the above implementation, the large language model can be instructed to generate business-related test suggestions through the business-related second business rules, so that the test suggestions can be close to business needs.
[0091] Figure 5 FIG. 1 is a schematic diagram of a structure of a demand risk analysis device according to some embodiments. Figure 5 As shown, the embodiment of the present disclosure provides a demand risk analysis device 500, and the demand risk analysis device 500 includes: An acquisition module 501 is configured to acquire target requirements; A determination module 502 is configured to determine, based on the target requirement, requirement information of the target requirement in at least one requirement dimension and / or code information of the target requirement in at least one code dimension; The obtaining module 503 is configured to obtain the risk conclusion corresponding to the target requirement and the reasoning process of the large language model to obtain the risk conclusion based on the requirement information and the code information through the large language model.
[0092] Optionally, the demand information of the target demand in at least one demand dimension includes at least one of the following: Semantic information of documents related to the target requirement, description information of the business corresponding to the target requirement, functional points affected by the target requirement, error information of historical requirements similar to the target requirement, and requirement attribute information of the target requirement.
[0093] Optionally, the code information of the target requirement in at least one code dimension includes at least one of the following: The repository information of the code repository corresponding to the target requirement, the merge request information of the code associated with the target requirement, the pipeline information of the code associated with the target requirement, the call chain information of the code associated with the target requirement, and the history information of the code associated with the target requirement.
[0094] Optionally, the determining module 502 is specifically configured to: According to the semantic information of the document related to the target requirement and the description information of the business corresponding to the target requirement, the function point affected by the target requirement is determined from the function tree corresponding to the business to which the target requirement belongs through the large language model.
[0095] Optionally, the obtaining module 503 is specifically configured to: Constructing, according to the requirement information and / or the code information, a prompt word for indicating that the large language model generates a risk conclusion; According to a first business rule corresponding to the business to which the target demand belongs, the weight of the prompt word is adjusted to obtain an adjusted prompt word; The risk conclusion is obtained through the large language model based on the demand information and / or the code information in combination with the adjusted prompt word.
[0096] Optionally, the obtaining module 503 is specifically configured to: According to the business to which the target demand belongs, obtaining a reasoning template related to the business, wherein the reasoning template is used to instruct the large language model to obtain a prompt word corresponding to the business through a preset reasoning logic; According to the requirement information and / or the code information, in combination with the reasoning template, construct a prompt word for instructing the large language model to obtain a risk conclusion; The risk conclusion is obtained through the large language model based on the requirement information and / or the code information in combination with the prompt word.
[0097] Optionally, the obtaining module 503 is specifically configured to: According to the requirement information and / or the code information, the risk conclusion corresponding to the target requirement is obtained through the large language model, as well as the reasoning process of the large language model for obtaining the risk conclusion and / or the test suggestion corresponding to the target requirement, wherein the test suggestion at least includes the missed test points corresponding to the target requirement.
[0098] Optionally, the obtaining module 503 is specifically configured to: According to the demand information and / or the code information, obtaining the risk conclusion corresponding to the target demand through the large language model and the reasoning process of the large language model obtaining the risk conclusion; According to the requirement information and / or the code information, in combination with the risk conclusion, a matching second business rule is obtained, where the second business rule is used to instruct the large language model to generate a test suggestion for the target requirement through the second business rule; Through the large language model, according to the requirement information and / or the code information, combined with the second business rule, the test suggestion corresponding to the target requirement is obtained and the reasoning process is adjusted.
[0099] The logic of the method executed by each functional module in the above-mentioned demand risk analysis device 500 can refer to the part of the method related to the above-mentioned embodiment, and will not be repeated here.
[0100] Reference below Figure 6 , which shows a schematic diagram of the structure of an electronic device (such as a terminal device or a server) 600 suitable for implementing the embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0101] like Figure 6 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0102] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0103] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0104] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0105] In some embodiments, the electronic devices may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0106] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0107] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: obtains the target demand; based on the target demand, determines the demand information of the target demand in at least one demand dimension and / or the code information of the target demand in at least one code dimension, and obtains the risk conclusion corresponding to the target demand through the large language model according to the demand information and / or the code information.
[0108] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0109] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0110] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a module does not, in some cases, limit the module itself.
[0111] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0112] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0113] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0114] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0115] Although the subject matter has been described in language specific to structural features and / or method logic actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Claims
1. A demand risk analysis method, characterized in that: include: Obtain target requirements; Based on the target demand, determining demand information of the target demand in at least one demand dimension and / or code information of the target demand in at least one code dimension; According to the demand information and / or the code information, a risk conclusion corresponding to the target demand is obtained through the large language model.
2. The method according to claim 1, characterized in that The demand information of the target demand in at least one demand dimension includes at least one of the following: Semantic information of documents related to the target requirement, description information of the business corresponding to the target requirement, functional points affected by the target requirement, error information of historical requirements similar to the target requirement, and requirement attribute information of the target requirement.
3. The method according to claim 1, characterized in that The code information of the target requirement in at least one code dimension includes at least one of the following: The repository information of the code repository corresponding to the target requirement, the merge request information of the code associated with the target requirement, the pipeline information of the code associated with the target requirement, the call chain information of the code associated with the target requirement, and the history information of the code associated with the target requirement.
4. The method according to claim 1, characterized in that The demand information includes the function points affected by the target demand, and determining the demand information of the target demand in at least one demand dimension based on the target demand includes: According to the semantic information of the document related to the target requirement and the description information of the business corresponding to the target requirement, the function point affected by the target requirement is determined from the function tree corresponding to the business to which the target requirement belongs through the large language model.
5. The method according to any one of claims 1 to 4, characterized in that The step of obtaining the risk conclusion corresponding to the target requirement through the large language model according to the requirement information and / or the code information includes: Constructing, according to the requirement information and / or the code information, a prompt word for indicating that the large language model generates a risk conclusion; According to a first business rule corresponding to the business to which the target demand belongs, the weight of the prompt word is adjusted to obtain an adjusted prompt word; The risk conclusion is obtained through the large language model based on the demand information and / or the code information in combination with the adjusted prompt word.
6. The method according to any one of claims 1 to 4, characterized in that The step of obtaining the risk conclusion corresponding to the target requirement through the large language model according to the requirement information and / or the code information includes: According to the business to which the target demand belongs, obtaining a reasoning template related to the business, wherein the reasoning template is used to instruct the large language model to obtain a prompt word corresponding to the business through a preset reasoning logic; According to the requirement information and / or the code information, in combination with the reasoning template, construct a prompt word for instructing the large language model to obtain a risk conclusion; The risk conclusion is obtained through the large language model based on the requirement information and / or the code information in combination with the prompt word.
7. The method according to any one of claims 1 to 4, characterized in that The step of obtaining the risk conclusion corresponding to the target requirement through the large language model according to the requirement information and / or the code information includes: According to the requirement information and / or the code information, the risk conclusion corresponding to the target requirement is obtained through the large language model, as well as the reasoning process of the large language model for obtaining the risk conclusion and / or the test suggestion corresponding to the target requirement, wherein the test suggestion at least includes the missed test points corresponding to the target requirement.
8. The method according to claim 7, characterized in that According to the requirement information and / or the code information, obtaining a risk conclusion corresponding to the target requirement through the large language model, and obtaining a reasoning process of obtaining the risk conclusion through the large language model and a test suggestion corresponding to the target requirement, including: According to the demand information and / or the code information, obtaining the risk conclusion corresponding to the target demand through the large language model and the reasoning process of the large language model obtaining the risk conclusion; According to the requirement information and / or the code information, in combination with the risk conclusion, a matching second business rule is obtained, where the second business rule is used to instruct the large language model to generate a test suggestion for the target requirement through the second business rule; Through the large language model, according to the requirement information and / or the code information, combined with the second business rule, the test suggestion corresponding to the target requirement is obtained and the reasoning process is adjusted.
9. A demand risk analysis device, characterized in that: include: an acquisition module, configured to acquire target requirements; A determination module is configured to determine, based on the target requirement, requirement information of the target requirement in at least one requirement dimension and / or code information of the target requirement in at least one code dimension; The obtaining module is configured to obtain the risk conclusion corresponding to the target requirement through the large language model according to the requirement information and / or the code information.
10. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processing device, the steps of the method according to any one of claims 1 to 8 are implemented.
11. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 8.
12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.