Device control method and apparatus, electronic device, and computer-readable storage medium

CN122177101APending Publication Date: 2026-06-09SHENZHEN TCL NEW-TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN TCL NEW-TECH CO LTD
Filing Date
2026-02-10
Publication Date
2026-06-09

Smart Images

  • Figure CN122177101A_ABST
    Figure CN122177101A_ABST
Patent Text Reader

Abstract

The application discloses a device control method and device, an electronic device and a computer readable storage medium, and relates to the technical field of device control. The method comprises the following steps: acquiring voice control information, matching control intent information corresponding to the voice control information from a target cache to obtain matching result information, wherein the target cache is controlled by hierarchical caching according to comprehensive value weight information; if the matching result information indicates that the control intent information is matched, generating a device control instruction for the control intent information, executing the device control instruction, and obtaining device control result information. The corresponding control intent information is matched from the target cache instead of directly performing a time-consuming actual reasoning task, which helps to speed up the acquisition of the control intent information. The actual reasoning task link is obtained from the target cache, the link delay during voice interaction is reduced, the problem of slow voice response is alleviated, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of equipment control technology, specifically to an equipment control method, apparatus, electronic device, and computer-readable storage medium. Background Technology

[0002] With the popularization of smart home technology, voice control has gradually become an important interaction method for home appliances such as air conditioners.

[0003] Existing technologies typically involve multiple steps when processing voice commands, including speech recognition, semantic understanding, command generation, and device control. However, this complex process results in a long overall response time, especially in scenarios involving Large Language Model (LLM) inference, where latency issues are particularly prominent.

[0004] Therefore, optimizing voice-based device interaction, reducing link latency during voice interaction, and alleviating the problem of slow voice response are technical issues that urgently need to be addressed. Summary of the Invention

[0005] This application provides a device control method, apparatus, electronic device, and computer-readable storage medium, which can reduce link latency during voice interaction, alleviate the problem of slow voice response, and improve user experience.

[0006] In a first aspect, embodiments of this application provide a device control method applied to a terminal device, the method comprising:

[0007] Obtain voice control information; The control intent information corresponding to the voice control information is matched from the target cache to obtain matching result information, wherein the target cache is hierarchically cached according to comprehensive value weight information; If the matching result information indicates a match with the control intent information, then a device control command is generated for the control intent information; Execute the device control command to obtain device control result information.

[0008] Secondly, embodiments of this application also provide a device control apparatus applied to a terminal device, the apparatus comprising: The acquisition module is used to acquire voice control information; The matching module is used to match the control intent information corresponding to the voice control information from the target cache to obtain matching result information, wherein the target cache is subjected to hierarchical caching control according to comprehensive value weight information; The generation module is used to generate device control instructions for the control intent information if the matching result information indicates a match with the control intent information. The execution module is used to execute the device control instructions and obtain device control result information.

[0009] Optionally, in some embodiments of this application, the target cache includes a hot cache and a cold cache, and the matching result information includes first matching result information and second matching result information; The step of matching the control intent information corresponding to the voice control information from the target cache to obtain matching result information includes: The control intent information corresponding to the voice control information is matched from the hot cache to obtain the first matching result information; If the first matching result information indicates that the control intent information is not matched, then the control intent information is matched from the cold cache to obtain the second matching result information; If the matching result information indicates a match with the control intent information, then a device control command is generated for the control intent information, including: If the second matching result information indicates a match with the control intent information, then a device control command is generated for the control intent information.

[0010] Optionally, in some embodiments of this application, after matching the control intent information corresponding to the voice control information from the target cache to obtain the matching result information, the device further includes: If the matching result information indicates that the control intention information is not matched, the control intention information corresponding to the voice control information is inferred through the semantic understanding model; The device further includes: The control intent information obtained through reasoning is cached in the hot cache of the target cache, wherein the hot cache is obtained by recalculating the comprehensive value weight information of the cached information in the hot cache of each terminal device based on a set period, and updating it based on the recalculated comprehensive value weight information; The target cache is based on the W-TinyLFU caching architecture.

[0011] Optionally, in some embodiments of this application, if the target cache contains the control intent information, the target cache includes a hot cache and a cold cache; Before obtaining the matching result information by matching the control intent information corresponding to the voice control information from the target cache, the device further includes: Calculate at least one dimension of value information corresponding to the control intent information, wherein the dimension of value information includes time dimension value information, space dimension value information, or business dimension value information; Generate comprehensive value weight information based on at least one of the aforementioned dimension value information; The control intent information is stored in the target cache in layers according to the comprehensive value weight information.

[0012] Optionally, in some embodiments of this application, storing the control intent information in the target cache in layers according to the comprehensive value weight information includes: If the comprehensive value weight information is greater than or equal to the weight threshold, then the control intent information is cached in the hot cache; If the comprehensive value weight information is less than the weight threshold, then the control intent information is cached in the cold cache.

[0013] Optionally, in some embodiments of this application, calculating at least one dimension of value information corresponding to the control intent information includes: If the dimension value information includes time dimension value information, then the dimension value information is calculated based on the time interval information from the generation of the control intention information to the current time and the time decay factor. If the dimensional value information includes spatial dimensional value information, then the hotspot distribution area corresponding to the control intent information is determined, and the dimensional value information is calculated based on the access probability of the hotspot distribution area. If the dimensional value information includes business dimensional value information, then the dimensional value information is calculated based on the business importance information and importance threshold information corresponding to the control intent information.

[0014] Optionally, in some embodiments of this application, after executing the device control command and obtaining the device control result information, the apparatus further includes: Match the feedback audio corresponding to the device control result information from the audio cache, and if the feedback audio is matched from the audio cache, output the feedback audio; If the feedback audio is not matched from the audio cache, the feedback audio corresponding to the device control command is generated by the audio generation model and the feedback audio is output.

[0015] Thirdly, embodiments of this application also provide an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the steps in the device control method described above.

[0016] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in the device control method described above.

[0017] Fifthly, embodiments of this application also provide a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various optional implementations described in embodiments of this application.

[0018] In summary, the terminal device of this application embodiment obtains voice control information, matches the control intent information corresponding to the voice control information from the target cache, and obtains matching result information. The target cache is hierarchically cached according to comprehensive value weight information. If the matching result information indicates that the control intent information is matched, a device control instruction for the control intent information is generated, the device control instruction is executed, and the device control result information is obtained.

[0019] In this embodiment, after obtaining the voice control information to be analyzed, the corresponding control intent information is first matched from the target cache, rather than directly performing the time-consuming actual reasoning task, which helps to speed up the acquisition of control intent information; the task link to replace the actual reasoning is obtained from the target cache, reducing the link delay during voice interaction, alleviating the problem of slow voice response, and improving the user experience.

[0020] Furthermore, the target cache is based on hierarchical cache control, which helps to match control intent information according to the characteristics of hierarchical cache, improves the matching efficiency of control intent information, further reduces link latency, and alleviates the problem of slow response.

[0021] Furthermore, hierarchical caching control based on comprehensive value weight information allows information to be cached hierarchically according to value, improving the efficiency of hitting control intent information, further enhancing the response rate of voice interaction, and improving the user experience. Attached Figure Description

[0022] To more clearly illustrate the technical solutions in this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 This is a schematic diagram of a scenario in which a terminal device, according to an embodiment of this application, executes the device control method; Figure 2 This is a schematic flowchart of the device control method provided in the embodiments of this application; Figure 3 This is a schematic diagram of the structure of the device control apparatus provided in the embodiments of this application; Figure 4 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application.

[0024] Explanation of icon numbers: 101-Terminal device; 301-Acquisition module; 302-Matching module; 303-Generation module; 304-Execution module; 401-Processor; 402-Memory; 403-Power supply; 404-Input unit. Detailed Implementation

[0025] The technical solutions of this application will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0026] In the description of the embodiments of this application, it should be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientation or positional relationships based on the orientation or positional relationships shown in the accompanying drawings, are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the present invention. Furthermore, the terms "first," "second," "third," and "fourth" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, features defined with "first," "second," "third," and "fourth" may explicitly or implicitly include one or more features. In the description of the present invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0027] In this application, the term "exemplary" is used to mean "serving as an example, illustration, or description." Any embodiment described as "exemplary" in this application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use the invention. Details are set forth in the following description for purposes of explanation. It should be understood that those skilled in the art will recognize that the invention can be made without using these specific details. In other instances, well-known structures and processes will not be described in detail to avoid obscuring the description of the invention with unnecessary detail. Therefore, the invention is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed in this application.

[0028] This application provides a device control method, apparatus, electronic device, and computer-readable storage medium. Specifically, this application provides a device control apparatus suitable for electronic devices, including terminal devices, which include, but are not limited to, devices with voice interaction capabilities such as mobile phones, tablets, smartwatches, speakers, extended reality devices, air conditioners, refrigerators, or televisions.

[0029] For example, please see Figure 1 , Figure 1 This is a schematic diagram illustrating a scenario where a terminal device, according to an embodiment of this application, executes the device control method. Specifically, the execution process of the terminal device executing the device control method is as follows: Terminal device 101 acquires voice control information, matches the control intent information corresponding to the voice control information from the target cache, and obtains matching result information. The target cache is hierarchically cached according to comprehensive value weight information. If the matching result information indicates that the control intent information is matched, a device control instruction for the control intent information is generated, the device control instruction is executed, and the device control result information is obtained.

[0030] For example, taking an air conditioner as a terminal device, if the terminal device detects the user's control voice, it matches the control intent corresponding to the control voice from the target cache. If a control intent information is matched, a device control command is generated based on the control intent information, and the device control command is executed to obtain device control result information. For example, the intent of the user's voice to adjust the temperature is understood, and then a device command to adjust the temperature is generated and executed to adjust the set temperature of the air conditioner.

[0031] It is understood that after obtaining the voice control information to be analyzed, the terminal device in this application embodiment first matches the corresponding control intent information from the target cache, rather than directly performing the time-consuming actual reasoning task, which helps to speed up the acquisition of control intent information; and obtains the task link to replace the actual reasoning from the target cache, reducing the link delay during voice interaction, alleviating the problem of slow voice response, and improving the user experience.

[0032] Furthermore, the target cache is based on hierarchical cache control, which helps to match control intent information according to the characteristics of hierarchical cache, improves the matching efficiency of control intent information, further reduces link latency, and alleviates the problem of slow response.

[0033] Furthermore, hierarchical caching control based on comprehensive value weight information allows information to be cached hierarchically according to value, improving the efficiency of hitting control intent information, further enhancing the response rate of voice interaction, and improving the user experience.

[0034] The following sections provide detailed descriptions of each example. It should be noted that the order in which the embodiments are described is not intended to limit the priority of the embodiments.

[0035] Please see Figure 2 , Figure 2 This is a flowchart illustrating a device control method provided in an embodiment of this application. Although the flowchart shows a logical order, in some cases, the steps shown or described may be executed in a different order than that shown in the flowchart. Specifically, this device control method is applied to a terminal device, and the specific flow of the device control method is as follows: S201. Obtain voice control information.

[0036] Voice control information refers to the instructions given by the user and collected by the device's voice acquisition module for controlling the device. For example, this includes voice commands such as "increase temperature," "increase fan speed," and "reduce noise."

[0037] It is understandable that the voice control information is speech that the device needs to understand. For example, the voice control information needs to be semantically understood before the device can know the user's operation intention, and then generate and execute the device instructions based on the operation intention to respond to the user's voice control.

[0038] S202. Match the control intent information corresponding to the voice control information from the target cache to obtain matching result information, wherein the target cache is hierarchically cached according to the comprehensive value weight information.

[0039] Understandably, the target cache is a cache that stores several intent information. This intent information can be obtained after semantic understanding by a large language model or other semantic understanding model, or it can be obtained by administrators, engineers or users.

[0040] Among them, control intent information is the intent understanding result corresponding to semantic control information, that is, the operation intent corresponding to the voice control information that the device can understand. For example, control intent information includes temperature increase, wind speed increase, or noise reduction.

[0041] In this embodiment, after obtaining voice control information, instead of directly performing a time-consuming semantic understanding task using a large language model or other semantic understanding model, the system first matches the control intent information corresponding to the voice control information from the target cache. It is understood that the information matching process is more time-efficient than the intent reasoning process. Therefore, if control intent information is matched from the target cache, the time required for intent understanding is saved by replacing the time-consuming intent reasoning task, thus improving the efficiency of intent understanding.

[0042] The matching result information refers to the result that indicates whether the control intent information corresponding to the voice control information is matched from the target cache. For example, the matching result information includes whether the control intent information corresponding to the voice control information is matched or not.

[0043] Among them, the comprehensive value weight information is the result of a comprehensive value assessment of information through multiple dimensions, representing the overall value of the information. It can be understood that the higher the comprehensive value weight information, the higher the value of the information; conversely, the lower the comprehensive value weight, the lower the value of the information.

[0044] Among these features, tiered caching control allows for the differentiated storage of different types of information within the cache. In essence, tiered caching based on comprehensive value weighting ensures that information of varying value is stored in the cache according to different hierarchical relationships. This tiered caching design facilitates the rapid matching of corresponding control intent information, thereby improving the efficiency of control intent information matching.

[0045] S203. If the matching result information indicates a match with the control intent information, then a device control command for the control intent information is generated.

[0046] Understandably, if control intent information is matched from the target cache, there is no need to perform the time-consuming intent reasoning task, thus saving intent reasoning time and improving intent acquisition efficiency.

[0047] Among them, device control commands are instructions for controlling the device, which are instructions that the device can understand and execute. By generating device control commands, it is helpful to realize the response to user voice control information based on the device control commands.

[0048] S204. Execute the device control command to obtain device control result information.

[0049] Among them, the equipment control result information refers to the execution result after the equipment executes the equipment control command. The equipment control result information includes at least two categories: successful execution and execution failure. For example, the equipment control result information includes successful temperature increase and failed temperature regulation.

[0050] In summary, after obtaining the voice control information to be analyzed, the terminal device in this application first matches the corresponding control intent information from the target cache, rather than directly performing the time-consuming actual reasoning task, which helps to speed up the acquisition of control intent information; it obtains the task link to replace the actual reasoning from the target cache, reduces the link delay during voice interaction, alleviates the problem of slow voice response, and improves the user experience.

[0051] Furthermore, the target cache is based on hierarchical cache control, which helps to match control intent information according to the characteristics of hierarchical cache, improves the matching efficiency of control intent information, further reduces link latency, and alleviates the problem of slow response.

[0052] Furthermore, hierarchical caching control based on comprehensive value weight information allows information to be cached hierarchically according to value, improving the efficiency of hitting control intent information, further enhancing the response rate of voice interaction, and improving the user experience.

[0053] In this embodiment, the target cache includes a hot cache and a cold cache, and hierarchical caching control of information is achieved through the hot cache and cold cache. Correspondingly, the matching result information includes first matching result information and second matching result information. The step of "matching the control intent information corresponding to the voice control information from the target cache to obtain the matching result information" includes: The control intent information corresponding to the voice control information is matched from the hot cache to obtain the first matching result information; If the first matching result information indicates that the control intent information is not matched, then the control intent information is matched from the cold cache to obtain the second matching result information; If the matching result information indicates a match with the control intent information, then a device control command is generated for the control intent information, including: If the second matching result information indicates a match with the control intent information, then a device control command is generated for the control intent information.

[0054] The first matching result information refers to the result of matching control intent information from the hot cache, which includes at least two types: matching control intent information and not matching control intent information.

[0055] The second matching result information refers to the result of matching control intent information from the cold cache, which includes at least two types: matching control intent information and not matching control intent information.

[0056] It is understood that in the embodiments of this application, if the first matching result information represents a match with control intent information, then there is no need to match the control intent information from the cold cache (such as the Redis cache). That is, the device control instructions can be generated directly using the control intent information matched from the hot cache.

[0057] The hot cache and cold cache are designed according to the frequency of data access. For example, information with high access frequency is cached in the hot cache, and information with low access frequency is cached in the cold cache.

[0058] Understandably, frequently accessed data is typically less abundant, while the cold cache contains a larger amount of data. Therefore, the hot cache matches control intent information more quickly. Thus, matching control intent information first from the hot cache helps improve the efficiency of control intent information matching and reduces the time spent matching from the large amount of data in the cold cache.

[0059] It is understandable that comprehensive value weight information reflects the value of information, and the access frequency of information is one factor reflecting the value of information. Alternatively, when the comprehensive value weight information of information is high, the access frequency of the information is generally also high. Therefore, in this embodiment, intent information (such as control intent information or other intent information corresponding to voice control) can be hierarchically cached between hot and cold caches according to the comprehensive value weight information. For example, control intent information with high comprehensive value weight information is cached using hot caching, while control intent information with low comprehensive value weight information is cached using cold caching.

[0060] In this embodiment of the application, if no control intent information is matched from the target cache, the semantic understanding model is used to perform intent reasoning to obtain the control intent information corresponding to the voice control information. That is, optionally, in some embodiments of the application, after the step "matching the control intent information corresponding to the voice control information from the target cache to obtain matching result information", the method further includes: If the matching result information indicates that the control intention information is not matched, the control intention information corresponding to the voice control information is inferred through the semantic understanding model; The method further includes: The control intent information obtained through reasoning is cached in the hot cache of the target cache, wherein the hot cache is obtained by recalculating the comprehensive value weight information of the cached information in the hot cache of each terminal device based on a set period, and updating it based on the recalculated comprehensive value weight information; The target cache is based on the W-TinyLFU caching architecture.

[0061] Among them, the semantic understanding model is a model for understanding or reasoning about the intent of speech control information. For example, the semantic understanding model includes a large language model.

[0062] Understandably, control intent information derived from reasoning using a large language model is cached in the target cache. It's also understandable that, since this control intent information is currently derived from reasoning using a large language model, it possesses high freshness and can therefore be cached using hot caching.

[0063] Correspondingly, this hot cache can be set up locally on the terminal device. For example, the terminal device can store control intent information with higher comprehensive value weight information locally. It is understandable that, since the voice control data of a single user is relatively small, or the sample size is limited, multiple hot caches corresponding to multiple terminal devices can be used to update the hot caches of each terminal device, thereby improving the accuracy and rationality of the control intent information stored in the hot cache. For example, the server can periodically retrieve the control intent information from the hot caches of multiple terminal devices, then recalculate the comprehensive value weight information of each control intent information, and update each hot cache based on the recalculated comprehensive value weight information.

[0064] It is understood that the embodiments of this application are based on the layered (hot cache and cold cache) design of the W-TinyLFU cache architecture, and combined with the adjustment mechanism of comprehensive value weight information to optimize the allocation of cache resources. Through the layered design, frequently used instructions and high-frequency data are preferentially stored in the high-level cache, reducing access latency, while low-frequency data is stored in the low-level cache, improving the overall cache utilization.

[0065] In this embodiment of the application, the comprehensive value weight information corresponding to the control intent information can be obtained by comprehensively evaluating value information from multiple dimensions. That is, optionally, in some embodiments of this application, if the target cache contains the control intent information, and the target cache includes a hot cache and a cold cache, then before the step "matching the control intent information corresponding to the voice control information from the target cache to obtain matching result information", the method further includes: Calculate at least one dimension of value information corresponding to the control intent information, wherein the dimension of value information includes time dimension value information, space dimension value information, or business dimension value information; Generate comprehensive value weight information based on at least one of the aforementioned dimension value information; The control intent information is stored in the target cache in layers according to the comprehensive value weight information.

[0066] Among them, the time dimension value information focuses on the value of the time dimension, reflecting the popularity trend and freshness of data over time. For example, the earlier the control intent information is from the current time, the lower the time dimension value of the control intent information; the more recent the control intent information is from the current time, the higher the time dimension value of the control intent information.

[0067] Among them, spatial dimension value information reflects the spatial distribution of data, the level of data popularity, and is related to the frequency of data access. For example, depending on whether the control intent information is distributed in frequently accessed areas, areas with high access popularity, areas where issues are relatively scattered and wide-ranging, areas where issues are concentrated but access frequency or access probability is low, or areas where access points are not concentrated, different control dimension values ​​are acquired.

[0068] Among them, the business dimension value information focuses on the importance evaluation of business indicators, which is related to business priority. For example, for air conditioners that mainly focus on music, the music domain has a higher weight; for air conditioners that mainly focus on control tasks, the cache of control instructions has a higher priority; and for air conditioners that mainly focus on emotional interaction, the emotional domain has a higher weight.

[0069] In this embodiment of the application, the value information of the time dimension, the value information of the space dimension, and the value information of the business dimension can be integrated based on the weights of the three dimensions of time, space, and business to obtain a more reasonable comprehensive value weight information.

[0070] It is understood that the embodiments of this application combine multiple dimensions such as time dimension, space dimension and business dimension to conduct comprehensive value weight analysis, improve the accuracy of comprehensive value weight information, and thus improve the rationality of control intent information caching.

[0071] For example, in this embodiment of the application, the time dimension value information can be calculated based on the time interval information from the generation of the control intention information to the current time and the time decay factor, such as the time dimension value information. This can be expressed by the following formula: .

[0072] Where α represents the time decay factor, used to control the impact of data freshness. This time decay factor can be predefined based on experience or actual needs. Where T represents the time interval from now, for example, the time interval from when the control intent information is obtained after inference by a large language model or when it is cached in a hot cache. Here, T reflects the freshness of the data; for example, the larger T is, the larger the time interval from now, and the lower the freshness.

[0073] In this embodiment, spatial dimension value information can be calculated based on the hotspot distribution area corresponding to the control intent information and the access probability corresponding to that hotspot distribution area. The access probability includes the access frequency corresponding to the hotspot distribution area. For example, each distribution area is divided into four regions according to access frequency: popular region, sparse but widespread region, concentrated but rarely accessed region, and isolated region, each region corresponding to an access frequency. By analyzing the region to which the control intent information belongs and using the access frequency corresponding to that region as the access probability, this access probability is based on the spatial dimension value information corresponding to the control intent information.

[0074] In this embodiment, the business dimension value information is calculated based on the business importance information and importance threshold information corresponding to the control intent information. The business importance information refers to the priority or importance of the business corresponding to the control intent information, and the importance threshold information refers to the highest importance among all businesses. Correspondingly, the business dimension value information corresponding to the control intent information can be calculated based on the ratio of the business importance information to the importance threshold information. For example, the business dimension value information of the control intent information... This can be expressed by the following formula: .

[0075] in, Information indicating the importance of the business, Information indicating the importance threshold.

[0076] In this embodiment, a weight threshold can be set to evaluate the comprehensive value weight information, thereby enabling hierarchical control of the caching of control intent information. Optionally, in some embodiments of this application, the step "hierarchically storing the control intent information into the target cache according to the comprehensive value weight information" includes: If the comprehensive value weight information is greater than or equal to the weight threshold, then the control intent information is cached in the hot cache; If the comprehensive value weight information is less than the weight threshold, then the control intent information is cached in the cold cache.

[0077] The weight threshold is used for hierarchical control of hot cache and cold cache. The weight threshold can be set based on experience or actual needs. For example, in this embodiment, the weight threshold is set to 0.8.

[0078] In this embodiment of the application, feedback audio can be generated to indicate the execution status of the device control command. The user is informed of the device's response to the voice control by outputting the feedback audio. For example, the feedback audio may include audio indicating that the air conditioner set temperature has been successfully increased or that the air conditioner fan speed has been successfully increased.

[0079] The feedback audio can be generated based on the device control result information. For example, the feedback audio of the device control result information can be generated by a deep learning-based audio generation model.

[0080] In this embodiment, the feedback audio corresponding to the device control result information can be preferentially matched from the cache to reduce the time consumed when generating the audio through the audio generation model. That is, optionally, in some embodiments of this application, after the step "execute the device control instruction to obtain the device control result information", the method further includes: Match the feedback audio corresponding to the device control result information from the audio cache, and if the feedback audio is matched from the audio cache, output the feedback audio; If the feedback audio is not matched from the audio cache, the feedback audio corresponding to the device control command is generated by the audio generation model and the feedback audio is output.

[0081] The audio cache is used to cache audio, which can be entered by the user or generated by the audio generation model.

[0082] Understandably, outputting feedback audio provides feedback on the user's voice control response. Furthermore, prioritizing matching feedback audio from the audio cache improves matching efficiency, avoiding the time-consuming issue of directly generating audio or using the audio generation model every time. Additionally, when the feedback audio is not in the audio cache, generation through the audio generation model ensures that the terminal device always outputs feedback audio reflecting the device control result, thus enhancing the user experience.

[0083] In summary, after obtaining the voice control information to be analyzed, the embodiments of this application first match the corresponding control intent information from the target cache, rather than directly performing the time-consuming actual reasoning task, which helps to speed up the acquisition of control intent information; and obtain the task link to replace the actual reasoning from the target cache, reducing the link latency during voice interaction, alleviating the problem of slow voice response, and improving the user experience.

[0084] Furthermore, the target cache is based on hierarchical cache control, which helps to match control intent information according to the characteristics of hierarchical cache, improves the matching efficiency of control intent information, further reduces link latency, and alleviates the problem of slow response.

[0085] Furthermore, hierarchical caching control based on comprehensive value weight information allows information to be cached hierarchically according to value, improving the efficiency of hitting control intent information, further enhancing the response rate of voice interaction, and improving the user experience.

[0086] In this application embodiment, the design of hot caching and cold caching, and the priority extraction of data from hot caching, improves the hit or matching efficiency of control intent information, improves the response speed of voice control, and enhances the user experience.

[0087] To facilitate better implementation of the equipment control method of this application, this application also provides an equipment control device based on the above-described equipment control method. The meanings of the terms used are the same as in the above-described equipment control method, and specific implementation details can be found in the descriptions of the method embodiments.

[0088] Please see Figure 3 , Figure 3 This is a schematic diagram of the structure of the device control device provided in the embodiment of this application, wherein the device control device is applied to a terminal device, and the device control device may specifically be as follows: The acquisition module 301 is used to acquire voice control information; The matching module 302 is used to match the control intent information corresponding to the voice control information from the target cache to obtain matching result information, wherein the target cache is subjected to hierarchical caching control according to comprehensive value weight information; The generation module 303 is used to generate a device control command for the control intent information if the matching result information indicates a match with the control intent information. The execution module 304 is used to execute the device control instructions and obtain device control result information.

[0089] Optionally, in some embodiments of this application, the target cache includes a hot cache and a cold cache, and the matching result information includes first matching result information and second matching result information; The step of matching the control intent information corresponding to the voice control information from the target cache to obtain matching result information includes: The control intent information corresponding to the voice control information is matched from the hot cache to obtain the first matching result information; If the first matching result information indicates that the control intent information is not matched, then the control intent information is matched from the cold cache to obtain the second matching result information; If the matching result information indicates a match with the control intent information, then a device control command is generated for the control intent information, including: If the second matching result information indicates a match with the control intent information, then a device control command is generated for the control intent information.

[0090] Optionally, in some embodiments of this application, after matching the control intent information corresponding to the voice control information from the target cache to obtain the matching result information, the device further includes: If the matching result information indicates that the control intention information is not matched, the control intention information corresponding to the voice control information is inferred through the semantic understanding model; The device further includes: The control intent information obtained through reasoning is cached in the hot cache of the target cache, wherein the hot cache is obtained by recalculating the comprehensive value weight information of the cached information in the hot cache of each terminal device based on a set period, and updating it based on the recalculated comprehensive value weight information; The target cache is based on the W-TinyLFU caching architecture.

[0091] Optionally, in some embodiments of this application, if the target cache contains the control intent information, the target cache includes a hot cache and a cold cache; Before obtaining the matching result information by matching the control intent information corresponding to the voice control information from the target cache, the device further includes: Calculate at least one dimension of value information corresponding to the control intent information, wherein the dimension of value information includes time dimension value information, space dimension value information, or business dimension value information; Generate comprehensive value weight information based on at least one of the aforementioned dimension value information; The control intent information is stored in the target cache in layers according to the comprehensive value weight information.

[0092] Optionally, in some embodiments of this application, storing the control intent information in the target cache in layers according to the comprehensive value weight information includes: If the comprehensive value weight information is greater than or equal to the weight threshold, then the control intent information is cached in the hot cache; If the comprehensive value weight information is less than the weight threshold, then the control intent information is cached in the cold cache.

[0093] Optionally, in some embodiments of this application, calculating at least one dimension of value information corresponding to the control intent information includes: If the dimension value information includes time dimension value information, then the dimension value information is calculated based on the time interval information from the generation of the control intention information to the current time and the time decay factor. If the dimensional value information includes spatial dimensional value information, then the hotspot distribution area corresponding to the control intent information is determined, and the dimensional value information is calculated based on the access probability of the hotspot distribution area. If the dimensional value information includes business dimensional value information, then the dimensional value information is calculated based on the business importance information and importance threshold information corresponding to the control intent information.

[0094] Optionally, in some embodiments of this application, after executing the device control command and obtaining the device control result information, the apparatus further includes: Match the feedback audio corresponding to the device control result information from the audio cache, and if the feedback audio is matched from the audio cache, output the feedback audio; If the feedback audio is not matched from the audio cache, the feedback audio corresponding to the device control command is generated by the audio generation model and the feedback audio is output.

[0095] In this embodiment, the acquisition module 301 acquires voice control information, and the matching module 302 matches the control intent information corresponding to the voice control information from the target cache to obtain matching result information. The target cache is hierarchically cached according to comprehensive value weight information. If the matching result information indicates that the control intent information is matched, the generation module 303 generates a device control instruction for the control intent information, and the execution module 304 executes the device control instruction to obtain device control result information.

[0096] In this embodiment, after obtaining the voice control information to be analyzed, the corresponding control intent information is first matched from the target cache, rather than directly performing the time-consuming actual reasoning task, which helps to speed up the acquisition of control intent information; the task link to replace the actual reasoning is obtained from the target cache, reducing the link delay during voice interaction, alleviating the problem of slow voice response, and improving the user experience.

[0097] Furthermore, the target cache is based on hierarchical cache control, which helps to match control intent information according to the characteristics of hierarchical cache, improves the matching efficiency of control intent information, further reduces link latency, and alleviates the problem of slow response.

[0098] Furthermore, hierarchical caching control based on comprehensive value weight information allows information to be cached hierarchically according to value, improving the efficiency of hitting control intent information, further enhancing the response rate of voice interaction, and improving the user experience.

[0099] In addition, this application also provides an electronic device, such as Figure 4As shown, it illustrates a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Specifically: The electronic device may include components such as a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will understand that... Figure 4 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein: The processor 401 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 402, and by calling data stored in the memory 402, it performs various functions and processes data, thereby providing overall monitoring of the electronic device. Optionally, the processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 401.

[0100] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function, etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.

[0101] The electronic device also includes a power supply 403 that supplies power to the various components. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 403 may also include one or more DC or AC power supplies, recharging systems, power equipment debugging circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0102] The electronic device may also include an input unit 404, which can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.

[0103] Although not shown, the electronic device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 401 in the electronic device loads the executable files corresponding to the processes of one or more applications into the memory 402 according to the following instructions, and the processor 401 runs the applications stored in the memory 402, thereby implementing the steps in any of the device control methods provided in the embodiments of this application.

[0104] The terminal device in this application embodiment obtains voice control information, matches the control intent information corresponding to the voice control information from the target cache, and obtains matching result information. The target cache is hierarchically cached according to comprehensive value weight information. If the matching result information indicates that the control intent information is matched, a device control instruction for the control intent information is generated, the device control instruction is executed, and device control result information is obtained.

[0105] In this embodiment, after obtaining the voice control information to be analyzed, the corresponding control intent information is first matched from the target cache, rather than directly performing the time-consuming actual reasoning task, which helps to speed up the acquisition of control intent information; the task link to replace the actual reasoning is obtained from the target cache, reducing the link delay during voice interaction, alleviating the problem of slow voice response, and improving the user experience.

[0106] Furthermore, the target cache is based on hierarchical cache control, which helps to match control intent information according to the characteristics of hierarchical cache, improves the matching efficiency of control intent information, further reduces link latency, and alleviates the problem of slow response.

[0107] Furthermore, hierarchical caching control based on comprehensive value weight information allows information to be cached hierarchically according to value, improving the efficiency of hitting control intent information, further enhancing the response rate of voice interaction, and improving the user experience.

[0108] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0109] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0110] Therefore, this application provides a computer-readable storage medium storing a computer program that can be loaded by a processor to execute the steps of any of the device control methods provided in this application.

[0111] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0112] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0113] Since the instructions stored in the computer-readable storage medium can execute the steps of any of the device control methods provided in this application, the beneficial effects that any of the device control methods provided in this application can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.

[0114] The above provides a detailed description of a device control method, apparatus, electronic device, and computer-readable storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, those skilled in the art will recognize that there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A device control method, characterized in that, Applied to a terminal device, the method includes: Obtain voice control information; The control intent information corresponding to the voice control information is matched from the target cache to obtain matching result information, wherein the target cache is hierarchically cached according to comprehensive value weight information; If the matching result information indicates a match with the control intent information, then a device control command is generated for the control intent information; Execute the device control command to obtain device control result information.

2. The equipment control method according to claim 1, characterized in that, The target cache includes a hot cache and a cold cache, and the matching result information includes first matching result information and second matching result information; The step of matching the control intent information corresponding to the voice control information from the target cache to obtain matching result information includes: The control intent information corresponding to the voice control information is matched from the hot cache to obtain the first matching result information; If the first matching result information indicates that the control intent information is not matched, then the control intent information is matched from the cold cache to obtain the second matching result information; If the matching result information indicates a match with the control intent information, then a device control command is generated for the control intent information, including: If the second matching result information indicates a match with the control intent information, then a device control command is generated for the control intent information.

3. The equipment control method according to claim 1, characterized in that, After obtaining the matching result information by matching the control intent information corresponding to the voice control information from the target cache, the method further includes: If the matching result information indicates that the control intention information is not matched, the control intention information corresponding to the voice control information is inferred through the semantic understanding model; The method further includes: The control intent information obtained through reasoning is cached in the hot cache of the target cache, wherein the hot cache is obtained by recalculating the comprehensive value weight information of the cached information in the hot cache of each terminal device based on a set period, and updating it based on the recalculated comprehensive value weight information; The target cache is based on the W-TinyLFU caching architecture.

4. The equipment control method according to claim 1, characterized in that, If the target cache contains the control intent information, the target cache includes a hot cache and a cold cache; Before obtaining the matching result information by matching the control intent information corresponding to the voice control information from the target cache, the method further includes: Calculate at least one dimension of value information corresponding to the control intent information, wherein the dimension of value information includes time dimension value information, space dimension value information, or business dimension value information; Generate comprehensive value weight information based on at least one of the aforementioned dimension value information; The control intent information is stored in the target cache in layers according to the comprehensive value weight information.

5. The equipment control method according to claim 4, characterized in that, The step of storing the control intent information in the target cache in layers according to the comprehensive value weight information includes: If the comprehensive value weight information is greater than or equal to the weight threshold, then the control intent information is cached in the hot cache; If the comprehensive value weight information is less than the weight threshold, then the control intent information is cached in the cold cache.

6. The equipment control method according to claim 4, characterized in that, The calculation of at least one dimension of value information corresponding to the control intent information includes: If the dimension value information includes time dimension value information, then the dimension value information is calculated based on the time interval information from the generation of the control intention information to the current time and the time decay factor. If the dimensional value information includes spatial dimensional value information, then the hotspot distribution area corresponding to the control intent information is determined, and the dimensional value information is calculated based on the access probability of the hotspot distribution area. If the dimensional value information includes business dimensional value information, then the dimensional value information is calculated based on the business importance information and importance threshold information corresponding to the control intent information.

7. The equipment control method according to claim 1, characterized in that, After executing the device control command and obtaining the device control result information, the method further includes: Match the feedback audio corresponding to the device control result information from the audio cache, and if the feedback audio is matched from the audio cache, output the feedback audio; If the feedback audio is not matched from the audio cache, the feedback audio corresponding to the device control command is generated by the audio generation model and the feedback audio is output.

8. A device control apparatus, characterized in that, Applied to a terminal device, the device includes: The acquisition module is used to acquire voice control information; The matching module is used to match the control intent information corresponding to the voice control information from the target cache to obtain matching result information, wherein the target cache is subjected to hierarchical caching control according to comprehensive value weight information; The generation module is used to generate device control instructions for the control intent information if the matching result information indicates a match with the control intent information. The execution module is used to execute the device control instructions and obtain device control result information.

9. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the device control method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the device control method as described in any one of claims 1-7.