Scene library construction method, device, electronic device and storage medium

By analyzing the categories and number of test scenarios, an optimized scenario library is built, which solves the problem of insufficient stacking and coverage of test scenarios in the scenario library, and achieves the effect of improving testing efficiency and accuracy.

CN114896166BActive Publication Date: 2025-01-10CHINA FAW CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210643964.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-08
Publication Date
2025-01-10
Estimated Expiration
2042-06-08

AI Technical Summary

Technical Problem

In the prior art, the number of test scenarios in the scenario library is too large, resulting in increased storage and management costs, and the coverage of test scenario categories does not meet the testing needs.

Method used

By obtaining the test scenario categories associated with the test task and determining the category proportion of each category, the recommended test set is determined for each test task, the scenario library is constructed and tested to determine the target scenario library.

Benefits of technology

Improve the coverage and effectiveness of the test scenarios, ensure the accuracy of subsequent tests, and reduce storage and management costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114896166B_ABST
    Figure CN114896166B_ABST
Patent Text Reader

Abstract

The present invention discloses a scenario library construction method, device, electronic device and storage medium, wherein the method comprises: obtaining at least one test scenario category associated with at least one test task, and determining the category proportion of each test scenario category; for each test task, obtaining the number of test scenarios corresponding to the test task, and determining the recommended test set corresponding to the test task based on the number of test scenarios and the category proportion; constructing at least one scenario library based on the recommended test set corresponding to each test task, and testing each scenario library based on each test task to determine the target scenario library based on the test results. The technical solution of the embodiment of the present invention achieves the technical effect of improving the effectiveness of the test scenario and the accuracy of its subsequent tests by analyzing the category distribution of the test scenario category and the optimal scale of the scenario library.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of autonomous driving technology, and in particular to a scene library construction method, device, electronic device and storage medium. Background Art

[0002] As cars are about to become the third generation of mobile smart terminals, the requirements for intelligence and networking are getting higher and higher. In the process of developing the function of automatic driving, it is necessary to implement it based on certain test scenarios. The test work needs to make test cases based on specific driving scenarios, some dangerous and extreme scenarios to obtain the test case set of the corresponding function. The development of a comprehensive scenario library to cover test scenario libraries with different functions and uses is the goal of the scenario development work of all parties at this stage.

[0003] At present, in order to make the test scenario library cover as many different categories of test scenarios as possible, it is usually achieved by continuously increasing the number of test scenarios and supplementing them with manual experience. However, as the number of scenarios in the scenario library increases, the scale of the scenario library also increases, resulting in an increase in storage and management costs. Summary of the invention

[0004] The present invention provides a scenario library construction method, device, electronic device and storage medium to achieve the effect of improving the coverage of test scenario categories in the scenario library and the test efficiency.

[0005] According to one aspect of the present invention, there is provided a scenario library construction method, the method comprising: obtaining at least one test scenario category associated with at least one test task, and determining a category proportion of each test scenario category;

[0006] For each test task, obtain the number of test scenarios corresponding to the test task, and determine the recommended test set corresponding to the test task based on the number of test scenarios and the proportion of categories;

[0007] Based on the recommended test sets corresponding to the test tasks, at least one scenario library is constructed, and each scenario library is tested based on each test task to determine a target scenario library based on the test results.

[0008] According to another aspect of the present invention, a scene library construction device is provided, the device comprising:

[0009] A test scenario category acquisition module, used to acquire at least one test scenario category associated with at least one test task, and determine the category proportion of each test scenario category;

[0010] A recommended test set determination module is used to obtain the number of test scenarios corresponding to each test task, and determine the recommended test set corresponding to the test task based on the number of test scenarios and the category ratio;

[0011] The target scenario library determination module is used to construct at least one scenario library based on the recommended test sets corresponding to each test task, and test each scenario library based on each test task to determine the target scenario library based on the test results.

[0012] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0013] at least one processor; and

[0014] a memory communicatively connected to the at least one processor; wherein,

[0015] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the scene library construction method described in any embodiment of the present invention.

[0016] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the scene library construction method described in any embodiment of the present invention when executed.

[0017] The technical solution of the embodiment of the present invention first obtains at least one test scenario category associated with at least one test task, and determines the category ratio of each test scenario category. Further, for each test task, the number of test scenarios corresponding to the test task is obtained, and based on the number of test scenarios and the category ratio, a recommended test set corresponding to the test task is determined. Finally, based on the recommended test set corresponding to each test task, at least one scenario library is constructed, and each scenario library is tested based on each test task to determine the target scenario library based on the test results. This solves the problem in the prior art that there are too many test scenarios piled up in the scenario library and the coverage of the test scenario categories does not meet the test requirements. By analyzing the category distribution of the test scenario categories and the optimal size of the scenario library, the technical effect of improving the effectiveness of the test scenarios and the accuracy of their subsequent tests is achieved.

[0018] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0020] Figure 1 is a flowchart of a scene library construction method provided according to Embodiment 1 of the present invention;

[0021] Figure 2 is a structural schematic diagram of a scene library construction device provided according to Embodiment 2 of the present invention;

[0022] Figure 3 It is a structural schematic diagram of an electronic device for implementing the scene library construction method of an embodiment of the present invention. DETAILED DESCRIPTION

[0023] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0025] Embodiment 1

[0026] Figure 1A flowchart of a scenario library construction method is provided for the first embodiment of the present invention. This embodiment is applicable to the case where the test scenarios contained in the test scenario library do not meet the test task requirements when testing vehicle functions. The method can be executed by a scenario library construction device, which can be implemented in the form of hardware and / or software, and can be configured in a terminal and / or server. Figure 1 As shown, the method includes:

[0027] S110: Obtain at least one test scenario category associated with at least one test task, and determine a category ratio of each test scenario category.

[0028] Among them, the test task can be a task for testing different functions of the vehicle. Exemplarily, when the automatic driving function of the vehicle needs to be tested, the corresponding test tasks may include but are not limited to adaptive cruise test, automatic emergency braking test and congested road driving test. It should be noted that the test task may include test tasks under actual conditions, and may also include test tasks expected to be implemented in the future, which is not specifically limited in this embodiment. The test scenario category may be the functional requirements that need to be met for executing the test task. Exemplarily, when the test task is an adaptive cruise test, its associated test scenario category may include but is not limited to executing appropriate vehicle start-up, executing appropriate line driving, and identifying and responding to temporary static obstacles; when the test task is an automatic emergency braking test, its associated test scenario category may include but is not limited to identifying and responding to stopped vehicles in front, identifying and responding to temporary static obstacles, and identifying and responding to lane change vehicles in front; when the test task is a congested road driving test, its associated test scenario category may include but is not limited to executing appropriate vehicle following, executing appropriate lane changes, and identifying and responding to adjacent stopped vehicles. The category ratio may be the percentage of the target test scenario category in all test scenario categories associated with all test tasks.

[0029] In practical applications, when a performance test is required for a certain function of a vehicle, a corresponding test task can be determined for the vehicle function to be tested, and then, a test scenario category associated with each test task can be determined. Optionally, obtaining at least one test scenario category associated with at least one test task includes: determining each test scenario category associated with each test task according to a pre-established correspondence between each test task and the test scenario category.

[0030] Specifically, when determining the test scenario category associated with the test task, a correspondence table between each test task and each test scenario category may be established in advance, so as to determine each test scenario category associated with each test task according to the correspondence table.

[0031] Furthermore, in order to determine the importance of each test scenario category, a statistical analysis can be performed on the determined test scenario categories to determine the number of times each test scenario type appears, and then the category proportion of each test scenario category can be determined based on the frequency of occurrence, so as to analyze the importance of each test scenario category based on the category proportion. Optionally, determining the category proportion of each test scenario category includes: superimposing each test scenario category of each test task and determining the frequency information of each test scenario; and determining the category proportion of each test scenario category based on the frequency information.

[0032] The frequency information may be the occurrence frequency or the number of occurrences of each test scenario category.

[0033] In a specific implementation, after determining all the test scenario categories associated with each test task, all the test scenario categories of the test task can be superimposed to obtain a total test scenario category library corresponding to the vehicle function that needs to be tested. Further, the number of times each test scenario category appears in the total test scenario category library is statistically analyzed to determine its category proportion based on the number of times each test scenario category appears. Exemplarily, when it is necessary to test the autonomous driving function of a vehicle, the corresponding test tasks may be 27, each test task corresponds to a number of test scenario categories, and after superimposing all the test scenario categories of the 27 test tasks, a total test scenario category library containing 500 test scenario categories is obtained, wherein the test scenario category of performing appropriate vehicle starting appears 50 times in the total test scenario category library, and its corresponding category proportion is 10%; the test scenario category of performing appropriate line driving appears 20 times in the total test scenario category library, and its corresponding category proportion is 4%.

[0034] S120. For each test task, obtain the number of test scenarios corresponding to the test task, and determine a recommended test set corresponding to the test task based on the number of test scenarios and the proportion of categories.

[0035] The number of test scenarios may be the number of test scenarios required for the current test task. For example, the number of test scenarios may be 500, 1000, or 1500. The recommended test set may be a set containing preferred test scenario categories. The preferred test scenario category may be a test scenario category that has a clear test significance for testing vehicle functions.

[0036] Optionally, for each test task, the number of test scenarios corresponding to the test task is obtained, and based on the number of test scenarios and the ratio of categories, a recommended test set corresponding to the test task is determined, including: based on the current test requirements of each test task, determining the number of test scenarios corresponding to the test task; based on the number of test scenarios and the ratio of test scenario categories, determining the number of scenarios in each test scenario category; and constructing a recommended test set corresponding to the test task based on a pre-set valid scenario library and number of scenarios.

[0037] Among them, the current test requirement can be the test requirement of the test developer for the vehicle function to be tested at the current moment. Exemplarily, according to the current test requirement, the corresponding number of test scenarios can be 500, 1000 or 1500, etc. The number of scenarios is the number of each test scenario category. The valid scenario library can be a pre-established scenario library for storing valid scenarios obtained based on the scenario validity analysis of the vehicle function test requirements. The valid scenario can be a scenario that has actual test significance in the vehicle function test, that is, a scenario that is useful for the vehicle function test process.

[0038] In a specific implementation, when determining the recommended test set for each test task, the current test requirements of each test task can be obtained to obtain the number of test scenarios corresponding to each test task. Furthermore, based on the number of test scenarios for each test task and the analog proportion of each test scenario category in each test task, the number of each test scenario category under the current number of test scenarios is determined, and based on the determined number of scenarios for each test scenario category, the test scenario categories with the target number of scenarios are retrieved from a pre-established valid scenario library, and the recommended test set corresponding to each test task is constructed based on the retrieved test scenario categories.

[0039] It should be noted that the benefit of constructing a recommended test set is that the target vehicle function can be tested based on the recommended test set during the early vehicle function development process, so that the vehicle function can be debugged according to the test results.

[0040] S130: construct at least one scenario library based on the recommended test sets corresponding to each test task, and test each scenario library based on each test task to determine a target scenario library based on the test results.

[0041] The scenario library may be a collection of all test scenarios required for testing vehicle functions. The test results may include test pass, test fail, and test abnormality.

[0042] In practical applications, scenario libraries of different orders of magnitude will produce different test results when conducting simulation tests on different test tasks. Therefore, it is necessary to determine a scenario library containing an appropriate number of test scenarios in order to achieve the best test results based on the scenario library. Optionally, at least one scenario library is constructed based on the recommended test set corresponding to each test task, including: determining at least one preset ratio for each test task, expanding the recommended test set based on the preset ratio to obtain at least one functional test set; and superimposing the functional test sets of each test task to obtain at least one scenario library.

[0043] In this embodiment, the preset ratio may be a preset test set expansion ratio. Exemplarily, the preset ratio may be 1:10, 1:20, or 1:50, etc. For example, the preset ratio may be set to 1:20, the number of test scenario categories in the recommended test set is 500, and after the recommended test set is expanded based on the preset ratio, the number of test scenario categories in the obtained functional test set is 10,000.

[0044] In a specific implementation, after determining the recommended test set corresponding to each test task, in order to determine the test effects of scenario libraries of different orders of magnitude, multiple preset ratios can be determined, and the recommended test set of each test task can be expanded according to the preset ratios to obtain multiple functional test sets corresponding to each test task. Furthermore, the functional test sets of each test task are superimposed respectively to obtain multiple scenario libraries, wherein each scenario library corresponds to each preset ratio.

[0045] Furthermore, each determined scenario library is tested based on each test task to obtain a test result, so that a target scenario library that meets the requirements can be determined based on the test result of each scenario library.

[0046] Optionally, determining the target scenario library based on the test results includes: determining the test pass rate, test failure information and test exception reasons of each scenario library according to the test results; and determining the target scenario library in each scenario library based on the test pass rate, test failure information and test exception reasons.

[0047] In this embodiment, the test pass rate may be the ratio of the number of test scenario categories that passed the test in each test task to the total number of test scenario categories. The test failure information may be the specific circumstances of the test scenario categories that failed the test in each test task. The test abnormality reason may be the reason for the test abnormality in the test scenario category in each test task. Exemplarily, the test abnormality reason may include, but is not limited to, problems with the scenario file and missing key parameters.

[0048] In the specific implementation, after obtaining the test results of each scenario library, the ratio of the number of test scenario categories that pass the test to the total number of scenario test categories when each scenario library copes with the same test task can be determined according to the test results, and the specific circumstances of the test scenario categories that fail the test can be analyzed, as well as the error reasons for abnormal test scenario categories. In this way, the test pass rate, test failure information and test abnormality reasons of each scenario library can be analyzed to determine the target scenario library with a reasonable number of scenarios and test results that meet the requirements.

[0049] It should be noted that the target scenario library corresponds to the vehicle function that needs to be tested. After the target scenario library is determined, the test scenario can be directly called from the target scenario library when other test tasks of the vehicle function are tested subsequently.

[0050] It should also be noted that as time changes, the test scenarios in the target scenario library may not conform to the current actual situation, or the test scenarios in the target scenario library may not meet the test task requirements due to changes in new test tasks. Based on this, after determining the target scenario library, it is also necessary to dynamically update it so that the target scenario library always meets the test task requirements and actual application scenario requirements.

[0051] On the basis of the above technical solution, it also includes: when a new test task is detected, updating the target scenario library based on the new test task; and obtaining the scenario library management rules to update the target scenario library based on the scenario library management rules.

[0052] In actual applications, when testing the same function of a vehicle, test developers may develop other test tasks that are different from existing test tasks over time, and the newly developed test tasks can be used as new test tasks.

[0053] In this embodiment, the scene library management rules may be rules required for subsequent maintenance of the constructed scene library. Exemplarily, the scene library management rules may include, but are not limited to, storage space, update frequency, scene date requirements, and scene utilization statistics. For example, with respect to storage space, the target scene library will have its fixed storage space, and when test scenes are subsequently added or removed, the storage space of the target scene library must always remain unchanged; with respect to update frequency, an update cycle may be pre-set so that the target scene library may be periodically updated based on a preset update cycle; with respect to scene date requirements, as time goes by, test scenes in the target scene library that are far away from the current time may not conform to the current actual situation, so these test scenes may be removed, so that the test scenes of the latest time may be added to the vacated storage space.

[0054] The technical solution of the embodiment of the present invention first obtains at least one test scenario category associated with at least one test task, and determines the category ratio of each test scenario category. Further, for each test task, the number of test scenarios corresponding to the test task is obtained, and based on the number of test scenarios and the category ratio, a recommended test set corresponding to the test task is determined. Finally, based on the recommended test set corresponding to each test task, at least one scenario library is constructed, and each scenario library is tested based on each test task to determine the target scenario library based on the test results. This solves the problem in the prior art that there are too many test scenarios piled up in the scenario library and the coverage of the test scenario categories does not meet the test requirements. By analyzing the category distribution of the test scenario categories and the optimal scale of the scenario library, the technical effect of improving the test scenario coverage, the effectiveness of the test scenarios and the accuracy of the subsequent test results is achieved.

[0055] Embodiment 2

[0056] Figure 2 This is a schematic diagram of the structure of a scene library construction device provided in the second embodiment of the present invention. Figure 2 As shown, the device includes: a test scenario category acquisition module 210, a recommended test set determination module 220 and a target scenario library determination module 230.

[0057] The test scenario category acquisition module 210 is used to acquire at least one test scenario category associated with at least one test task, and determine the category proportion of each test scenario category;

[0058] The recommended test set determination module 220 is used to obtain the number of test scenarios corresponding to each test task, and determine the recommended test set corresponding to the test task based on the number of test scenarios and the category ratio;

[0059] The target scenario library determination module 230 is used to construct at least one scenario library based on the recommended test sets corresponding to each test task, and test each scenario library based on each test task to determine the target scenario library based on the test results.

[0060] The technical solution of the embodiment of the present invention first obtains at least one test scenario category associated with at least one test task, and determines the category ratio of each test scenario category. Further, for each test task, the number of test scenarios corresponding to the test task is obtained, and based on the number of test scenarios and the category ratio, a recommended test set corresponding to the test task is determined. Finally, based on the recommended test set corresponding to each test task, at least one scenario library is constructed, and each scenario library is tested based on each test task to determine the target scenario library based on the test results. This solves the problem in the prior art that there are too many test scenarios piled up in the scenario library and the coverage of the test scenario categories does not meet the test requirements. By analyzing the category distribution of the test scenario categories and the optimal scale of the scenario library, the technical effect of improving the test scenario coverage, the effectiveness of the test scenarios and the accuracy of the subsequent test results is achieved.

[0061] Optionally, the test scenario category acquisition module 210 includes a test scenario category determination unit, which is used to determine each of the test scenario categories associated with each test task according to a pre-established correspondence between each test task and the test scenario category.

[0062] Optionally, the test scenario category acquisition module 210 also includes a category proportion determination unit, which is used to superimpose the test scenario categories of each test task and determine the frequency information of each test scenario; based on the frequency information, determine the category proportion of each test scenario category.

[0063] Optionally, the recommended test set determination module 220 includes a test scenario quantity determination unit, a scenario quantity determination unit and a recommended test set construction unit.

[0064] A test scenario quantity determination unit, used to determine the number of test scenarios corresponding to the test task based on the current test requirements of each test task;

[0065] A scene quantity determination unit, used to determine the scene quantity of each test scene category based on the number of test scenes and the category ratio of the test scene categories;

[0066] The recommended test set construction unit is used to construct a recommended test set corresponding to the test task based on a pre-set valid scenario library and scenario quantity.

[0067] Optionally, the target scenario library determination module 230 includes a scenario library construction unit, which is used to determine at least one preset ratio for each test task, to expand the recommended test set based on the preset ratio to obtain at least one functional test set; and to superimpose the functional test sets of each test task to obtain at least one scenario library.

[0068] Optionally, the target scenario library determination module 230 also includes a target scenario library determination unit, which is used to determine the test pass rate, test failure information and test exception reasons of each scenario library according to the test results; based on the test pass rate, test failure information and test exception reasons, determine the target scenario library in each scenario library.

[0069] Optionally, the device further includes: a target scenario library updating module, for updating the target scenario library based on the newly added test task when a new test task is detected; and obtaining scenario library management rules to update the target scenario library based on the scenario library management rules.

[0070] The scene library construction device provided in the embodiment of the present invention can execute the scene library construction method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0071] Embodiment 3

[0072] Figure 3 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0073] like Figure 3 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0074] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0075] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a scene library construction method.

[0076] In some embodiments, the scene library construction method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the scene library construction method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the scene library construction method in any other appropriate manner (e.g., by means of firmware).

[0077] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0078] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0079] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

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

[0081] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0082] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0083] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0084] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for constructing a scene library, characterized in that: include: Obtain at least one test scenario category associated with at least one test task, and determine a category ratio of each of the test scenario categories; For each of the test tasks, the number of test scenarios corresponding to the test task is obtained, and based on the number of test scenarios and the category proportion, a recommended test set corresponding to the test task is determined; Based on the recommended test sets corresponding to the test tasks, at least one scenario library is constructed, and each scenario library is tested based on the test tasks to determine a target scenario library based on the test results; The step of obtaining, for each of the test tasks, the number of test scenarios corresponding to the test task, and determining, based on the number of test scenarios and the category proportion, a recommended test set corresponding to the test task includes: Based on the current test requirements of each of the test tasks, determine the number of test scenarios corresponding to the test tasks; Determining the number of scenes in each of the test scene categories based on the number of test scenes and the category ratio of the test scene categories; Constructing a recommended test set corresponding to the test task according to a preset valid scenario library and the number of scenarios; The step of constructing at least one scenario library based on the recommended test sets corresponding to the test tasks includes: For each of the test tasks, determining at least one preset ratio, so as to expand the recommended test set based on the preset ratio to obtain at least one functional test set; The functional test sets of each of the test tasks are superimposed to obtain at least one scenario library.

2. The method according to claim 1, characterized in that The obtaining of at least one test scenario category associated with at least one test task includes: According to the pre-established correspondence between each test task and the test scenario category, each test scenario category associated with each test task is determined.

3. The method according to claim 1, characterized in that Determining the category proportion of each of the test scenario categories includes: Superimposing each test scenario category of each test task, and determining frequency information of each test scenario; Based on the frequency information, the category proportion of each of the test scenario categories is determined.

4. The method according to claim 1, characterized in that The determining of the target scenario library based on the test results includes: Determine the test pass rate, test failure information and test abnormality reasons of each scenario library according to the test results; Based on the test pass rate, the test failure information and the test abnormality reason, the target scenario library is determined in each of the scenario libraries.

5. The method according to claim 1, characterized in that Also includes: When a new test task is detected, updating the target scenario library based on the new test task; as well as, A scene library management rule is obtained to update the target scene library based on the scene library management rule.

6. A scene library construction device, characterized in that: include: A test scenario category acquisition module, used to acquire at least one test scenario category associated with at least one test task, and determine the category proportion of each of the test scenario categories; A recommended test set determination module, used to obtain, for each of the test tasks, the number of test scenarios corresponding to the test task, and determine a recommended test set corresponding to the test task based on the number of test scenarios and the category proportion; A target scenario library determination module, used to construct at least one scenario library based on the recommended test sets corresponding to the test tasks, and test the scenario libraries based on the test tasks to determine the target scenario library based on the test results; The recommended test set determination module includes: a test scenario quantity determination unit, a scenario quantity determination unit and a recommended test set construction unit; The test scenario quantity determination unit is used to determine the number of test scenarios corresponding to the test task based on the current test requirements of each test task; The scene quantity determination unit is used to determine the number of scenes in each of the test scene categories based on the number of test scenes and the category ratio of the test scene categories; The recommended test set construction unit is used to construct a recommended test set corresponding to the test task according to a preset valid scenario library and the number of scenarios; The target scenario library determination module includes: a scenario library construction unit, used to determine at least one preset ratio for each of the test tasks, so as to expand the recommended test set based on the preset ratio to obtain at least one functional test set; and to superimpose the functional test sets of each of the test tasks to obtain at least one scenario library.

7. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the scene library construction method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the scene library construction method according to any one of claims 1 to 5 when executed.

Citation Information

Patent Citations

  • Test scene library construction method and device, electronic equipment and medium

    CN110579216A

  • Method and device for testing automatic driving system

    CN111122175A