Financial service test script generation method and device, equipment and storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-10
- Publication Date
- 2026-04-03
AI Technical Summary
[0005]本发明提供一种金融业务测试脚本生成方法、装置、设备及存储介质,用以解决现有技术中在处理非标准业务界面和专有控件时,存在生成的测试脚本的操作逻辑不够准确的缺陷,实现通过检索增强生成机制在业务知识图谱中检索出测试目标对应的具备完整操作流程实体及实体关系的需求故事数据,并通过需求故事数据以及测试目标和多模态大模型生成具备完整操作逻辑的测试步骤序列及测试脚本,使得生成的测试脚本的操纵逻辑准确性更高
Smart Images

Figure CN121785910A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automated testing technology, and in particular to a method, apparatus, device, and storage medium for generating test scripts for financial business. Background Technology
[0002] In the context of rapid iteration in fintech, software systems not only need to support complex business logic and present diverse interface layouts, but also need to flexibly respond to frequent product updates. Taking futures trading systems as an example, their business semantics are highly complex, yet they often lack clear definitions of semantic rules for complete business process nodes, industry terminology, and dependencies on preceding operations. Meanwhile, the user interface of futures industry software typically integrates a large number of interactive controls—such as input boxes, buttons, drop-down menus, and tables. These controls are not static but dynamically adjust their style and interaction logic with version evolution or specific business scenarios. While this flexibility significantly improves the user experience, it also brings unprecedented challenges to automated testing.
[0003] When conducting automated business testing, intelligent testing solutions, such as Midscene, are commonly used. This solution analyzes interface screenshots through visual recognition and recognizes text descriptions through natural language processing. It then uses the results of visual recognition and natural language processing to locate interface elements and automatically generate test scripts. Furthermore, it can automatically adjust its location strategy to generate new test scripts when the interface changes.
[0004] However, when dealing with non-standard business interfaces and proprietary controls, the above technologies suffer from inaccurate operational logic in the generated test scripts. Summary of the Invention
[0005] This invention provides a method, apparatus, device, and storage medium for generating test scripts for financial business applications. It addresses the shortcomings of existing technologies where the operational logic of generated test scripts is inaccurate when handling non-standard business interfaces and proprietary controls. The invention utilizes a retrieval-enhanced generation mechanism to retrieve requirement story data with complete operational processes and entity relationships corresponding to the test target from a business knowledge graph. It then generates a sequence of test steps and test scripts with complete operational logic using the requirement story data, the test target, and a multimodal large model, resulting in more accurate operational logic in the generated test scripts.
[0006] This invention provides a method for generating test scripts for financial transactions, comprising: Obtain the test target text to be tested; A retrieval-enhanced generation mechanism is adopted to determine the target requirement story data associated with the test target text in the business knowledge graph based on the test target text. The aforementioned business knowledge graph includes multiple different requirement story data, and each requirement story data includes entities with complete operation processes and the relationships between entities. Based on the test target text, target requirement story data, and multimodal large model, a sequence of test steps corresponding to the test target text is generated; the above sequence of test steps includes multiple test step texts arranged in execution order; Based on the test step sequence, generate the target business test script corresponding to the test target text.
[0007] According to a financial business test script generation method provided by the present invention, the above-mentioned method employs a retrieval-enhanced generation mechanism, which determines the target requirement story data associated with the test target text in a business knowledge graph based on the test target text, including: The test target text is vectorized to determine the first vector; Each entity in the business knowledge graph is vectorized to determine the second vector corresponding to each entity in the business knowledge graph. A retrieval-enhanced generation mechanism is adopted to determine the target requirement story data associated with the test target text in the business knowledge graph based on the first vector and each second vector.
[0008] According to a financial business test script generation method provided by the present invention, the above-mentioned method employs a retrieval-enhanced generation mechanism, which determines target requirement story data associated with the test target text in a business knowledge graph based on a first vector and each of the second vectors, including: A retrieval-enhanced generation mechanism is adopted to identify multiple candidate entities associated with the test target text from among the entities in the business knowledge graph based on the similarity between the first vector and each second vector. A large language model is used to quantize each candidate entity, determine the quantization value corresponding to each candidate entity, and based on the quantization value of each candidate entity, identify multiple target entities whose quantization values are all greater than the threshold. Obtain the target requirement story data corresponding to each candidate entity from the business knowledge graph; Filter out target requirement story data that is associated with the test target text from the target requirement story data.
[0009] According to a method for generating financial business test scripts provided by the present invention, the method further includes: Obtain relevant business description data for financial services; the aforementioned relevant business description data includes the complete business process nodes, state transition rules, and role and permission requirements of the financial services. Based on the relevant business description data, construct multiple primary entities and the relationships between them; Based on the operation methods of non-standard controls in financial business and / or the operation paths or processes of financial business, construct an operation model and use the operation model as a second entity; Based on each first entity, the relationships between each first entity, the second entity, and the relationship between the second entity and the first entity, a demand story data that connects business scenarios to entities is constructed from top to bottom, and a business knowledge graph is constructed based on each demand story data.
[0010] According to a financial business test script generation method provided by the present invention, the first entity includes at least one of the following: business scenario entity, interface content entity, standard control entity, non-standard control entity, participating role entity, data construction method entity, business behavior entity, behavior operation method entity, interface design automation entity, and interface design automation entity. The relationships between the aforementioned multiple first entities and the relationships between the second entities and the first entities include at least one of the following: inclusion relationship, data dependency relationship, operation process relationship, and execution role relationship.
[0011] According to a financial business test script generation method provided by the present invention, the first entity and the second entity include a demand-oriented entity and an entity oriented towards implementing specific functions. The entity types of the demand-oriented entity and the entity types of the entity oriented towards implementing specific functions are different. Before generating the test step sequence corresponding to the test target text based on the test target text, target demand story data, and multimodal large model, the method further includes: The test target text is subjected to intent recognition to determine the target intent type corresponding to the test target text; different intent types correspond to different entity types required to implement the test. Based on the target intent type, identify multiple matching entities in the target demand story data that match the target intent type; Accordingly, based on the test target text, target requirement story data, and multimodal large model, the above-mentioned test step sequence corresponding to the test target text is generated, including: Based on the target text, multiple matching entities, and a multimodal large model, generate a sequence of test steps corresponding to the target text.
[0012] According to a financial business test script generation method provided by the present invention, before generating the target business test script corresponding to the test target text based on the test step sequence, the method further includes: Display the text of each test step in the test step sequence to the user; Get the first modified text for the test step text input by the user; Generate the target test step text corresponding to the test step text based on the first modified text, and generate the target test step sequence based on the target test step text; Accordingly, the above-mentioned generation of the target business test script corresponding to the test target text based on the test step sequence includes: Based on the sequence of target test steps, generate the target business test script corresponding to the test target text.
[0013] According to a financial business test script generation method provided by the present invention, the above-mentioned generation of a target business test script corresponding to a test target text based on a test step sequence includes: Based on the test step sequence, generate the initial business test script corresponding to the test target text and display it to the user; Obtain the second modified text input by the user for the initial business test script; Generate the target business test script corresponding to the test target text based on the second modified text.
[0014] The present invention also provides a financial business test script generation device, comprising the following modules: The test text acquisition module is used to acquire the test target text to be tested; The requirement story identification module is used to identify target requirement story data associated with the test target text in the business knowledge graph based on the test target text using a retrieval-enhanced generation mechanism. The aforementioned business knowledge graph includes multiple different requirement story data, and each requirement story data includes entities with complete operation processes and the relationships between entities. The test step generation module is used to generate a sequence of test steps corresponding to the test target text based on the test target text, target requirement story data, and multimodal large model; the test step sequence includes multiple test step texts arranged in execution order. The test script generation module is used to generate target business test scripts corresponding to the test target text based on the test step sequence.
[0015] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the financial business test script generation method described above.
[0016] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the financial business test script generation method as described above.
[0017] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the financial business test script generation method described above.
[0018] The financial business test script generation method, apparatus, device, and storage medium provided by this invention acquire the test target text to be tested, employ a retrieval-enhanced generation mechanism, determine the target requirement story data associated with the test target text in a business knowledge graph based on the test target text, generate a test step sequence corresponding to the test target text based on the test target text, the target requirement story data, and a multimodal large model, and generate the target business test script corresponding to the test target text based on the test step sequence; wherein, the business knowledge graph includes multiple different requirement story data, each requirement story data includes entities with complete operation processes and relationships between entities, and the test step sequence includes multiple test step texts arranged in execution order. In this method, since the complete operational logic / process of financial business can be explicitly stored through a business knowledge graph, when generating test scripts for test target text, requirement story data with complete and accurate operational logic / process can be retrieved from the business knowledge graph. Thus, the multimodal large model can generate business test scripts with accurate operational logic through this requirement story data with complete and accurate operational logic / process, improving the ability to generate business test scripts for standard business interfaces and proprietary / non-standard controls, making the operational logic of the generated business test scripts more accurate. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0020] Figure 1 This is one of the flowcharts illustrating the financial business test script generation method provided by the present invention.
[0021] Figure 2 This is a schematic diagram of a graph framework corresponding to a demand story data in the business knowledge graph provided by this invention.
[0022] Figure 3 This is a schematic diagram of the structure of the business knowledge graph provided by the present invention.
[0023] Figure 4 This is a schematic diagram of the business testing process provided by the present invention.
[0024] Figure 5This is a schematic diagram of the financial business test script generation device provided by the present invention.
[0025] Figure 6 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0027] In the field of automated testing for financial transactions, especially in the financial futures sector, current software automation testing employs both traditional automation solutions and intelligent automation solutions to generate test scripts. Traditional automation solutions, such as those represented by Selenium, first require locating elements on the page, typically using CSS selectors, XPath, or element IDs. Once an element is successfully identified, corresponding actions can be performed, such as clicking or inputting text. To ensure the stability and maintainability of the test scripts, developers need to periodically update the element location strategy to adapt to changes in the interface layout. Furthermore, Selenium supports organizing test cases using frameworks (such as TestNG or JUnit), enabling parameterized and data-driven test cases, further improving testing efficiency.
[0028] Intelligent automation solutions: Intelligent solutions, represented by Midscene, use a method that combines visual recognition and natural language processing to locate interface elements. Compared with traditional element location methods, this method is more flexible and robust. It can automatically generate test scripts by analyzing interface screenshots and text descriptions, and automatically adjust the location strategy when the interface changes, without the need for manual intervention.
[0029] In the field of automated testing for financial transactions, both UI (User Interface) and API (Application Programming Interface) testing face the problem of semantic gaps caused by highly simplified test case descriptions. Test cases only include core business terms (such as "closing order" or "rolling settlement") and key parameters (such as "contract number" or "product number"), but omit complete business process nodes, semantic rules of industry-specific terms, and dependencies on preceding operations. This characteristic leads to a double logical dilemma for both types of testing: 1. Business semantic parsing is missing.
[0030] UI testing: "Rolling delivery" needs to be parsed into a sequence of nodes: "Entering delivery month → Buyer delivery application → Delivery matching → Warehouse receipt transfer", and associated with business rules for terms such as "warehouse / factory warehouse". API testing: The "closing order" needs to be parsed as a business process of "verifying customer status → checking position availability → order placement", and the parameter rules should be clearly defined (such as "the order quantity is greater than the minimum order size", "the closing quantity is less than the position size", etc.).
[0031] 2. Insufficient dynamic adaptation capability.
[0032] UI testing: The style and interaction of UI controls (such as multi-level cascading dropdowns) change dynamically with the business status, causing the static positioning strategy to fail. API testing: The validity of interface parameters (such as "contract_id") depends on business rules (such as "contract has been delisted"), while general testing solutions cannot automatically associate business context.
[0033] It is evident that traditional UI automation solutions (such as Selenium) focus only on interface structure, and API testing solutions (such as Postman) only verify parameter formats; neither can parse business semantics. While intelligent solutions (such as Midscene) can automatically generate UI scripts, they lack an understanding of parameter rules for API testing. Therefore, the test scripts generated by current automated testing solutions are insufficient in capability and may have inaccurate operational logic, making it difficult to meet the demands of high-quality, high-efficiency automated testing.
[0034] Based on this, embodiments of the present invention provide a method, apparatus, device, and storage medium for generating test scripts for financial business operations, which can solve the aforementioned technical problems. Specifically, it explicitly stores the complete operational logic / process of financial business through a business knowledge graph. The business knowledge graph, as a unified business semantic hub, becomes a necessary support for bridging the logical gap between simplified use cases and executable operations, ensuring that UI testing and API testing can be accurately mapped to specific business rules and operation sequences, generating test scripts with more accurate operational logic, and achieving the goal of efficient and high-quality automated testing.
[0035] It should be noted that the execution subject in the embodiments of the present invention may be a financial business test script generation device, an electronic device, or other devices or equipment, without specific limitations. The following embodiments will use an electronic device as an example for illustration, which may be a terminal or a server.
[0036] Figure 1 This is one of the flowcharts illustrating the financial business test script generation method provided by this invention, such as... Figure 1 As shown, the method includes the following steps: Step 102: Obtain the test target text to be tested.
[0037] The test target text to be tested can be the test requirement text that needs to be implemented. It can be input by the user, such as through voice or keyboard. This test target text can be a business test requirement text in the financial field. It can be a relatively simple text describing the test requirements, which does not include specific business test process content or detailed operation instructions. It only describes the simple test requirements to facilitate the testers' understanding, such as "verify the entire process of physical delivery of corn futures" or "verify the entire process of investors completing physical delivery of corn futures in the futures trading system".
[0038] Step 104: Using a retrieval-enhanced generation mechanism, target requirement story data associated with the test target text is determined in the business knowledge graph based on the test target text. The aforementioned business knowledge graph includes multiple different requirement story data, and each requirement story data includes entities with complete operation processes and the relationships between entities.
[0039] This process involves pre-collecting various business knowledge within the financial sector, such as business requirement documents, knowledge of business interfaces, and relationships between business processes. Business interfaces can include standard or non-standard interfaces, and the relevant knowledge includes knowledge of standard and non-standard controls, encompassing the complete operational logic / processes of these controls. Then, different business requirements or scenarios within the financial sector are collected to create requirement stories / user stories for each requirement or scenario. Using business requirement documents, knowledge of business interfaces, and relationships between business processes, entities and their relationships are constructed for each requirement or scenario. These entities and their relationships are then connected through complete business operation processes / logic, forming different requirement story / user story data sets. Finally, a business knowledge graph is created and stored.
[0040] It should be noted that entities in requirement story data from different business needs or different business scenarios can be shared. That is, requirement story data from multiple different business needs / scenarios can include the same entities or relationships between entities. In addition, the entities in the requirement story data of the aforementioned business knowledge graph can include the complete operation logic / process of non-standard controls and the relevant operation logic / process of non-standard business interfaces. This allows for the explicit storage of the complete manipulation logic / process of financial business.
[0041] In addition, the aforementioned business knowledge graph can also be dynamically updated based on changes in the financial business interface and / or controls.
[0042] After constructing the business knowledge graph, when testing target text, a retrieval-enhanced generation mechanism can be used to retrieve relevant requirement story data from the various requirement story data within the business knowledge graph. This retrieves contextual information closely related to the target text and designates it as the target requirement story data. For example, this can be achieved by searching the various entities within the business knowledge graph for the target text and finding requirement story data with a high number of matching entities; alternatively, other retrieval methods can be used. This target requirement story data can include one or more target requirement story data sets. Each target requirement story data set includes a complete operational flow requirement story architecture, encompassing different entities and their interrelationships. Entities can include relevant knowledge of the business interface and complete operational flows / logic for standard / non-standard controls.
[0043] In addition, the aforementioned retrieval-augmented generation mechanism, namely the RAG (Retrieval-Augmented Generation) mechanism, enables the subsequent multimodal large model to generate text without relying solely on the "static knowledge" stored in the model parameters. Instead, it dynamically retrieves relevant facts from external knowledge sources, namely, it retrieves target demand story data related to / associated with the test target text from the business knowledge graph and uses this information as context input to the subsequent multimodal large model. This allows the multimodal large model to generate more accurate and reasonable answers based on authoritative and real-time reference context information.
[0044] For example, if the target test text is "Add a new warehouse transfer application, where the transferor's customer number is: 00****71, the exchange handles the settlement and payment, the transferee's member number is **15, 'Warehouse / Sub-warehouse' is selected as [25-Country A], the transfer quantity is 1, the transfer price is XX, and the transferee's customer number is: 00****55", then the following information can be automatically retrieved from the business knowledge graph using the RAG mechanism: Execution page: "Warehouse Transfer Application Page"; Operational role: "Customer role"; Business process nodes: "Warehouse transfer application entry → Exchange confirmation → Warehouse selection → Price verification"; Non-standard control operations: Predefined operation models for "Warehouse / Sub-warehouse Selector" (e.g., "Click the drop-down box → Select [25-A Country] → Confirm").
[0045] Step 106: Generate a sequence of test steps corresponding to the test target text based on the test target text, target requirement story data, and multimodal large model; the above test step sequence includes multiple test step texts arranged in execution order.
[0046] In this step, the multimodal large model can be a multimodal large language model, and its specific architecture or type can be set according to the actual situation, such as the Qwen-VL model. This multimodal large model can receive input data from multiple different modalities and process this input data to generate answers that match the input data. This multimodal large model can be pre-trained, specifically using different sample demand texts and their associated different numbers of sample demand story data, as well as the sample test step sequences corresponding to different sample demand texts.
[0047] Specifically, after finding target requirement story data that is relatively relevant to the test target text in the constructed business knowledge graph through the retrieval enhancement generation mechanism, the test target text and the retrieved target requirement story data can be jointly input into a trained multimodal large model. The multimodal large model can perform cross-modal semantic alignment and business process reasoning, ultimately outputting a structured sequence of test steps for the test target text. This sequence of test steps includes multiple test step texts arranged in execution order. These multiple test step texts are executable test step texts, which can then be used to generate test scripts for automated testing of the test target text.
[0048] It is understandable that when generating the test step sequence corresponding to the test target text based on the test target text and the target requirement story data, the multimodal large model here can also adopt a retrieval enhancement generation mechanism to generate an accurate and complete test step sequence based on the target requirement story data. This test step sequence may be the same as or different from the business process in the target requirement story data.
[0049] It's important to note that the executable test step text here refers to the steps used to test the target text. This can include the content displayed at each specific step of the business interface execution, user guidance information for each step (e.g., what content should be displayed at each step), and verification information required upon completion of the business process. In essence, the test step text in this sequence represents a relatively detailed and complete test flow, guiding users through the business testing process step-by-step, thus reducing the difficulty of business testing. For example, a generated test step sequence could be: "Member Login → Enter 'Member Transaction' Page → Select Customers under Member → Fill in Order Application → Confirm Send → Verify Order Status".
[0050] Step 108: Generate the target business test script corresponding to the test target text based on the test step sequence.
[0051] In this step, after generating a sequence of test steps for the target text using the multimodal large model, relevant script prefixes or suffixes can be added to each test step text in the sequence. Simultaneously, an executable target business test script is generated, matching the execution order of the test step texts. This target business test script allows for complete end-to-end business testing of the target text to be tested.
[0052] It should be noted that traditional automated testing of financial business relies on step-driven or code-driven approaches, while this embodiment implements a goal-driven paradigm for financial business. That is, only the high-level business requirement goal (i.e., the test target text to be tested) needs to be input, and the execution page, role permissions, business process nodes and operation sequences can be automatically derived to generate a complete executable test path / test step sequence. This automatically generates a complete executable financial business test script with more complete and accurate operation logic, realizing goal-driven intelligent business testing throughout the entire process.
[0053] In summary, the multimodal large model in this embodiment of the invention, through the business process rules injected by the business knowledge graph (such as the business process flow logic of "delivery application → inspection qualification → warehouse receipt registration"), can accurately match the test target text and system operation to be tested, completely solving the defect of Midscene being unable to determine the execution context (page / role), and realizing intelligent testing of the entire process driven by the test target.
[0054] For example, assuming the test target text is "verify the entire process of investors completing physical delivery of corn futures in the futures trading system," we can first identify key elements such as "delivery application form" and "warehousing inspection confirmation button," and then RAG can retrieve them from the business knowledge graph: Business process nodes: "Delivery application → Goods warehousing → Inspection passed → Warehouse receipt registration → Settlement completed"; Role permissions: "Delivery Forecast" requires a customer role, and "Warehouse Receipt Registration" requires an administrator role; Non-standard control operations: Operation sequence of the "Batch Upload Quality Inspection Report File Drag and Drop Component"; Business rules: "Corn delivery advance deposit standard (30 yuan / ton)" and "Inspection parameter matching rules (moisture content ≤10%)".
[0055] The complete operation chain for generating a multimodal large model, i.e., the complete sequence of test steps: Log in to the trading system → Enter the "Delivery Management" module (customer role) → Fill in the delivery forecast (select warehouse, enter quantity, upload quality inspection report) → Pay deposit (automatically calculated at 30 yuan / ton) → Wait 40 days to trigger the "Inspection Qualified" status → Submit warehouse receipt registration (administrator role) → Complete settlement; Then, based on the test step sequence, an executable test script is automatically generated to drive the system to execute end-to-end and verify the status (such as deposit payment record, warehouse receipt status, and delivery note generation time).
[0056] As can be seen, the embodiments of the present invention inject complete business process rules through a business knowledge graph, enabling the multimodal large model to automatically understand cross-role business processes such as "delivery application-inspection-registration-settlement" and to parse business process logic such as "deposit calculation rules" and "inspection parameter matching". This gives it the ability to "understand business processes, know rules, and operate", effectively making up for the shortcomings of Midscene-type solutions in understanding customized business processes and operating non-standard controls. It achieves accurate transformation from "target" to "executable path" and improves the accuracy of intelligent test script generation and execution reliability in customized scenarios.
[0057] In this embodiment, by acquiring the test target text to be tested, a retrieval-enhanced generation mechanism is employed. Based on the test target text, target requirement story data associated with the test target text is determined in the business knowledge graph. A test step sequence corresponding to the test target text is generated based on the test target text, target requirement story data, and the multimodal large model. Finally, a target business test script corresponding to the test target text is generated based on the test step sequence. The business knowledge graph includes multiple different requirement story data sets, each containing entities with complete operational flows and the relationships between entities. The test step sequence includes multiple test step text sets arranged in execution order. This method allows the explicit storage of the complete operational logic / flow of financial business within the business knowledge graph. Therefore, when generating a test script from the test target text, requirement story data with complete and accurate operational logic / flow can be retrieved from the business knowledge graph. This enables the multimodal large model to generate business test scripts with accurate operational logic based on these requirement story data, improving the ability to generate business test scripts for standard business interfaces and proprietary / non-standard controls, resulting in more accurate operational logic in the generated business test scripts.
[0058] The following example illustrates a possible implementation of retrieving target requirement story data from a business knowledge graph using a retrieval enhancement generation mechanism.
[0059] In one embodiment, step 104 above employs a retrieval-enhanced generation mechanism to determine target requirement story data associated with the test target text in the business knowledge graph, which may include the following steps: Step A1: Vectorize the test target text to determine the first vector.
[0060] Step A2 involves vectorizing each entity in the business knowledge graph to determine the second vector corresponding to each entity.
[0061] Step A3 employs a retrieval-enhanced generation mechanism to determine the target requirement story data associated with the test target text in the business knowledge graph based on the first vector and each of the second vectors.
[0062] After obtaining the target test text, a semantic encoder can be used to transform it into a vector, obtaining the first vector. This semantic encoder can be a Transformer-based model, such as the BERT model.
[0063] Similarly, each entity in the requirement story data of the business knowledge graph can be transformed into a vector using a semantic encoder, obtaining a second vector corresponding to each entity. Then, a retrieval-enhanced generation mechanism can be used to calculate the similarity (e.g., cosine similarity) between the first vector and each second vector, obtaining the similarity scores from largest to smallest. The top-ranked similarity scores are then identified, yielding these second vectors with high similarity and their corresponding entities. Finally, the requirement story data containing these entities can be located in the business knowledge graph and directly used as the target requirement story data associated with the test target text.
[0064] Alternatively, the target demand story data associated with the test target text can be further filtered through the demand story data containing these multiple entities. Optionally, this filtering method may include: A retrieval-enhanced generation mechanism is adopted to identify multiple candidate entities associated with the test target text from among the entities in the business knowledge graph based on the similarity between the first vector and each second vector. A large language model is used to quantize each candidate entity, determine the quantization value corresponding to each candidate entity, and based on the quantization value of each candidate entity, identify multiple target entities whose quantization values are all greater than the threshold. Obtain the target requirement story data corresponding to each candidate entity from the business knowledge graph; Filter out target requirement story data that is associated with the test target text from the target requirement story data.
[0065] As mentioned above, a retrieval enhancement generation mechanism can be used to find multiple second vectors with high similarity and the entities corresponding to these multiple second vectors in the ranking results of the similarity between the first vector and each second vector. The entities corresponding to these multiple second vectors can be recorded as candidate entities. For example, find the top-k candidate entities, k=100~1000.
[0066] For the above process of screening candidate entities, other methods can also be used. Optionally, sparse retrieval methods can be used, such as the BM25 keyword matching method. Specifically, this can include: extracting keywords from the test target text and extracting keywords from each entity in the business knowledge graph; performing similarity matching between the keywords of the test target text and the keywords of each entity to obtain the similarity between the test target text and each entity; finding multiple similarities with high similarity and the entities corresponding to these multiple similarities among the multiple similarities, and these entities corresponding to these multiple similarities can be recorded as candidate entities.
[0067] Then, a large language model can be used to quantify the relevance between each candidate entity and the test target text, i.e., to score them, obtaining a quantified value (score) for each candidate entity. The quantified values of each candidate entity are then sorted from largest to smallest. The top-ranked candidate entities, or those with values greater than a threshold, are identified as target entities. These target entities are those with a strong correlation to the test target text. The threshold value can be set according to the actual situation.
[0068] After obtaining multiple target entities that are strongly related to the test target text, the requirement story data containing these target entities can be retrieved from the business knowledge graph. Then, based on the number of target entities matched in the requirement story data containing these target entities, one or more requirement story data with a larger number of matches can be selected as the target requirement story data associated with the test target text; alternatively, one or more requirement story data that are semantically more related to the test target text can be selected as the target requirement story data associated with the test target text; or other filtering methods can be used. In short, the target requirement story data most relevant to the test target text can be selected.
[0069] Additionally, if all the multiple demand story data containing these target entities can match all target entities, then the demand story data is filtered according to the minimization principle. For example, the smaller demand story data among these multiple demand story data is selected as the target demand story data. Alternatively, if none of the multiple demand story data containing these target entities can match all target entities, then the demand story data is filtered according to the union of the sets. For example, the multiple smallest matching demand story data are selected as the target demand story data.
[0070] In this embodiment, by converting the test target text into a first vector and the vectors of each entity in the business knowledge graph into second vectors, and employing a retrieval enhancement generation mechanism, target requirement story data associated with the test target text is determined in the business knowledge graph based on the first vector and each of the second vectors. This vector matching approach improves the efficiency and accuracy of retrieval in the business knowledge graph. Furthermore, by first calculating the similarity between the first vector and each of the second vectors and using this similarity to initially filter out relevant entities in the business knowledge graph, and then further refining the target requirement story data associated with the test target text from the requirement story data of these relevant entities, this two-stage filtering method reduces the complexity of the filtering process and further improves the efficiency and accuracy of requirement story data filtering.
[0071] The above embodiments briefly illustrate the construction process of the business knowledge graph. The following embodiments will describe the specific construction process of the business knowledge graph.
[0072] In one embodiment, the above method further includes the following steps: Obtain relevant business description data for financial services; the aforementioned relevant business description data includes the complete business process nodes, state transition rules, and role and permission requirements of the financial services. Based on the relevant business description data, construct multiple primary entities and the relationships between them; Based on the operation methods of non-standard controls in financial business and / or the operation paths or processes of financial business, construct an operation model and use the operation model as a second entity; Based on each first entity, the relationships between each first entity, the second entity, and the relationship between the second entity and the first entity, a demand story data that connects business scenarios to entities is constructed from top to bottom, and a business knowledge graph is constructed based on each demand story data.
[0073] This involves pre-collecting relevant business description data such as product PRDs (requirements documents), interface prototype documentation, interaction documentation, and user manuals for financial businesses. This data forms the initial semantic input for the business testing process. These relevant business description data include information such as the complete business process nodes, state transition rules, and role and permission requirements for financial businesses. For example, it includes the complete business process of "closing order" which requires association with "customer login → trading page → position check → order submission → result confirmation". Execution roles can be labeled, and these roles can be human or non-human objects, such as customers, administrators, or trading targets (e.g., contracts).
[0074] Then, based on the characteristics of financial business, a standardized business knowledge meta-model can be constructed. This model includes entities and relationships between them. For each entity, a knowledge graph construction platform can be used to extract, align, and fuse structured and unstructured requirement information from the aforementioned business description data to obtain the relevant entities and their relationships. The extracted and constructed entities can be designated as the first entity. Optionally, the first entity may include at least one of the following: business scenario entity, interface content entity, standard control entity, non-standard control entity, participating role entity, data construction method entity, business behavior entity, behavior operation method entity, interface design automation entity, and interface design automation entity. The business scenario entity refers to the relevant knowledge of a specific business scenario, including its preconditions, main processes, constraints, and expected results. The interface content entity refers to the specific interface content of the financial business, including the specific content contained within the interface and its location distribution; for example, the left half of the interface may contain a title bar, and the right half may contain controls. Standard control entities refer to the knowledge related to standard and universal controls in the business interface. Standard controls generally have fixed styles, positions, and knowledge. Non-standard control entities refer to the knowledge related to non-standard controls in the business interface. Non-standard controls can also be customized or proprietary controls. Their styles, positions, and knowledge are generally not fixed and can be dynamically set according to business needs. Participating role entities refer to the role entities that participate in the business process, including human or non-human objects. Data construction method entities refer to the methods for constructing new data based on basic data such as relevant business description data in a business scenario / process. These can be composed of constructor functions, etc. Business behavior entities refer to the specific behaviors executed by behavior branches in a business scenario. These can be composed of behavior functions, etc. Behavior operation method entities refer to the operation methods / processes / logic of specific behaviors in a business scenario. Interface design automation entities refer to the test process content when performing interface automation testing. Interface design automation entities refer to the test process content when performing interface automation testing, including interface / page design, controls, etc.
[0075] Multiple primary entities can be constructed by collecting relevant business description data. The relationships between these primary entities can also be obtained through this data. Optionally, the relationships between these primary entities include at least one of the following: inclusion relationship, data dependency relationship, operational flow relationship, and execution role relationship. Specifically, an inclusion relationship means that one entity includes another; a data dependency relationship means that the execution of one entity depends on the execution result of another entity; an operational flow relationship means that one entity is a node in an operational flow with other entities; and an execution role relationship means that one entity is the object of another entity's business flow execution.
[0076] Furthermore, the operation methods / processes / logic of non-standard controls in financial business, as well as the specific operation paths or processes under various business scenarios in financial business, can be obtained through the aforementioned relevant business description data. Then, the operation methods / processes / logic of non-standard controls and the specific operation paths or processes under various business scenarios in financial business can be formed into an operation model and encapsulated as a second entity, which is different from the first entity. Simultaneously, the relationship between the second entity and the first entity can be obtained through the relevant business description data. Optionally, the relationship between the second entity and the first entity includes at least one of the following: inclusion relationship, data dependency relationship, operation process relationship, and execution role relationship.
[0077] After obtaining the relationships between each first entity and the relationships between them, as well as the relationships between each second entity and the first entity, a knowledge graph construction platform can be used to build different business scenario architectures or business requirement architectures from top to bottom, connecting business scenarios to the relationships between entities. This forms requirement story data with complete business processing logic / processes under different business scenarios / requirements. These multiple requirement story data ultimately form a business knowledge graph. It can be understood that the business knowledge graph here is a queryable and reasonable financial business knowledge graph. It can serve as a business semantic hub, explicitly storing the entire business process information, including process nodes, state transition logic, role and permission mappings, and data dependency rules, facilitating subsequent retrieval and generation of complete and accurate test step sequences with operational logic.
[0078] For example, see Figure 2The diagram shown illustrates the framework of a business knowledge graph corresponding to a type of requirement story data. The first and second entities include requirement-oriented entities and entities oriented towards implementing specific functions. The entity types of requirement-oriented entities and function-oriented entities differ. Each type of requirement data corresponds to a user story / business scenario. A user story includes story role entities and business behavior entities (i.e., a data dictionary). User story entities, story role entities, and business behavior entities are requirement-oriented entities. Entities built under requirement-oriented entities are function-oriented entities. Under the story role entity, basic data is built, and a constructor is constructed from this basic data. The constructor then builds an entity to automate interface testing. Under the business behavior entity, behavior branch entities are built, and behavior functions are built from these behavior functions. Entities to automate interface design (i.e., UI automation) and UI automation testing are then built. The user story entities include the story's prerequisites, main flow, inter-flow constraints, and acceptance criteria. The story role entity includes role name, business description, and permissions. The basic data entity includes the basic data entity. The business behavior entity includes participating roles, behavior descriptions, a business behavior dictionary, and internal constraints. The behavior function entity includes node details (Note details) and UI behavior functions.
[0079] For example, see Figure 3 The diagram shown illustrates the structure of a business knowledge graph. The business knowledge graph includes multiple nodes and the relationships between nodes. Each node is an entity, and the relationships between nodes are the relationships between entities. Nodes of different colors can represent different entities, and different branches can represent demand story data under different business scenarios, thus forming a business knowledge graph with interwoven nodes and a complete business processing flow.
[0080] It should be noted that the business knowledge graph established in this embodiment of the invention includes core elements such as roles (Who), activities (What), and value (Why). A role refers to a story character entity, indicating the type or role of a user using the function, such as "a registered user" or "an administrator." An activity refers to the aforementioned business behavior entity, describing the specific behavior or function the role wants to perform, such as "publishing a blog post." Value refers to the aforementioned user story, explaining the purpose or benefit of performing the activity, such as "to share experiences with community members." These elements are typically expressed in a standard format: As a <role>, I want <activities> to achieve <value>. Beyond the basic format, user stories / requirement stories should adhere to the INVEST principle to ensure quality. This principle includes: independent (stories should minimize dependencies to facilitate prioritization and iterative development); negotiable (story content should remain flexible, with details determined through communication rather than fixed contracts); valuable (each story must provide clear value to the user or business); measurable (the team can roughly estimate the workload, typically no more than 10 ideal person-days); small (stories should be small enough to be completed in a single iteration); and testable (clear acceptance criteria should be defined to verify completion). Furthermore, user stories emphasize active language and concrete scenarios, avoiding abstract descriptions to improve readability and collaboration efficiency. For example, changing "resumes can be published" to "users can publish resumes" is more direct and easier to understand.
[0081] By adopting a user story-based requirement architecture, user stories are more easily parsed into automated script input by tools. Contextualized use cases are naturally adapted, and BDD / Gherkin syntax facilitates automation. This enables bidirectional traceability between requirements and automation, reducing maintenance costs. It also provides rapid feedback on "whether the function still meets user goals" rather than "whether it runs." This results in stronger behavioral descriptibility, and user requirement story data can be directly used as automated test suites, supporting end-to-end scenario coverage and a clear scope of change impact.
[0082] Furthermore, based on the business knowledge graph constructed above, different entity types can be obtained from the business knowledge graph to generate test step sequences based on different test intentions, thereby improving the efficiency and accuracy of test step sequence generation. This will be explained below.
[0083] Optionally, before generating the test step sequence corresponding to the test target text based on the test target text, target requirement story data, and multimodal large model, the above method further includes: The test target text is subjected to intent recognition to determine the target intent type corresponding to the test target text; different intent types correspond to different entity types required to implement the test. Based on the target intent type, identify multiple matching entities in the target demand story data that match the target intent type; Accordingly, based on the test target text, target requirement story data, and multimodal large model, the above-mentioned test step sequence corresponding to the test target text is generated, including: Based on the target text, multiple matching entities, and a multimodal large model, generate a sequence of test steps corresponding to the target text.
[0084] Specifically, the test intent of the test target text can be identified using a large language model to obtain the corresponding intent type, denoted as the target intent type. The target intent type can be any of the following: test case generation, test case refinement, script generation, or heterogeneous verification. Different entity types require different entity types when generating the test step sequence. For the test case generation intent type, the required entity types are: User Story Entity, Story Role Entity, and Business Behavior Entity; for the test case refinement intent type, the required entity types are: User Story Entity, Story Role Entity, Business Behavior Entity, and Behavior Branch Entity; for the script generation intent type, the required entity types are: Basic Data Entity, Constructor Entity, Behavior Function Entity, Interface Automation Entity, and UI Automation Entity; for the heterogeneous verification intent type, the required entity types are: Interface Automation Entity and UI Automation Entity.
[0085] Based on the target intent type corresponding to the test target text determined above, the target entity type corresponding to the target intent type can be determined. Then, the entities and their data corresponding to these target entity types can be extracted from the target requirement story, that is, multiple matching entities and their data can be obtained.
[0086] Then, relevant intent prompts can be added based on the target intent type of the intent recognition results. The test target text, prompts, and multiple matching entities are then input into the multimodal big model, which generates the test step sequence corresponding to the test target.
[0087] In this embodiment, a first entity and its relationships are constructed by collecting relevant business description data, including complete business process nodes, state transition rules, and role permission requirements for financial business. An operation model is then constructed as a second entity using the operation methods of non-standard controls and / or operation paths or processes of financial business. Finally, a top-down requirement story data is built through the relationships between entities to obtain a business knowledge graph. This allows for the rapid generation of a queryable and reasonable business knowledge graph, providing business semantic information for subsequent multimodal large-scale model generation test steps and improving the semantic logic between generated test steps. Furthermore, the entities include business scenario entities, interface content entities, standard control entities, non-standard control entities, participating role entities, data construction method entities, business behavior entities, behavior operation method entities, interface design automation entities, and interface design automation entities. The relationships between entities include inclusion relationships, data dependency relationships, operation process relationships, and execution role relationships. This rich combination of entity types and relationships enriches the semantic information of the final generated business knowledge graph. Furthermore, by identifying the intent type of the test target text and obtaining the matching entity accordingly, a test step sequence is generated using the selected matching entity. Here, the selected matching entity data is small and accurate, thus improving the efficiency and accuracy of test step sequence generation.
[0088] The above embodiments illustrate the generation of test step sequences using a multimodal large model. In order to ensure that the final generated test step sequence meets the user's business testing needs, this embodiment proposes a technical solution that allows users to interact with and modify the test step sequence generated by the multimodal large model. The following embodiments will illustrate this.
[0089] In one embodiment, before generating the target business test script corresponding to the test target text according to the test step sequence in step 108 above, the method further includes the following steps: Display the text of each test step in the test step sequence to the user; Get the first modified text for the test step text input by the user; Generate the target test step text corresponding to the test step text based on the first modified text, and generate the target test step sequence based on the target test step text; Accordingly, step 108 above generates the target business test script corresponding to the test target text based on the test step sequence, including: Based on the sequence of target test steps, generate the target business test script corresponding to the test target text.
[0090] After generating the test step sequence from the multimodal large model, the text of each test step in the sequence can be sorted according to its execution order and displayed to the user on the interface. The interface also provides an edit button, allowing the user to select the test step text to be modified and enter the revised text, designated as the first modified text. This first modified text, along with the other unmodified test step texts in the sequence, can then be sorted according to their execution order to obtain the modified target test step sequence. Finally, the target business test script corresponding to the target test text can be generated based on this target test step sequence.
[0091] Similarly, to ensure that the final generated business test script meets the user's business testing needs, this embodiment proposes a technical solution that allows for user interaction to modify the business test script. Optionally, step 108 above, which generates the target business test script corresponding to the test target text based on the test step sequence, includes the following steps: Based on the test step sequence, generate the initial business test script corresponding to the test target text and display it to the user; Obtain the second modified text input by the user for the initial business test script; Generate the target business test script corresponding to the test target text based on the second modified text.
[0092] After obtaining the aforementioned test step sequence or target test step sequence, a preliminary business test script can be generated based on the test step text within the sequence. This preliminary script is then displayed to the user on the interface. The interface also provides an edit button, allowing the user to select the script content to be modified and input the revised content, recorded as the second modified text. This second modified text can then be used to fill in the corresponding modified positions, generating the final business test script, i.e., the target business test script.
[0093] In this embodiment, by displaying the test step sequence generated by the multimodal large model to the user and allowing the user to interact with and modify the generated test step sequence, the final generated test step sequence can better meet the user's business testing needs. Similarly, by displaying the business test script initially generated from the test step sequence to the user and allowing the user to interact with and modify the initially generated business test script, the final generated business test script can better meet the user's business testing needs.
[0094] In summary, the technical architecture of "financial testing knowledge graph + RAG mechanism + multimodal large model" in this embodiment of the invention can effectively make up for the shortcomings of Midscene-type solutions in understanding customized business processes and operating non-standard controls. The specific implementation process is as follows: 1. Business semantic modeling based on knowledge graphs: (1) Construct a structured knowledge graph for the futures field, and abstract business scenarios, pages, controls (standard and non-standard), role permissions, business process nodes, data dependencies, etc. into entities and relationships.
[0095] (2) The business knowledge graph serves as the system's business knowledge base, explicitly storing financial business rules (such as "closing order" needs to be mapped to the complete process of "verifying customer status → checking position availability → order placement") and proprietary control operation methods (such as the interaction sequence of a customized date picker).
[0096] (3) Support incremental iteration of knowledge graph to adapt to changes in business rules and interface adjustments.
[0097] 2. Test objective-driven testing under the retrieval enhancement mechanism: (1) See Figure 4 The diagram illustrates the business testing process flow. During the test script generation phase, the multimodal big data model first uses the RAG mechanism to infer relevant entities based on the test case description (i.e., the test target text), and then retrieves the corresponding business scenario. RAG is used to dynamically retrieve contextual information related to the test target text from the business knowledge graph, including: Execution page (e.g., "Warehouse Transfer Application Page"); The object of operation (e.g., "customer role"); Business process nodes (such as "delivery application → goods warehousing → inspection qualified"); Predefined operation models for non-standard controls (such as the click and selection steps for the "warehouse / sub-warehouse selector").
[0098] (2) Based on the retrieved business knowledge, the multimodal big model can automatically deduce the execution page, role permissions, business process nodes and operation sequence when only high-level business objectives (such as "verify the entire process of physical delivery of corn futures") are input.
[0099] (3) Enhance the ability to operate non-standard controls (such as multi-level linked drop-down boxes and date pickers with lunar calendar calculation), inject operational knowledge through business knowledge graphs, and combine multimodal large models to make up for the blind spots of general AI models.
[0100] (4) Break through the limitations of traditional “step-driven” or “code-driven” to achieve “goal-driven” automated testing, reduce manual intervention and support test shift to the left.
[0101] In summary, the embodiments of the present invention have the following technical effects: 1. Enhance the semantic depth of interface understanding: The spatial relationships, state transition logic, data dependencies, and mapping relationships between test cases and execution pages / roles in the financial business process are abstracted into entities and relationships in the business knowledge graph. This enables multimodal large models (such as visual large models) to not only "see" controls, but also "understand" their roles, execution positions, and required permissions in the business context (such as "closing order" being automatically associated with the trading interface and matched with the customer role), solving the problem that traditional solutions cannot automatically determine the operation context.
[0102] 2. Supports dynamic business rule adaptation: Through a dynamic update mechanism of the business knowledge graph, the system can inject changes to financial business rules in real time. This rule-driven adaptability enables the system to flexibly respond to high-frequency iterative business needs and reduce the risk of test failures due to rule changes. Compared with traditional manual maintenance methods, rule response efficiency is improved by more than 90%, significantly enhancing the system's adaptability to high-frequency iterative business environments and achieving a scalable and maintainable automated testing system.
[0103] 3. Achieve coverage of multimodal interaction scenarios: By combining visual recognition and natural language processing technologies, the system can simultaneously parse visual elements (such as buttons and form fields) and business objectives described in natural language (such as "complete physical delivery of corn futures") in an interface screenshot, and generate a complete operation path through cross-modal alignment. This multimodal processing capability enables the system to cover complex mixed interaction scenarios, breaking through the limitations of single visual recognition or code-driven approaches.
[0104] 4. Improve compatibility with non-standard controls: By creating a business knowledge graph for the futures business domain, business rules are structurally linked to the operational models of non-standard controls. Specifically, the operational models and interaction sequences of various customized controls (such as date pickers supporting holiday calculations and multi-level approval node components) are predefined in the business knowledge graph, enabling the system to dynamically match the operational logic of these customized controls. Combined with RAG and multimodal large model inference, the system achieves a success rate of up to 95% for these controls, far exceeding traditional visual recognition solutions (typically below 60%). Furthermore, when the interface layout changes, only the control node relationships in the graph need to be updated, reducing script maintenance costs by approximately 80%.
[0105] 5. Enhance testing by shifting left and ensuring full process coverage: Test case generation technology based on natural language processing can directly extract high-level business objectives from requirements documents and transform them into executable test steps. It covers the entire process from "business objectives" to "execution verification," significantly improving the foresight and completeness of testing.
[0106] 6. Reduce manual intervention and maintenance costs: By automatically generating AI scripts and modularly updating the business knowledge graph, the system reduces its reliance on manually writing, debugging, and maintaining test scripts. When the interface layout is adjusted, only the node relationships in the knowledge graph need to be updated, without rewriting the positioning strategy or script logic, thereby significantly reducing script maintenance costs and development cycles.
[0107] 7. Enhance self-healing capabilities in abnormal scenarios: By combining rule-based reasoning with exception handling mechanisms, the system can automatically identify unexpected states that occur during testing and generate corrective operation chains by invoking backup processes in the knowledge graph. This self-healing capability enables the system to maintain high fault tolerance and robustness in complex business scenarios, reducing the frequency of manual intervention.
[0108] The financial business test script generation device provided by the present invention is described below. The financial business test script generation device described below and the financial business test script generation method described above can be referred to in correspondence.
[0109] Figure 5 This is a schematic diagram of the financial business test script generation device provided by the present invention. See also: Figure 5 As shown, the device may include: The test text acquisition module 510 is used to acquire the test target text to be tested; The requirement story determination module 520 is used to determine the target requirement story data associated with the test target text in the business knowledge graph based on the test target text using a retrieval enhancement generation mechanism. The aforementioned business knowledge graph includes multiple different requirement story data, and each requirement story data includes entities with complete operation processes and the relationships between entities. The test step generation module 530 is used to generate a sequence of test steps corresponding to the test target text based on the test target text, target requirement story data, and multimodal large model; the test step sequence includes multiple test step texts arranged in execution order. The test script generation module 540 is used to generate target business test scripts corresponding to the test target text based on the test step sequence.
[0110] In one embodiment, the aforementioned requirement story determination module 520 is specifically used to vectorize the test target text to determine a first vector; vectorize each entity in the business knowledge graph to determine a second vector corresponding to each entity in the business knowledge graph; and use a retrieval-enhanced generation mechanism to determine target requirement story data associated with the test target text in the business knowledge graph based on the first vector and each second vector.
[0111] Optionally, the aforementioned requirement story determination module 520 is specifically used to employ a retrieval enhancement generation mechanism to determine multiple candidate entities associated with the test target text from among the entities in the business knowledge graph based on the similarity between the first vector and each of the second vectors; to quantify each candidate entity using a large language model to determine the quantization value corresponding to each candidate entity, and to determine multiple target entities among the candidate entities whose quantization values are all greater than a threshold based on the quantization values of each candidate entity; to obtain the target requirement story data corresponding to each candidate entity from the business knowledge graph; and to filter out the target requirement story data associated with the test target text from the target requirement story data.
[0112] In one embodiment, the above-mentioned apparatus further includes: The knowledge graph construction module is used to acquire relevant business description data for financial services. This data includes complete business process nodes, state transition rules, and role and permission requirements for financial services. Based on this data, multiple first entities and the relationships between them are constructed. An operation model is built based on the operation methods of non-standard controls in financial services and / or the operation paths or processes, and this model is used as a second entity. Based on each first entity, the relationships between them, the second entities, and the relationships between them, a top-down construction of requirement story data connecting business scenarios to entities is performed, and a business knowledge graph is built based on this requirement story data.
[0113] Optionally, the aforementioned first entity includes at least one of the following: business scenario entity, interface content entity, standard control entity, non-standard control entity, participating role entity, data construction method entity, business behavior entity, behavior operation method entity, interface design automation entity, and interface design automation entity; the relationship between the aforementioned multiple first entities and the relationship between the second entity and the first entity includes at least one of the following: inclusion relationship, data dependency relationship, operation process relationship, and execution role relationship.
[0114] Optionally, the first entity and the second entity mentioned above include demand-oriented entities and entities oriented towards implementing specific functions. The entity types of the demand-oriented entities and the entity types of the entities oriented towards implementing specific functions are different. Before the test step generation module 530 generates the test step sequence corresponding to the test target text based on the test target text, target demand story data, and multimodal large model, the above device further includes: The intent filtering module is used to identify the intent of the test target text and determine the target intent type corresponding to the test target text; different intent types correspond to different entity types required to implement the test; based on the target intent type, multiple matching entities matching the target intent type are identified in the target requirement story data; Accordingly, the test step generation module 530 is specifically used to generate a sequence of test steps corresponding to the test target text based on the test target text, multiple matching entities, and a multimodal large model.
[0115] In one embodiment, before the test script generation module 540 generates the target business test script corresponding to the test target text according to the test step sequence, the apparatus further includes: The test step modification module is used to display the text of each test step in the test step sequence to the user; obtain the first modified text of the test step text input by the user; generate the target test step text corresponding to the test step text based on the first modified text; and generate the target test step sequence based on the target test step text. Accordingly, the test script generation module 540 is specifically used to generate the target business test script corresponding to the test target text based on the target test step sequence.
[0116] In one embodiment, the test script generation module 540 is specifically used to generate an initial business test script corresponding to the test target text according to the test step sequence and display it to the user; obtain a second modified text for the initial business test script input by the user; and generate a target business test script corresponding to the test target text according to the second modified text.
[0117] It should be noted that the apparatus provided in this embodiment of the invention can implement all the method steps implemented in the above method embodiment and can achieve the same technical effect. Therefore, the parts and beneficial effects that are the same as those in the method embodiment will not be described in detail here.
[0118] Figure 6 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 6As shown, the electronic device may include: a processor 610, a communications interface 620, a memory 630, and a communication bus 640, wherein the processor 610, communications interface 620, and memory 630 communicate with each other through the communication bus 640. The processor 610 can call logical instructions in the memory 630 to execute a financial business test script generation method. This method includes: acquiring the test target text to be tested; using a retrieval-enhanced generation mechanism, determining target requirement story data associated with the test target text in a business knowledge graph based on the test target text; the business knowledge graph includes multiple different requirement story data, each of which includes entities with complete operational processes and relationships between entities; generating a test step sequence corresponding to the test target text based on the test target text, target requirement story data, and a multimodal large model; the test step sequence includes multiple test step texts arranged in execution order; and generating a target business test script corresponding to the test target text based on the test step sequence.
[0119] Furthermore, the logical instructions in the aforementioned memory 630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0120] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the financial business test script generation method provided by the above methods. The method includes: obtaining the test target text to be tested; using a retrieval-enhanced generation mechanism, determining the target requirement story data associated with the test target text in a business knowledge graph based on the test target text; the business knowledge graph includes multiple different requirement story data, each of which includes an entity with a complete operation process and the relationships between entities; generating a test step sequence corresponding to the test target text based on the test target text, the target requirement story data, and the multimodal large model; the test step sequence includes multiple test step texts arranged in execution order; and generating a target business test script corresponding to the test target text based on the test step sequence.
[0121] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements a method for generating financial business test scripts provided by the methods described above. This method includes: acquiring a test target text to be tested; employing a retrieval-enhanced generation mechanism to determine target requirement story data associated with the test target text in a business knowledge graph based on the test target text; the business knowledge graph includes multiple different requirement story data, each of which includes an entity with a complete operational flow and the relationships between entities; generating a test step sequence corresponding to the test target text based on the test target text, the target requirement story data, and a multimodal large model; the test step sequence includes multiple test step texts arranged in execution order; and generating a target business test script corresponding to the test target text based on the test step sequence.
[0122] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0123] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0124] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for generating test scripts for financial transactions, characterized in that, include: Obtain the test target text to be tested; A retrieval-enhanced generation mechanism is adopted to determine the target requirement story data associated with the test target text in the business knowledge graph based on the test target text. The business knowledge graph includes multiple different requirement story data, and each requirement story data includes an entity with a complete operation process and the relationships between entities. Based on the test target text, the target requirement story data, and the multimodal large model, a test step sequence corresponding to the test target text is generated; the test step sequence includes multiple test step texts arranged in execution order. Based on the sequence of test steps, generate the target business test script corresponding to the test target text.
2. The method for generating financial business test scripts according to claim 1, characterized in that, The method employs a retrieval-enhanced generation mechanism to determine target requirement story data associated with the test target text in the business knowledge graph, based on the test target text, including: The test target text is vectorized to determine the first vector; Each entity in the business knowledge graph is vectorized to determine the second vector corresponding to each entity in the business knowledge graph; A retrieval-enhanced generation mechanism is employed to determine target demand story data associated with the test target text in the business knowledge graph based on the first vector and each of the second vectors.
3. The method for generating financial business test scripts according to claim 2, characterized in that, The method employs a retrieval-enhanced generation mechanism to determine target demand story data associated with the test target text in the business knowledge graph based on the first vector and each of the second vectors, including: A retrieval-enhanced generation mechanism is adopted to determine multiple candidate entities associated with the test target text from among the entities in the business knowledge graph based on the similarity between the first vector and each of the second vectors. A large language model is used to quantize each candidate entity to determine the quantization value corresponding to each candidate entity. Based on the quantization value of each candidate entity, multiple target entities whose quantization values are all greater than a threshold are identified among the candidate entities. Obtain the target requirement story data corresponding to each candidate entity from the business knowledge graph; Filter out target requirement story data that is associated with the test target text from the target requirement story data.
4. The method for generating financial business test scripts according to any one of claims 1 to 3, characterized in that, The method further includes: Obtain relevant business description data for financial services; the relevant business description data includes the complete business process nodes, state transition rules, and role and permission requirements of the financial services. Based on the relevant business description data, construct multiple first entities and the relationships between the multiple first entities; Based on the operation methods of the non-standard controls of the financial business and / or the operation path or operation process of the financial business, an operation model is constructed, and the operation model is used as a second entity. Based on each of the first entities, the relationships between the first entities, the second entities, and the relationships between the second entities and the first entities, a top-down structure of demand story data is constructed, which connects business scenarios to entities. The business knowledge graph is then constructed based on the demand story data.
5. The method for generating financial business test scripts according to claim 4, characterized in that, The first entity and the second entity include requirement-oriented entities and entities oriented towards implementing specific functions. The entity type of the requirement-oriented entity and the entity type of the entity oriented towards implementing specific functions are different. Before generating the test step sequence corresponding to the test target text based on the test target text, the target requirement story data, and the multimodal large model, the method further includes: The test target text is subjected to intent recognition to determine the target intent type corresponding to the test target text; different intent types correspond to different entity types required to implement the test; Based on the target intent type, identify multiple matching entities in the target demand story data that match the target intent type; Accordingly, generating the test step sequence corresponding to the test target text based on the test target text, the target requirement story data, and the multimodal large model includes: Based on the target test text, the multiple matching entities, and the multimodal large model, a sequence of test steps corresponding to the target test text is generated.
6. The method for generating financial business test scripts according to any one of claims 1 to 3, characterized in that, Before generating the target business test script corresponding to the test target text based on the test step sequence, the method further includes: Display the text of each test step in the test step sequence to the user; Obtain the first modified text input by the user for the test step text; Generate the target test step text corresponding to the test step text based on the first modified text, and generate the target test step sequence based on the target test step text; Accordingly, generating the target business test script corresponding to the test target text based on the test step sequence includes: Based on the target test step sequence, generate the target business test script corresponding to the test target text.
7. The method for generating financial business test scripts according to any one of claims 1 to 3, characterized in that, The step of generating the target business test script corresponding to the test target text based on the test step sequence includes: Based on the sequence of test steps, generate the initial business test script corresponding to the test target text and display it to the user; Obtain the second modified text input by the user for the initial business test script; Generate the target business test script corresponding to the test target text based on the second modified text.
8. A financial business test script generation device, characterized in that, include: The test text acquisition module is used to acquire the test target text to be tested; The requirement story determination module is used to determine the target requirement story data associated with the test target text in the business knowledge graph based on the test target text using a retrieval enhancement generation mechanism. The business knowledge graph includes multiple different requirement story data, and each requirement story data includes an entity with a complete operation process and the relationships between entities. The test step generation module is used to generate a test step sequence corresponding to the test target text based on the test target text, the target requirement story data, and the multimodal large model; the test step sequence includes multiple test step texts arranged in execution order; The test script generation module is used to generate the target business test script corresponding to the test target text based on the test step sequence.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the financial business test script generation method as described in any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the financial business test script generation method as described in any one of claims 1 to 7.