Equipment control method and device, computer equipment and storage medium

By pre-recording preset instructions generated by the large language model in the database and matching them after receiving the original instructions input by the user, the problem of slow response of AI control devices is solved, and fast response and efficient intelligent device control are achieved.

CN119717563APending Publication Date: 2025-03-28NEW H3C INTELLIGENCE TERMINAL CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411866376.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

AI control devices respond slowly, mainly due to the long time to infer AI models and network delays.

Method used

The preset instructions generated by pre-recording the large language model are in the database. After receiving the original instructions input by the user, the appropriate preset instructions are matched from the database, and the equipment control is performed based on the preset instructions.

Benefits of technology

It realizes instructions that quickly respond to user input, significantly improves the response speed of smart devices, and reduces dependence on AI big model inference and network latency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119717563A_ABST
    Figure CN119717563A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of intelligent control, and discloses an equipment control method and device, computer equipment and a storage medium, and the method comprises the steps: obtaining an original instruction inputted by a current user; performing vector operation on the original instruction, and mapping the original instruction into an original feature vector; under the condition that a target feature vector matched with the original feature vector exists in a database used for storing instruction information, taking a preset instruction corresponding to the target feature vector as a target instruction; the instruction information comprises a feature vector and a corresponding preset instruction, and the preset instruction is generated based on a large language model; and controlling corresponding controlled equipment according to the target instruction. Quick response can be realized by utilizing the preset instruction queried in the database, and the response speed of the intelligent equipment can be greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent control technology, and in particular to a device control method, apparatus, computer equipment and storage medium. Background Art

[0002] With the development of artificial intelligence (AI) technology, it is becoming possible to realize intelligent control of equipment based on AI big models; for example, AI big models can be used to control smart home devices. However, due to the long time it takes to infer AI big models and the possibility of network delays, decision-making and control are slow. Summary of the invention

[0003] In view of this, the present invention provides a device control method, apparatus, computer equipment and storage medium to solve the problem of slow AI control response.

[0004] In a first aspect, the present invention provides a device control method, comprising:

[0005] Get the original command currently entered by the user;

[0006] Performing vector operations on the original instructions to map the original instructions into original feature vectors;

[0007] In the case where there is a target feature vector matching the original feature vector in a database for storing instruction information, a preset instruction corresponding to the target feature vector is used as the target instruction; the instruction information includes a feature vector and a corresponding preset instruction, and the preset instruction is generated based on a large language model;

[0008] The corresponding controlled device is controlled according to the target instruction.

[0009] In a second aspect, the present invention provides a device control apparatus, comprising:

[0010] The acquisition module is used to obtain the original instruction input by the current user;

[0011] A vector operation module, used for performing vector operation on the original instruction and mapping the original instruction into an original feature vector;

[0012] a processing module, configured to use a preset instruction corresponding to the target feature vector as a target instruction if there is a target feature vector matching the original feature vector in a database for storing instruction information; the instruction information includes a feature vector and a corresponding preset instruction, and the preset instruction is generated based on a large language model;

[0013] The control module is used to control the corresponding controlled device according to the target instruction.

[0014] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the device control method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0015] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the device control method of the first aspect or any corresponding embodiment thereof.

[0016] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the device control method of the first aspect or any corresponding embodiment thereof.

[0017] The present invention utilizes a database to pre-record preset instructions generated by a large language model. After receiving the original instructions input by the user, the appropriate preset instructions are matched from the database, and the device is controlled based on the preset instructions. Since the preset instructions are generated based on the large language model and the database matching takes a short time, the preset instructions queried in the database can be used to achieve a quick response, which can greatly improve the response speed of the smart device while ensuring the realization of AI control. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0019] Figure 1 is a flow chart of a device control method according to an embodiment of the present invention;

[0020] Figure 2 is a schematic diagram of an architecture of a smart home system according to an embodiment of the present invention;

[0021] Figure 3 is a flow chart of another device control method according to an embodiment of the present invention;

[0022] Figure 4 is a schematic diagram of a format of instruction information in two databases according to an embodiment of the present invention;

[0023] Figure 5 is a schematic diagram of the process of task distribution and task execution of various services according to an embodiment of the present invention;

[0024] Figure 6 is a flowchart of task distribution according to an embodiment of the present invention;

[0025] Figure 7 is a flow chart of a service execution task according to an embodiment of the present invention;

[0026] Figure 8 is a structural block diagram of a device control apparatus according to an embodiment of the present invention;

[0027] Fig. 9 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0028] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0029] Smart home systems provide users with automated, intelligent and convenient home life through various intelligent technologies and devices, such as smart lighting, smart security, smart appliances, etc. Users can easily control these devices through mobile terminal apps (applications), voice assistants or smart remote controls, thereby achieving remote monitoring, automatic control and intelligent linkage.

[0030] AI big language model refers to an artificial intelligence model with large-scale parameters and complex network structure, which can process massive data and perform end-to-end learning and inference. With the support of AI big model, smart home is gradually enhanced, and AI big model makes smart home more intelligent. For example, through deep learning and recommendation algorithms of user behavior data, the system can adjust the home environment according to the user's habits and preferences to improve the quality of life.

[0031] Large Language Model (LLM) is a language understanding and generation model built on deep learning technology. It can generate coherent text with semantic and grammatical correctness through training on large-scale text data. LLM is not only large in scale, containing tens, hundreds, or even hundreds of billions of parameters, but also can capture complex patterns of language.

[0032] Although AI has enhanced the functionality and performance of smart home systems, it has also brought new challenges, one of which is the slow response of decision-making control. This problem involves multiple factors, including but not limited to network latency, data processing, hardware performance, etc.

[0033] On the one hand, when performing complex AI inference, complex AI models and deep learning algorithms require a lot of computing resources and time to parse the data, resulting in longer response times.

[0034] On the other hand, smart devices usually need to communicate with cloud servers through the network for data processing and decision-making. However, the quality of network connection (such as bandwidth, packet loss rate and latency) directly affects the response speed of the system. When the network conditions are poor, the response speed of smart devices may be significantly reduced.

[0035] The device control method provided in the embodiment of the present invention uses a database to pre-record preset instructions generated by a large language model. After receiving the instructions input by the user, the appropriate preset instructions are matched from the database, and the device is controlled based on the preset instructions. Since the preset instructions are generated based on the large language model and the database matching takes a short time, it can quickly respond to the instructions input by the user, which can greatly improve the response speed of the smart device.

[0036] According to an embodiment of the present invention, an embodiment of a device control method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0037] In this embodiment, a device control method is provided, which can be applied to a controlled device, or a control center of a system, such as a smart center of a smart home system. Figure 1 is a flow chart of a device control method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps.

[0038] Step S101, obtaining the original instruction currently input by the user.

[0039] In this embodiment, when a user needs to control a device, he can input a corresponding control instruction; for the convenience of distinguishing descriptions, the user is referred to as the current user, the device to be controlled is referred to as the controlled device, and the instruction input by the current user is referred to as the original instruction. In the smart home scenario, the original instruction is generally an instruction input by the user through voice; of course, the user can also input the original instruction in other ways such as based on an application, which is not limited in this embodiment.

[0040] The user may actively determine which device needs to be controlled, that is, the controlled device is specified by the user; or the system may automatically identify the device that currently needs to be controlled, that is, which device is the controlled device.

[0041] For example, when a user needs a smart speaker to play music, he can send out a voice message "play music" and the smart speaker can receive the corresponding voice data, thereby determining the original command, and the smart speaker is the controlled device. Alternatively, if the smart hub of the smart home system obtains the voice data, it can extract the relevant original command based on the content of the voice data and identify the controlled device that is suitable for executing the original command, that is, the smart hub automatically determines which device is the controlled device.

[0042] Step S102, performing vector operation on the original instruction, and mapping the original instruction into an original feature vector.

[0043] In this embodiment, a database is established in advance to store instructions for controlling the device, and the database is constructed based on a feature vector obtained by vector operation; after receiving the original instruction input by the current user, the original instruction is also subjected to vector operation, so that the original instruction can be mapped into a corresponding feature vector, i.e., the original feature vector, so that the feature vector in the database can be matched subsequently based on the original feature vector.

[0044] The vector operation may specifically be an Embedding operation, which can map the original data from a high-dimensional space to a low-dimensional space, helping to reduce data complexity and computing resource requirements, and improve the training and reasoning efficiency of the model.

[0045] Step S103, when there is a target feature vector matching the original feature vector in the database used to store instruction information, the preset instruction corresponding to the target feature vector is used as the target instruction; the instruction information includes the feature vector and the corresponding preset instruction, and the preset instruction is generated based on the large language model.

[0046] In this embodiment, certain instructions, namely preset instructions, can be generated in advance based on a large language model (LLM), and the preset instructions are instructions for controlling the controlled device. Specifically, the user instructions that need to be input when the user controls the controlled device can be obtained in advance, and then the user instructions are converted into preset instructions suitable for controlling the controlled device using the large language model; and vector operations are performed on the user instructions, so that the user instructions can also be mapped into corresponding feature vectors, and the feature vectors and the corresponding preset instructions are combined to generate an instruction information, and stored in the database.

[0047] At the current moment, if an original instruction input by a user is received, the original instruction is also a user input instruction, and the other user instructions mentioned above are in similar formats, generally in text format. Based on the original feature vector of the original instruction, the database can be queried to determine whether there is a feature vector matching the original feature vector in the database; for ease of description, the feature vector matching the original feature vector in the database is called the target feature vector.

[0048] For example, it is possible to determine whether the original feature vector is exactly the same as the feature vector in the database, or it is possible to determine the similarity between the original feature vector and the feature vector in the database. When the similarity exceeds a preset threshold (for example, 0.92, 0.98, etc.), the feature vector corresponding to the highest similarity is used as the target feature vector.

[0049] In this embodiment, if there is a target feature vector matching the original feature vector in the preset database, the corresponding preset instruction can be determined based on the instruction information corresponding to the target feature. The preset instruction is generated based on the large language model and is suitable for controlling the controlled device based on the original instruction. Therefore, at this time, the preset instruction is directly used as the target instruction, and the corresponding controlled device is controlled by the target instruction. That is, there is no need to use the large language model to process the original instruction.

[0050] Step S104: controlling the corresponding controlled device according to the target instruction.

[0051] If the method is executed by the controlled device, after determining the target instruction, the controlled device can directly execute the target instruction. If the method is executed by the control center, in addition to determining the target instruction, the controlled device that needs to execute the target instruction can also be determined, and the target instruction is sent to the controlled device, so that the controlled device can perform the corresponding action according to the target instruction.

[0052] Traditional smart devices can respond quickly to user commands due to the introduction of large language models, and control can be achieved within seconds. However, for smart devices controlled by large AI models, it takes more time for AI calculations, as well as network delays, which results in 6-8 seconds for conventional home control and 15-20 seconds for music retrieval and playback. The control response time is uncertain, and the response time is too long, resulting in poor user experience.

[0053] In this embodiment, the response speed can be greatly improved by using the preset database. Figure 2 A schematic diagram of the architecture of a smart home system is shown. Figure 2As shown, smart devices such as smart lights, voice panels, smart speakers, etc. are connected to AC (Access Point Controller, used to control AP) through AP (Access Point); the AI ​​big language model can be accessed from the external network to generate corresponding command information in advance, and the database records this command information. After receiving the original command input by the user, the smart center can query the database to determine the appropriate target command. Since the target command is obtained by matching the query in the database, there is no need to use the AI ​​big language model to process the original command, and control can be achieved in seconds, greatly improving the response speed of AI control.

[0054] The device control method provided in this embodiment uses a database to pre-record preset instructions generated by a large language model. After receiving the original instructions input by the user, the appropriate preset instructions are matched from the database, and the device is controlled based on the preset instructions. Since the preset instructions are generated based on the large language model and the database matching takes a short time, the preset instructions queried in the database can be used to achieve a quick response, which can greatly improve the response speed of the smart device while ensuring the realization of AI control.

[0055] In this embodiment, a device control method is provided, which can be applied to a controlled device, or a control center of a system, such as a smart center of a smart home system. Figure 3 is a flow chart of a device control method according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps.

[0056] Step S301, obtaining the original instruction currently input by the user.

[0057] For details, please see Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.

[0058] Step S302, performing vector operation on the original instruction, mapping the original instruction into an original feature vector.

[0059] For details, please see Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.

[0060] Step S303, when there is a target feature vector matching the original feature vector in the database used to save instruction information, the preset instruction corresponding to the target feature vector is used as the target instruction; the instruction information includes the feature vector and the corresponding preset instruction, and the preset instruction is generated based on the large language model.

[0061] For details, please see Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.

[0062] In some optional implementations, before the above step S303, for example, before taking the preset instruction corresponding to the target feature vector as the target instruction, the method further includes the following steps A1 to A3.

[0063] Step A1, determining the user ID of the current user.

[0064] Different users correspond to different user identifiers, and using each user identifier, more personalized command control can be provided for different users. For example, if the user inputs an original command based on voice, the corresponding voice data can be recognized to extract the user identifier.

[0065] Step A2, determining pending instruction information in the database that matches the user identification of the current user; the instruction information also includes the corresponding user identification.

[0066] Step A3: When the original feature vector matches the feature vector in the pending instruction information, the feature vector in the pending instruction information is used as a target feature vector that matches the original feature vector.

[0067] In this embodiment, the instruction information recorded in the database also includes the corresponding user identification, that is, the instruction information includes the user identification, the feature vector and the corresponding preset instruction. After determining the user identification of the current user, the database can be queried for appropriate instruction information based on the user identification, and the instruction information matched by the user identification is used as the pending instruction information. It can be understood that the pending instruction information can be one or more.

[0068] Afterwards, the original feature vector is used to query the pending instruction information, that is, to determine whether the original feature vector matches the feature vector in the pending instruction information. If the two match, the feature vector in the pending instruction information is the target feature vector that matches the original feature vector, that is, there is a target feature vector that matches the original feature vector in the database, and the preset instruction in the pending instruction information can be used as the target instruction.

[0069] Optionally, the method further includes: regularly updating personalized information of the target user; and updating preset instructions in instruction information matching the user identifier of the target user in the database according to the personalized information.

[0070] For some users' online and time-sensitive needs, such as playing today's news, weather, latest music, etc., the characteristics of such needs are: on the one hand, they need to be queried online in real time, but the online query time is long, users need to wait for a long time, and the experience is not good; on the other hand, users do not provide specific query content and lack specific operation instructions.

[0071] In this embodiment, these users can be used as target users, personalized information can be generated based on the recent preferences of the target users, and corresponding instructions can be predicted and constructed; for example, the corresponding online information can be queried regularly and the information can be saved to a local data center to facilitate regular updates of the instructions in the instruction information and improve query response efficiency.

[0072] For example, local storage of recent user daily experience data, such as news categories (military, basketball, finance), weather (Hangzhou, Beijing, Shanghai), music (singer name), etc.; data analysis based on the stored information to predict the user's latest preferences. For example, user behavior information can be uploaded to the AI ​​big model, and the user's recent preferences can be analyzed through the AI ​​big model; or, local data statistical analysis can be performed directly, that is, statistical analysis can be performed directly on the locally stored data information, and the most recently visited information in each category and the fastest growing number of visits per day can be taken as personalized information.

[0073] From the user's preferences for the corresponding categories, we filter out the information that the user may like, and based on this, we predict the information content that the user is more concerned about. For example, for the news category, a user likes military news the most, and for music playback, the user has recently been listening to a certain singer's songs.

[0074] A polling timer can be configured locally, such as a 1-hour timer, to obtain the latest online information regularly and update and save it to the local data center. For example, military news information can be obtained regularly and saved locally. After more than 1 hour, it will be updated in real time. When users have corresponding service needs, they can directly obtain information from the local area. For example: when users need to broadcast today's news, the latest military news can be played in real time.

[0075] In this embodiment, suitable instruction information is constructed for different user adaptability, so that personalized control can be achieved. In addition, the database is regularly updated based on personalized information, which can ensure the real-time nature of the instruction information and the generated target instruction is more in line with user habits.

[0076] Step S304, when there is no target feature vector matching the original feature vector, determine the target instruction corresponding to the original instruction according to the large language model, and store the original feature vector and the target instruction generated by the large language model as new instruction information in the database.

[0077] In an embodiment of the present invention, if there is no matching feature vector in the database, a corresponding instruction can be generated by using an AI large language model to generate intelligent device control instructions. The instruction generated by the large language model can be used as the target instruction for controlling the controlled device in the future.

[0078] In addition, in order to enable rapid instruction generation based on the target instruction in the future, the original feature vector and the target instruction generated by the large language model are used as new instruction information and stored in the database. When the instruction input by the user later matches the feature vector (i.e., the original feature vector) in the new instruction information, the target instruction generated by the large language model can be used directly without the need for AI reasoning calculation again. While expanding the instruction information in the database, the efficiency of subsequent instruction generation can also be guaranteed.

[0079] Optionally, due to the uncertainty of the large language model, there may be errors between the instruction construction process and the actual situation. In order to ensure the accuracy of the fast instructions recorded in the database, the quality of voice input can be improved, noise can be removed, and data errors can be corrected to ensure the accuracy of the text information received by the AI ​​large model. In addition, the generated instructions can also be verified.

[0080] Specifically, the above step S305 "determine the target instruction corresponding to the original instruction according to the large language model, and store the original feature vector and the target instruction generated by the large language model as new instruction information in the database" may include steps B1 to B3.

[0081] Step B1, input the original instruction into the large language model for semantic recognition multiple times, and determine the recognition results of the multiple recognitions.

[0082] Step B2: When multiple recognition results are the same, the recognition results are used as target instructions.

[0083] Step B3: When the target instruction is correctly executed by the controlled device, the target instruction generated by the original feature vector and the large language model is stored in the database as new instruction information.

[0084] In this embodiment, if it is necessary to construct an instruction based on a large language model, that is, if there is no matching preset instruction in the local database, the original instruction can be input into the large language model for semantic recognition multiple times, and each recognition result represents a fast instruction generated by the large language model; if the instructions generated multiple times are the same, it can be said that the instruction constructed by the large language model is basically accurate, and the instruction can be used as the target instruction. And if the target instruction can be correctly executed by the controlled device, the target instruction can be stored in the database for next use.

[0085] It can be understood that in order to improve the response efficiency, after the instruction is constructed based on the large language model for the first time, the instruction can be used as the target instruction and executed by the controlled device. If there are large differences in the instructions generated by the large language model multiple times, or the controlled device cannot accurately execute the target instruction, it can be said that there is a problem with the target instruction, so the target instruction can be deleted and not stored in the database.

[0086] Step S305: controlling the corresponding controlled device according to the target instruction.

[0087] For details, please see Figure 1 Step S104 of the illustrated embodiment will not be described in detail here.

[0088] It can be understood that the target instruction can be a preset instruction found in the database, or it can be an instruction generated by the large language model when no instruction is found, and this embodiment does not limit this.

[0089] In some optional implementations, when the control center responds to user instructions, since there are multiple smart devices in the system, corresponding services are allocated to each device in this embodiment. When user instructions are received, task distribution is performed first, and then instructions suitable for the corresponding device are generated.

[0090] Specifically, the local database includes a task distribution database and a service database. The task distribution database is used to implement task distribution, and records multiple instruction information, namely, first instruction information, which includes a feature vector, a correction instruction and a corresponding service identifier, which can represent the corresponding relationship between the feature vector, the correction instruction and the corresponding service identifier; the correction instruction is generated based on the first language model.

[0091] Similarly, the service database is applicable to various services, and also records multiple instruction information, namely, second instruction information, which specifically includes: feature vectors, service identifiers and corresponding service instructions, which can represent the correspondence between feature vectors, service identifiers and corresponding service instructions; the service instructions are generated based on the second largest language model.

[0092] Figure 4 A schematic diagram of the format of instruction information in two databases is shown. Figure 4 As shown, the first instruction information includes a user identifier (userid, username), a service identifier (agent), an original instruction (pre_command), a modified instruction (command) and a feature vector (embedding), and the original instruction can be used to timely verify whether the modified instruction is accurate. The second instruction information includes a user identifier (userid, username), a service identifier (agent), a modified instruction (command), a feature vector (embedding) and a service instruction (ex_command). It should be noted that the feature vector in the first instruction information is the feature vector corresponding to the original instruction, and the feature vector in the second instruction information is the feature vector corresponding to the modified instruction.

[0093] In this embodiment, an agent for task distribution and agents for various services may be set up, and each agent may be used to quickly determine the target instruction of the device.

[0094] Figure 5 It shows a schematic diagram of the task distribution and the process of various services executing tasks. Figure 5 As shown, after the user inputs the voice, the corresponding user ID (userid) and the original command (pre_command) can be obtained, and then the task distribution agent queries whether there is a quick command (i.e., correction command) in the task distribution database. If so, the task is distributed directly; if not, the first language model is needed to perform AI task disassembly to determine the appropriate correction command, and then distribute the task.

[0095] The agents of various services can determine whether they hit the correction instructions determined by the above task distribution process. If a service agent hits it, the service agent will query whether there is a quick instruction (i.e., service instruction) in the service database. If so, the device can be directly controlled to execute the task; if not, the second largest language model needs to be used to perform AI encapsulation tasks to obtain service instructions suitable for the controlled device, and then control the device to execute the service task.

[0096] In addition, when generating corresponding instructions based on the large language model, the corresponding database can be updated directly, or it can be updated based on the instruction confirmation and verification mechanism. After determining that the device can correctly execute the instructions generated by the large language model, the database can be updated, that is, the generated instructions can be added to the database. The specific details can be determined based on actual needs.

[0097] Specifically, the above step S303 "determine whether there is a target feature vector matching the original feature vector in the database for storing instruction information" may specifically include the following steps C1 to C3.

[0098] Step C1: when there is a first feature vector matching the original feature vector in the task distribution database, the correction instruction and service identifier corresponding to the first feature vector are used as the valid correction instruction and the valid service identifier.

[0099] Optionally, the method may further include the following step D1.

[0100] Step D1, when there is no first feature vector matching the original feature vector, determine the modified instruction corresponding to the original instruction according to the first large language model, and store the original feature vector and the modified instruction generated by the first large language model as new first instruction information in the task distribution database.

[0101] In this embodiment, the voice input device of the control center, such as a voice panel, can be awakened by the wake-up word, and then the user can voice input the corresponding control instruction, which is the original instruction. For example, after the user voice triggers the wake-up word, and then voice inputs "turn on the light", the control center can convert the voice into text information, voice recognition and query user information, and then send the relevant information to the task distribution agent. For example, json format information can be sent to the task distribution agent: {"userid":"","username":"","pre_command":""}.

[0102] After receiving the corresponding text information, the task distribution agent performs an embedding vector operation on the text ("turn on the light") to obtain the result valueA (i.e., the original feature vector), and then queries the embedding field in the task distribution database through useid, etc., extracts the feature vector valueB therein, and then calculates the matching degree of valueA and valueB to obtain the first instruction information with a matching degree greater than or equal to a preset threshold (e.g., 0.92) and the largest matching degree, and then obtains the execution end information (agent field, i.e., service identifier) ​​and the correction instruction (command field) to be executed. It can be understood that in the first instruction information with the largest matching degree, its feature vector is the first feature vector, and the correction instruction and service identifier therein are the valid correction instruction and the valid service identifier.

[0103] For example, the task distribution agent can combine user information and repackage the JSON information: {"userid":"","username":"",agent:"",command:""}, and then pass the JSON information to the corresponding execution client, that is, the subsequent service agent.

[0104] If the task distribution quick instruction query fails (for example, the matching degree is less than the preset threshold), the original instruction can be encapsulated with prompt words (prompt), that is, the prompt information is encapsulated, and the encapsulated information (including the original instruction) is input into the first language model for semantic recognition to realize task disassembly, so that the corresponding service identifier and correction instruction can be returned, for example, {"agent":"","command":""}json information is returned. Similarly, combined with user information, the json information is re-encapsulated: {"userid":"","username":"",agent:"",command:""}, and then the json information is passed to the subsequent service agent, and the json information is added to the task distribution database.

[0105] The above task distribution process can be found in detail. Figure 6 shown.

[0106] Step C2, performing vector operation on the effective correction instruction, mapping the effective correction instruction into a correction feature vector.

[0107] Step C3, determining the valid instruction information corresponding to the valid service identifier in the second instruction information of the service database. Wherein, if there is a second feature vector matching the modified feature vector, the service instruction corresponding to the second feature vector in the valid instruction information is used as the target instruction.

[0108] Optionally, the method may further include the following step D2.

[0109] Step D2, when there is no valid instruction information corresponding to the valid service identifier in the service database, or when there is no second feature vector matching the corrected feature vector in the valid instruction information, determine the service instruction corresponding to the valid corrected instruction based on the second largest language model, and store the service instruction generated by the corrected feature vector and the second largest language model as new second instruction information in the service database.

[0110] In this embodiment, after receiving the valid correction instruction, various application service agents can query based on the valid correction instruction; wherein, the valid correction instruction can be a correction instruction determined based on step C2 or step D1; for example, the valid correction instruction is included in the above-mentioned json information: {"userid":"","username":"",agent:"",command:""}.

[0111] The service agent can perform Embedding vector operation on the effective correction instruction (command information) to obtain the result valueC, and then query the valueD of the embedding field in the corresponding service database through the userid, and then calculate the matching degree of valueC and valueD, and obtain the second instruction information with a matching degree greater than or equal to a preset threshold (for example, 0.92) and the largest matching degree, and then obtain the final execution command information (ex_command), which is the service instruction that can be used as the target instruction. Among them, the service instruction can be encapsulated into an instruction format executable by the controlled device and passed to the execution client corresponding to the controlled device.

[0112] For example, the control format of a smart home system is: {"deviceid":"","devicetype":"","option":""}. If command:"turn on the light", the target command ex_command generated can be, for example: "{"deviceid":"1","devicetype":"switch","option":"1"}", which means turning on the ceiling light switch.

[0113] In addition, if the service speed instruction query fails (for example, the matching degree is less than the preset threshold), the prompt information can be encapsulated for the effective correction instruction, and the second largest language model can be used for semantic recognition to obtain the encapsulated operation instruction, and the corresponding json information is returned: {"deviceid":"", "devicetype":"","option":""}, the json information is the service instruction generated by the second largest language model, and then the json information is passed to the corresponding execution client, and the json information is added to the service database.

[0114] For example, if the original instruction is "turn on the light", and the determined effective modified instruction is "turn on the ambient light", an example of encapsulating prompt information is as follows:

[0115] This is a smart home task, and the return format is {"deviceid":"","devicetype":"","option":""}: The current smart home device information is as follows: ceiling light ("deviceid":1","devicetype":"switch"), light strip ("deviceid":2","devicetype":"switch"), atmosphere light ("deviceid":3","devicetype":"switch"), speaker ("deviceid":4","devicetype":"sound"), curtain ("deviceid":5","devicetype":"curtain"). Off (option:0), On (option:1), eg: Turn on the ceiling light and return {"deviceid":"1","devicetype":"switch","option":"1"}. The current operation instruction is: "Turn on the atmosphere light", please return the result in json format.

[0116] Input the above content into the second largest language model to get the corresponding json information, for example: {"deviceid":"3","devicetype":"switch","option":"1"}.

[0117] After determining the target command, that is, obtaining ex_command, you can call the service interface and execute the corresponding service command. For example, executing {"deviceid":"1","devicetype":"switch","option":"1"} can turn on the ceiling light.

[0118] The above process of using services to perform tasks can be found in Figure 7 shown.

[0119] The device control method provided in this embodiment sets up corresponding servers for task distribution and services, and pre-stores corresponding quick instructions, so that the instructions that the device needs to execute can be quickly obtained by querying commands, which can greatly improve the execution efficiency and control efficiency; after testing, the optimized smart home system has a response time of seconds for tasks such as turning on lights, checking weather, checking news, playing music, etc., and basically completes the response within 2 seconds. This not only reduces the dependence on cloud services and the cost of using AI large model tokens, but also reduces the frequency of data transmission and the use of bandwidth, which can reduce service bandwidth costs.

[0120] In addition, by building quick commands based on the behaviors of different users, different user portraits can be built to achieve a user experience for thousands of people and thousands of machines, and to achieve differentiated control. Through the result confirmation mechanism and the exception mechanism, the effectiveness and accuracy of quick commands for AI smart home control can be improved; according to user preferences, regular analysis and prediction can be performed to obtain online information required by users, and the local user data center can be saved to reduce the waiting time for online requests.

[0121] In this embodiment, a device control device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0122] This embodiment provides a device control device, such as Figure 8 As shown, including:

[0123] The acquisition module 801 is used to acquire the original instruction currently input by the user;

[0124] A vector operation module 802, used for performing vector operation on the original instruction and mapping the original instruction into an original feature vector;

[0125] The processing module 803 is used to use a preset instruction corresponding to the target feature vector as a target instruction when there is a target feature vector matching the original feature vector in a database for storing instruction information; the instruction information includes a feature vector and a corresponding preset instruction, and the preset instruction is generated based on a large language model;

[0126] The control module 804 is used to control the corresponding controlled device according to the target instruction.

[0127] In some optional implementations, before taking the preset instruction corresponding to the target feature vector as the target instruction, the processing module 803 is further configured to:

[0128] Determining a user identifier of the current user;

[0129] Determine pending instruction information in the database that matches the user identifier of the current user; the instruction information also includes the corresponding user identifier;

[0130] In the case where the original feature vector matches the feature vector in the pending instruction information, the feature vector in the pending instruction information is used as a target feature vector that matches the original feature vector.

[0131] In some optional implementations, the processing module 803 is further configured to:

[0132] Regularly update personalized information of target users;

[0133] The preset instructions in the instruction information in the database that matches the user identification of the target user are updated according to the personalized information.

[0134] In some optional implementations, the processing module 803 is further configured to:

[0135] In the absence of a target feature vector matching the original feature vector, a target instruction corresponding to the original instruction is determined according to the large language model, and the original feature vector and the target instruction generated by the large language model are stored in the database as new instruction information.

[0136] In some optional implementations, the processing module 803 determines a target instruction corresponding to the original instruction according to the large language model, and stores the original feature vector and the target instruction generated by the large language model as new instruction information in the database, including:

[0137] Inputting the original instruction into the large language model for multiple times to perform semantic recognition, and determining recognition results of the multiple times;

[0138] When multiple recognition results are the same, the recognition results are used as target instructions;

[0139] When the target instruction is correctly executed by the controlled device, the original feature vector and the target instruction generated by the large language model are stored in the database as new instruction information.

[0140] In some optional implementations, the database includes a task distribution database and a service database;

[0141] The task distribution database is used to store first instruction information; the first instruction information is used to represent the correspondence between the feature vector, the correction instruction and the corresponding service identifier, and the correction instruction is generated based on the first large language model;

[0142] The service database is used to store second instruction information; the second instruction information is used to represent the correspondence between the feature vector, the service identifier and the corresponding service instruction, and the service instruction is generated based on the second language model;

[0143] The processing module 803 is also used for:

[0144] In the case where there is a first feature vector matching the original feature vector in the task distribution database, taking the correction instruction and service identifier corresponding to the first feature vector as the valid correction instruction and the valid service identifier;

[0145] Performing vector operations on the effective correction instructions to map the effective correction instructions into correction feature vectors;

[0146] Determine valid instruction information corresponding to the valid service identifier in the second instruction information of the service database;

[0147] Wherein, in the case that there is a second feature vector matching the modified feature vector in the effective instruction information, the service instruction corresponding to the second feature vector in the effective instruction information is used as the target instruction.

[0148] In some optional implementations, the processing module 803 is further configured to:

[0149] In the case where there is no first feature vector matching the original feature vector, determining a correction instruction corresponding to the original instruction according to the first large language model, and storing the original feature vector and the correction instruction generated by the first large language model as new first instruction information in the task distribution database;

[0150] When there is no valid instruction information corresponding to the valid service identifier in the service database, or when there is no second feature vector matching the corrected feature vector in the valid instruction information, a service instruction corresponding to the valid corrected instruction is determined based on the second largest language model, and the corrected feature vector and the service instruction generated by the second largest language model are stored in the service database as new second instruction information.

[0151] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0152] The device control device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, including a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0153] The embodiment of the present invention also provides a computer device having the above Figure 8 Device controls shown.

[0154] See also Fig. 9 , Fig. 9 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Fig. 9 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig. 9 A processor 10 is taken as an example.

[0155] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0156] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0157] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0158] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0159] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0160] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0161] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0162] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations should all be included in the protection scope of the present invention.

Claims

1. A device control method, characterized in that: The method comprises: Get the original command currently entered by the user; Performing vector operations on the original instructions to map the original instructions into original feature vectors; In the case where there is a target feature vector matching the original feature vector in a database for storing instruction information, a preset instruction corresponding to the target feature vector is used as the target instruction; the instruction information includes a feature vector and a corresponding preset instruction, and the preset instruction is generated based on a large language model; The corresponding controlled device is controlled according to the target instruction.

2. The method according to claim 1, characterized in that Before taking the preset instruction corresponding to the target feature vector as the target instruction, the method further includes: Determining a user identifier of the current user; Determine pending instruction information in the database that matches the user identifier of the current user; the instruction information also includes the corresponding user identifier; In the case where the original feature vector matches the feature vector in the pending instruction information, the feature vector in the pending instruction information is used as a target feature vector that matches the original feature vector.

3. The method according to claim 2, characterized in that The method further comprises: Regularly update personalized information of target users; The preset instructions in the instruction information in the database that matches the user identification of the target user are updated according to the personalized information.

4. The method according to claim 1, characterized in that: The method further comprises: In the absence of a target feature vector matching the original feature vector, a target instruction corresponding to the original instruction is determined according to the large language model, and the original feature vector and the target instruction generated by the large language model are stored in the database as new instruction information.

5. The method according to claim 4, characterized in that The determining a target instruction corresponding to the original instruction according to the large language model, and storing the original feature vector and the target instruction generated by the large language model as new instruction information in the database, comprises: Inputting the original instruction into the large language model for multiple times to perform semantic recognition, and determining recognition results of the multiple times; When multiple recognition results are the same, the recognition results are used as target instructions; When the target instruction is correctly executed by the controlled device, the original feature vector and the target instruction generated by the large language model are stored in the database as new instruction information.

6. The method according to any one of claims 1 to 5, characterized in that The database includes a task distribution database and a service database; The task distribution database is used to store first instruction information; the first instruction information is used to represent the correspondence between the feature vector, the correction instruction and the corresponding service identifier, and the correction instruction is generated based on the first large language model; The service database is used to store second instruction information; the second instruction information is used to represent the correspondence between the feature vector, the service identifier and the corresponding service instruction, and the service instruction is generated based on the second language model; The method further comprises: In the case where there is a first feature vector matching the original feature vector in the task distribution database, taking the correction instruction and service identifier corresponding to the first feature vector as the valid correction instruction and the valid service identifier; Performing vector operations on the effective correction instructions to map the effective correction instructions into correction feature vectors; Determine valid instruction information corresponding to the valid service identifier in the second instruction information of the service database; Wherein, in the case that there is a second feature vector matching the modified feature vector in the effective instruction information, the service instruction corresponding to the second feature vector in the effective instruction information is used as the target instruction.

7. The method according to claim 6, characterized in that The method further comprises: In the case where there is no first feature vector matching the original feature vector, determining a correction instruction corresponding to the original instruction according to the first large language model, and storing the original feature vector and the correction instruction generated by the first large language model as new first instruction information in the task distribution database; When there is no valid instruction information corresponding to the valid service identifier in the service database, or when there is no second feature vector matching the corrected feature vector in the valid instruction information, a service instruction corresponding to the valid corrected instruction is determined based on the second largest language model, and the corrected feature vector and the service instruction generated by the second largest language model are stored in the service database as new second instruction information.

8. A device control device, characterized in that: The device comprises: The acquisition module is used to obtain the original instruction input by the current user; A vector operation module, used for performing vector operation on the original instruction and mapping the original instruction into an original feature vector; a processing module, configured to use a preset instruction corresponding to the target feature vector as a target instruction if there is a target feature vector matching the original feature vector in a database for storing instruction information; the instruction information includes a feature vector and a corresponding preset instruction, and the preset instruction is generated based on a large language model; The control module is used to control the corresponding controlled device according to the target instruction.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the device control method according to any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the device control method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Electric vehicle speed regulation method, system and device based on voice semantic recognition and medium

    CN113851125A

  • Voice control method, server, washing machine and system

    CN114242049A

  • Equipment control method and device, household appliance and storage medium

    CN116289079A

  • Information interaction method and device, electronic equipment and medium

    CN116894078A

  • Screen voice control method and device, electronic equipment and storage medium

    CN117995186A