Method, device, storage medium and terminal device for determining wake-up delay
Through the cooperation of the collection thread and the wake-up thread, audio data is collected periodically and the number of sampling points is recorded, which solves the problem of being unable to accurately measure the wake-up delay of smart devices in the existing technology, and achieves high-accuracy measurement in the actual environment.
Patent Information
- Application Number
- CN202011135337.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-21
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2040-10-21
AI Technical Summary
The prior art is difficult to accurately measure the wake-up delay of smart devices, especially in actual use environments, which cannot represent the delay of front-end algorithms.
Collect multiple audio data by collecting threads cyclical, obtain the time of collection of audio data. When the wake -up engine receives audio data, turn on the sampling point of the wake -up thread, detect the wake -up status to determine the awakening time, and determine the target collection time according to the target sampling point. Calculate the awakening of the terminal device.
The awakening delay of the terminal equipment accurately measured in the actual use environment, and improved the accuracy and efficiency of measurement.
Smart Images

Figure CN112241249B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of terminal technology, and in particular to a method, apparatus, storage medium and terminal device for determining a wake-up delay. Background Art
[0002] With the development of science and technology, more and more smart devices are gradually entering the lives of users. Smart devices can respond to the user's wake-up by being equipped with artificial intelligence operating systems, and execute the control instructions sent by the user to interact with the user. Among them, the time to respond to the user's wake-up will directly affect the user experience. Therefore, it is necessary to test the wake-up delay of the smart device and avoid the wake-up delay being too long to affect the user experience.
[0003] In the related art, the wake-up delay of the smart device can be obtained by inputting a special signal. However, this method can only play a special signal, which cannot represent the actual wake-up environment and therefore cannot accurately represent the delay of the front-end algorithm. Summary of the invention
[0004] In order to overcome the problems existing in the related art, the present disclosure provides a method, an apparatus, a storage medium and a terminal device for determining a wake-up delay.
[0005] According to a first aspect of an embodiment of the present disclosure, a method for determining a wake-up delay is provided, the method comprising: periodically collecting multiple audio data through the collection thread, and obtaining collection times of the multiple audio data; when the wake-up engine receives the audio data, starting the wake-up thread, the wake-up thread being used to record the number of sampling points of the audio data received by the wake-up engine; when it is detected that the wake-up engine is in a wake-up state, determining the wake-up time of the wake-up engine; determining a target number of sampling points recorded by the wake-up thread when the wake-up engine wakes up, and determining a target collection time corresponding to the collection thread according to the target number of sampling points; and determining a wake-up delay corresponding to a terminal device according to the target collection time and the wake-up time.
[0006] Optionally, obtaining the collection time of the multiple audio data includes: dividing the multiple audio data into multiple audio data groups according to a preset time interval; obtaining the group collection time of each audio data group, and using the group collection time as the collection time of each audio data in the audio data group.
[0007] Optionally, obtaining the group acquisition time of each of the audio data groups includes: taking the acquisition time of any audio data in the audio data group as the group acquisition time; or taking the average acquisition time of the audio data in the audio data group as the group acquisition time.
[0008] Optionally, before determining the target acquisition time corresponding to the acquisition thread according to the target number of sampling points, the method further includes: obtaining identifiers of a plurality of the audio data, the identifier being used to represent the cumulative value of the amount of audio data that has been collected; determining the target acquisition time corresponding to the acquisition thread according to the target number of sampling points includes: determining the target audio data corresponding to the target number of sampling points according to the target number of sampling points and the identifier; obtaining the acquisition time of the target audio data; and using the acquisition time of the target audio data as the target acquisition time.
[0009] Optionally, determining the target audio data corresponding to the target number of sampling points according to the target number of sampling points and the identifier includes: searching for the audio data recorded in the acquisition thread according to the target number of sampling points and the identifier; and taking at least one of the audio data corresponding to the first identifier that is greater than or equal to the target number of sampling points as the target audio data.
[0010] Optionally, the method further includes: generating a plurality of correspondences between the audio data and the acquisition time to obtain an acquisition time association relationship; and obtaining the acquisition time of the target audio data includes: determining the acquisition time of the target audio data through the acquisition time association relationship.
[0011] Optionally, the method further includes: sending the wake-up delay to a server, so that the server obtains the working status of the terminal device according to the wake-up delay.
[0012] According to a second aspect of an embodiment of the present disclosure, a device for determining a wake-up delay is provided, the device comprising: a collection module, configured to periodically collect multiple audio data through the collection thread, and obtain the collection time of the multiple audio data; a start module, configured to start the wake-up thread when the wake-up engine receives the audio data, the wake-up thread being used to record the number of sampling points of the audio data received by the wake-up engine; a wake-up time determination module, configured to determine the wake-up time of the wake-up engine when detecting that the wake-up engine is in a wake-up state; an collection time determination module, configured to determine the target number of sampling points recorded by the wake-up thread when the wake-up engine is awakened, and determine the target collection time corresponding to the collection thread according to the target number of sampling points; a delay determination module, configured to determine the wake-up delay corresponding to the terminal device according to the target collection time and the wake-up time.
[0013] Optionally, the acquisition module includes: a division module, configured to divide the multiple audio data into multiple audio data groups according to a preset time interval; and an acquisition submodule, configured to obtain a group acquisition time of each of the audio data groups, and use the group acquisition time as the acquisition time of each of the audio data in the audio data group.
[0014] Optionally, the acquisition submodule is configured to: use the acquisition time of any audio data in the audio data group as the group acquisition time; or use the average acquisition time of the audio data in the audio data group as the group acquisition time.
[0015] Optionally, the device further includes: an identification acquisition module, configured to acquire identifications of a plurality of the audio data, wherein the identification is used to represent the cumulative value of the number of the collected audio data; the collection time determination module includes: an audio data determination submodule, configured to determine the target audio data corresponding to the target sampling point number according to the target sampling point number and the identification; a collection time acquisition submodule, configured to acquire the collection time of the target audio data; and a target collection time acquisition module, configured to use the collection time of the target audio data as the target collection time.
[0016] Optionally, the audio data determination submodule is configured to: search for the audio data recorded in the acquisition thread according to the target number of sampling points and the identifier; and take at least one of the audio data corresponding to the first identifier that is greater than or equal to the target number of sampling points as the target audio data.
[0017] Optionally, the device further includes: a relationship generation module, configured to generate a plurality of corresponding relationships between the audio data and the acquisition time to obtain an acquisition time association relationship; and the acquisition time acquisition submodule, configured to determine the acquisition time of the target audio data through the acquisition time association relationship.
[0018] Optionally, the apparatus further includes: a sending module configured to send the wake-up delay to a server, so that the server obtains the working status of the terminal device according to the wake-up delay.
[0019] According to a third aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the method for determining the wake-up delay provided in the first aspect of the present disclosure are implemented.
[0020] According to a fourth aspect of an embodiment of the present disclosure, a terminal device is provided, comprising: a memory on which a computer program is stored; and a processor for executing the computer program in the memory to implement the steps of the method for determining the wake-up delay provided in the first aspect of the present disclosure.
[0021] The technical solution provided by the embodiment of the present disclosure may include the following beneficial effects: periodically collecting multiple audio data through the collection thread, and obtaining the collection time of the multiple audio data, when the wake-up engine receives the audio data, starting the wake-up thread, the wake-up thread is used to record the number of sampling points of the audio data received by the wake-up engine; when it is detected that the wake-up engine is in the wake-up state, determining the wake-up time of the wake-up engine; determining the target number of sampling points recorded by the wake-up thread when the wake-up engine is awakened, and determining the target collection time corresponding to the collection thread according to the target number of sampling points; determining the wake-up delay corresponding to the terminal device according to the target collection time and the wake-up time. In other words, the target collection time corresponding to the collection thread can be determined according to the target number of sampling points recorded by the wake-up thread when the wake-up engine is awakened, and the wake-up delay of the terminal device can be determined according to the target collection time and the wake-up time. In this way, the terminal device can obtain the wake-up delay corresponding to the terminal device according to the audio data collected in real time. Compared with the wake-up delay obtained by the laboratory through special signals, the accuracy of the wake-up delay of the terminal device obtained by the present disclosure is higher.
[0022] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0024] Figure 1 is a flow chart showing a method for determining a wake-up delay according to an exemplary embodiment;
[0025] Figure 2 is a flow chart showing another method for determining a wake-up delay according to an exemplary embodiment;
[0026] Figure 3 is a schematic diagram showing a method for determining a wake-up delay according to an exemplary embodiment;
[0027] Figure 4 is a structural schematic diagram of a device for determining a wake-up delay according to an exemplary embodiment;
[0028] Figure 5is a structural schematic diagram of a second apparatus for determining a wake-up delay according to an exemplary embodiment;
[0029] Figure 6 is a structural schematic diagram of a third apparatus for determining a wake-up delay according to an exemplary embodiment;
[0030] Figure 7 is a structural schematic diagram of a fourth apparatus for determining a wake-up delay according to an exemplary embodiment;
[0031] Figure 8 The present invention is a block diagram of a terminal device according to an exemplary embodiment. DETAILED DESCRIPTION
[0032] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0033] First, the application scenario of the present disclosure is described. The present disclosure can be applied to a terminal device capable of intelligent wake-up. In order to facilitate the user's control of the terminal device, the terminal device can obtain a voice signal sent by the user. When the voice signal is a preset wake-up instruction, a response message is sent according to the voice signal. During the intelligent wake-up process, after the user sends a voice signal, the terminal device needs to switch to the wake-up state according to the wake-up instruction in a timely manner to avoid the user waiting too long and causing a poor user experience.
[0034] After the terminal device collects the wake-up command input by the user, it needs to process the wake-up command through the acoustic front-end algorithm and transmit the processed data to the wake-up module of the terminal device so that the wake-up module can determine whether the terminal device needs to be awakened. The acoustic front-end algorithm and data transmission both take a certain amount of time, so there will be a certain delay in the wake-up of the terminal device. In order to shorten the wake-up delay as much as possible, it is necessary to measure and optimize the wake-up delay of the terminal device to ensure a good user experience.
[0035] In the related technology, the wake-up delay of the terminal device can be obtained by inputting a special signal. For example, a pulse signal can be input. When the terminal device collects the pulse signal, it obtains the collection time of the pulse signal. After that, the pulse signal is processed by the acoustic front-end algorithm, and the processed data is sent to the wake-up module of the terminal device. At this time, the receiving time of the wake-up module receiving the pulse signal can be detected, and the difference between the receiving time and the collection time is the wake-up delay of the terminal device.
[0036] However, this method can only input special signals, and requires the use of instruments to detect the time point when the wake-up module receives the pulse signal. Therefore, it can only be measured manually in the laboratory, and the measurement efficiency is low. In addition, the special signal is different from the wake-up command input by the user during use. The delay of the acoustic front-end algorithm cannot be accurately obtained through the special signal. Therefore, the accuracy of the wake-up delay of the terminal device measured by the special signal is low.
[0037] In order to solve the above problems, the present disclosure provides a method, apparatus, storage medium and terminal device for determining the wake-up delay. The target acquisition time corresponding to the acquisition thread can be determined according to the target sampling points recorded by the wake-up thread when the wake-up engine wakes up, and the wake-up delay of the terminal device can be determined according to the target acquisition time and the wake-up time. In this way, the wake-up delay corresponding to the terminal device can be obtained based on the audio data collected in real time. Compared with the wake-up delay obtained by special signals in the laboratory, the wake-up delay of the terminal device obtained by the present disclosure has higher accuracy.
[0038] The present disclosure is described below in conjunction with specific embodiments.
[0039] The terminal devices disclosed herein may include handheld devices, wearable devices, household appliances, etc., which are not limited in the present disclosure.
[0040] Figure 1 is a flow chart showing a method for determining a wake-up delay according to an exemplary embodiment. Figure 1 As shown, the method is applied to a terminal device, which may include a collection thread and a wake-up thread. The method includes:
[0041] S101: Periodically collect multiple audio data through a collection thread, and obtain the collection time of the multiple audio data.
[0042] Among them, the audio data can be sampling point data, and the collection period for collecting the multiple audio data can be indefinite. For example, the collection thread can continue to collect the audio data after the terminal device is turned on; the collection period can also be determined according to the type of the terminal device. For example, for terminal devices with high frequency of use, such as mobile phones, a smaller collection period can be set, such as 10ms, and for terminal devices with low frequency of use, such as air conditioners, a larger collection period can be set, such as 1s; the collection period can also be determined according to the time period. For example, in the time period when the terminal device is used frequently, such as 7 am to 11 pm, a smaller collection period can be set, and in the time period when the terminal device is used less frequently, such as 11 pm to 7 am, a larger collection period can be set; the collection period can also be a user-defined period. For example, the user can set the collection period of the terminal device through the setting options in the terminal device. In this way, the collection period of the audio data can be flexibly set according to different usage scenarios and different time periods. Under the premise of ensuring a good user experience, the collection period of the audio data can be shortened to the maximum extent, thereby reducing the power consumption of the terminal device. The above method of determining the collection period is only an example. The collection period may also be determined by other methods, which are not limited in the present disclosure.
[0043] In this step, after the acquisition thread acquires the multiple audio data, the acquisition time of each audio data can be obtained. In order to avoid the error between the acquisition time and the wake-up time, the acquisition time can be determined according to the monotonic system time of the terminal device, and the monotonic system time can be the timing time started after the terminal device is turned on. Afterwards, a corresponding relationship between each audio data and the acquisition time of the audio data can be established, and the corresponding relationship can be stored. Here, an identifier can be added to each audio data to distinguish different audio data. For example, different header information can be added to each audio data.
[0044] Considering that the amount of collected audio data is large, if the multiple audio data are directly stored, a large memory space will be occupied. The present disclosure can obtain the data identifier of each audio data, establish a corresponding relationship between the data identifier of each audio data and the collection time of the audio data, and store the corresponding relationship in the terminal device. Among them, the data identifier can be the quantitative sequence of the audio data in this collection cycle. For example, the data identifier of the first audio data collected in this collection cycle can be 1, the data identifier of the second audio data can be 2, and the data identifier of the third audio data can be 3. In this way, it is only necessary to store the corresponding relationship between the data identifier and the collection time, thereby saving the memory space of the terminal device.
[0045] It should be noted that the correspondence between the audio data and the collection time of the audio data can be stored in the terminal device or in the server, and the present disclosure does not limit this.
[0046] S102: When the wake-up engine receives the audio data, a wake-up thread is started.
[0047] The wake-up thread is used to record the number of sampling points of the audio data received by the wake-up engine.
[0048] In this step, after the acquisition thread acquires the multiple audio data, the multiple audio data can be sent to the wake-up engine. Here, the acquisition thread can send the audio data to the wake-up engine each time it acquires one audio data, or it can send the preset number of audio data to the wake-up engine after acquiring a preset number of audio data. For example, after acquiring a frame of audio data, the audio data of the frame can be sent to the wake-up engine, and the present disclosure does not limit this. After receiving the multiple audio data, the wake-up engine can start the wake-up thread, and record the number of sampling points of the audio data sent by the acquisition thread received by the wake-up engine through the wake-up thread. For example, the wake-up thread can record the number of sampling points of the audio data received by the wake-up engine through a counter, and the wake-up engine adds 1 to the count of the counter each time it receives an audio data, so that the number of sampling points of the audio data received by the wake-up engine can be obtained through the count value of the counter.
[0049] It should be noted that, when the terminal device includes a front-end acoustic algorithm thread, the acquisition thread can first send the multiple audio data to the front-end acoustic algorithm thread, pre-process the multiple audio data through the front-end acoustic algorithm thread, and then the front-end acoustic algorithm thread sends the preprocessed audio data to the wake-up engine.
[0050] S103: When it is detected that the wake-up engine is in the wake-up state, determine the wake-up time of the wake-up engine.
[0051] In this step, after the wake-up engine receives the audio data sent by the acquisition thread, it can perform wake-up word detection based on the audio data, and determine whether to wake up the wake-up engine based on the detection result. If it is determined that the wake-up engine needs to be woken up, the state of the wake-up engine can be switched to the wake-up state, and the wake-up time of the wake-up engine can be obtained.
[0052] The wake-up time may be determined according to the monotonic system time of the terminal device, so that an error between the wake-up time and the acquisition time may be avoided, resulting in a low accuracy rate of the wake-up delay of the terminal device finally obtained.
[0053] S104: Determine the target number of sampling points recorded by the wake-up thread when the wake-up engine is awakened, and determine the target collection time corresponding to the collection thread according to the target number of sampling points.
[0054] The target number of sampling points may be the sum of the numbers of all audio data received by the wake-up thread. For example, the target number of sampling points is the accumulated value of the number of sampling points corresponding to the wake-up time.
[0055] It should be noted that since the collection thread collects a lot of audio data, and the wake-up instruction for the terminal device may be only part of the multiple audio data, after the wake-up engine wakes up, it is necessary to determine the audio data that triggers the wake-up engine to wake up. For example, if the audio data collected by the collection thread includes 20, and the wake-up engine determines to wake up the wake-up engine after receiving the first 15 audio data of the 20 audio data, then it can be determined that the first 15 audio data are the audio data that trigger the wake-up engine to wake up.
[0056] In this step, after determining that the wake-up engine is awakened, the last target audio data sent by the acquisition thread and received by the wake-up engine before awakening can be determined by the target sampling points recorded by the wake-up thread, and then the acquisition time of the target audio data can be obtained, and the acquisition time of the target audio data is the target acquisition time corresponding to the acquisition thread. Here, the acquisition time of the target audio data can be obtained from the acquisition time of the multiple audio data obtained in step S101.
[0057] For example, the acquisition time of the target audio data can be obtained based on the corresponding relationship between the stored audio data and the acquisition time of the audio data. If the corresponding relationship is the corresponding relationship between the audio data and the acquisition time of the audio data, the acquisition time of the target audio data can be determined by comparing the target audio data with multiple audio data in the corresponding relationship; if the corresponding relationship is the corresponding relationship between the data identifier of the audio data and the acquisition time of the audio data, the target data identifier corresponding to the target audio data can be obtained first. For example, if the data identifier in the corresponding relationship is the quantitative sequence of the audio data, the acquisition time of the target audio data can be determined by comparing the target sampling point number with the data identifier in the corresponding relationship.
[0058] S105: Determine a wake-up delay corresponding to the terminal device according to the target collection time and the wake-up time.
[0059] In this step, after obtaining the target collection time and the wake-up time, the time difference between the wake-up time and the target collection time may be obtained, and the time difference may be used as the wake-up delay corresponding to the terminal device.
[0060] In some embodiments, when the terminal device wakes up, the total number of sampling points at the wake-up moment is obtained, and the monotonic system time T_wake at the wake-up moment is obtained, and then the monotonic system time T_record corresponding to the first sampling point greater than the sampling point at the wake-up moment is searched from the Ts linked list data recorded in the acquisition thread, and the difference between the monotonic time at the wake-up moment and the monotonic time obtained is T_delata = T_wake-T_record, where T_delata is the wake-up delay of the front end, and the accuracy of the wake-up delay is the time Tms corresponding to one frame of data from the acquisition module.
[0061] By adopting the above method, multiple audio data are periodically collected through the collection thread, and the collection time of the multiple audio data is obtained. When the wake-up engine receives the audio data, the wake-up thread is started, and the wake-up thread is used to record the number of sampling points of the audio data received by the wake-up engine. When the wake-up engine is detected to be in the wake-up state, the wake-up time of the wake-up engine is determined, the target number of sampling points recorded by the wake-up thread when the wake-up engine is awakened is determined, and the target collection time corresponding to the collection thread is determined according to the target number of sampling points, and the wake-up delay corresponding to the terminal device is determined according to the target collection time and the wake-up time. In this way, the wake-up delay corresponding to the terminal device can be obtained according to the audio data collected in real time. Compared with the wake-up delay obtained by special signals in the laboratory, the accuracy of the wake-up delay of the terminal device obtained by the present disclosure is higher.
[0062] Figure 2 is a flow chart showing another method for determining a wake-up delay according to an exemplary embodiment. Figure 2 As shown, the method includes:
[0063] S201. Periodically collect multiple audio data through a collection thread.
[0064] The audio data may be sampling point data, and the collection period for collecting the multiple audio data may be indefinite. For example, the collection thread may continue to collect the audio data after the terminal device is turned on. For example, from the moment the device is turned on, the recorder real-time audio collection module sequentially stores the sampling point data size of each frame within the last T seconds and the monotonic system time corresponding to each frame of sampling point data, and forms a linked list for storage, where T is a positive integer greater than zero, for example, T may be 3s, 5s. The collection period may also be determined according to the type of the terminal device. For example, for terminal devices with a higher frequency of use, such as For mobile phones, a smaller collection period can be set, such as 10ms. For terminal devices with lower usage frequency, such as air conditioners, a larger collection period can be set, such as 1s. The collection period can also be determined according to the time period. For example, in the time period when the terminal device is used more frequently, such as 7 am to 11 pm, a smaller collection period can be set, and in the time period when the terminal device is used less frequently, such as 11 pm to 7 am, a larger collection period can be set. The collection period can also be a user-defined period. For example, the user can set the collection period of the terminal device through the setting options in the terminal device. In this way, the collection period of the audio data can be flexibly set according to different usage scenarios and different time periods. Under the premise of ensuring a good user experience, the collection period of the audio data can be shortened to the maximum extent, thereby reducing the power consumption of the terminal device. The above-mentioned method of determining the collection period is only an example, and the collection period can also be determined by other methods, which is not limited by the present disclosure.
[0065] In some embodiments, the number of sampling points per frame can be obtained by calculation. For example, the recording data is collected in a fixed number of milliseconds, such as Tms per frame, so the number of sampling points per frame can be calculated based on the sampling frequency, and the calculation formula is:
[0066] Number of sampling points = sampling frequency * N * T / 1000. The unit of sampling frequency is KHZ, N is the number of acquisitions, and T is the periodic sampling time.
[0067] S202: Divide the plurality of audio data into a plurality of audio data groups according to a preset time interval.
[0068] It should be noted that since the acquisition thread collects audio data very quickly, the time difference of the audio data collected in a short period of time is very small. Therefore, multiple audio data with small differences in acquisition time can be divided into an audio data group, and the same acquisition time can be set for multiple audio data in the audio data group.
[0069] The preset time interval can be determined according to the sampling frequency of the acquisition thread. When the sampling frequency is high, a larger preset time interval can be set, such as 15ms. When the sampling frequency is low, a smaller preset time interval can be set, such as 8ms. In this way, the error of the acquisition time of the audio data can be reduced as much as possible. For example, the duration of collecting one frame of audio data can be used as the preset time interval.
[0070] In this step, after the terminal device is turned on, the acquisition thread can collect the audio data in real time according to the preset time interval, and the multiple audio data collected within the preset time interval can be used as an audio data group. For example, the duration of the audio data collected by the acquisition thread for one frame can be obtained in advance, and the duration can be used as the preset time interval. For example, if the duration of the audio data collected by the acquisition thread for one frame is 8ms, the acquisition thread can use the multiple audio data collected every 8ms as an audio data group. For example, after the terminal device is turned on, the multiple audio data collected from the 1st ms to the 8th ms can be used as the first audio data group, the multiple audio data collected from the 9th ms to the 16th ms can be used as the second audio data group, the multiple audio data collected from the 17th ms to the 24th ms can be used as the third audio data group, and so on, and multiple audio data groups are continuously acquired.
[0071] S203: Obtain a group collection time of each audio data group, and use the group collection time as the collection time of each audio data in the audio data group.
[0072] In this step, the collection thread can determine the group collection time of the audio data group after each group of audio data is collected. Since the collection time differences of multiple audio data in the audio data group are small, in a possible implementation, the collection time of any audio data in the audio data group can be used as the group collection time; or the average collection time of the audio data in the audio data group can be used as the group collection time.
[0073] For example, the collection time of the first audio data in each audio data group can be used as the group collection time of the audio data group, the collection time of the last audio data in each audio data group can be used as the group collection time of the audio data group, and the average time of the collection time of all audio data in each audio data group can be obtained and the average time can be used as the group collection time of the audio data group.
[0074] Further, after the group collection time of each audio data group is obtained, the group collection time may be used as the collection time of each audio data in the audio data group.
[0075] S204: Obtain identifiers of multiple audio data.
[0076] The identifier is used to represent the cumulative value of the amount of collected audio data. The identifier may be the collection order of each audio data among all collected audio data, or may be the group identifier of the audio data group to which each audio data belongs.
[0077] In this step, when the identifier is the collection order of each audio data in all the collected audio data, the collection order of the audio data can be obtained while collecting each audio data through the collection thread, and the collection order of the audio data is used as the identifier of the audio data. For example, when the collection thread collects the first audio data, the identifier of the first audio data is 1, when the collection thread collects the second audio data, the identifier of the second audio data is 2, and so on. When the collection thread collects the 100th audio data, the identifier of the 100th audio data is 100.
[0078] In the case where the identifier is the group identifier of the audio data group to which each audio data belongs, the group identifier of the audio data group can be used as the identifier of each audio data in the audio data group. For example, if the group identifier of the audio data group is 50, the identifier of each audio data in the audio data group is 50. Among them, the group identifier of the audio data group can be the sum of the number of audio data in the audio data group and the number of audio data in the target audio data group, and the target audio data group includes at least one audio data group before the audio data group. For example, the group identifier of the audio data group can be the cumulative value of the number of collected audio data. Here, when dividing the audio data group, the number of audio data included in each audio data group can be obtained, and then, for each audio data group, the target audio data group corresponding to the audio data group can be obtained, and the number of audio data in the target audio data group can be obtained, and the number of audio data in the audio data group and the sum of the number of audio data in the target audio data group are used as the group identifier of the audio data group.
[0079] For example, if the number of audio data in each audio data group is 10, the group identifier of the first audio data group may be 10, the group identifier of the second audio data group may be 20, and the group identifier of the third audio data group may be 30.
[0080] S205: Generate a correspondence between the plurality of audio data and the collection time to obtain a collection time association relationship.
[0081] In this step, after the acquisition thread acquires multiple audio data, obtains the acquisition time of the multiple audio data, and obtains the identifiers of the multiple audio data, a correspondence between the identifiers of the multiple audio data and the acquisition time of the multiple audio data can be established to obtain the acquisition time association relationship.
[0082] It should be noted that, since the amount of the multiple audio data collected by the collection thread is very large, for example, if the sampling rate of the collection thread is 16kHZ, the number of audio data collected within a 1s time period is 16,000. If the corresponding relationship between each audio data and the collection time of the audio data is stored, the stored corresponding relationships will also be very large, resulting in more memory space being occupied. Therefore, in the case where the identifier of the audio data is the group identifier of the audio data group to which each audio data belongs, since the identifier of the audio data in each audio data group and the collection time of the audio data are the same, there is no need to establish a corresponding relationship between the identifier of each audio data and the collection time of the audio data. It is only necessary to establish a corresponding relationship between the group identifier of each audio data group and the group collection time of the audio data group. In this way, the amount of stored data can be greatly reduced and memory space can be saved.
[0083] S206: When the wake-up engine receives the audio data, a wake-up thread is started.
[0084] The wake-up thread is used to record the number of sampling points of the audio data received by the wake-up engine.
[0085] S207: When it is detected that the wake-up engine is in the wake-up state, determine the wake-up time of the wake-up engine.
[0086] S208: Determine the target number of sampling points recorded by the wake-up thread when the wake-up engine is awakened.
[0087] The target number of sampling points may be the sum of all the audio data received by the wake-up thread.
[0088] It should be noted that since the collection thread collects a lot of audio data, and the wake-up instruction for the terminal device may only be part of the multiple audio data, after the terminal device wakes up, it is necessary to determine the audio data that triggers the wake-up of the terminal device. For example, if the audio data collected by the collection thread includes 20, the wake-up engine determines to wake up the wake-up engine after receiving the first 15 audio data of the 20 audio data, then it can be determined that the first 15 audio data are the audio data that trigger the wake-up of the terminal device.
[0089] In this step, when it is determined that the wake-up engine is awakened, the current number of sampling points recorded by the wake-up thread may be obtained, and the current number of sampling points may be used as the target number of sampling points.
[0090] S209: Determine target audio data corresponding to the target sampling point number according to the target sampling point number and the identifier.
[0091] In this step, since the target number of sampling points is the number of all audio data sent by the acquisition thread and received by the wake-up engine, and the identifier is the identifier of the audio data collected by the acquisition thread, after determining the target number of sampling points recorded by the wake-up thread, the audio data recorded in the acquisition thread can be searched according to the target number of sampling points and the identifier, and at least one audio data corresponding to the first identifier that is greater than or equal to the target number of sampling points is used as the target audio data.
[0092] In the case where the identifier is the collection order of each audio data in all the collected audio data, the target number of sampling points and the identifier can be compared, and the target identifier with the same target number of sampling points can be found, and the audio data corresponding to the target identifier can be used as the target audio data. For example, if the target number of sampling points is 150, the target number of sampling points and the identifier can be compared, and the audio data with the identifier of 150 can be found from the audio data collected by the collection thread, and the audio data with the identifier of 150 can be used as the target audio data.
[0093] In the case where the identifier is the group identifier of the audio data group to which each audio data belongs, since the identifiers of all audio data in each audio data group are the same, and the identifier cannot represent the sampling order of the audio data, for example, for the third audio data group collected by the acquisition thread, if the audio data group includes the 101st to 150th audio data collected by the acquisition thread, the identifiers of all audio data in the audio data group are 150. In this case, when comparing the target number of sampling points with the identifier, it may not be possible to find the identifier that is the same as the target number of sampling points. For example, if the target number of sampling points is 120, it is not possible to find the identifier that is the same as the target number of sampling points. If the target number of sampling points is 150, it is possible to find the identifier that is the same as the target number of sampling points, and the audio data corresponding to the identifier includes multiple.
[0094] Therefore, for the case where the identifier is the group identifier of the audio data group to which each audio data belongs, at least one audio data corresponding to the first identifier greater than or equal to the target number of sampling points can be used as the target audio data. For example, if the target number of sampling points is 120, the group identifier of the second audio data group is 100, which includes the 51st to 100th audio data collected by the acquisition thread, and the group identifier of the third audio data group is 150, which includes the 101st to 150th audio data collected by the acquisition thread. In fact, the target number of sampling points should correspond to the 120th audio data collected by the acquisition thread, but the 120th audio data belongs to the third audio data group, and the identifier of the 120th audio data is 150. Therefore, at least one audio data with a first identifier greater than or equal to 120, that is, all audio data in the third audio data group, can be obtained, and all audio data in the third audio data group can be used as the target audio data.
[0095] S210: Obtain the acquisition time of the target audio data.
[0096] In this step, after the target audio data is obtained, the collection time of the target audio data can be determined through the collection time association relationship. Here, the collection time of the target audio data can be obtained through the collection time association relationship according to the identifier of the target audio data.
[0097] S211. The acquisition time of the target audio data is used as the target acquisition time.
[0098] S212: Determine a wake-up delay corresponding to the terminal device according to the target collection time and the wake-up time.
[0099] In some embodiments, when the device wakes up, the total number of sampling points at the wake-up moment is obtained, and the monotonic system time T_wake at the wake-up moment is obtained, and then the monotonic system time T_record corresponding to the first sampling point greater than the sampling point at the wake-up moment is searched from the Ts linked list data recorded in the acquisition thread, and the monotonic time at the wake-up moment is subtracted from the monotonic time obtained by the search by T_delata = T_wake-T_record, where T_delata is the wake-up delay of the front end, and the accuracy of the wake-up delay is the time Tms corresponding to one frame of data of the recorder module.
[0100] S213: Send the wake-up delay to the server.
[0101] In this step, after obtaining the wake-up delay of the wake-up engine, the wake-up delay can be sent to the server, and the server can obtain the working status of the terminal device according to the wake-up delay. For example, after receiving the wake-up delay sent by the terminal device, the server can obtain the preset wake-up delay, and the preset wake-up delay can be the delay for the terminal device to meet the basic user experience. After that, the wake-up delay and the preset wake-up delay can be compared. If the wake-up delay is less than the preset wake-up delay, it means that the working status of the terminal device is good and can achieve a better user experience; if the wake-up delay is greater than or equal to the preset wake-up delay, it means that the wake-up waiting time of the terminal device is long and the user experience is poor. In this case, the response speed of the terminal device can be optimized through a preset optimization strategy to improve the user experience.
[0102] By adopting the above method, by obtaining multiple audio data and the collection time of the multiple audio data, obtaining the identifiers of the multiple audio data, generating a correspondence between the multiple audio data and the collection time, and obtaining the collection time association relationship, when the wake-up engine receives the audio data, the wake-up thread is started, and when it is detected that the wake-up engine is in the wake-up state, the wake-up time of the wake-up engine is determined, and the target number of sampling points recorded by the wake-up thread when the wake-up engine is awakened is determined, and the target audio data corresponding to the target sampling point number is determined according to the target sampling point number and the identifier of the audio data, and the collection time of the target audio data is obtained, and the collection time of the target audio data is used as the target collection time, and the wake-up delay corresponding to the terminal device is determined according to the target collection time and the wake-up time. That is to say, the wake-up delay corresponding to the terminal device can be determined according to the target number of sampling points obtained by the wake-up thread and the identifier of the audio data collected by the collection thread. In this way, the wake-up delay of the terminal device can be automatically obtained according to the audio data collected in real time, without manual operation, saving labor costs, and the accuracy of the wake-up delay is higher. Furthermore, after obtaining the wake-up delay of the terminal device, the wake-up delay can be sent to the server, so that the wake-up delay of the terminal device can be monitored and optimized in real time.
[0103] Figure 3 is a schematic diagram showing a method for determining a wake-up delay according to an exemplary embodiment. Figure 3 As shown, the terminal device may include a real-time sound collection module, a front-end acoustic algorithm module and a wake-up module.
[0104] After the terminal device is turned on, the real-time audio sampling module starts to collect audio data, and stores the accumulated sampling points corresponding to the audio data collected within a preset time period and the system monotonic time corresponding to the audio data in a linked list, such as Figure 3As shown, the preset time period can be 3s. The real-time audio acquisition module can store the cumulative sampling points stamps of the audio data collected every Tms and the system monotonic time time corresponding to the audio data in a linked list. For example, the real-time audio acquisition module stores the cumulative sampling points stamps1 of the audio data collected in the first Tms and the system monotonic time time1 corresponding to the audio data in the first position of the linked list, stores the cumulative sampling points stamps2 of the audio data collected in the second Tms and the system monotonic time time2 corresponding to the audio data in the second position of the linked list, and so on, stores the cumulative sampling points stampsn of the audio data collected every Tms and the system monotonic time timen corresponding to the audio data in the linked list until the duration of the stored audio data reaches 3s.
[0105] After the real-time audio acquisition module stores the cumulative sampling points of the collected audio data and the system monotonic time corresponding to the audio data in the linked list, it can send the audio data to the front-end acoustic processing module. The front-end acoustic processing module preprocesses the audio data and sends the preprocessed audio data to the wake-up module. The wake-up module can determine whether to wake up the terminal device according to the audio data. After the wake-up module determines to wake up the terminal device and wakes up the terminal device, it can obtain the monotonic system time T_wake at the wake-up moment and the cumulative sampling points end_stamps at the wake-up moment. Then, it can find the first stamps greater than the end_stamps from the stamps stored in the linked list according to the end_stamps and obtain the end_time corresponding to the stamps. In this way, the wake-up delay T_delata of the terminal device can be obtained as T_wake – end_time. Exemplarily, if stamps1 < end_stamps, then stamps1 does not meet the condition. If stamps2 > end_stamps, then stamps2 meets the condition, and the time2 corresponding to the stamps2 can be further obtained. The wake-up delay T_delata of the terminal device is T_wake – time2.
[0106] Figure 4 It is a schematic structural diagram of a device for determining wake-up delay shown according to an exemplary embodiment. The device is applied to a terminal device, and the terminal device includes an acquisition thread and a wake-up thread. As Figure 4 shown, the device includes:
[0107] An acquisition module 401, configured to periodically acquire a plurality of audio data through the acquisition thread and obtain the acquisition time of the plurality of audio data;
[0108] The start module 402 is configured to start a wake-up thread when the wake-up engine receives the audio data, and the wake-up thread is used to record the number of sampling points of the audio data received by the wake-up engine;
[0109] A wake-up time determination module 403 is configured to determine a wake-up time of the wake-up engine when detecting that the wake-up engine is in a wake-up state;
[0110] The collection time determination module 404 is configured to determine the target number of sampling points recorded by the wake-up thread when the wake-up engine is awakened, and determine the target collection time corresponding to the collection thread according to the target number of sampling points;
[0111] The delay determination module 405 is configured to determine the wake-up delay corresponding to the terminal device according to the target collection time and the wake-up time.
[0112] Optionally, the acquisition module 401 includes:
[0113] A division submodule is configured to divide the plurality of audio data into a plurality of audio data groups according to a preset time interval;
[0114] The collection submodule is configured to obtain a group collection time of each audio data group, and use the group collection time as the collection time of each audio data in the audio data group.
[0115] Optionally, the acquisition submodule is configured as follows:
[0116] The collection time of any audio data in the audio data group is used as the collection time of the group; or
[0117] The average acquisition time of the audio data in the audio data group is used as the acquisition time of the group.
[0118] Optionally, Figure 5 is a schematic diagram of the structure of a second apparatus for determining a wake-up delay according to an exemplary embodiment. Figure 5 As shown, the device also includes:
[0119] The identification acquisition module 406 is configured to acquire identifications of the plurality of audio data, wherein the identifications are used to represent the accumulated value of the number of the collected audio data;
[0120] The acquisition time determination module 404 includes:
[0121] an audio data determination submodule, configured to determine target audio data corresponding to the target number of sampling points according to the target number of sampling points and the identifier;
[0122] A collection time acquisition submodule, configured to obtain the collection time of the target audio data;
[0123] The target collection time acquisition module is configured to use the collection time of the target audio data as the target collection time.
[0124] Optionally, the audio data determination submodule is configured to:
[0125] According to the target number of sampling points and the identifier, searching for the audio data recorded in the acquisition thread;
[0126] The at least one audio data corresponding to the first identifier that is greater than or equal to the target number of sampling points is used as the target audio data.
[0127] Optionally, Figure 6 is a schematic structural diagram of a third apparatus for determining a wake-up delay according to an exemplary embodiment. Figure 6 As shown, the device also includes:
[0128] The relationship generating module 407 is configured to generate a plurality of corresponding relationships between the audio data and the acquisition time to obtain an acquisition time association relationship;
[0129] The acquisition time acquisition submodule is configured as follows:
[0130] The acquisition time of the target audio data is determined according to the acquisition time association relationship.
[0131] Optionally, Figure 7 is a schematic structural diagram of a fourth apparatus for determining a wake-up delay according to an exemplary embodiment. Figure 7 As shown, the device also includes:
[0132] The sending module 408 is configured to send the wake-up delay to the server, so that the server obtains the working status of the terminal device according to the wake-up delay.
[0133] Through the above-mentioned device, multiple audio data are periodically collected through the collection thread of the terminal device, and the collection time of the multiple audio data is obtained. When the wake-up engine receives the audio data, the wake-up thread is started, and the wake-up thread is used to record the number of sampling points of the audio data received by the wake-up engine; when it is detected that the wake-up engine is in the wake-up state, the wake-up time of the wake-up engine is determined; the target number of sampling points recorded by the wake-up thread when the wake-up engine is awakened is determined, and the target collection time corresponding to the collection thread is determined according to the target number of sampling points; the wake-up delay corresponding to the terminal device is determined according to the target collection time and the wake-up time. In this way, the wake-up delay corresponding to the terminal device can be obtained according to the audio data collected in real time. Compared with the wake-up delay obtained by the laboratory through special signals, the accuracy of the wake-up delay of the terminal device obtained by the present disclosure is higher.
[0134] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0135] Figure 8 800 is a block diagram of a terminal device 800 according to an exemplary embodiment. For example, the terminal device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0136] Reference Figure 8 The terminal device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , an audio component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .
[0137] The processing component 802 generally controls the overall operation of the terminal device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the method for determining the wake-up delay. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include an audio module to facilitate the interaction between the audio component 808 and the processing component 802.
[0138] The memory 804 is configured to store various types of data to support operations on the terminal device 800. Examples of such data include instructions for any application or method operating on the terminal device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0139] The power component 806 provides power to various components of the terminal device 800. The power component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the terminal device 800.
[0140] The audio component 808 includes a screen that provides an output interface between the terminal device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the audio component 808 includes a front camera and / or a rear camera. When the terminal device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external audio data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0141] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the terminal device 800 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0142] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.
[0143] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the terminal device 800. For example, the sensor assembly 814 can detect the open / closed state of the terminal device 800, the relative positioning of the components, such as the display and keypad of the terminal device 800, and the sensor assembly 814 can also detect the position change of the terminal device 800 or a component of the terminal device 800, the presence or absence of contact between the user and the terminal device 800, the orientation or acceleration / deceleration of the terminal device 800, and the temperature change of the terminal device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0144] The communication component 816 is configured to facilitate the communication between the terminal device 800 and other devices in a wired or wireless manner. The terminal device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0145] In an exemplary embodiment, the terminal device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to execute the method for determining wake-up delay.
[0146] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by a processor 820 of a terminal device 800 to complete the method of determining the wake-up delay. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a tape, a floppy disk, an optical data storage device, and the like.
[0147] In another exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program executable by a programmable device. The computer program has a code portion for executing the above-mentioned method for determining the wake-up delay when executed by the programmable device.
[0148] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. This application is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0149] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A method for determining a wake-up delay, characterized in that: The method comprises: Periodically collecting multiple audio data through a collection thread, and obtaining collection time of the multiple audio data; When the wake-up engine receives the audio data, a wake-up thread is started, where the wake-up thread is used to record the number of sampling points of the audio data received by the wake-up engine; When detecting that the wake-up engine is in the wake-up state, determining the wake-up time of the wake-up engine; Determine the target number of sampling points recorded by the wake-up thread when the wake-up engine is awakened, and determine the target collection time corresponding to the collection thread according to the target number of sampling points; Determine a wake-up delay corresponding to the terminal device according to the target acquisition time and the wake-up time; Determining the wake-up delay corresponding to the terminal device according to the target acquisition time and the wake-up time includes: The time difference between the target acquisition time and the wake-up time is used as the wake-up delay corresponding to the terminal device.
2. The method according to claim 1, characterized in that The acquiring of the acquisition time of the plurality of audio data comprises: Dividing the plurality of audio data into a plurality of audio data groups according to a preset time interval; The group collection time of each of the audio data groups is obtained, and the group collection time is used as the collection time of each of the audio data in the audio data group.
3. The method according to claim 2, characterized in that The obtaining of the group acquisition time of each audio data group comprises: The collection time of any audio data in the audio data group is used as the group collection time; or, The average acquisition time of the audio data in the audio data group is used as the group acquisition time.
4. The method according to claim 1 or 2, characterized in that: Before determining the target collection time corresponding to the collection thread according to the target number of sampling points, the method further includes: Acquire identifiers of a plurality of the audio data, wherein the identifiers are used to represent a cumulative value of the amount of the collected audio data; Determining the target acquisition time corresponding to the acquisition thread according to the target number of sampling points includes: Determining target audio data corresponding to the target number of sampling points according to the target number of sampling points and the identifier; Obtaining the acquisition time of the target audio data; The acquisition time of the target audio data is used as the target acquisition time.
5. The method according to claim 4, characterized in that The determining, according to the target number of sampling points and the identifier, target audio data corresponding to the target number of sampling points comprises: According to the target number of sampling points and the identifier, searching for the audio data recorded in the acquisition thread; The at least one audio data corresponding to the first identifier that is greater than or equal to the target number of sampling points is used as the target audio data.
6. The method according to claim 4, characterized in that The method further comprises: Generate a plurality of corresponding relationships between the audio data and the acquisition time to obtain an acquisition time correlation relationship; The acquisition time of the target audio data includes: The acquisition time of the target audio data is determined according to the acquisition time association relationship.
7. The method according to claim 1, characterized in that The method further comprises: The wake-up delay is sent to a server, so that the server obtains the working status of the terminal device according to the wake-up delay.
8. A device for determining a wake-up delay, characterized in that: The device comprises: A collection module is configured to periodically collect multiple audio data through a collection thread and obtain the collection time of the multiple audio data; An opening module is configured to open a wake-up thread when the wake-up engine receives the audio data, wherein the wake-up thread is used to record the number of sampling points of the audio data received by the wake-up engine; a wake-up time determination module, configured to determine the wake-up time of the wake-up engine when detecting that the wake-up engine is in the wake-up state; a collection time determination module, configured to determine the target number of sampling points recorded by the wake-up thread when the wake-up engine is awakened, and determine the target collection time corresponding to the collection thread according to the target number of sampling points; A delay determination module is configured to determine a wake-up delay corresponding to the terminal device according to the target acquisition time and the wake-up time; The delay determination module is configured to use the time difference between the target acquisition time and the wake-up time as the wake-up delay corresponding to the terminal device.
9. The device according to claim 8, characterized in that The acquisition module comprises: A division submodule is configured to divide the plurality of audio data into a plurality of audio data groups according to a preset time interval; The collection submodule is configured to obtain a group collection time of each of the audio data groups, and use the group collection time as the collection time of each of the audio data in the audio data group.
10. The device according to claim 9, characterized in that The acquisition submodule is configured as follows: Taking the collection time of any audio data in the audio data group as the group collection time; or, The average acquisition time of the audio data in the audio data group is used as the group acquisition time.
11. The device according to claim 8 or 9, characterized in that The device also includes: An identification acquisition module is configured to acquire identifications of a plurality of the audio data, wherein the identifications are used to represent a cumulative value of the number of the collected audio data; The acquisition time determination module comprises: an audio data determination submodule, configured to determine target audio data corresponding to the target number of sampling points according to the target number of sampling points and the identifier; A collection time acquisition submodule, configured to obtain the collection time of the target audio data; The target collection time acquisition module is configured to use the collection time of the target audio data as the target collection time.
12. The device according to claim 11, characterized in that The audio data determination submodule is configured as follows: According to the target number of sampling points and the identifier, searching for the audio data recorded in the acquisition thread; The at least one audio data corresponding to the first identifier that is greater than or equal to the target number of sampling points is used as the target audio data.
13. The device according to claim 11, characterized in that The device also includes: A relationship generation module is configured to generate a plurality of corresponding relationships between the audio data and the acquisition time to obtain an acquisition time association relationship; The acquisition time acquisition submodule is configured as follows: The acquisition time of the target audio data is determined according to the acquisition time association relationship.
14. The device according to claim 8, characterized in that The device also includes: The sending module is configured to send the wake-up delay to the server, so that the server obtains the working status of the terminal device according to the wake-up delay.
15. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the steps of the method described in any one of claims 1 to 7 are implemented.
16. A terminal device, characterized in that: include: a memory having a computer program stored thereon; A processor, configured to execute the computer program in the memory to implement the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Display control method and display device
CN110225386A