Method and apparatus for determining processing duration, storage medium and electronic device
By searching for interaction data of target identifiers in the log files of home appliances and using timestamps to automatically determine the processing time, the inefficiency caused by manually viewing logs in existing technologies is solved, and efficient and accurate determination of processing time is achieved.
Patent Information
- Application Number
- CN202210327287.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-30
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2042-03-30
AI Technical Summary
In existing technologies, the method for determining the processing time of home appliances relies on testers manually checking logs, which leads to low efficiency and is prone to errors.
The system automatically determines the processing time for each interaction stage by searching for interaction data with target identifiers in the log files of the interactive device and based on the timestamps.
It automates the determination of processing time for interactive devices, improving the efficiency and accuracy of processing time determination and solving the inefficiency problem caused by manually viewing logs.
Smart Images

Figure CN114840398B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of smart homes, and more specifically, to a method and apparatus for determining processing time, a storage medium, and an electronic device. Background Technology
[0002] As home appliances become more intelligent, higher demands are being placed on their performance optimization metrics. Whether testers are determining interactive performance or technicians are optimizing it, they need to collect a large amount of data on appliance interactions, then statistically analyze the response times to refine the time consumed at each stage, and finally optimize the interaction response time.
[0003] In related technologies, the processing time for home appliances is mainly determined by testers filtering and reviewing logs. This method is prone to omissions and statistical errors, and is time-consuming, labor-intensive, and error-prone. Therefore, the methods for determining processing time in related technologies suffer from low efficiency due to the need for testers to manually review logs. Summary of the Invention
[0004] This application provides a method and apparatus for determining processing time, a storage medium, and an electronic device to at least solve the problem that the processing time determination methods in the related art are inefficient because they require testers to manually check logs.
[0005] According to one aspect of the embodiments of this application, a method for determining processing time is provided, comprising: obtaining a target log file of a target interactive device, wherein the target log file includes interaction data of the target interactive device in a set of interaction stages after the target interactive device is woken up; searching for interaction data with a target identifier in the target log file, wherein the interaction data with the target identifier includes interaction data generated when the target interactive device enters each interaction stage in the set of interaction stages; if a set of interaction data with the target identifier is found, obtaining a timestamp corresponding to the set of interaction data in the target log file; and determining the processing time of the target interactive device in each interaction stage in the set of interaction stages based on the timestamp corresponding to the set of interaction data.
[0006] According to another aspect of the embodiments of this application, a device for determining processing time is also provided, comprising: a first acquisition unit, configured to acquire a target log file of a target interactive device, wherein the target log file includes interactive data of the target interactive device in a set of interactive stages after the target interactive device is woken up; a search unit, configured to search for interactive data with a target identifier in the target log file, wherein the interactive data with the target identifier includes interactive data generated when the target interactive device enters each interactive stage in the set of interactive stages; a second acquisition unit, configured to acquire a timestamp corresponding to the set of interactive data with the target identifier in the target log file when the set of interactive data with the target identifier is found; and a first determination unit, configured to determine the processing time of the target interactive device in each interactive stage in the set of interactive stages based on the timestamp corresponding to the set of interactive data.
[0007] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer program, and the computer program is configured to execute the above-described method for determining the processing duration when running.
[0008] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the above-described method for determining the processing time through the computer program.
[0009] In this embodiment, by searching for interactive data from the log file of the interactive device based on a specific identifier and determining the processing time of the interactive device in each interactive stage based on the timestamps corresponding to the found set of interactive data, the purpose of automatically determining the processing time of the interactive device can be achieved, thereby improving the efficiency of determining the processing time and solving the problem that the efficiency of determining the processing time in related technologies is low due to the need for testers to manually check the logs. Attached Figure Description
[0010] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0011] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1This is a schematic diagram of the hardware environment for an optional method for determining processing time according to an embodiment of this application;
[0013] Figure 2 This is a flowchart illustrating an optional method for determining processing time according to an embodiment of this application;
[0014] Figure 3 This is a flowchart illustrating another optional method for determining processing time according to an embodiment of this application;
[0015] Figure 4 This is a flowchart illustrating another optional method for determining processing time according to an embodiment of this application;
[0016] Figure 5 This is a structural block diagram of an optional processing time determination device according to an embodiment of this application;
[0017] Figure 6 This is a structural block diagram of an optional electronic device according to an embodiment of this application. Detailed Implementation
[0018] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0019] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0020] According to one aspect of the embodiments of this application, a method for determining processing time is provided. This method for determining processing time is widely applicable to whole-house intelligent digital control application scenarios such as smart homes, smart home ecosystems, and intelligence house ecosystems. Optionally, in this embodiment, the above-mentioned method for determining processing time can be applied to, for example... Figure 1 The hardware environment shown consists of terminal device 102 and server 104. For example... Figure 1 As shown, server 104 is connected to terminal device 102 via a network and can be used to provide services (such as application services) to the terminal or clients installed on the terminal. A database can be set up on the server or independently of the server to provide data storage services for server 104. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data processing services for server 104.
[0021] The aforementioned network may include, but is not limited to, at least one of the following: wired network, wireless network. The aforementioned wired network may include, but is not limited to, at least one of the following: wide area network, metropolitan area network, local area network. The aforementioned wireless network may include, but is not limited to, at least one of the following: Wi-Fi (Wireless Fidelity), Bluetooth. The terminal device 102 may not be limited to PC, mobile phone, tablet computer, smart air conditioner, smart range hood, smart refrigerator, smart oven, smart stove, smart washing machine, smart water heater, smart washing equipment, smart dishwasher, smart projector, smart TV, smart clothes rack, smart curtains, smart audio-visual equipment, smart socket, smart speaker, smart speaker box, smart fresh air equipment, smart kitchen and bathroom equipment, smart bathroom equipment, smart robot vacuum cleaner, smart window cleaning robot, smart mopping robot, smart air purifier, smart steam oven, smart microwave oven, smart water heater, smart air purifier, smart water dispenser, smart door lock, etc.
[0022] The method for determining the processing time in this embodiment can be executed by server 104, terminal 102, or both server 104 and terminal 102. Alternatively, the method for determining the processing time in this embodiment can be executed by a client installed on terminal 102.
[0023] Taking the method for determining the processing time in this embodiment, executed by server 104, as an example, Figure 2 This is a flowchart illustrating an optional method for determining processing time according to an embodiment of this application, as shown below. Figure 2 As shown, the process of this method may include the following steps:
[0024] Step S202: Obtain the target log file of the target interactive device, wherein the target log file includes the interaction data of the target interactive device in a set of interaction stages after the target interactive device is woken up.
[0025] The method for determining processing time in this embodiment can be applied to scenarios where, after waking up the target interactive device, the processing time of each interaction stage in a set of interaction stages is determined. The target interactive device can be a smart home appliance with a voice interaction module, or an interactive device with other interaction modules. The wake-up operation can be voice wake-up, gesture wake-up, or other wake-up methods, and is not limited thereto. This embodiment uses a smart home appliance with a voice interaction module as the target interactive device and voice wake-up as the wake-up operation as an example for explanation.
[0026] In related technologies, when testing the interactive response performance of smart home appliances with voice modules, it is necessary to obtain the time consumption of each interaction stage in a set of interaction stages, and then have testers manually check and filter the logs, which is inefficient and has a high error rate.
[0027] In this embodiment, by adding target identifiers (e.g., target keywords, target keywords, etc.) to the program of the interactive device, each interaction stage can be represented by the target identifiers. When the program runs, log data can be output to a log file in combination with the added target identifiers, so that each interaction stage can be determined based on the target identifiers in the log file.
[0028] For example, such as Figure 3 As shown, the process of printing logs to a log file during application execution may include the following steps:
[0029] Step S302, Start. The application starts running, and the interactive test begins.
[0030] Step S304, Initialization. The application is initialized.
[0031] Step S306: Enable voice interaction. Once voice interaction is enabled, voice interaction with the user is achieved through the interaction module (e.g., voice interaction module) in the target interaction device.
[0032] Step S308: Print logs to log files. Before the application runs, logs in a fixed format can be added to the locations in the program where data needs to be captured. After the application runs and interaction is enabled, the log data generated by the target interactive device and the user at each stage of voice interaction can be printed to the corresponding log files based on the added identifiers.
[0033] Step S310: Determine whether the test has ended. If yes, proceed to step S312; otherwise, proceed to step S306.
[0034] Step S312, End.
[0035] Before retrieving the target log file, during the program development process, you can add logs with a fixed format where data needs to be captured. After enabling voice interaction, print the logs to the log file, and determine the processing time of the interaction phase by reading the log file.
[0036] For example, after a user wakes up the target interactive device, interaction can begin between the user and the target interactive device. A single wake-up can include multiple interaction phases; that is, a set of interaction phases can include multiple interaction phases. Relevant data generated during the interaction process (including the time the interaction started, the specific content involved in the interaction, etc.) can be stored in a target log file generated by the target interactive device. The multiple log files stored in the target interactive device can be arranged in chronological order according to the interaction time (e.g., the interaction date). When it is necessary to retrieve interaction data corresponding to a specific interaction time or a certain period of interaction time, the corresponding log file can be found in the target interactive device according to the interaction time, thus obtaining the target log file and acquiring the interaction data of the target interactive device in a set of interaction phases after waking up the target interactive device.
[0037] Step S204: Search for interaction data with target identifier in the target log file. The interaction data with target identifier includes interaction data generated when the target interaction device enters each interaction stage in a set of interaction stages.
[0038] In this embodiment, a wake-up can correspond to a set of interaction stages. To distinguish the various interaction stages within a set, target identifiers can be used. These target identifiers can be keywords in the voice segments used by the user when interacting with the target interactive device, such as "I want XX," "Play XX," or "Weather." The target interactive device responds to the received interaction request and processes it. One interaction request can correspond to an interaction stage between the user and the target interactive device. Therefore, frequently occurring keywords in the voice segments used by the user when interacting with the target interactive device can be extracted and used as target identifiers, stored in a preset configuration file on the target interactive device. When the voice segment during interaction matches the target identifier in the preset configuration file, this interaction can be defined as an interaction stage.
[0039] Optionally, in order to determine the various interaction stages contained in a set of interaction stages based on the target identifier, interaction data with the target identifier can be searched in the target log file. The interaction data with the target identifier may include the interaction data generated when the target interactive device is woken up and enters each interaction stage in a set of interaction stages, such as the time corresponding to each interaction stage and the request content corresponding to each interaction stage.
[0040] Step S206: If a set of interactive data with a target identifier is found, obtain the timestamp corresponding to the set of interactive data from the target log file.
[0041] In this embodiment, when a set of interactive data with a target identifier is found in the target log file, in order to determine the processing time of the target interactive device for the interactive request in each interactive stage of the set of interactive stages, the timestamp corresponding to the set of interactive data can be determined in the target log file, and the processing time of each interactive stage in the set of interactive stages can be calculated according to the time indicated by the timestamp.
[0042] Optionally, for each target identifier queried, its corresponding timestamp can be obtained from the target log file. Alternatively, when the number of queried target identifiers reaches a preset value, the timestamps corresponding to a set of interactive data associated with the aforementioned target identifiers can be obtained from the target log file.
[0043] Step S208: Based on the timestamps corresponding to a set of interactive data, determine the processing time of each interactive stage in a set of interactive stages for the target interactive device.
[0044] In this embodiment, the processing time of each interaction stage in a set of interaction stages of the target interaction device can be determined by the timestamps corresponding to a set of interaction data with target identifiers. For example, the timestamps can be sorted first, and the difference between two adjacent timestamps in the timestamp sequence can be used as the processing time corresponding to one of the interaction stages.
[0045] Optionally, if there is an acquisition anomaly in the timestamps corresponding to the acquired set of interactive data, the historical processing time corresponding to the same interactive stage in the historical time period can be obtained through the timestamps corresponding to the historical data, and the processing time of each interactive stage in the set of interactive stages of the target interactive device can be determined based on the historical processing time.
[0046] Through steps S202 to S208 above, a target log file of the target interactive device is obtained. The target log file includes interaction data of the target interactive device during a set of interaction stages after the target interactive device is woken up. Interaction data with a target identifier is searched in the target log file. This interaction data includes interaction data generated when the target interactive device enters each interaction stage of the set of interaction stages. If a set of interaction data with a target identifier is found, the timestamp corresponding to the set of interaction data is obtained from the target log file. Based on the timestamp corresponding to the set of interaction data, the processing time of each interaction stage of the target interactive device within the set of interaction stages is determined. This solves the problem of low efficiency in determining processing time in related technologies due to the need for testers to manually check logs, thus improving the efficiency of determining processing time.
[0047] In one exemplary embodiment, the processing time of the target interactive device in each interaction stage of a set of interaction stages is determined based on the timestamps corresponding to a set of interaction data, including:
[0048] S11. Arrange the timestamps corresponding to a set of interactive data in chronological order to obtain a timestamp sequence.
[0049] S12, based on two adjacent timestamps in the timestamp sequence, determine the processing time of each interaction stage in a set of interaction stages for the target interactive device.
[0050] In this embodiment, when determining the processing time of each interaction stage in a set of interaction stages of the target interaction device based on the timestamps corresponding to a set of interaction data, the timestamps corresponding to a set of interaction data can be sorted in chronological order to obtain a set of timestamp sequences.
[0051] After obtaining the above timestamp sequence, since each timestamp can correspond to the start time of an interaction phase, two adjacent timestamps in the timestamp sequence can respectively correspond to the start time of an interaction phase and the start time of the next adjacent interaction phase (which can also be understood as the end time of the previous interaction phase). Based on the difference between the obtained two adjacent timestamps, the processing time of the interaction task corresponding to each interaction phase of the target interaction device can be determined.
[0052] This embodiment improves the efficiency of determining the processing time of each interaction stage by sorting the timestamps corresponding to the interaction stages.
[0053] In one exemplary embodiment, determining the processing time of each interaction stage in a set of interaction stages for the target interactive device based on two adjacent timestamps in a timestamp sequence includes:
[0054] S21, when the timestamp sequence includes N timestamps, obtain the difference between every two adjacent timestamps in the timestamp sequence to get N-1 durations. Determine the duration of the first N-1 interaction stages out of the N interaction stages as equal to N-1 durations, and determine the duration of the last interaction stage out of the N interaction stages as equal to the difference between the target end timestamp and the last timestamp in the timestamp sequence. Here, N is an integer greater than or equal to 2, and the target end timestamp is the end timestamp of the last interaction stage in a set of interaction stages.
[0055] In this embodiment, when determining the processing time of each interaction stage in a set of interaction stages for the target interactive device based on two adjacent timestamps in the timestamp sequence, if the timestamp sequence includes N timestamps (N is an integer greater than or equal to 2, i.e., the timestamp sequence includes multiple timestamps), the difference between every two adjacent timestamps in the timestamp sequence can be obtained to obtain the interaction duration of the first N-1 interaction stages in a set of interaction stages. Here, the order of the differences between every two adjacent timestamps is consistent with the order of the first N-1 interaction stages in a set of interaction stages. That is, the difference between the second timestamp and the first timestamp is the interaction duration (i.e., processing time) of the first interaction stage, the difference between the third timestamp and the second timestamp is the interaction duration of the second interaction stage, and so on, with the difference between the Nth timestamp and the (N-1)th timestamp being the interaction duration of the (N-1)th interaction stage.
[0056] Since the timestamps in the timestamp sequence correspond to the interaction data associated with the target identifier, the processing time of the last interaction stage in the timestamp sequence cannot be determined based on the timestamps recorded in the timestamp sequence. Therefore, the target log file can be queried to find the last timestamp recorded in the log file (i.e., the target end timestamp). The target end timestamp is the end timestamp corresponding to the last interaction stage in a set of interaction stages recorded in the target log file. The difference between the last timestamp in the timestamp sequence and the target end timestamp can be used to determine the processing time of the Nth interaction stage (i.e., the last interaction stage).
[0057] This embodiment improves the completeness of determining the processing time of each interaction stage by determining the processing time of each interaction stage based on the target end timestamp and each timestamp in the timestamp sequence.
[0058] In one exemplary embodiment, determining the processing time of each interaction stage in a set of interaction stages for the target interactive device based on two adjacent timestamps in a timestamp sequence includes:
[0059] S31, when the timestamp sequence includes M timestamps, a set of interaction stages includes N interaction stages, and M equals N, determine the processing time of the interaction stage corresponding to the M timestamps in the set of interaction stages based on the historical processing time of each interaction stage in the set of interaction stages of the target interaction device, where M and N are positive integers greater than or equal to 1; or
[0060] S32, given that the timestamp sequence includes M timestamps, a set of interaction stages includes N interaction stages, and M is less than N, determine the processing duration of the interaction stage corresponding to the M timestamps in a set of interaction stages based on the log data corresponding to the M timestamps in the target log file, where M is a positive integer greater than or equal to 1 and N is a positive integer greater than or equal to 2.
[0061] As an optional implementation, when determining the processing time of each interaction stage in a set of interaction stages for the target interactive device based on two adjacent timestamps in the timestamp sequence, if the timestamp sequence includes M timestamps (M is a positive integer greater than or equal to 1), and N is a positive integer greater than or equal to 1, and M equals N, that is, if there are no missing timestamps in the obtained timestamp sequence corresponding to a set of interaction stages, the processing time of the interaction stage corresponding to the M timestamps in the set of interaction stages can be determined based on the historical processing time of each interaction stage in the set of interaction stages for the target interactive device.
[0062] For example, the interaction stages can be classified according to the type of the target identifier. The historical processing time of each interaction stage can be determined based on the timestamps of each interaction stage recorded in the log file of the previous day, thereby determining the processing time of the interaction stages corresponding to M timestamps in a set of interaction stages.
[0063] As another optional implementation, when determining the processing time of each interaction stage in a set of interaction stages for the target interactive device based on two adjacent timestamps in the timestamp sequence, if the timestamp sequence includes M timestamps, where N is a positive integer greater than or equal to 2 and M is a positive integer less than N, that is, if there are missing timestamps in the obtained timestamp sequence corresponding to a set of interaction stages, the processing time of the interaction stage corresponding to the M timestamps in the set of interaction stages can be determined based on the log data corresponding to the M timestamps in the target log file.
[0064] For example, the difference between any two adjacent timestamps in the timestamp sequence can be calculated first. If the difference exceeds the historical processing time range, it can be determined that a timestamp is missing between the two adjacent timestamps and has not been retrieved. By using the log data corresponding to the two timestamps in the target log file, if voice data is detected within the time interval corresponding to the two timestamps, the timestamp corresponding to that voice data is used as the retrieved missing timestamp, thereby determining the processing time of each interaction stage in a set of interaction stages.
[0065] In this embodiment, in the event of missing timestamps, the processing time of each interaction stage in a set of interaction stages is determined by combining historical processing time or log data, thereby improving the accuracy of determining the processing time of each interaction stage.
[0066] In one exemplary embodiment, the processing time of the interaction stage corresponding to M timestamps in a set of interaction stages is determined based on the historical processing time of each interaction stage in a set of interaction stages for the target interaction device, including:
[0067] S41, obtain the difference between every two adjacent timestamps in the M timestamps included in the timestamp sequence to obtain M-1 durations, and determine the difference between the target end timestamp and the last timestamp in the M timestamps as the Mth duration, wherein the M-1 durations and the Mth duration constitute the M durations;
[0068] S42, search the target log file for interaction data at the M interaction stages corresponding to the M timestamps;
[0069] S43, Based on the interaction data of the M interaction stages, determine the interaction stage identifiers of the M interaction stages;
[0070] S44, determine the historical processing time of the M interaction stages corresponding to the interaction stage identifiers of the M interaction stages from the pre-acquired historical information set, wherein the historical information set includes the historical processing time of different interaction stages after historical wake-up of the target interaction device and the corresponding interaction stage identifiers of different interaction stages.
[0071] S45, determine the duration that satisfies the first preset condition among the M durations, wherein the first preset condition includes: the difference between the duration among the M durations and the historical processing duration of the corresponding interaction stage among the M interaction stages is less than or equal to a preset threshold, or, when the historical processing duration is within the processing duration range, the duration among the M durations is within the processing duration range of the corresponding interaction stage among the M interaction stages.
[0072] S46, if P durations satisfying the first preset condition are determined, the processing duration of the interaction stage corresponding to M timestamps in a set of interaction stages is determined to include: P durations, where P≤M, P is a positive integer greater than or equal to 1, and P durations are the processing durations of the P interaction stages corresponding to a set of interaction stages.
[0073] In this embodiment, when determining the processing time of the interaction stage corresponding to M timestamps in a set of interaction stages based on the historical processing time of each interaction stage in a set of interaction stages of the target interaction device, the difference between each two adjacent timestamps in the M timestamps included in the timestamp sequence can be obtained first to get M-1 durations, and the difference between the target end timestamp and the last timestamp in the M timestamps can be determined as the Mth duration. Based on this, M durations can be obtained.
[0074] The server can also search for interaction data in the target log file corresponding to the M interaction stages, and determine the interaction stage identifiers of the M interaction stages based on the interaction data in the M interaction stages. The method of obtaining the interaction data in the M interaction stages corresponding to the M timestamps can be determined based on the interaction time corresponding to the timestamps and interaction data, or it can be determined by other methods. This embodiment does not limit this method.
[0075] Since historical information sets can be used to record the historical processing time of different interaction stages after waking up the target interactive device in the past, as well as the corresponding interaction stage identifiers of different interaction stages, after determining the interaction stage identifiers corresponding to M interaction stages, the historical processing time of the M interaction stages corresponding to the interaction stage identifiers of the M interaction stages can be determined from the pre-acquired historical information sets.
[0076] Furthermore, for the M durations, each duration can be judged individually to determine whether it meets the first preset condition, thereby obtaining the durations among the M durations that meet the first preset condition. The first preset condition includes one of the following: the difference between the duration among the M durations and the historical processing time of the corresponding interaction stage among the M interaction stages is less than or equal to a preset threshold; or, when the historical processing time is within the processing time range, the duration among the M durations is within the processing time range of the corresponding interaction stage among the M interaction stages.
[0077] If P durations out of M durations satisfy the first preset condition, then these P durations can be determined as the processing durations of the corresponding P interaction stages. That is, the processing durations of the interaction stages corresponding to the M timestamps in a set of interaction stages are determined to include P durations, where P≤M and P is a positive integer greater than or equal to 1.
[0078] This embodiment determines the processing time of the corresponding interaction stage by identifying the duration during which no anomalies occur, thereby improving the accuracy of determining the processing time of each interaction stage.
[0079] In one exemplary embodiment, the above method further includes:
[0080] S51, the average processing time of the same interaction stage included in Q historical log files is determined as the historical processing time of the same interaction stage, wherein the historical information set includes the historical processing time of the same interaction stage, each historical log file includes the processing time of the target interaction device in each interaction stage after a historical wake-up of the target interaction device, and Q is a positive integer greater than or equal to 1; or
[0081] S52, select one processing duration from the processing durations of the same interaction stage included in the Q historical log files as the historical processing duration of the same interaction stage. The historical information set includes the historical processing durations of the same interaction stage. Each historical log file includes the processing duration of the target interaction device in each interaction stage after a historical wake-up of the target interaction device. Q is a positive integer greater than or equal to 1; or
[0082] S53, obtain the minimum and maximum processing times of the same interaction phase included in Q historical log files, and determine the processing time range formed by the minimum and maximum processing times of the same interaction phase as the processing time range of the same interaction phase.
[0083] In this embodiment, the historical processing time of an interaction stage can be determined based on the processing time of the interaction stage recorded in at least one historical log file. Taking Q historical log files as an example, for a certain interaction stage, the Q historical log files can record at most Q processing times for that interaction stage. Based on the processing times of the same interaction stages included in the Q historical log files, the processing times of all or part of the interaction stages in a group of interaction stages can be determined. Here, Q is a positive integer greater than or equal to 1.
[0084] Optionally, the historical information set includes the historical processing time of the same interaction stage, and each historical log file includes the processing time of the target interaction device in each interaction stage after the target interaction device is woken up once in the past. Correspondingly, the method of determining the processing time of a certain interaction stage may include, but is not limited to, one of the following: (1) determining the average of the processing times of the same interaction stage included in Q historical log files as the historical processing time of the same interaction stage; or, (2) selecting one processing time from the processing times of the same interaction stage included in Q historical log files as the historical processing time of the same interaction stage; or, (3) obtaining the minimum and maximum values of the processing times of the same interaction stage included in Q historical log files, and determining the range of processing times formed by the minimum and maximum values of the processing times of the same interaction stage as the range of processing times of the same interaction stage.
[0085] This embodiment improves the accuracy of determining the processing time of each interaction stage by determining the processing time of the same interaction stage based on the processing time of the same interaction stage included in the historical log files (e.g., Q historical log files).
[0086] In one exemplary embodiment, based on the log data corresponding to M timestamps in the target log file, the processing duration of the interaction stage corresponding to the M timestamps in a set of interaction stages is determined, including:
[0087] S61, obtain the difference between every two adjacent timestamps in the M timestamps included in the timestamp sequence to obtain M-1 durations, and determine the difference between the target end timestamp and the last timestamp in the M timestamps as the Mth duration, wherein the M-1 durations and the Mth duration constitute the M durations;
[0088] S62, search the target log file for interaction data at the M interaction stages corresponding to the M timestamps;
[0089] S63, Based on the interaction data of the M interaction stages, determine the interaction stage identifiers of the M interaction stages;
[0090] S64, determine the historical processing time of the M interaction stages corresponding to the interaction stage identifiers of the M interaction stages from the pre-acquired historical information set, wherein the historical information set includes the historical processing time of different interaction stages after historical wake-up of the target interaction device and the corresponding interaction stage identifiers of different interaction stages.
[0091] S65, determine the duration that does not meet the first preset condition among the M durations, wherein the first preset condition includes: the difference between the duration in the M durations and the historical processing duration of the corresponding interaction stage in the M interaction stages is less than or equal to a preset threshold, or, when the historical processing duration is within the processing duration range, the duration in the M durations is within the processing duration range of the corresponding interaction stage in the M interaction stages.
[0092] S66, if T durations that do not meet the first preset condition are determined, based on the interaction data within each of the T durations, a set of supplementary timestamps that meet the second preset condition are determined within each of the T durations, where T≤M, T is a positive integer greater than or equal to 1, and each duration is divided into a set of sub-durations by a set of supplementary timestamps. The second preset condition includes: each sub-duration in a set of sub-durations corresponds to an interaction stage, and the difference between each sub-duration in a set of sub-durations and the historical processing time of the corresponding interaction stage in the historical information set is less than or equal to a preset threshold, or, when the historical processing time is within the processing time range, each sub-duration in a set of sub-durations is within the processing time range of the corresponding interaction stage in the historical information set.
[0093] S67. According to the chronological order of the timestamps, insert a set of supplementary timestamps determined within each duration into the timestamp sequence to obtain the target timestamp sequence;
[0094] S68, obtain the difference between every two adjacent timestamps in the target timestamp sequence to get S durations, and determine the difference between the target end timestamp and the last timestamp in the target timestamp sequence as the (S+1)th duration. In a set of interaction stages, the processing duration of the interaction stage corresponding to M timestamps includes S durations and the (S+1)th duration, where S is a positive integer greater than or equal to 1.
[0095] In this embodiment, when determining the processing duration of an interaction stage corresponding to M timestamps in a set of interaction stages based on the log data corresponding to M timestamps in the target log file, the historical processing duration of the M interaction stages obtained from the timestamp sequence can be obtained in the same or similar way as in the previous embodiment, and then the duration of the M durations that does not meet the first preset condition can be determined. This has been described before and will not be repeated here.
[0096] If T (here, T≤M, T is a positive integer greater than or equal to 1) durations are identified that do not meet the first preset condition, a set of supplementary timestamps that meet the second preset condition can be determined within each of the T durations based on the interaction data within each duration. Each duration can be divided into a set of sub-durations by the set of supplementary timestamps. Here, the second preset condition includes: each sub-duration in the set of sub-durations corresponds to an interaction stage, and the difference between each sub-duration in the set of sub-durations and the historical processing time of the corresponding interaction stage in the historical information set is less than or equal to a preset threshold; or, when the historical processing time is within a processing time range, each sub-duration in the set of sub-durations is within the processing time range of the corresponding interaction stage in the historical information set.
[0097] According to the chronological order of the timestamps, a set of supplementary timestamps within each duration is inserted into the timestamp sequence to obtain the target timestamp sequence. At this time, the target timestamp sequence contains S+1 timestamps, and S durations can be obtained from the S+1 timestamps (the above S durations can be obtained from the difference between each two adjacent timestamps in the S+1 timestamps), and each of the S durations satisfies the first preset condition.
[0098] After obtaining the target timestamp sequence, the difference between each two adjacent timestamps in the target timestamp sequence can be obtained to get S durations. The difference between the target end timestamp and the last timestamp in the target timestamp sequence is determined as the (S+1)th duration. At this point, a total of S+1 durations can be obtained.
[0099] This embodiment improves the accuracy and completeness of determining the processing time of each interaction stage by supplementing missing timestamps in the timestamp sequence based on the supplemented timestamp sequence.
[0100] The method for determining the processing time in this application embodiment is explained below with reference to an optional example. In this optional example, the processing time is the time for the target interactive device to process the request, and the interactive operation is voice interaction.
[0101] This optional example provides a solution for automatically calculating interaction response time on a voice module. It automatically retrieves relevant data from logs, extracts it, and automatically generates a table. For example... Figure 4 As shown, the process for determining the processing time in this optional example may include the following steps:
[0102] Step S402, Begin.
[0103] The application starts running.
[0104] Step S404: After enabling voice interaction, read the corresponding log file.
[0105] After the voice module in the target interactive device detects the voice signal and initiates interaction with the user, the server responds to the interaction by iterating through the log files generated during the voice interaction phase, reading one line of the log file at a time and checking whether the log file contains keywords (i.e., target identifiers).
[0106] Step S406: Determine whether the log file contains the keyword. If yes, proceed to step S408; otherwise, proceed to step S404.
[0107] Step S408: Save the timestamps corresponding to the filtered logs to a queue. Filter logs containing keywords from the read log files, and record the timestamps corresponding to the keywords in the queue. Multiple timestamps from a set of interaction phases after a single wake-up are stored in the same queue.
[0108] Step S410: Determine whether the log has been read completely. If yes, proceed to step S412; otherwise, proceed to step S404.
[0109] Step S412: Calculate the time difference between each stage. Process the timestamps stored in each queue, and use the difference between adjacent timestamps in the chronologically arranged timestamp sequence as the processing time of an interaction stage, thus obtaining the time difference between each stage in each interaction process.
[0110] Step S414: Determine whether all lists have been calculated. If yes, proceed to step S416; otherwise, proceed to step S412.
[0111] Step S416: Output to a table.
[0112] After organizing the time difference data for each stage of each interaction, the data is formatted and output as a table file.
[0113] Step S418, End.
[0114] This optional example automatically filters keywords, retrieves logs to view timestamps, calculates time differences based on keywords, and compiles the time spent at each stage into a table. This solves the previous time-consuming, labor-intensive, and error-prone problem, improving the efficiency and accuracy of determining the processing time of target interactive devices.
[0115] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0116] According to another aspect of the embodiments of this application, a processing time determination apparatus for implementing the above-described processing time determination method is also provided. Figure 5 This is a structural block diagram of an optional processing time determination device according to an embodiment of this application, such as... Figure 5 As shown, the device may include:
[0117] The first acquisition unit 502 is used to acquire the target log file of the target interactive device, wherein the target log file includes the interaction data of the target interactive device in a set of interaction stages after the target interactive device is woken up;
[0118] The search unit 504 is connected to the first acquisition unit 502 and is used to search for interactive data with a target identifier in the target log file. The interactive data with a target identifier includes interactive data generated when the target interactive device enters each interactive stage in a set of interactive stages.
[0119] The second acquisition unit 506 is connected to the search unit 504 and is used to acquire the timestamp corresponding to a set of interactive data in the target log file when a set of interactive data with a target identifier is found.
[0120] The first determining unit 508, connected to the second obtaining unit 506, is used to determine the processing time of each interaction stage in a set of interaction stages of the target interactive device based on the timestamps corresponding to a set of interaction data.
[0121] The above modules correspond to any of the methods for determining the processing time in the embodiments of this application, and can execute the steps in any of the methods for determining the processing time, which will not be repeated here.
[0122] The above modules are used to obtain the target log file of the target interactive device. The target log file includes the interaction data of the target interactive device in a set of interaction stages after the target interactive device is woken up. The target log file is used to search for interaction data with a target identifier. The interaction data with a target identifier includes the interaction data generated when the target interactive device enters each interaction stage in the set of interaction stages. If a set of interaction data with a target identifier is found, the timestamp corresponding to the set of interaction data is obtained from the target log file. Based on the timestamp corresponding to the set of interaction data, the processing time of each interaction stage in the set of interaction stages of the target interactive device is determined. This solves the problem of low efficiency in determining the processing time in related technologies due to the need for testers to manually check the logs, and improves the efficiency of determining the processing time.
[0123] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the content disclosed in the above embodiments. It should also be noted that the above modules, as part of a device, can operate in environments such as... Figure 1 The hardware environment shown can be implemented through software or hardware, and the hardware environment includes the network environment.
[0124] According to another aspect of the embodiments of this application, a storage medium is also provided. Optionally, in this embodiment, the storage medium can be used to execute program code for the method of determining the processing duration described above in the embodiments of this application. Optionally, in this embodiment, the storage medium can be located on at least one of a plurality of network devices in the network shown in the above embodiments.
[0125] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments, and will not be repeated in this embodiment.
[0126] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, ROMs, RAMs, portable hard drives, magnetic disks, or optical disks.
[0127] According to another aspect of the embodiments of this application, an electronic device for implementing the above-described method for determining processing time is also provided. The electronic device may be a server, a terminal, or a combination thereof.
[0128] Figure 6 This is a structural block diagram of an optional electronic device according to an embodiment of this application, such as... Figure 6As shown, it includes a processor 602, a communication interface 604, a memory 606, and a communication bus 608. The processor 602, communication interface 604, and memory 606 communicate with each other via the communication bus 608.
[0129] Memory 606 is used to store computer programs;
[0130] When the processor 602 executes the computer program stored in the memory 606, it implements the steps in any of the above-mentioned methods for determining the processing time.
[0131] Optionally, the communication bus can be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 The symbol is represented by a single thick line, but this does not indicate that there is only one bus or one type of bus. The communication interface is used for communication between the aforementioned electronic device and other devices.
[0132] The memory may include RAM, or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0133] As an example, the memory 606 described above may include, but is not limited to, the first acquisition unit 502, the search unit 504, the second acquisition unit 506, and the first determination unit 508 from the processing time determination device described above. Furthermore, it may include, but is not limited to, other module units from the processing time determination device described above, which will not be elaborated upon in this example.
[0134] The processors mentioned above can be general-purpose processors, including but not limited to: CPU (Central Processing Unit), NP (Network Processor), etc.; they can also be DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0135] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments, and will not be repeated here.
[0136] Those skilled in the art will understand that Figure 6 The structure shown is for illustrative purposes only. The device implementing the above method for determining the processing time can be a terminal device, such as a smartphone (e.g., an Android phone, an iOS phone), a tablet computer, a PDA, a mobile internet device (MID), a PAD, or other terminal devices. Figure 6 This does not limit the structure of the aforementioned electronic device. For example, the electronic device may also include components that are more... Figure 6 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 6 The different configurations shown.
[0137] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, ROM, RAM, disk or optical disk, etc.
[0138] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0139] If the integrated units in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in the aforementioned computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.
[0140] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0141] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the solution provided in this embodiment, depending on actual needs.
[0142] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or at least two units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0143] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for determining processing time, characterized in that, include: Obtain the target log file of the target interactive device, wherein the target log file includes the interaction data of the target interactive device in a set of interaction phases after the target interactive device is woken up; Search the target log file for interaction data with a target identifier, wherein the interaction data with the target identifier includes interaction data generated when the target interaction device enters each interaction stage in a set of interaction stages; If a set of interactive data with the target identifier is found, the timestamp corresponding to the set of interactive data is obtained from the target log file; Based on the timestamps corresponding to the set of interactive data, the processing time of the target interactive device for each interactive stage in the set of interactive stages is determined. The step of determining the processing time of each interaction stage in the set of interaction stages by the target interaction device based on the timestamps corresponding to the set of interaction data includes: Arrange the timestamps corresponding to the set of interactive data in chronological order to obtain a timestamp sequence; Based on two adjacent timestamps in the timestamp sequence, the processing time of the target interactive device in each interactive stage of the set of interactive stages is determined; The step of determining the processing time of the target interactive device for each interaction stage in the set of interaction stages based on two adjacent timestamps in the timestamp sequence includes: When the timestamp sequence includes M timestamps, the set of interaction stages includes N interaction stages, and M equals N, the processing time of the interaction stage corresponding to the M timestamps in the set of interaction stages is determined based on the historical processing time of each interaction stage in the set of interaction stages by the target interaction device, where M and N are positive integers greater than or equal to 1; or If the timestamp sequence includes M timestamps, the set of interaction stages includes N interaction stages, and M is less than N, the processing duration of the interaction stage corresponding to the M timestamps in the set of interaction stages is determined based on the log data corresponding to the M timestamps in the target log file, where M is a positive integer greater than or equal to 1 and N is a positive integer greater than or equal to 2.
2. The method according to claim 1, characterized in that, The step of determining the processing time of the target interactive device for each interaction stage in the set of interaction stages based on two adjacent timestamps in the timestamp sequence includes: When the timestamp sequence includes N timestamps, the difference between every two adjacent timestamps in the timestamp sequence is obtained to get N-1 durations. The duration of the first N-1 interaction stages in the N interaction stages is determined to be equal to the N-1 durations, and the duration of the last interaction stage in the N interaction stages is determined to be equal to the difference between the target end timestamp and the last timestamp in the timestamp sequence, where N is an integer greater than or equal to 2, and the target end timestamp is the end timestamp of the last interaction stage in the group of interaction stages.
3. The method according to claim 1, characterized in that, The step of determining the processing time of the interaction stage corresponding to the M timestamps in the set of interaction stages based on the historical processing time of each interaction stage in the set of interaction stages by the target interaction device includes: The difference between any two adjacent timestamps in the M timestamps included in the timestamp sequence is obtained to obtain M-1 durations. The difference between the target end timestamp and the last timestamp in the M timestamps is determined as the Mth duration. The M-1 durations and the Mth duration constitute the M durations. Search the target log file for interaction data at the M interaction stages corresponding to the M timestamps; Based on the interaction data in the M interaction stages, determine the interaction stage identifiers for the M interaction stages; In a pre-acquired set of historical information, the historical processing time of the M interaction stages corresponding to the interaction stage identifiers of the M interaction stages is determined. The set of historical information includes the historical processing time of different interaction stages after the target interaction device is historically woken up, as well as the corresponding interaction stage identifiers of the different interaction stages. Among the M durations, a duration that satisfies a first preset condition is determined, wherein the first preset condition includes: the difference between the duration among the M durations and the historical processing duration of the corresponding interaction stage among the M interaction stages is less than or equal to a preset threshold, or, when the historical processing duration is within a processing duration range, the duration among the M durations is within the processing duration range of the corresponding interaction stage among the M interaction stages. If P durations satisfy the first preset condition are determined, the processing duration of the interaction stage corresponding to the M timestamps in the group of interaction stages is determined to include: the P durations, where P≤M, P is a positive integer greater than or equal to 1, and the P durations are the processing durations of the P interaction stages corresponding to the group of interaction stages.
4. The method according to claim 3, characterized in that, The method further includes: The average processing time of the same interaction stage included in Q historical log files is determined as the historical processing time of the same interaction stage, wherein the historical information set includes the historical processing time of the same interaction stage, each historical log file includes the processing time of the target interaction device in each interaction stage after the target interaction device is historically woken up once, and Q is a positive integer greater than or equal to 1; or Select one processing duration from the processing durations of the same interaction stage included in Q historical log files as the historical processing duration of the same interaction stage, wherein the historical information set includes the historical processing durations of the same interaction stage, each historical log file includes the processing duration of the target interaction device in each interaction stage after the target interaction device is historically woken up once, and Q is a positive integer greater than or equal to 1; or Obtain the minimum and maximum processing times for the same interaction phase in Q historical log files, and determine the processing time range formed by the minimum and maximum processing times for the same interaction phase as the processing time range for the same interaction phase.
5. The method according to claim 1, characterized in that, The step of determining the processing duration of the interaction phase corresponding to the M timestamps in the set of interaction phases based on the log data corresponding to the M timestamps in the target log file includes: The difference between any two adjacent timestamps in the M timestamps included in the timestamp sequence is obtained to obtain M-1 durations. The difference between the target end timestamp and the last timestamp in the M timestamps is determined as the Mth duration. The M-1 durations and the Mth duration constitute the M durations. Search the target log file for interaction data at the M interaction stages corresponding to the M timestamps; Based on the interaction data in the M interaction stages, determine the interaction stage identifiers for the M interaction stages; In a pre-acquired set of historical information, the historical processing time of the M interaction stages corresponding to the interaction stage identifiers of the M interaction stages is determined. The set of historical information includes the historical processing time of different interaction stages after the target interaction device is historically woken up, as well as the corresponding interaction stage identifiers of the different interaction stages. Among the M durations, determine the durations that do not meet the first preset condition, wherein the first preset condition includes: the difference between the duration in the M durations and the historical processing duration of the corresponding interaction stage in the M interaction stages is less than or equal to a preset threshold, or, when the historical processing duration is within the processing duration range, the duration in the M durations is within the processing duration range of the corresponding interaction stage in the M interaction stages; If T durations are determined that do not meet the first preset condition, based on the interaction data within each of the T durations, a set of supplementary timestamps that meet the second preset condition are determined within each of the T durations, where T≤M, and T is a positive integer greater than or equal to 1. Each duration is divided into a set of sub-durations by the set of supplementary timestamps. The second preset condition includes: each sub-duration in the set of sub-durations corresponds to an interaction stage, and the difference between each sub-duration in the set of sub-durations and the historical processing time of the corresponding interaction stage in the historical information set is less than or equal to a preset threshold; or, when the historical processing time is within a processing time range, each sub-duration in the set of sub-durations is within the processing time range of the corresponding interaction stage in the historical information set. According to the chronological order of the timestamps, the set of supplementary timestamps determined for each duration is inserted into the timestamp sequence to obtain the target timestamp sequence; The difference between every two adjacent timestamps in the target timestamp sequence is obtained to obtain S durations, and the difference between the target end timestamp and the last timestamp in the target timestamp sequence is determined as the (S+1)th duration. The processing duration of the interaction stage corresponding to the M timestamps in the group of interaction stages includes the S durations and the (S+1)th duration, where S is a positive integer greater than or equal to 1.
6. A device for determining processing time, characterized in that, include: The first acquisition unit is used to acquire the target log file of the target interactive device, wherein the target log file includes the interaction data of the target interactive device in a set of interaction stages after the target interactive device is woken up; The search unit is used to search for interaction data with a target identifier in the target log file, wherein the interaction data with the target identifier includes interaction data generated when the target interaction device enters each interaction stage in a set of interaction stages; The second acquisition unit is used to acquire the timestamp corresponding to the set of interactive data in the target log file when a set of interactive data with the target identifier is found. The first determining unit is used to determine the processing time of each interaction stage of the target interactive device in the set of interaction stages based on the timestamp corresponding to the set of interaction data. The first determining unit is further configured to arrange the timestamps corresponding to the set of interactive data in chronological order to obtain a timestamp sequence; and to determine the processing time of each interactive stage of the target interactive device in the set of interactive stages based on two adjacent timestamps in the timestamp sequence. The first determining unit is further configured to, when the timestamp sequence includes M timestamps, the set of interaction stages includes N interaction stages, and M equals N, determine the processing time of the interaction stage corresponding to the M timestamps in the set of interaction stages based on the historical processing time of each interaction stage in the set of interaction stages by the target interaction device, wherein M and N are positive integers greater than or equal to 1; or, when the timestamp sequence includes M timestamps, the set of interaction stages includes N interaction stages, and M is less than N, determine the processing time of the interaction stage corresponding to the M timestamps in the set of interaction stages based on the log data corresponding to the M timestamps in the target log file, wherein M is a positive integer greater than or equal to 1, and N is a positive integer greater than or equal to 2.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program, when executed, performs the method of any one of claims 1 to 5.
8. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method of any one of claims 1 to 5 through the computer program.
Citation Information
Patent Citations
Test method and system for full-duplex voice interaction system
CN113707128A