Construction method and device of test database, equipment and medium
By building a unified test database, the problems of dispersed test data and low collection efficiency are solved, the uniformity and accuracy of test data are achieved, the testing efficiency and result reliability are improved, and a reliable basis for product performance evaluation is provided.
Patent Information
- Application Number
- CN202411333040.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2025-01-03
AI Technical Summary
In the prior art, the test data is dispersed and the acquisition efficiency is low, which makes it difficult to ensure consistency when collecting test data. The reliability of the test results is affected.
By building a unified test database, determine the target test scenarios, extract and sort the corresponding test materials, and form a systematic database to ensure the uniformity and accuracy of the test data and avoid repeated manual operations.
It significantly reduces the time and labor cost of collecting and sorting test data, ensures the consistency and reliability of test results, improves testing efficiency, and provides a reliable basis for product performance evaluation.
Smart Images

Figure CN119248597A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data management, and in particular to a method, device, equipment and medium for constructing a test database. Background Art
[0002] With the development of artificial intelligence technology, the iteration speed of learning aids such as electronic dictionary pens has accelerated. In order to evaluate the functions of these new products, test data has become an important testing basis.
[0003] However, existing test resources are scattered in various books and documents, which makes the collection of test data consuming a lot of manpower and time. At the same time, reusing the same test data is crucial for performance comparison before and after hardware replacement.
[0004] Therefore, there is an urgent need to build a unified and systematic database to store and manage test data. Summary of the invention
[0005] The present invention provides a method, device, equipment and medium for constructing a test database, which are used to solve the defects of scattered test resources and low collection efficiency in related technologies.
[0006] The present invention provides a method for constructing a test database, comprising the following steps: Identify target test scenarios; Extracting the test material under the target test scenario from a resource library as the target test material, wherein the resource library includes candidate test materials under each candidate test scenario, and the candidate test materials are printed materials obtained by segmenting in units of text lines; Based on the test sequence under the target test scenario, the target test materials are sorted to obtain a test database for the target test scenario.
[0007] According to a method for constructing a test database provided by the present invention, the determination of candidate test materials in each candidate test scenario includes: Determine the type of test material required for the candidate test scenario based on at least one of the language to be tested, the content type to be tested, the text format to be tested, and the function to be tested in the candidate test scenario; Based on the test material type required for the candidate test scenario, candidate test materials for the candidate test scenario are determined from candidate printed materials.
[0008] According to a method for constructing a test database provided by the present invention, the method of determining candidate test materials under the candidate test scenario from candidate printed materials based on the test material type required by the candidate test scenario includes: Determining, from the candidate printed materials, a material printed material that belongs to the test material type required by the candidate test scenario; The content to be tested is determined from the source printed material, and the text line where the content to be tested is located is segmented from the source printed material to obtain the candidate test material.
[0009] According to a method for constructing a test database provided by the present invention, the determination of candidate test materials in each candidate test scenario further includes: In the case that the candidate printed material that belongs to the test material type required by the candidate test scenario does not exist, the candidate test material under the candidate test scenario is determined based on the supplementary electronic material.
[0010] According to a method for constructing a test database provided by the present invention, each candidate test scenario includes at least one of an optical character recognition test scenario, a speech recognition scenario, a translation scenario, a spoken language evaluation scenario, and a speech synthesis scenario.
[0011] The present invention provides a testing method, comprising the following steps: Acquire a test database of a target test scenario, wherein the test database is determined based on the test database construction method described in any one of the above items; A test is performed based on the test database to obtain a test result.
[0012] The present invention also provides a device for constructing a test database, comprising the following modules: A scene determination unit, used for determining a target test scene; A material extraction unit, used to extract the test material under the target test scenario from a resource library as the target test material, wherein the resource library includes candidate test materials under each candidate test scenario, and the candidate test materials are printed materials obtained by segmenting in units of text lines; The database construction unit is used to sort the target test materials based on the test sequence under the target test scenario to obtain a test database for the target test scenario.
[0013] The present invention also provides a testing device, comprising the following modules: An acquisition unit, configured to acquire a test database of a target test scenario, wherein the test database is determined based on the test database construction method as described in any one of the above items; The testing unit is used to perform testing based on the testing database to obtain test results.
[0014] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the construction and testing method of the test database as described above is implemented.
[0015] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the test database construction and testing method described in any one of the above methods is implemented.
[0016] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned test database construction and testing methods.
[0017] The test database construction method, device, equipment and medium provided by the present invention determine the target test material according to the specific test scenario, significantly reduce the time cost and labor cost of collecting and collating test data, and avoid repeated manual operations. The construction of the test database ensures the uniformity and accuracy of the test data and effectively guarantees the consistency and reliability of the test results. This not only improves the test efficiency, but also provides a more reliable basis for product performance evaluation. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the present invention or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1 This is one of the flow charts of the method for constructing a test database provided by the present invention.
[0020] Figure 2 It is a schematic diagram of the flow chart of the testing method provided by the present invention.
[0021] Figure 3 This is the second flow chart of the method for constructing a test database provided by the present invention.
[0022] Figure 4 It is a structural schematic diagram of the device for constructing a test database provided by the present invention.
[0023] Figure 5 It is a structural schematic diagram of the testing device provided by the present invention.
[0024] Figure 6 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are 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 are within the scope of protection of the present invention.
[0026] With the rapid development of artificial intelligence technology, the update and iteration speed of learning aids such as electronic dictionary pens has increased significantly. In order to ensure the performance improvement of these new products, the test results obtained using test sets have become an important indicator for evaluating product quality and effectiveness. Through test sets, the performance of products in different usage scenarios can be quantitatively analyzed to ensure that product improvements meet user needs and achieve expected results. Test sets can not only verify the performance of products under specific conditions, but also help developers find potential problems and further optimize algorithm and hardware design.
[0027] However, current test data is often scattered in various books, documents, and materials from various sources, lacking effective centralized management. This scattered test data poses a great challenge to collection. Every time a new round of testing is conducted, test data collectors must search, screen, and organize the required test data from scratch. This not only consumes a lot of manpower and time, but also easily leads to incomplete or erroneous data, affecting the accuracy and reliability of test results.
[0028] At the same time, it is very important to maintain the consistency of test data during the upgrade of hardware equipment. In order to compare the performance difference before and after the hardware is replaced, it is usually necessary to reuse the same test set. However, due to the dispersion of existing resources and the lack of systematic management, this consistency is difficult to ensure, which in turn affects the credibility of the performance comparison results between different devices and different product versions.
[0029] Therefore, building a unified and systematic database for centralized storage and efficient management of test data is an efficient solution to improve test efficiency and ensure the reliability of test results.
[0030] In view of the above problems, an embodiment of the present invention provides a method for constructing a test database. Figure 1 It is one of the flow charts of the method for constructing the test database provided by the present invention, such as Figure 1 As shown, the method includes: Step 110, determining the target test scenario.
[0031] Specifically, target test scenarios refer to various typical usage situations that may occur in actual applications. Determining target test scenarios is one of the key links in building a test database. In order to ensure that the test set can fully cover the usage of the product, the determination of scenarios should take into account the user's usage habits, device functional characteristics, and requirements in various scenarios.
[0032] In the embodiment of the present invention, the test scenarios that may be included include but are not limited to: OCR (Optical Character Recognition) test scenario, speech recognition test scenario, translation test scenario, oral evaluation test scenario, TTS (Text-to-Speech) synthesis test scenario. Among them, the OCR scenario can recognize and extract character information in the image and convert it into editable text content; the speech recognition scenario is used to convert voice input into corresponding text, recognize the user's voice expression and perform accurate analysis; the translation scenario is used to automatically translate between different languages to achieve language conversion and cross-language communication functions; the function of the oral evaluation test scenario is to evaluate the accuracy of the user's pronunciation and judge the user's oral level by comparing with the standard pronunciation; the TTS synthesis test scenario is responsible for converting text content into natural and fluent voice output, realizing the conversion function from text to sound.
[0033] By determining the above test scenarios, we can ensure that the test set has comprehensive coverage and conduct detailed tests on various functions of the product, laying the foundation for subsequent test material extraction.
[0034] Step 120, extracting the test material under the target test scenario from a resource library as the target test material, wherein the resource library includes candidate test materials under each candidate test scenario, and the candidate test materials are printed materials obtained by segmenting in units of text lines.
[0035] Test materials refer to test data used in specific test scenarios. In different test scenarios, test materials can include various forms of text, voice, images, etc. These materials are the most basic components of the test and are used to evaluate the performance of the product in different functional modules. The quality and accuracy of test materials directly affect the reliability of the test results. Therefore, retrieving appropriate test materials is crucial to the entire test process.
[0036] The resource library stores candidate test materials for various test scenarios. Candidate test materials are pre-processed and classified printed materials, which are usually divided into text lines so that they can be flexibly called under different test requirements.
[0037] After determining the target test scenario, the corresponding test materials can be extracted from the resource library and used as the target test materials. Each test scenario will select different candidate materials based on specific functional requirements. The test material extraction process ensures the accuracy and applicability of the test materials, and can avoid errors that may be caused by manual selection, ensuring the consistency of test data.
[0038] For example, in an OCR test scenario, candidate test materials usually include printed content that has been segmented. The OCR function can recognize and convert printed text, so the test materials must include various types of printed text resources to evaluate the accuracy of the recognition function. In a speech recognition test scenario, candidate test materials need to cover complex language environments. In a translation test scenario, candidate test materials include multilingual text resources to test the system's ability to convert between different languages.
[0039] This resource library-based candidate test material extraction method can ensure that material extraction for different test scenarios is fast and efficient, while ensuring data consistency during the test process and the reliability of the test results.
[0040] Step 130: sort the target test materials based on the test sequence under the target test scenario to obtain a test database for the target test scenario.
[0041] Specifically, according to the determined test scenarios and the test requirements of each test scenario, the extracted target test materials are reasonably sorted to obtain the final test database. The key to sorting is to ensure that the order of the test materials can match the operation process required in the actual test process, so that the test work can be carried out more orderly and efficiently.
[0042] The sorting process is mainly based on the specific test order and requirements of each test scenario. For example, for different test scenarios such as OCR, speech recognition, translation, TTS synthesis, etc., the test materials will be sorted differently to ensure that the order of calling materials meets the actual needs of the scenario.
[0043] For example, in an OCR test scenario, the test sequence may be to start with simple printed text and gradually increase the complexity; in a speech recognition test scenario, the relatively simple Chinese and English individual voices may be recognized first, and then polyphones, dialects, or mixed Chinese and English sentences may be gradually added; in a translation test environment, the tests may be sorted according to different types of languages, such as translating English first, then French or other languages; in a TTS synthesis test environment, the test sequence may start with simple phrases or sentences and gradually increase the complexity of the text, such as sentences containing symbols, numbers, polyphones, or tone changes, to evaluate the product's speech synthesis effect when processing different types of text.
[0044] Through this sorting, the test database formed can not only ensure the order and rationality of the test, but also ensure that the materials in different test scenarios are carried out in sequence, effectively avoiding errors or reduced efficiency caused by material confusion or improper sequence during the test process.
[0045] The test database construction method provided by the embodiment of the present invention determines the target test material from the resource library according to the target test scenario, significantly reduces the time cost and labor cost of test data collection and sorting, and avoids repeated manual operations. The construction of the test database ensures the uniformity and accuracy of the test data and effectively guarantees the consistency and reliability of the test results. This not only improves the test efficiency, but also provides a more reliable basis for product performance evaluation.
[0046] Based on the above embodiment, in step 120, the determination of the candidate test materials in each candidate test scenario includes: Determine the type of test material required for the candidate test scenario based on at least one of the language to be tested, the type of content to be tested, the text format to be tested, and the function to be tested in the candidate test scenario; Based on the test material type required for the candidate test scenario, candidate test materials for the candidate test scenario are determined from candidate printed materials.
[0047] Specifically, it is necessary to determine the required test material type based on the specific requirements of the candidate test scenarios. The determination process mainly considers at least one of the following four aspects: the language to be tested, the content type to be tested, the text format to be tested, and the function to be tested. Among them, the language to be tested refers to the language used by the test material, such as Chinese, English or other languages; the content type to be tested includes the nature of the text content, such as textbooks, technical documents, literary works, etc. The text format to be tested refers to the layout, structure and other characteristics of the text, which may be text with complex annotations, polyphone contexts, or paragraphs containing special symbols. The function to be tested is the specific function that needs to be implemented in the test scenario.
[0048] In a specific candidate test scenario, it is necessary to comprehensively consider at least one of the language to be tested, the type of content to be tested, the text format to be tested, and the function to be tested to determine the candidate test materials to ensure that the test materials can meet the requirements of the specific scenario. For example, in the OCR test scenario, the language to be tested can be Chinese, English, or other languages, and the types of content to be tested may include Chinese textbooks, English textbooks, or Chinese and English picture books. It may also include three-line grid pinyin, overlapping Chinese and English words, etc. The text format to be tested may be a single-page or multi-page layout, and may contain complex text with special symbols or annotations. The function to be tested focuses on the recognition and extraction of characters to ensure that characters can be accurately recognized in texts with different layouts and content complexities.
[0049] In the speech recognition test scenario, the language to be tested may be Chinese, English, or a mixture of Chinese and English, and the content type to be tested may be ancient poetry, texts containing polyphones, etc. The text format to be tested may be a complex sentence mixed with Chinese and English, texts with different speech speeds, or paragraphs containing polyphones. The function to be tested is mainly used to evaluate whether speech can be accurately converted into text in different contexts and environments.
[0050] For translation testing scenarios, the languages involved may include Chinese, English, French and other languages, depending on the translation algorithm. The content types to be tested can be teaching materials, literary works or picture books. The text format to be tested can be short sentences, long paragraphs, or professional documents with terminology and complex structures. The function to be tested is to test whether the conversion between languages can be accurate and natural both offline and online.
[0051] In the oral assessment test scenario, the languages to be tested are usually Chinese and English, and the content types to be tested can include daily conversations or complex sentences. The text format to be tested can be Chinese word sentences or English word sentences. The function to be tested focuses on evaluating the user's pronunciation accuracy, fluency, and intonation changes in the voice, ensuring that the system can accurately evaluate the user's oral expression.
[0052] In the TTS synthesis test scenario, the language to be tested can be Chinese and / or English, and the content type to be tested can be sentences or text with numeric symbols, numbers and polyphones. The text format to be tested may be a complex long sentence or text with special symbols or grammatical structures. The function to be tested is mainly used to test whether the text can be converted into natural and coherent speech.
[0053] Once the test material type is determined, such as "long paragraphs in Chinese textbooks for translation", specific candidate test materials that meet the requirements are extracted from the resource library. Candidate printed materials are processed test data pre-stored in the resource library, which can be flexibly retrieved after classification and segmentation. According to the specific requirements of the test material type, suitable candidate printed materials are selected as the final candidate test materials.
[0054] Based on the above embodiment, the step of determining the candidate test material under the candidate test scenario from the candidate printed materials based on the test material type required by the candidate test scenario includes: Determining, from the candidate printed materials, a material printed material that belongs to the test material type required by the candidate test scenario; The content to be tested is determined from the source printed material, and the text line where the content to be tested is located is segmented from the source printed material to obtain the candidate test material.
[0055] Specifically, after determining the test material type, it is necessary to screen out the candidate printed materials that meet this type. This process is based on the specific requirements of the test scenario. For example, in the OCR test scenario, if the test material type is determined to be "standard printed text in Chinese textbooks", then the printed materials may include chapters or fragments of multiple Chinese textbooks. Through this step of screening, the pertinence and effectiveness of the test are optimized.
[0056] Next, identify the specific content to be tested from the identified source printed materials. The content to be tested refers to the portion of the text that requires specific operations in the test scenario, which may be a specific paragraph, sentence or word. For example, in a translation test scenario, the content to be tested may be a long paragraph in a Chinese textbook or a sentence with special meaning. In a speech recognition test, the content to be tested may be a fragment containing polyphones or complex phonetic structures. Through this step, the content in the source printed materials can be further accurately located to ensure that the test focuses on specific content.
[0057] Finally, based on the content to be tested, the text lines containing the content to be tested are segmented from the source printed material to obtain candidate test materials. Text lines refer to the specific lines corresponding to the content to be tested in the actual printed material. Each line of text is precisely segmented to ensure that they can be extracted separately for use in the test scenario. For example, in the OCR scenario, each line of the printed text is extracted to ensure that character recognition can be performed line by line; in the translation scenario, the text lines containing specific paragraphs are extracted for translation. Through this segmentation method, the system can process and operate each line of text more accurately to ensure the integrity and accuracy of the test material.
[0058] Through this precise screening, candidate test materials that meet the requirements of the test scenario are finally determined from a wide range of candidate printing materials, ensuring that the test can be carried out smoothly while meeting the requirements, thereby improving the accuracy and consistency of the test.
[0059] Based on the above embodiment, the determination of candidate test materials in each candidate test scenario further includes: In the case that the candidate printed material that belongs to the test material type required by the candidate test scenario does not exist, the candidate test material under the candidate test scenario is determined based on the supplementary electronic material.
[0060] Specifically, when the type of test material required for a certain test scenario cannot be found in the candidate printed material library, supplementary electronic materials can be used instead. The supplementary electronic material can be digital content from electronic documents, online resources, or databases, which is not limited in the embodiments of the present invention. This approach ensures that even if the required material cannot be found in the physical printed material library, suitable test content can still be obtained from other electronic resources. For example, in an OCR test scenario, if there are no Chinese teaching materials that meet the standards, electronic teaching materials, electronic journals, or related texts in online databases can be used as candidate test material sources.
[0061] In this way, the supplementary electronic materials fill the possible resource gaps in the printed material library, ensuring that each test scenario can obtain sufficient and required test materials, thereby avoiding the situation where the test process is affected by insufficient resources.
[0062] Based on the above embodiment, the candidate test scenarios include at least one of an optical character recognition test scenario, a speech recognition scenario, a translation scenario, a spoken language evaluation scenario, and a speech synthesis scenario.
[0063] Specifically, the embodiment of the present invention provides a plurality of candidate test scenarios, which cover a wide range of application fields and are intended to comprehensively test and evaluate different functions. Each test scenario corresponds to different technical requirements and functional verifications.
[0064] In the optical character recognition test scenario, the focus is on evaluating the optical character recognition function's ability to recognize and extract characters from printed text images. The test scenario may contain content such as different fonts, layouts, symbols, etc. to ensure that texts in various formats can be accurately recognized. The resource library contains printed texts in various formats and layouts, such as Chinese textbooks, English textbooks, or Chinese and English picture books. These resources are used to test character recognition capabilities in different layouts and complex formats.
[0065] In the speech recognition test scenario, the test scenario is mainly used to evaluate the ability to convert speech into text. The content covers speech input in different languages, dialects, and speech speeds, and may include mixed Chinese and English or polyphonic contexts to test the recognition effect under complex language conditions. Candidate test materials in the resource library may include materials such as mixed Chinese and English, polyphonic contexts, and ancient poems. These materials are used to test the ability of the speech recognition function to convert speech into text in a complex language environment.
[0066] In the translation test scenario, the test involves the translation ability between multiple languages. The test scenarios may include online translation, offline translation, textbook translation, and picture book translation, etc., mainly evaluating the accuracy and fluency of the translation, especially when dealing with complex grammar and terminology. The resource library stores multilingual text resources, such as textbooks, picture books, daily conversations, technical documents, etc. These materials provide support for testing the multilingual processing capabilities of the translation system, ensuring that the system can accurately convert languages in different contexts.
[0067] In the oral assessment test scenario, the accuracy and fluency of the user's pronunciation are mainly tested. The scenario involves Chinese and English words and sentences, and evaluates the oral assessment function's ability to judge the standardization of pronunciation and intonation changes. The resource library includes a corpus with standard pronunciation, covering vocabulary and sentence patterns in multiple languages such as Chinese and English, which is used to evaluate the accuracy, fluency and intonation changes of users' pronunciation.
[0068] In the speech synthesis test scenario, the test is about the ability to convert text into natural speech. The test scenario may contain sentences with numeric symbols, polyphones, and text with inflected tones to verify the naturalness and coherence of the speech output. The resource library may contain complex text with numeric symbols and polyphones to ensure that the test can generate natural and coherent output when converting text into speech.
[0069] The embodiment of the present invention also provides a testing method. Figure 2 It is a schematic diagram of the flow chart of the testing method provided by the present invention, such as Figure 2 As shown, the method includes: Step 210: Acquire a test database of a target test scenario, wherein the test database is determined based on the test database construction method as described in any one of the above items.
[0070] Specifically, the test database is generated based on the aforementioned construction method to ensure that it covers the test materials corresponding to the specific test scenarios. Through the early resource library construction and test material screening, the data in the test database is strictly screened, segmented and systematically stored. Whether it is optical character recognition, speech recognition, translation, oral evaluation, or speech synthesis test scenarios, the test database has the test materials required for the corresponding scenarios, ensuring the comprehensiveness and accuracy of the test data, thereby providing a stable data foundation for the test.
[0071] Step 220: Perform a test based on the test database to obtain a test result.
[0072] The main purpose of the test is to conduct a comprehensive evaluation of different functions by calling the test materials in the constructed test database and verify the performance of each function in various scenarios.
[0073] Specifically, in the OCR test scenario, the test is mainly based on Chinese textbooks, English textbooks, Chinese and English picture books, etc. in the test database to verify the product's ability to recognize and extract characters; in the speech recognition test scenario, the test is mainly based on mixed Chinese and English voices, ancient poems, texts containing polyphones, etc. to verify the product's speech-to-text capabilities for different languages and complex contexts; in the translation test scenario, the test is mainly based on textbooks and picture books in different languages to verify the accuracy of the product's language conversion of multilingual texts in offline and online translation scenarios; in the oral assessment test scenario, the test is based on Chinese and English word sentences, and the standardization and fluency of pronunciation are evaluated by comparing standard voice and user voice; in the TTS test scenario, the test is based on sentences containing digital symbols, polyphones and tone-shifted texts to test the product's ability to convert text into natural speech.
[0074] The test method provided by the embodiment of the present invention ensures that the data used in each test meets the standard by finely screening and segmenting the data in the test database, thereby avoiding test errors caused by data differences. This method reduces human intervention, makes the test process more automated and efficient, and ensures the accuracy and stability of the test results. In addition, the standardized database makes each test result have good comparability, providing a more accurate basis for system optimization.
[0075] Figure 3 FIG. 2 is a flow chart of the method for constructing a test database provided by the present invention. Figure 3 As shown in the figure, in the process of building the test database, the test plan design is first required, that is, designing test plans suitable for various scenarios according to specific test requirements to ensure that the test can cover all functional modules. During the design of the test plan, the test plan review will be conducted to ensure the feasibility and accuracy of the plan. At the same time, the test plan needs to be optimized and the plan needs to be appropriately adjusted to better meet the test objectives.
[0076] Next is the resource preparation process. The main task of this stage is to collect, organize and confirm the resource materials required for testing. Resource preparation may include various types of materials, such as paper printed resources, electronic documents or voice files. The prepared resources need to ensure that they meet the test requirements and provide basic data support for subsequent processing and storage. If the existing resources in the resource library cannot fully meet the test requirements, they may need to be supplemented and expanded.
[0077] For paper printed resources, the next step is resource processing. In this stage, paper resources are processed in detail according to the layout of text lines to ensure that each line of text is properly segmented. Subsequently, all processed texts in the same scenario are organized and stored in a centralized manner, making full preparations for the subsequent database construction work.
[0078] If the collected resources are not paper printed materials, resource design is required. The purpose of resource design is to customize or supplement resources according to test requirements. This may include designing new candidate test materials according to test functions, or printing electronic files into paper printed materials. Resource design ensures that even if the existing resources are not sufficient, new resources can be generated through manual design or expansion and supplementation to meet the test requirements.
[0079] After resource processing or design, the database establishment phase begins. All organized and confirmed test materials will be systematically stored in a unified database. Next, the database is constructed based on the stored resources to establish a test database to ensure that subsequent test scenarios can directly call these pre-processed or designed resource materials to support the implementation of different test functions. Based on the data in the database, data sets can be constructed. This step further classifies, integrates, and groups test materials to form test data sets specifically suitable for each test scenario.
[0080] This process ensures the systematic management of test materials, especially through the establishment of databases and the construction of data sets, it provides normalized and standardized test data, greatly improving the efficiency of the test process and the consistency of data.
[0081] The following is a description of a test database construction device provided by the present invention. The test database construction device described below and the test database construction method described above can be referred to each other.
[0082] Figure 4 Schematic diagram of the structure of the test database construction device provided by the present invention, such as Figure 4 As shown, the device comprises: The scene determination unit 410 is used to determine a target test scene.
[0083] The material extraction unit 420 is used to extract the test material under the target test scenario from the resource library as the target test material. The resource library includes candidate test materials under each candidate test scenario. The candidate test material is a printed material obtained by segmenting in units of text lines.
[0084] The database construction unit 430 is used to sort the target test materials based on the test sequence under the target test scenario to obtain a test database for the target test scenario.
[0085] The test database construction device provided by the embodiment of the present invention determines the target test material according to the specific test scenario, significantly reduces the time cost and labor cost of collecting and organizing test data, and avoids repeated manual operations. The construction of the test database ensures the uniformity and accuracy of the test data and effectively guarantees the consistency and reliability of the test results. This not only improves the test efficiency, but also provides a more reliable basis for product performance evaluation.
[0086] Based on any of the above embodiments, the material extraction unit is specifically used for: Determine the type of test material required for the candidate test scenario based on at least one of the language to be tested, the type of content to be tested, the text format to be tested, and the function to be tested in the candidate test scenario; Based on the test material type required for the candidate test scenario, candidate test materials for the candidate test scenario are determined from candidate printed materials.
[0087] Determining, from the candidate printed materials, a material printed material that belongs to the test material type required by the candidate test scenario; The content to be tested is determined from the source printed material, and the text line where the content to be tested is located is segmented from the source printed material to obtain the candidate test material.
[0088] In the case that the candidate printed material that belongs to the test material type required by the candidate test scenario does not exist, the candidate test material under the candidate test scenario is determined based on the supplementary electronic material.
[0089] The candidate test scenarios include at least one of an optical character recognition test scenario, a speech recognition scenario, a translation scenario, a spoken language evaluation scenario, and a speech synthesis scenario.
[0090] The embodiment of the present invention also provides a testing device. Figure 5 It is a structural schematic diagram of the testing device provided by the present invention, such as Figure 5 As shown, the device comprises: The acquiring unit 510 acquires a test database of a target test scenario, where the test database is determined based on the test database construction method as described in any one of the above items.
[0091] The testing unit 520 is used to perform a test based on the test database to obtain a test result.
[0092] The test device provided by the embodiment of the present invention ensures that the data used in each test meets the standard by finely screening and segmenting the data in the test database, thereby avoiding test errors caused by data differences. This method reduces human intervention, makes the test process more automated and efficient, and ensures the accuracy and stability of the test results. In addition, the standardized database makes each test result have good comparability, providing a more accurate basis for system optimization.
[0093] Figure 6 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 6 As shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630 and a communication bus 640, wherein the processor 610, the communication interface 620 and the memory 630 communicate with each other through the communication bus 640. The processor 610 may call the logic instructions in the memory 630 to execute the construction method or the test method of the test database, and the construction method of the test database includes: Identify target test scenarios; Extracting the test material under the target test scenario from a resource library as the target test material, wherein the resource library includes candidate test materials under each candidate test scenario, and the candidate test materials are printed materials obtained by segmenting in units of text lines; Based on the test sequence under the target test scenario, the target test materials are sorted to obtain a test database for the target test scenario.
[0094] Test methods include: Acquire a test database of a target test scenario, wherein the test database is determined based on the test database construction method described in any one of the above items; A test is performed based on the test database to obtain a test result.
[0095] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention, or the part that contributes to the relevant technology or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0096] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program 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 test database construction method or test method provided by the above methods, the test database construction method includes: Identify target test scenarios; Extracting the test material under the target test scenario from a resource library as the target test material, wherein the resource library includes candidate test materials under each candidate test scenario, and the candidate test materials are printed materials obtained by segmenting in units of text lines; Based on the test sequence under the target test scenario, the target test materials are sorted to obtain a test database for the target test scenario.
[0097] Test methods include: Acquire a test database of a target test scenario, wherein the test database is determined based on the test database construction method described in any one of the above items; A test is performed based on the test database to obtain a test result.
[0098] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the test database construction method or the test method provided by the above methods is implemented, and the test database construction method includes: Identify target test scenarios; Extracting the test material under the target test scenario from a resource library as the target test material, wherein the resource library includes candidate test materials under each candidate test scenario, and the candidate test materials are printed materials obtained by segmenting in units of text lines; Based on the test sequence under the target test scenario, the target test materials are sorted to obtain a test database for the target test scenario.
[0099] Test methods include: Acquire a test database of a target test scenario, wherein the test database is determined based on the test database construction method described in any one of the above items; A test is performed based on the test database to obtain a test result.
[0100] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0101] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiment.
[0102] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for constructing a test database, characterized in that: include: Identify target test scenarios; Extracting the test material under the target test scenario from a resource library as the target test material, wherein the resource library includes candidate test materials under each candidate test scenario, and the candidate test materials are printed materials obtained by segmenting in units of text lines; Based on the test sequence under the target test scenario, the target test materials are sorted to obtain a test database for the target test scenario.
2. The method for constructing a test database according to claim 1, characterized in that: The determination of the candidate test materials under each candidate test scenario includes: Determine the type of test material required for the candidate test scenario based on at least one of the language to be tested, the content type to be tested, the text format to be tested, and the function to be tested in the candidate test scenario; Based on the test material type required for the candidate test scenario, candidate test materials for the candidate test scenario are determined from candidate printed materials.
3. The method for constructing a test database according to claim 2, characterized in that: The step of determining the candidate test material under the candidate test scenario from the candidate printed materials based on the test material type required by the candidate test scenario includes: Determining, from the candidate printed materials, a material printed material that belongs to the test material type required by the candidate test scenario; The content to be tested is determined from the source printed material, and the text line where the content to be tested is located is segmented from the source printed material to obtain the candidate test material.
4. The method for constructing a test database according to claim 2, characterized in that: The determination of candidate test materials under each candidate test scenario further includes: In the case that the candidate printed material that belongs to the test material type required by the candidate test scenario does not exist, the candidate test material under the candidate test scenario is determined based on the supplementary electronic material.
5. The method for constructing a test database according to any one of claims 1 to 4, characterized in that: The candidate test scenarios include at least one of an optical character recognition test scenario, a speech recognition scenario, a translation scenario, a spoken language evaluation scenario, and a speech synthesis scenario.
6. A testing method, characterized in that: include: Acquire a test database of a target test scenario, wherein the test database is determined based on the test database construction method according to any one of claims 1 to 5; A test is performed based on the test database to obtain a test result.
7. A device for constructing a test database, characterized in that: include: A scene determination unit, used for determining a target test scene; A material extraction unit, used to extract the test material under the target test scenario from a resource library as the target test material, wherein the resource library includes candidate test materials under each candidate test scenario, and the candidate test materials are printed materials obtained by segmenting in units of text lines; The database construction unit is used to sort the target test materials based on the test sequence under the target test scenario to obtain a test database for the target test scenario.
8. A testing device, characterized in that: include: An acquisition unit, configured to acquire a test database of a target test scenario, wherein the test database is determined based on the test database construction method according to any one of claims 1 to 5; The testing unit is used to perform testing based on the testing database to obtain test results.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method for constructing a test database as described in any one of claims 1 to 5, or the testing method as described in claim 6 is implemented.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for constructing a test database according to any one of claims 1 to 5 or the testing method according to claim 6 is implemented.
11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for constructing a test database according to any one of claims 1 to 5 or the testing method according to claim 6 is implemented.
