Audio function detection method and device
Patent Information
- Application Number
- CN202110573730.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-25
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2041-05-25
AI Technical Summary
[0005]然而,智能设备在回收过程中往往无法安装应用程序,难以满足音频api的调用要求,而人工检测的工作量大且检测结果不稳定
[0036] The above-mentioned computer storage medium obtains the first running state of the audio device in the intelligent device to be detected according to the first audio running log of the intelligent device to be detected. When the first running state changes, it obtains the second audio running log of the intelligent device to be detected and obtains the second running state of the audio device according to the second audio running log. Finally, comparison data is obtained based on the first running state, the second running state and the preset running state, and the audio function state of the intelligent device to be detected is determined according to the comparison data. Based on this, a large amount of manual operations are not required, reducing the detection workload and detection time. Moreover, the audio function state of the intelligent device to be detected is determined according to the comparison data. Even in the case where an application program for calling the audio API cannot be installed, the audio function of the intelligent device to be detected can be accurately detected, providing a recycling reference for the intelligent device to be detected.
Smart Images

Figure CN113220648B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electronic products, and in particular to an audio function detection method and device. Background Art
[0002] With the advancement of electronic technology, a wide variety of smart devices, such as smartphones, laptops, and tablets, have emerged. When users use these smart devices, the primary means of interaction is through their screens. Therefore, the quality of smart device screens has a significant impact on the user experience. Currently, with the rapid development of the economy and technology, the popularity and replacement of smart devices are accelerating. For example, the advent of the 5G era has accelerated the replacement of smartphones. As smart devices evolve, effective recycling is one way to effectively utilize their residual value, reducing chemical pollution and waste.
[0003] During the recycling process, the quality of a smart device's audio function can impact its residual value. Generally, when recycling smart devices, the audio function is tested to ensure it's functioning properly. Audio malfunctions can severely impact the device's usability and, in turn, its residual value. Therefore, during the recycling process, audio testing is essential to provide a reference for valuation and reduce the risk of losses.
[0004] Traditionally, there are two main methods for testing the function of smart device audio. One is for professional quality inspectors to operate the device audio application after receiving the recycled mobile phone to observe the smart device's audio function to determine whether the smart device's audio function is abnormal. The other is to install a testing application on the mobile phone. Its detection mechanism is to call the audio API (Application Programming Interface) publicly available by the smart device manufacturer, and use the results returned by the audio API as the basis for judging whether the audio function is normal.
[0005] However, smart devices often cannot install applications during the recycling process, making it difficult to meet the requirements of calling audio APIs. Manual detection is labor-intensive and the detection results are unstable. Therefore, traditional methods for detecting whether the audio function of smart devices is normal still have some shortcomings. Summary of the Invention
[0006] Based on this, it is necessary to provide an audio function detection method and device to address the shortcomings of traditional methods for detecting whether the audio function of smart devices is normal.
[0007] A method for detecting audio function, comprising the steps of:
[0008] Obtaining the first audio operation log of the smart device to be detected;
[0009] Obtaining a first operating state of an audio device in the smart device to be detected according to the first audio operating log;
[0010] When a change in the first operating state is detected, obtaining a second audio operating log of the smart device to be detected, and obtaining a second operating state of the audio device according to the second audio operating log;
[0011] Obtaining comparison data according to the first operating state, the second operating state, and the preset operating state;
[0012] Based on the comparison data, the audio function status of the smart device to be tested is determined.
[0013] The above-mentioned audio function detection method obtains the first operating status of the audio device in the smart device to be detected based on the first audio operating log after obtaining the first audio operating log of the smart device to be detected. When the first operating status changes, the second audio operating log of the smart device to be detected is obtained, and the second operating status of the audio device is obtained based on the second audio operating log. Finally, comparison data is obtained based on the first operating status, the second operating status and the preset operating status, and the audio function status of the smart device to be detected is determined based on the comparison data. Based on this, there is no need for a large amount of manual operation, which reduces the detection workload and detection time. In addition, the audio function status of the smart device to be detected is determined based on the comparison data. In the case where the calling application of the audio API cannot be installed, the audio function of the smart device to be detected can also be accurately detected, providing a recycling reference for the smart device to be detected.
[0014] In one embodiment, the process of obtaining the first audio operation log of the smart device to be detected includes the steps of:
[0015] Obtain a first audio operation log of a smart device to be detected within a preset time period.
[0016] In one embodiment, the steps are further included:
[0017] When the data stream corresponding to the first audio operation log is empty, it is determined that the audio function status is unknown.
[0018] In one embodiment, the preset operating state includes a first sub-preset state and a second sub-preset state;
[0019] The process of obtaining comparison data according to the first operating state, the second operating state and the preset operating state includes the steps of:
[0020] Obtaining first sub-data according to a matching result between the first operating state and the first sub-preset state;
[0021] When the first operating state matches the first sub-preset state, obtaining second sub-data according to a matching result between the second operating state and the second sub-preset state;
[0022] Comparison data is determined based on the first sub-data and the second sub-data.
[0023] In one embodiment, the process of obtaining comparison data according to the first operating state, the second operating state, and the preset operating state further includes the steps of:
[0024] When the first operating state does not match the first sub-preset state, comparison data is determined according to the first sub-data.
[0025] In one embodiment, the process of determining the audio function status of the smart device to be detected based on the comparison data includes the steps of:
[0026] The audio function status of the smart device to be detected is determined based on the correspondence between the comparison data and the preset data.
[0027] In one embodiment, the audio function status includes unknown audio function status, normal audio function status, or abnormal audio function status.
[0028] An audio function detection device, comprising:
[0029] A first log acquisition module is used to acquire a first audio operation log of the smart device to be detected;
[0030] A first state determination module is configured to obtain a first operating state of an audio device in a to-be-detected smart device according to a first audio operation log;
[0031] A second state determination module is configured to obtain a second audio operation log of the smart device to be detected when a change in the first operation state is detected, and obtain a second operation state of the audio device according to the second audio operation log;
[0032] a comparison data determination module, configured to obtain comparison data according to the first operating state, the second operating state, and the preset operating state;
[0033] The function status determination module is used to determine the audio function status of the smart device to be detected based on the comparison data.
[0034] The above-mentioned audio function detection device obtains the first operating status of the audio device in the smart device to be detected based on the first audio operating log after obtaining the first audio operating log of the smart device to be detected. When the first operating status changes, the second audio operating log of the smart device to be detected is obtained, and the second operating status of the audio device is obtained based on the second audio operating log. Finally, comparison data is obtained based on the first operating status, the second operating status and the preset operating status, and the audio function status of the smart device to be detected is determined based on the comparison data. Based on this, there is no need for a large amount of manual operation, which reduces the detection workload and detection time. In addition, the audio function status of the smart device to be detected is determined based on the comparison data. In the case where the calling application of the audio API cannot be installed, the audio function of the smart device to be detected can also be accurately detected, providing a recycling reference for the smart device to be detected.
[0035] A computer storage medium stores computer instructions, which, when executed by a processor, implement the audio function detection method of any of the above embodiments.
[0036] The above-mentioned computer storage medium obtains the first operating state of the audio device in the smart device to be detected based on the first audio operating log after obtaining the first audio operating log of the smart device to be detected. When the first operating state changes, the second audio operating log of the smart device to be detected is obtained, and the second operating state of the audio device is obtained based on the second audio operating log. Finally, comparison data is obtained based on the first operating state, the second operating state and the preset operating state, and the audio function state of the smart device to be detected is determined based on the comparison data. Based on this, there is no need for a large amount of manual operation, which reduces the detection workload and detection time. In addition, the audio function state of the smart device to be detected is determined based on the comparison data. In the case where the calling application of the audio API cannot be installed, the audio function of the smart device to be detected can also be accurately detected, providing a recycling reference for the smart device to be detected.
[0037] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the audio function detection method of any of the above embodiments is implemented.
[0038] The above-mentioned computer device, after obtaining the first audio operation log of the smart device to be detected, obtains the first operation status of the audio device in the smart device to be detected based on the first audio operation log. When the first operation status changes, the computer device obtains the second audio operation log of the smart device to be detected, and obtains the second operation status of the audio device based on the second audio operation log. Finally, according to the first operation status, the second operation status and the preset operation status, comparison data is obtained, and the audio function status of the smart device to be detected is determined based on the comparison data. Based on this, there is no need for a large amount of manual operation, which reduces the detection workload and detection time. In addition, the audio function status of the smart device to be detected is determined based on the comparison data. In the case where the calling application of the audio API cannot be installed, the audio function of the smart device to be detected can also be accurately detected, providing a recycling reference for the smart device to be detected. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 This is a flow chart of an audio function detection method according to one embodiment;
[0040] Figure 2 A flow chart of an audio function detection method according to another embodiment;
[0041] Figure 3 This is a module structure diagram of an audio function detection device according to one embodiment;
[0042] Figure 4 A schematic diagram of the internal structure of a computer according to one embodiment. DETAILED DESCRIPTION
[0043] In order to better understand the purpose, technical solutions and technical effects of the present invention, the present invention is further explained below with reference to the accompanying drawings and embodiments. It is also stated that the embodiments described below are only used to illustrate the present invention and are not intended to limit the present invention.
[0044] During the recycling process of the smart device to be tested, the smart device to be tested can be recycled and tested through a self-service terminal or recycling machine. The self-service terminal or recycling machine can establish a data connection with the smart device to be tested through a wired connection or a wireless connection to obtain the corresponding data of the smart device to be tested or transmit the corresponding data to the smart device to be tested. At the same time, the self-service terminal or recycling machine can serve as a computing platform for hardware detection, or send data to a cloud server for calculation. Based on this, in the recycling detection of the self-service terminal or recycling machine, an audio function detection method is provided for the hardware detection of the smart device to be tested.
[0045] Figure 1 FIG. 1 is a flow chart of an audio function detection method according to an embodiment of the present invention, Figure 1As shown, the audio function detection method of one embodiment includes steps S100 to S104:
[0046] S100, obtaining a first audio operation log of the smart device to be detected;
[0047] When the audio device of the smart device to be tested is turned on, it can perform multiple operations, such as audio playback and volume adjustment. Each operation ends when the audio device is turned off. From the time the audio device is turned on to the time it is turned off, each operation constitutes a complete operation process, which includes multiple operating states. Depending on the characteristics of the audio device, there may be multiple related operating states, and determining the audio function status requires combining these related operating states.
[0048] In one embodiment, the user or a third-party automatic operation device can actively perform corresponding operations on the audio device according to corresponding prompts or instructions, such as turning the audio device on or off, adjusting the volume of the audio device, etc.
[0049] In one embodiment, the smart device to be tested includes an iOS device. A self-service terminal or recycling machine connects to the smart device via a USB data connection. The self-service terminal or recycling machine runs the usbmuxd daemon to establish a connection channel with the smart device to be tested, and communication is performed via this channel. After the connection channel is established, the self-service terminal or recycling machine launches the idevicesyslog log capture program to capture the system operation log of the smart device to be tested. The idevicesyslog program reads the operation log of the smart device to be tested and stores it in a log cache list to be analyzed. The system operation log includes the audio operation log of the smart device to be tested.
[0050] In one embodiment, Figure 2 FIG. 1 is a flow chart of an audio function detection method according to another embodiment of the present invention, Figure 2 As shown, the process of obtaining the first audio operation log of the smart device to be detected in step S100 includes step S200:
[0051] S200: Obtain a first audio operation log of a smart device to be detected within a preset time period.
[0052] In one embodiment, the preset time period can be adjusted based on the number of audio device operation stages or device type of the smart device to be detected. By determining the preset time period, the number of audio operation logs obtained is limited, reducing the subsequent data processing workload. As a preferred embodiment, the preset time period provides sufficient time to capture audio operation logs for each operation stage.
[0053] S101, obtaining a first operating status of an audio device in a to-be-detected smart device according to a first audio operating log;
[0054] The first audio operation log can be used to characterize the type of the audio device, and changes in the first audio operation log can be used to characterize changes in the operating state of the audio device. The first operating state of the audio device is determined based on the first audio operation log. For example, if the audio device is determined to be a speaker based on the first audio operation log, whether the audio device is playing is determined based on changes in the first audio operation log.
[0055] S102, when a change in the first operating state is detected, obtaining a second audio operating log of the smart device to be detected, and obtaining a second operating state of the audio device according to the second audio operating log;
[0056] When the first operating state changes, the second audio operating log is captured, otherwise the second audio operating log is not captured. In one embodiment, when the first operating state does not change, it is determined that the audio function state of the smart device to be detected is unknown.
[0057] S103, obtaining comparison data according to the first operating state, the second operating state, and the preset operating state;
[0058] When the second operating state is acquired, the first operating state has changed. The changed first operating state and the second operating state are compared with the preset operating state to obtain comparison data.
[0059] In one embodiment, the preset operating state includes a first sub-preset state and a second sub-preset state, such as Figure 2 As shown, the process of obtaining comparison data according to the first operating state, the second operating state and the preset operating state in step S102 includes steps S201 to S203:
[0060] S201, obtaining first sub-data according to a matching result between a first operating state and a first sub-preset state;
[0061] The first sub-data is differentiated according to the matching result to obtain different values.
[0062] S202, when the first operating state matches the first sub-preset state, obtaining second sub-data according to a matching result between the second operating state and the second sub-preset state;
[0063] The second sub-data is differentiated according to the matching result and assigned different values.
[0064] S203: Determine comparison data according to the first sub-data and the second sub-data.
[0065] The comparison data may be a combination of the first sub-data and the second sub-data, or a data processing result after the first sub-data and the second sub-data are substituted into a preset algorithm.
[0066] In one embodiment, Figure 2 As shown, the process of obtaining comparison data according to the first operating state, the second operating state and the preset operating state in step S102 further includes step S204:
[0067] S204 : When the first operating state does not match the first sub-preset state, determine comparison data according to the first sub-data.
[0068] When the first operating state does not match the first sub-preset state, no matching is performed on the second operating state, and only one sub-data is determined as comparison data.
[0069] S104: Determine the audio function status of the smart device to be detected based on the comparison data.
[0070] In one embodiment, the audio function status includes unknown audio function status, normal audio function status, or abnormal audio function status.
[0071] Among them, a mapping relationship between the data type and the audio function status can be pre-established according to the data type of the comparison data, and the audio function status corresponding to the comparison data can be determined according to the mapping relationship.
[0072] In one embodiment, Figure 2 As shown, the audio function detection method of another embodiment further includes step S205:
[0073] S205: When the data stream corresponding to the first audio operation log is empty, it is determined that the audio function status is unknown.
[0074] The audio function detection method of any of the above embodiments obtains the first audio operation log of the smart device to be detected, and obtains the first operation status of the audio device in the smart device to be detected according to the first audio operation log. When the first operation status changes, the second audio operation log of the smart device to be detected is obtained, and the second operation status of the audio device is obtained according to the second audio operation log. Finally, comparison data is obtained based on the first operation status, the second operation status and the preset operation status, and the audio function status of the smart device to be detected is determined based on the comparison data. Based on this, there is no need for a large amount of manual operation, which reduces the detection workload and detection time. In addition, the audio function status of the smart device to be detected is determined based on the comparison data. In the case where the calling application of the audio API cannot be installed, the audio function of the smart device to be detected can also be accurately detected, providing a recycling reference for the smart device to be detected.
[0075] The embodiment of the present invention also provides an audio function detection device.
[0076] Figure 3 FIG. 1 is a block diagram of an audio function detection device according to an embodiment of the present invention. Figure 3 As shown, an audio function detection device according to one embodiment includes modules 100, 101, 102, 103, and 104:
[0077] The first log acquisition module 100 is used to acquire a first audio operation log of the smart device to be detected;
[0078] A first state determination module 101 is configured to obtain a first operating state of an audio device in a to-be-detected smart device according to a first audio operation log;
[0079] The second state determination module 102 is configured to obtain a second audio operation log of the smart device to be detected when a change in the first operation state is detected, and obtain a second operation state of the audio device according to the second audio operation log;
[0080] A comparison data determination module 103 is configured to obtain comparison data according to the first operating state, the second operating state, and the preset operating state;
[0081] The function status determination module 104 is used to determine the audio function status of the smart device to be detected based on the comparison data.
[0082] The above-mentioned audio function detection device obtains the first operating status of the audio device in the smart device to be detected based on the first audio operating log after obtaining the first audio operating log of the smart device to be detected. When the first operating status changes, the second audio operating log of the smart device to be detected is obtained, and the second operating status of the audio device is obtained based on the second audio operating log. Finally, comparison data is obtained based on the first operating status, the second operating status and the preset operating status, and the audio function status of the smart device to be detected is determined based on the comparison data. Based on this, there is no need for a large amount of manual operation, which reduces the detection workload and detection time. In addition, the audio function status of the smart device to be detected is determined based on the comparison data. In the case where the calling application of the audio API cannot be installed, the audio function of the smart device to be detected can also be accurately detected, providing a recycling reference for the smart device to be detected.
[0083] An embodiment of the present invention further provides a computer storage medium storing computer instructions, which, when executed by a processor, implement the audio function detection method of any of the above embodiments.
[0084] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0085] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention, or the part that contributes to the relevant technology, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, terminal, or network device, etc.) to execute all or part of the methods of each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, RAM, ROM, magnetic disks or optical disks.
[0086] Corresponding to the above-mentioned computer storage medium, in one embodiment, a computer device is also provided, which includes a memory, a processor, and a computer program stored in the memory and runnable on the processor, wherein when the processor executes the program, it implements any one of the audio function detection methods in the above-mentioned embodiments.
[0087] The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 4As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, an audio function detection method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad provided on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0088] The above-mentioned computer device, after obtaining the first audio operation log of the smart device to be detected, obtains the first operation status of the audio device in the smart device to be detected based on the first audio operation log. When the first operation status changes, the computer device obtains the second audio operation log of the smart device to be detected, and obtains the second operation status of the audio device based on the second audio operation log. Finally, according to the first operation status, the second operation status and the preset operation status, comparison data is obtained, and the audio function status of the smart device to be detected is determined based on the comparison data. Based on this, there is no need for a large amount of manual operation, which reduces the detection workload and detection time. In addition, the audio function status of the smart device to be detected is determined based on the comparison data. In the case where the calling application of the audio API cannot be installed, the audio function of the smart device to be detected can also be accurately detected, providing a recycling reference for the smart device to be detected.
[0089] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0090] The above embodiments merely illustrate several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent. It should be noted that a person skilled in the art would be able to make various modifications and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present invention. Therefore, the scope of protection of the patent for this invention shall be determined by the appended claims.
Claims
1. A method for detecting audio function, characterized in that: Including steps: Obtaining the first audio operation log of the smart device to be detected; Obtaining a first operating status of an audio device in the smart device to be detected according to the first audio operating log; When a change in the first operating state is detected, obtaining a second audio operating log of the smart device to be detected, and obtaining a second operating state of the audio device according to the second audio operating log; Obtaining comparison data according to the first operating state, the second operating state, and a preset operating state; Determining the audio function status of the smart device to be detected based on the comparison data; The change of the first audio operation log is used to indicate the change of the operation state of the audio device, and whether the audio device is playing is determined according to the change of the first audio operation log; The audio function status includes unknown audio function status, normal audio function status or abnormal audio function status.
2. The audio function detection method according to claim 1, characterized in that The process of obtaining the first audio operation log of the smart device to be detected includes the following steps: Obtain a first audio operation log of the smart device to be detected within a preset time period.
3. The audio function detection method according to claim 1, characterized in that: Also includes the steps: When the data stream corresponding to the first audio operation log is empty, it is determined that the audio function status is unknown.
4. The audio function detection method according to claim 1, characterized in that: The preset operating state includes a first sub-preset state and a second sub-preset state; The process of obtaining comparison data according to the first operating state, the second operating state and the preset operating state includes the steps of: Obtaining first sub-data according to a matching result between the first operating state and the first sub-preset state; When the first operating state matches the first sub-preset state, obtaining second sub-data according to a matching result between the second operating state and the second sub-preset state; The comparison data is determined according to the first sub-data and the second sub-data.
5. The audio function detection method according to claim 4, characterized in that: The process of obtaining comparison data according to the first operating state, the second operating state and the preset operating state further includes the steps of: When the first operating state does not match the first sub-preset state, the comparison data is determined according to the first sub-data.
6. The audio function detection method according to any one of claims 1 to 4, characterized in that: The process of determining the audio function status of the smart device to be detected based on the comparison data includes the steps of: The audio function status of the smart device to be detected is determined according to the correspondence between the comparison data and the preset data.
7. An audio function detection device using the audio function detection method according to any one of claims 1 to 6, characterized in that: include: A first log acquisition module is used to acquire a first audio operation log of the smart device to be detected; A first state determination module is configured to obtain a first operating state of the audio device in the smart device to be detected according to the first audio operation log; a second state determination module, configured to obtain a second audio operation log of the smart device to be detected when a change in the first operation state is detected, and obtain a second operation state of the audio device according to the second audio operation log; a comparison data determination module, configured to obtain comparison data according to the first operating state, the second operating state, and a preset operating state; The function status determination module is used to determine the audio function status of the smart device to be detected based on the comparison data.
8. A computer storage medium having computer instructions stored thereon, characterized in that: When the computer instructions are executed by a processor, the audio function detection method according to any one of claims 1 to 6 is implemented.
9. A computer 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 audio function detection method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Equipment abnormality detecting method, device and system, air conditioner and storage medium
CN108469109A
Test method and related device
CN111666222A
Log processing method and device and electronic equipment
CN112395175A