Earphone test method and device, electronic equipment and storage medium

By comparing the operation logs in the headphone test cases, identifying and updating redundant operations, the problem of repeated operations in the headphone test is solved and the testing efficiency is improved.

CN118900393APending Publication Date: 2024-11-05SHENZHEN PHICOUSTIC SYST DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410937668.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-12
Publication Date
2024-11-05

AI Technical Summary

Technical Problem

There is a problem of repeated test operations in headphone testing, which increases the test duration and reduces efficiency.

Method used

By obtaining the headset's test cases and preset operation log mapping tables, comparing the operation logs in different test cases, identifying redundant operations and updating them, reducing duplicate operations and improving testing efficiency.

Benefits of technology

It effectively reduces the repetition of operation during headphone testing, shortens the test time, and improves the test efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118900393A_ABST
    Figure CN118900393A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an earphone test method and device, electronic equipment and a storage medium, and belongs to the technical field of artificial intelligence. The method comprises the following steps: acquiring a first test case of an earphone; based on the first test case and a preset operation log mapping table, testing the earphone to obtain a test log; in response to an earphone test request carrying a second test case sent by the test client, determining a second operation log of the earphone based on the second test case and the operation log mapping table; comparing the second operation log with the first operation log to obtain a log comparison result; if the log comparison result shows that the second operation log is the same as the first operation log, updating the second test case based on the second operation log to obtain the current test operation; and testing the earphone based on the current test operation. According to the embodiment of the invention, the earphone testing efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a headphone testing method and device, an electronic device, and a storage medium. Background Art

[0002] At present, headphone testing usually relies on manually written test cases. However, when different types of tests are performed on the headphones according to the test cases, the problem of repeated test operations is prone to occur. For example, the headphones need to be turned on and off when performing a functional test on the headphones, and the headphones also need to be turned on and off when performing a smoke test on the headphones. If the headphones have been turned on and off in the functional test phase of the headphones, and then the headphones are turned on and off in the smoke test phase of the headphones, the test time of the headphones will increase, resulting in a decrease in the test efficiency of the headphones. Therefore, how to improve the test efficiency of the headphones has become a technical problem that needs to be solved urgently. Summary of the invention

[0003] The main purpose of the embodiments of the present application is to provide a headphone testing method and device, an electronic device and a storage medium, aiming to improve the testing efficiency of the headphone.

[0004] To achieve the above-mentioned purpose, a first aspect of an embodiment of the present application proposes a headset testing method, which is applied to a testing server, and the method includes:

[0005] Get the first test case of the headset;

[0006] Based on the first test case and a preset operation log mapping table, the headset is tested to obtain a test log, wherein the test log includes a first operation log;

[0007] In response to a headset test request carrying a second test case sent by a test client, determining a second operation log of the headset based on the second test case and the operation log mapping table, wherein the second test case includes an actual test operation;

[0008] performing a log comparison on the second operation log and the first operation log to obtain a log comparison result, wherein the log comparison result indicates whether the second operation log is the same as or different from the first operation log;

[0009] If the log comparison result indicates that the second operation log is the same as the first operation log, then based on the second operation log, the actual test operation is updated to obtain a current test operation;

[0010] The headset is tested based on the current test operation.

[0011] In some embodiments, before testing the headset based on the first test case and the preset operation log mapping table to obtain the test log, the method further includes:

[0012] Acquire an overall test case of the headset, wherein the overall test case includes the first test case and the second test case, and the overall test case includes an overall test operation;

[0013] Based on the overall test operation, writing an earphone operation log, wherein the earphone operation log is used to characterize the overall test operation performed by the earphone;

[0014] Based on the overall test operation and the headset operation log, the operation log mapping table is generated.

[0015] In some embodiments, the testing the headset based on the first test case and a preset operation log mapping table to obtain a test log includes:

[0016] Performing semantic analysis on the first test case to obtain a first test operation;

[0017] Based on the operation log mapping table and the first test operation, generate the first operation log;

[0018] Based on the first test operation, testing the headset to obtain test data;

[0019] The first operation log is bound to the test data to obtain the test log.

[0020] In some embodiments, performing semantic analysis on the first test case to obtain a first test operation includes:

[0021] Performing part-of-speech tagging on the first test case to obtain the part-of-speech of the phrase;

[0022] Based on the part of speech of the phrase, performing dependency grammar parsing on the first test case to obtain sentence dependency relations;

[0023] Based on the phrase part of speech and the sentence dependency, keywords are extracted from the first test case to obtain the first test operation.

[0024] In some embodiments, comparing the second operation log with the first operation log to obtain a log comparison result includes:

[0025] Obtaining a first log format of the first operation log and a second log format of the second operation log;

[0026] Traversing the first log format, and querying whether there is a target log format that is the same as the second log format in the first log format;

[0027] If the target log format does not exist, generating difference characterization data, and performing data encapsulation on the difference characterization data to obtain the log comparison result, wherein the difference characterization data is used to characterize that the second operation log is different from the first operation log;

[0028] If the target log format exists, identical characterization data is generated, and data encapsulation is performed on the identical characterization data to obtain the log comparison result, wherein the identical characterization data is used to characterize that the second operation log is identical to the first operation log.

[0029] In some embodiments, if the log comparison result indicates that the second operation log is the same as the first operation log, then based on the second operation log, the actual test operation is updated to obtain the current test operation, including:

[0030] When the log comparison result indicates that the second operation log is the same as the first operation log, based on the second operation log, filtering out the redundant operation from the actual test operation, wherein the redundant operation is used to characterize the actual test operation matching the second operation log;

[0031] The redundant operations in the actual test operations are deleted to obtain the current test operations.

[0032] In some embodiments, after testing the headset based on the current test operation, the method further includes:

[0033] storing a current test log obtained by the headset based on the test performed by the current test operation to obtain a stored test log;

[0034] Based on the target test log, the test log and a preset third test case, the headset is tested to obtain a target test log.

[0035] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application provides an earphone testing device, the device comprising:

[0036] A test case acquisition module, used to acquire a first test case of the headset;

[0037] a test log generating module, configured to test the headset based on the first test case and a preset operation log mapping table to obtain a test log, wherein the test log includes a first operation log;

[0038] an operation log generating module, configured to respond to a headset test request carrying a second test case sent by a test client, and determine a second operation log of the headset based on the second test case and the operation log mapping table, wherein the second test case includes an actual test operation;

[0039] a log matching module, configured to perform a log comparison on the second operation log and the first operation log to obtain a log comparison result, wherein the log comparison result indicates whether the second operation log is the same as or different from the first operation log;

[0040] A test operation updating module, configured to update the actual test operation based on the second operation log to obtain a current test operation if the log comparison result indicates that the second operation log is the same as the first operation log;

[0041] The earphone testing module is used to test the earphone based on the current testing operation.

[0042] To achieve the above objectives, a third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in the first aspect is implemented.

[0043] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.

[0044] The headset testing method and device, electronic device and storage medium proposed in the present application test the headset according to a first test case of the headset and a preset operation log mapping table to obtain a test log containing the first operation log, and then determine the second operation log of the headset according to a second test case in the received headset test request and the above operation log mapping table, and obtain a log comparison result indicating whether the second operation log is the same as or different from the first operation log by comparing the second operation log with the first operation log, so as to clarify whether there is an operation in the second test case that is the same as that in the first test case; if the log comparison result indicates that the second operation log is the same as the first operation log, then the actual test operation is updated according to the second operation log to obtain the current test operation, and then the headset is tested according to the current test operation, thereby reducing the repetition of operations during the headset testing process, reducing the testing time of the headset, and improving the testing efficiency of the headset. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 is a flow chart of a headphone testing method provided in an embodiment of the present application;

[0046] Figure 2 is a flow chart of a headphone testing method provided by another embodiment of the present application;

[0047] Figure 3 yes Figure 1 Flow chart of step S102 in FIG.

[0048] Figure 4 yes Figure 3 Flow chart of step S301 in FIG.

[0049] Figure 5 yes Figure 1 Flow chart of step S104 in FIG.

[0050] Figure 6 yes Figure 1 Flow chart of step S105 in FIG.

[0051] Figure 7 is a flow chart of a headphone testing method provided by another embodiment of the present application;

[0052] Figure 8 is a structural schematic diagram of an earphone testing device provided in an embodiment of the present application;

[0053] Fig. 9 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0055] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0056] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0057] First, some nouns involved in this application are analyzed:

[0058] Artificial Intelligence (AI) is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. AI is a branch of computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Research in this field includes robots, language recognition, image recognition, natural language processing and expert systems. AI can simulate the information process of human consciousness and thinking. AI is also a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0059] Log: A log is a record or file that records events, activities, or information. In the computer field, logs usually refer to records generated by systems, applications, or services, which are used to track and record important information such as system operation status, error information, user activities, etc. By analyzing and reviewing logs, system administrators and developers can understand the operation status of the system, troubleshoot problems, monitor performance, and perform fault diagnosis and security audits. Logging is a very important part of system operation and troubleshooting.

[0060] At present, headphone testing usually relies on manually written test cases. However, when different types of tests are performed on the headphones according to the test cases, repeated test operations are prone to occur. For example, the headphones need to be turned on and off when performing a functional test on the headphones, and they also need to be turned on and off when performing a smoke test on the headphones. If the headphones have been turned on and off in the functional test phase of the headphones, and then the headphones are turned on and off in the smoke test phase of the headphones, the test time of the headphones will increase, resulting in a decrease in the test efficiency of the headphones. Therefore, how to improve the test efficiency of the headphones has become a technical problem that needs to be solved urgently.

[0061] Based on this, the embodiments of the present application provide a headphone testing method and device, an electronic device, and a storage medium, aiming to improve the testing efficiency of the headphone.

[0062] The earphone testing method and device, electronic device and storage medium provided in the embodiments of the present application are specifically described through the following embodiments. First, the earphone testing method in the embodiments of the present application is described.

[0063] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0064] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0065] The headphone testing method provided in the embodiment of the present application relates to the field of artificial intelligence technology. The headphone testing method provided in the embodiment of the present application can be applied to a terminal, can be applied to a server side, or can be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the headphone testing method, etc., but is not limited to the above forms.

[0066] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0067] Figure 1 is an optional flow chart of the headphone testing method provided in an embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S106.

[0068] Step S101, obtaining a first test case of the headset;

[0069] Step S102, testing the headset based on the first test case and a preset operation log mapping table to obtain a test log, wherein the test log includes the first operation log;

[0070] Step S103, in response to the headset test request carrying the second test case sent by the test client, determining the second operation log of the headset based on the second test case and the operation log mapping table, wherein the second test case includes the actual test operation;

[0071] Step S104, performing a log comparison between the second operation log and the first operation log to obtain a log comparison result, wherein the log comparison result indicates whether the second operation log is identical or different from the first operation log;

[0072] Step S105: if the log comparison result indicates that the second operation log is the same as the first operation log, then based on the second operation log, the actual test operation is updated to obtain the current test operation;

[0073] Step S106: testing the earphone based on the current test operation.

[0074] In steps S101 to S106 shown in the embodiment of the present application, the test server of the headset tests the headset according to the acquired first test case of the headset and the pre-set operation log mapping table, and obtains a test log containing the content of the first operation log. Secondly, when the test server receives the headset test request carrying the second test case sent by the test client, the second operation log of the headset is determined according to the second test case and the above-mentioned operation log mapping table, wherein the second operation log is used to characterize the actual test operation performed by the above-mentioned headset. Furthermore, after obtaining the second operation log of the above-mentioned headset, the second operation log is compared with the first operation log in the test log to obtain a log comparison result indicating that the second operation log is the same as the first operation log or the second operation log is different from the first operation log. Finally, when the log comparison result indicates that the second operation log is the same as the first operation log, the actual test operation is updated according to the second operation log of the above-mentioned headset to obtain the current test operation, and then the headset is tested according to the current test operation. Therefore, the present application tests the headset according to the first test case of the headset and the preset operation log mapping table to obtain a test log including the first operation log, and then determines the second operation log of the headset according to the second test case in the received headset test request and the above operation log mapping table, and obtains a log comparison result indicating whether the second operation log is the same as or different from the first operation log by comparing the second operation log with the first operation log, so that it can be clear whether there is an operation in the second test case that is the same as that in the first test case. If the log comparison result indicates that the second operation log is the same as the first operation log, the actual test operation is updated according to the second operation log to obtain the current test operation, and then the headset is tested according to the current test operation, thereby reducing the repetition of operations during the headset testing process, reducing the testing time of the headset, and improving the testing efficiency of the headset.

[0075] In an application scenario, taking the test of a Bluetooth headset as an example, the test types of the Bluetooth headset include functional testing, smoke testing, compatibility testing and other test items. Among them, when performing a functional test on the Bluetooth headset, it is necessary to turn the Bluetooth headset on and off to verify whether the on and off function of the headset is intact. When performing a smoke test on the Bluetooth headset, it is also necessary to turn the Bluetooth headset on and off to verify whether the on and off function of the headset is intact. Therefore, when the Bluetooth headset is subjected to a functional test and a smoke test at the same time, a functional test case is generated according to the content of the functional test, and the Bluetooth headset is tested according to the functional test case and a pre-set operation log mapping table. Perform a functional test to obtain a functional test log of the Bluetooth headset, wherein the functional test log includes a functional operation log of the Bluetooth headset. Further, according to the smoke test case in the smoke test and the above-mentioned operation log mapping table, determine the smoke operation log of the Bluetooth headset. Secondly, compare the smoke operation log with the functional operation log in the functional test log to determine whether the smoke operation log is the same as the functional operation log. If the smoke operation log is the same as the functional operation log, update the smoke test operation according to the smoke operation log to obtain the current smoke test operation, and then perform a smoke test on the Bluetooth headset according to the current smoke test operation.

[0076] In step S101 of some embodiments, the first test case may be the first test item in a complete test link of the headset. For example, in the order of the test items, the headset test link may include test links such as function test, sound quality test, and comfort test, wherein the first test case may be a function test. The first test case may be encapsulated in a first test request of the headset, so the test server may obtain the first test case by parsing the received first test request.

[0077] In step S102 of some embodiments, the preset operation log mapping table may be a data table preset to characterize the mapping relationship between the test operation of the headset and the operation log. The first operation log refers to the operation log mapped in the operation log mapping table to the test operation included in the first test case. After obtaining the first test case of the headset, the first operation log can be obtained by querying the preset operation log mapping table, and then the headset is tested according to the first operation log to obtain the test log.

[0078] It should be noted that the preset operation log mapping table includes the operation log corresponding to any operation step in the earphone test link.

[0079] See also Figure 2 In some embodiments, before step S102, the headphone testing method may further include but is not limited to steps S201 to S203:

[0080] Step S201, obtaining an overall test case of the headset, wherein the overall test case includes a first test case and a second test case, and the overall test case includes an overall test operation;

[0081] Step S202, based on the overall test operation, writing an earphone operation log, wherein the earphone operation log is used to characterize the overall test operation performed by the earphone;

[0082] Step S203: Generate an operation log mapping table based on the overall test operation and the headset operation log.

[0083] In step S201 of some embodiments, the overall test case may be a set of test items of the headset. The overall test operation may be a set of operations in the test items of the headset. By merging the manually written test cases of the headset test, an overall test case including the overall test operation can be obtained.

[0084] In step S202 of some embodiments, after the overall test operation of the headset is determined, the headset operation logs are written one by one according to the overall test operation, wherein the log formats of the headset operation logs for each test operation in the overall test operation are different. It should be noted that the log writing for each test operation in the overall test operation can be achieved by embedding a log generation module in the headset.

[0085] In step S203 of some embodiments, after determining the earphone operation log of each test operation in the overall test operation, the test operation in the overall test operation is bound to the earphone operation log of the test operation to obtain an operation log mapping table for characterizing the mapping relationship between the test operation and the operation log.

[0086] In steps S201 to S203 shown in this embodiment, by writing the earphone operation log of each operation in the overall test case and generating an operation log mapping table, the operation log of each operation in the earphone test link can be clarified, so as to determine whether repeated operations occur according to the operation log.

[0087] It should be noted that after the operation log mapping table is set, the headset is tested according to the first test case and the operation log mapping table, and a test log including the first operation log can be obtained.

[0088] See also Figure 3 In some embodiments, step S102 may include but is not limited to steps S301 to S304:

[0089] Step S301, performing semantic analysis on a first test case to obtain a first test operation;

[0090] Step S302, generating a first operation log based on the operation log mapping table and the first test operation;

[0091] Step S303, based on the first test operation, testing the headset to obtain test data;

[0092] Step S304: Bind the first operation log with the test data to obtain a test log.

[0093] In step S301 of some embodiments, by using a language analysis model to perform semantic analysis on the sentences in the first test case, keywords representing the first test operation can be extracted. It should be noted that the language analysis model can be a BERT model, a GPT model, or other models.

[0094] See also Figure 4 In some embodiments, step S301 may include but is not limited to steps S401 to S403:

[0095] Step S401, performing part-of-speech tagging on the first test case to obtain the part-of-speech of the phrase;

[0096] Step S402, performing dependency grammar analysis on the first test case based on the phrase part of speech to obtain sentence dependency relations;

[0097] Step S403: extract keywords from the first test case based on the phrase part of speech and sentence dependency to obtain a first test operation.

[0098] In step S401 of some embodiments, the part of speech of a phrase may be the grammatical role played by the phrase in the first test case or the part of speech represented, such as verb, adjective, adverb, etc. The trained language model may be used to annotate the part of speech represented by each phrase or word in the first test case to obtain the part of speech of the phrase.

[0099] In step S402 of some embodiments, after obtaining the part of speech of each phrase or word in the first test case, a grammatical analysis is performed on the sentences in the first test case based on the part of speech of the phrase using a trained language model to determine the dependency relationship between each sentence in the first test case and obtain the sentence dependency relationship.

[0100] In step S403 of some embodiments, after obtaining the phrase part of speech and sentence dependency in the first test case, keywords representing the operation can be extracted from the first test case by keyword extraction methods such as TF-IDF and TextRank to obtain the first test operation.

[0101] In steps S401 to S403 shown in the present embodiment, the phrases in the first test case are tagged with parts of speech to obtain the phrase parts of speech, and the sentences in the first test case are subjected to dependency grammar parsing to obtain sentence dependencies, and then the first test operation is extracted from the first test case based on the phrase parts of speech and the sentence dependencies, thereby improving the accuracy of extracting test operations from the test case.

[0102] In step S302 of some embodiments, according to the first test operation in the first test case, the operation log mapping table is queried to obtain the earphone operation log corresponding to the first test operation, that is, the first operation log.

[0103] In step S303 of some embodiments, the headset is tested step by step according to the first test operation in the first test case to obtain test data of the first test operation. For example, the first test operation includes a power-on operation, a play operation, and a power-off operation. When the headset is powered on, the test data of the power-on operation can be obtained. The test data is used to indicate that the power-on operation of the headset is successful or that the power-on operation of the headset fails.

[0104] In step S304 of some embodiments, after obtaining the test data of each first test operation, the test data of the headset is bound to the first operation log of the test data to obtain a test log.

[0105] In steps S301 to S304 shown in the present embodiment, a semantic analysis is performed on the first test case to obtain a first test operation, a first operation log is generated based on the first test operation in the first test case and the operation log mapping table, and then the headset is tested based on the first test operation to obtain test data. Finally, the first operation log is bound to the test data of the first operation log to obtain a test log, which can accurately record each operation step and test data in the headset testing process, and is convenient for subsequent analysis and review of the testing process of the headset. In addition, by generating an operation log for each first test operation in the first test case, a log expression of each first test operation can be obtained, which is convenient for finding the same test operation in the subsequent headset testing process, thereby improving the testing efficiency of the headset.

[0106] In step S103 of some embodiments, the second test case may be a test item after the first test item in a complete test link of the headset. After the headset completes the test of the first test case, the test client sends a headset test request carrying the second test case to the test server. After receiving the headset test request, the test server determines the second operation log of the headset according to the actual test operation in the second test case and the above-mentioned operation log mapping table, wherein the actual test operation can be obtained by performing semantic analysis on the second test case.

[0107] In step S104 of some embodiments, after obtaining the second operation log of the second test case, the second operation log is compared with the first operation log in the test log to obtain a log comparison result indicating whether the second operation log is the same as or different from the first operation log.

[0108] See also Figure 5 In some embodiments, step S104 may include but is not limited to steps S501 to S504:

[0109] Step S501, obtaining a first log format of a first operation log and a second log format of a second operation log;

[0110] Step S502, traverse the first log format, and query whether there is a target log format that is the same as the second log format in the first log format;

[0111] Step S503: if the target log format does not exist, then generating difference characterization data, and performing data encapsulation on the difference characterization data to obtain a log comparison result, wherein the difference characterization data is used to characterize that the second operation log is different from the first operation log;

[0112] Step S504: if the target log format exists, identical characterization data is generated, and data encapsulation is performed on the identical characterization data to obtain a log comparison result, wherein the identical characterization data is used to characterize that the second operation log is identical to the first operation log.

[0113] In step S501 of some embodiments, the first log format refers to the log format of the first operation log, wherein the log format refers to the specific format specification adopted when recording log information, and the log format generally includes elements such as timestamp, log level, log source, and log content. The first log format refers to the log format of the second operation log. The first log format is determined by extracting elements such as timestamp, log level, log source, and log content from the first operation log, and the second log format is determined by extracting elements such as timestamp, log level, log source, and log content from the second operation log.

[0114] In step S502 of some embodiments, by checking and recording the content of each first log format, it is queried whether there is a target log format in the first log format that is the same as the second log format. It should be noted that when determining whether the first log format is the same as the second log format, it is not necessary to determine whether the timestamps of the first log format and the second log format are the same.

[0115] In step S503 of some embodiments, when a target log format that is identical to the second log format in the first log format does not exist, difference characterization data representing that the second operation log is different from the first operation log is generated, and further, the difference characterization data is encapsulated to obtain a log comparison result.

[0116] In step S504 of some embodiments, when a target log format identical to the second log format exists in the first log format, identical characterization data representing that the second operation log is identical to the first operation log is generated, and further, data encapsulation is performed on the identical characterization data to obtain a log comparison result.

[0117] In steps S501 to S504 shown in this embodiment, by comparing the first log format of the first operation log with the second log format of the second operation log one by one, it is possible to accurately determine whether the second operation log is the same as the first operation log, thereby improving the accuracy of deleting redundant operations in the headphone test.

[0118] In step S105 of some embodiments, when the log comparison result indicates that the second operation log is the same as the first operation log, redundant operations in the actual test operation are determined based on the second operation log, thereby deleting redundant operations of the actual test operation to obtain an updated current test operation.

[0119] See also Figure 6 In some embodiments, step S105 may include but is not limited to steps S601 to S602:

[0120] Step S601: When the log comparison result indicates that the second operation log is the same as the first operation log, redundant operations are screened out from the actual test operations based on the second operation log, wherein the redundant operations are used to characterize the actual test operations that match the second operation log;

[0121] Step S602, deleting redundant operations in the actual test operation to obtain the current test operation.

[0122] In step S601 of some embodiments, when the log comparison result indicates that the second operation log is the same as the first operation log, it indicates that the test operation corresponding to the second operation log in the operation log mapping table is the same as the test operation corresponding to the first operation log in the operation log mapping table, that is, the test operation of the second operation log has been processed when the headset is tested according to the first test case. Therefore, the test operation of the second operation log selected from the actual test operation of the second test case is a redundant operation in the actual test operation.

[0123] In step S602 of some embodiments, after redundant operations are screened out from actual test operations, the redundant operations are deleted from the actual test operations to obtain the current test operations, which can achieve the deletion of redundant operations in the headphone test link, thereby reducing the test time of the headphone and improving the test efficiency of the headphone.

[0124] In steps S601 to S602 shown in this embodiment, when the log comparison result indicates that the second operation log is the same as the first operation log, the test operation matched by the second operation log in the actual test operation is treated as a redundant operation, and the redundant operation is deleted to obtain the current test operation. This can achieve deletion of redundant operations in the headphone test link, thereby reducing the test time of the headphone and improving the test efficiency of the headphone.

[0125] It is important to know that when the log comparison result indicates that the second operation log is different from the first operation log, it means that there is no identical test operation between the actual test operation of the second test case and the first test operation of the first test case. Therefore, there is no need to delete the actual test operation of the second test case.

[0126] In step S106 of some embodiments, when the current test operation is obtained, the headset can be tested according to the current test operation to avoid repeated operations, thereby improving the testing efficiency of the headset.

[0127] Furthermore, in order to ensure that the operation logs of the second test case and the first test case can be used for operation log comparison items of subsequent test cases, after deleting redundant operations in the actual test operation, it is also necessary to test the headset according to the second test case to obtain the target test log for storage.

[0128] Specifically, see Figure 7 In some embodiments, after step S105, the headphone testing method further includes but is not limited to steps S701 to S702:

[0129] Step S701, storing a current test log obtained by a test performed by the headset based on a current test operation to obtain a stored test log;

[0130] Step S702: Testing the headset based on the target test log, the test log and a preset third test case to obtain the target test log.

[0131] In step S701 of some embodiments, after the current test operation is determined, the headset is tested according to the current test operation, and the current test log of the headset under the current test operation can be obtained. After obtaining the current test log, the current test log is stored to obtain a stored test log, which is convenient for subsequent analysis and evaluation of the headset test link and for using the target test log to screen out redundant operations in subsequent test cases. It should be noted that the storage database of the target test log can be the same as the storage database of the test log of the first test case, so that the test log can be extracted for log comparison during subsequent testing.

[0132] In step S702 of some embodiments, the preset third test case may be a test item after the second test case in a complete test session of the headset that is preset. When the test server completes the second test case for the headset, the headset is tested according to the stored test log, the test log and the third test case to obtain a target test log.

[0133] In step S701 to step S702 shown in this embodiment, by storing the test log of each test case, the efficiency of subsequent updating of the test operation of the test case can be improved, thereby improving the testing efficiency of the headset.

[0134] The present application tests the headset according to a first test case of the headset and a preset operation log mapping table to obtain a test log including the first operation log, and then determines the second operation log of the headset according to a second test case in a received headset test request and the operation log mapping table, and obtains a log comparison result indicating whether the second operation log is the same as or different from the first operation log by comparing the second operation log with the first operation log, so that it can be clear whether there is an operation in the second test case that is the same as that in the first test case; if the log comparison result indicates that the second operation log is the same as the first operation log, then the actual test operation is updated according to the second operation log to obtain the current test operation, and then the headset is tested according to the current test operation, thereby reducing the repetition of operations during the headset testing process, reducing the testing time of the headset, and improving the testing efficiency of the headset.

[0135] See also Figure 8 The embodiment of the present application further provides an earphone testing device, which can implement the above earphone testing method, and the device includes:

[0136] A test case acquisition module 801, used to acquire a first test case of the headset;

[0137] A test log generating module 802 is used to test the headset based on the first test case and a preset operation log mapping table to obtain a test log, wherein the test log includes a first operation log;

[0138] The operation log generating module 803 is used to determine the second operation log of the headset based on the second test case and the operation log mapping table in response to the headset test request carrying the second test case sent by the test client, wherein the second test case includes the actual test operation;

[0139] The log matching module 804 is used to compare the second operation log with the first operation log to obtain a log comparison result, wherein the log comparison result indicates whether the second operation log is the same as or different from the first operation log;

[0140] The test operation update module 805 is used to update the actual test operation based on the second operation log to obtain the current test operation if the log comparison result indicates that the second operation log is the same as the first operation log;

[0141] The earphone testing module 806 is used to test the earphone based on the current testing operation.

[0142] The specific implementation of the headphone testing device is substantially the same as the specific implementation of the headphone testing method described above, and will not be described in detail herein.

[0143] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned headphone testing method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.

[0144] See also Fig. 9 , Fig. 9 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:

[0145] The processor 901 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;

[0146] The memory 902 may be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 may store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 902, and the processor 901 calls and executes the headset testing method of the embodiment of this application;

[0147] Input / output interface 903, used to implement information input and output;

[0148] Communication interface 904, used to realize communication interaction between the device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WI FI, Bluetooth, etc.);

[0149] A bus 905 that transmits information between the various components of the device (e.g., the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);

[0150] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .

[0151] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned headphone testing method is implemented.

[0152] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0153] The earphone testing method, earphone testing device, electronic device and storage medium provided in the embodiments of the present application test the earphone according to a first test case of the earphone and a preset operation log mapping table to obtain a test log including the first operation log, and then determine the second operation log of the earphone according to a second test case in the received earphone test request and the operation log mapping table, and obtain a log comparison result indicating whether the second operation log is the same as or different from the first operation log by comparing the second operation log with the first operation log, so as to clarify whether there is the same operation in the second test case as in the first test case; if the log comparison result indicates that the second operation log is the same as the first operation log, then update the actual test operation according to the second operation log to obtain the current test operation, and then test the earphone according to the current test operation, thereby reducing the repetition of operations during the earphone testing process, reducing the testing time of the earphone, and improving the testing efficiency of the earphone.

[0154] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0155] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0156] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0157] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0158] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application 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 interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0159] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0160] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. The mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0161] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0162] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0163] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or 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 multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0164] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.

Claims

1. A headphone testing method, characterized in that: Applied to the test server, the method includes: Get the first test case of the headset; Based on the first test case and a preset operation log mapping table, the headset is tested to obtain a test log, wherein the test log includes a first operation log; In response to a headset test request carrying a second test case sent by a test client, determining a second operation log of the headset based on the second test case and the operation log mapping table, wherein the second test case includes an actual test operation; performing a log comparison on the second operation log and the first operation log to obtain a log comparison result, wherein the log comparison result indicates whether the second operation log is the same as or different from the first operation log; If the log comparison result indicates that the second operation log is the same as the first operation log, then based on the second operation log, the actual test operation is updated to obtain a current test operation; The headset is tested based on the current test operation.

2. The method according to claim 1, characterized in that Before testing the headset based on the first test case and the preset operation log mapping table to obtain the test log, the method further includes: Acquire an overall test case of the headset, wherein the overall test case includes the first test case and the second test case, and the overall test case includes an overall test operation; Based on the overall test operation, writing an earphone operation log, wherein the earphone operation log is used to characterize the overall test operation performed by the earphone; Based on the overall test operation and the headset operation log, the operation log mapping table is generated.

3. The method according to claim 1, characterized in that The testing of the headset based on the first test case and the preset operation log mapping table to obtain a test log includes: Performing semantic analysis on the first test case to obtain a first test operation; Based on the operation log mapping table and the first test operation, generate the first operation log; Based on the first test operation, testing the headset to obtain test data; The first operation log is bound to the test data to obtain the test log.

4. The method according to claim 3, characterized in that The performing semantic analysis on the first test case to obtain a first test operation includes: Performing part-of-speech tagging on the first test case to obtain the part-of-speech of the phrase; Based on the part of speech of the phrase, performing dependency grammar parsing on the first test case to obtain sentence dependency relations; Based on the phrase part of speech and the sentence dependency, keywords are extracted from the first test case to obtain the first test operation.

5. The method according to claim 1, characterized in that The comparing the second operation log with the first operation log to obtain a log comparison result includes: Obtaining a first log format of the first operation log and a second log format of the second operation log; Traversing the first log format, and querying whether there is a target log format that is the same as the second log format in the first log format; If the target log format does not exist, generating difference characterization data, and performing data encapsulation on the difference characterization data to obtain the log comparison result, wherein the difference characterization data is used to characterize that the second operation log is different from the first operation log; If the target log format exists, identical characterization data is generated, and data encapsulation is performed on the identical characterization data to obtain the log comparison result, wherein the identical characterization data is used to characterize that the second operation log is identical to the first operation log.

6. The method according to any one of claims 1 to 5, characterized in that: If the log comparison result indicates that the second operation log is the same as the first operation log, then based on the second operation log, the actual test operation is updated to obtain the current test operation, including: When the log comparison result indicates that the second operation log is the same as the first operation log, based on the second operation log, filtering out the redundant operation from the actual test operation, wherein the redundant operation is used to characterize the actual test operation matching the second operation log; The redundant operations in the actual test operations are deleted to obtain the current test operations.

7. The method according to any one of claims 1 to 5, characterized in that: After testing the headset based on the current test operation, the method further includes: storing a current test log obtained by the headset based on the test performed by the current test operation to obtain a stored test log; Based on the target test log, the test log and a preset third test case, the headset is tested to obtain a target test log.

8. An earphone testing device, characterized in that: The device comprises: A test case acquisition module, used to acquire a first test case of the headset; a test log generating module, configured to test the headset based on the first test case and a preset operation log mapping table to obtain a test log, wherein the test log includes a first operation log; an operation log generating module, configured to respond to a headset test request carrying a second test case sent by a test client, and determine a second operation log of the headset based on the second test case and the operation log mapping table, wherein the second test case includes an actual test operation; a log matching module, configured to perform a log comparison on the second operation log and the first operation log to obtain a log comparison result, wherein the log comparison result indicates whether the second operation log is the same as or different from the first operation log; A test operation updating module, configured to update the actual test operation based on the second operation log to obtain a current test operation if the log comparison result indicates that the second operation log is the same as the first operation log; The earphone testing module is used to test the earphone based on the current testing operation.

9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the earphone testing method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the earphone testing method according to any one of claims 1 to 7 is implemented.