A method, device and medium for recommending a device linkage solution
By determining the relationship between the device and the scene, combining historical data and knowledge graphs, we recommend the linkage solution for smart home devices, which solves the problem of cumbersome configuration of user-defined scenarios and improves the intelligence of user experience and device linkage.
Patent Information
- Application Number
- CN202110822825.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-21
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2041-07-21
AI Technical Summary
In the prior art, the linkage configuration process of user-defined scenarios and smart home devices is complicated, which affects the user experience.
By determining the candidate scenario corresponding to the current binding device, based on the received scene selection instructions and historical device linkage data, a linkage scheme containing the current binding device and the target device is recommended, and a knowledge graph is used to optimize the device correlation recommendation.
It simplifies the user-defined device linkage process, improves the user experience, and enhances the intelligence and efficiency of device linkage.
Smart Images

Figure CN115685765B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of smart home device linkage, and particularly relates to a method, device and medium for recommending a device linkage solution. Background Art
[0002] With the rapid development of science and technology, smart home devices play an increasingly important role in people's lives, and smart home linkages based on different life scenarios emerge as the times require. For example, if the life scenario is the scene of coming home from work in summer, the user wants the lights to be turned on, the air conditioner to be turned on, the windows to be closed, and the camera to be closed; if the life scenario is the scene of going to bed at night, the user wants the lights to be turned off, the air conditioner to be turned off, and the sleep monitoring device to be turned on. Such linkages of multiple smart home devices can effectively reduce the user's workload and enhance the user's interactive experience with smart home devices.
[0003] In the prior art, when performing the linkage between a scene and smart home devices, the user needs to manually set the smart home devices linked to the scene. However, due to the large variety of smart home combinations matching the scene, the user needs to spend a lot of time and cost to customize the scene and the linked smart home configuration, and the setting process is also very cumbersome, reducing the user's experience. Summary of the Invention
[0004] The present application provides a method, device, equipment and medium for recommending a device linkage solution, so as to solve the problem that the process of device linkage by the user customizing the scene and the linked smart home configuration in the prior art is cumbersome and affects the user's experience.
[0005] The present application provides a method for recommending a device linkage solution, and the method includes:
[0006] Determine and output candidate scenes corresponding to the currently bound devices according to the corresponding relationship between the devices and the scenes;
[0007] Determine the target scene according to the received scene selection instruction;
[0008] Determine the target devices other than the currently bound devices in the target scene according to the historical device linkage data;
[0009] Recommend a device linkage solution including the currently bound devices and the target devices.
[0010] The present application provides a device for recommending a device linkage solution, and the device includes:
[0011] A determination module, configured to determine and output candidate scenarios corresponding to the currently bound device according to the corresponding relationship between the device and the scenario; determine a target scenario according to the received scenario selection instruction; and determine target devices other than the currently bound device in the target scenario according to historical device linkage data.
[0012] A recommendation module, configured to recommend a device linkage solution including the currently bound device and the target devices.
[0013] This application also provides an electronic device, which at least includes a processor and a memory. The processor is configured to implement the steps of the device linkage solution recommendation method as described in any one of the above when executing a computer program stored in the memory.
[0014] This application also provides a computer-readable storage medium, which stores a computer program. The computer program is configured to implement the steps of the device linkage solution recommendation method as described in any one of the above when executed by a processor.
[0015] In the embodiments of this application, according to the corresponding relationship between the device and the scenario, candidate scenarios corresponding to the currently bound device are determined and output. According to the received scenario selection instruction, a target scenario is determined. According to historical device linkage data, target devices other than the currently bound device in the target scenario are determined, and a linkage solution including the currently bound device and the target devices is recommended. Since in the embodiments of this application, a device linkage solution that can be selected in the target scenario can be determined and recommended based on the currently bound device and the target scenario selected by the user, the user experience is improved. Description of the Drawings
[0016] To more clearly illustrate the technical solutions in the embodiments of this application, the following briefly introduces the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of this application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0017] Figure 1 A process schematic diagram of a device linkage solution recommendation method provided by some embodiments of this application;
[0018] Figure 2 A schematic diagram of historical device linkage data display provided by some embodiments of this application;
[0019] Figure 3 A schematic diagram of a knowledge graph constructed based on historical device linkage data provided by some embodiments of this application;
[0020] Figure 4A schematic diagram of a process for determining a device linkage solution provided by some embodiments of the present application;
[0021] Figure 5 A schematic structural diagram of a device linkage solution recommendation device provided by some embodiments of the present application;
[0022] Figure 6 A schematic structural diagram of an electronic device provided by some embodiments of the present application. Detailed implementation manners
[0023] In order to make the objectives, technical solutions, and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0024] In the embodiments of the present application, according to the corresponding relationship between the device and the scene, the candidate scenes corresponding to the currently bound device are determined and output. According to the received scene selection instruction, the target scene is determined. According to the historical device linkage data, the target device other than the currently bound device in the target scene is determined, and a linkage solution including the currently bound device and the target device is recommended. Since in the embodiments of the present application, based on the currently bound device and the target scene selected by the user, the device linkage solution that can be selected in the target scene can be determined and recommended, it is possible to avoid the user from customizing the scene and linking the smart home configuration by himself to implement device linkage, and solve the problem affecting the user experience.
[0025] In order to avoid the user from customizing the scene and linking the smart home configuration by himself to implement device linkage and improve the user experience, the embodiments of the present application provide a device linkage solution recommendation method, device, device, and medium.
[0026] Figure 1 A schematic diagram of a process of a device linkage solution recommendation method provided by some embodiments of the present application, the process including the following steps:
[0027] S101: According to the corresponding relationship between the device and the scene, determine the candidate scenes corresponding to the currently bound device and output.
[0028] The device linkage solution recommendation method provided by the embodiments of the present application is applied to an electronic device, and the electronic device may be a smart terminal, a PC, a server, or other devices.
[0029] In the present application, for different scenarios, the devices that need to be linked may be the same or different. For example, if the scenario is a leaving home scenario, the devices that need to be linked may be lights, air conditioners, windows, and doors; if the scenario is a sleeping scenario, the devices that need to be linked may be lights, air conditioners, and sleep monitoring devices. Therefore, in order to determine the scenarios in which the currently bound device can be applied, the electronic device pre-stores the correspondence between the device and the scene, wherein the pre-stored correspondence between the device and the scene can be manually pre-set or obtained based on statistics of historical device linkage data. Among them, the currently bound device can be any smart home device that can be linked to multiple devices, such as lights, windows, etc. When recommending a device linkage solution, the currently bound device can be selected from the pre-bound devices.
[0030] In order to facilitate the user to select the corresponding scene, in the present application, the electronic device determines and outputs the candidate scene corresponding to the currently bound device according to the correspondence between the device and the scene and the currently bound device, wherein the candidate scene is the scene that can be applied by the currently bound device. The determined candidate scene can be output in the form of text information, or the determined candidate scene can be output in the form of voice information. For example, after determining that the candidate scenes corresponding to the currently bound device are the home scene and the sleep scene, if the electronic device is a smart terminal, the text "The currently available scenes are the home scene and the sleep scene, please make your choice" can be displayed on the display of the smart terminal, or the smart terminal can output a prompt tone of "The currently available scenes are the home scene and the sleep scene, please make your choice".
[0031] S102: Determine a target scene according to the received scene selection instruction.
[0032] After the electronic device outputs the candidate scenes corresponding to the currently bound device, the user can select the desired scene based on the output candidate scenes. That is, the electronic device can receive a scene selection instruction, which carries information about the selected scene. The electronic device determines the selected scene based on the received scene selection instruction and determines the selected scene as the target scene.
[0033] S103: Determine a target device other than the currently bound device in the target scenario according to historical device linkage data.
[0034] In this application, historical device linkage data is pre - saved. The historical device linkage data records the corresponding scenarios for each device linkage and the identification information of the devices included in the device linkage under that scenario. In this application, the identification information can be information such as the name or number of the device that uniquely identifies the device. Therefore, based on the historical device linkage data, the devices included in each scenario can be counted. That is to say, based on the historical device linkage data, the target devices other than the currently bound device in the target scenario can be determined. Among them, the target devices can be all the devices other than the currently bound device in the target scenario, or the target devices can be some of the devices other than the currently bound device in the target scenario. For example, if the target scenario is the home - coming scenario and the currently bound device is the door, and the historical device linkage data contains two pieces of device linkage data corresponding to the home - coming scenario. Among them, the identification information of the devices included in the first piece of device linkage data corresponding to the home - coming scenario is the door, window, and air conditioner, and the identification information of the devices included in the second piece of device linkage data corresponding to the home - coming scenario is the door, window, and TV. Then the devices included in the target scenario are the door, window, air conditioner, and TV. If the target devices are all the devices other than the currently bound device in the target scenario, the target devices are the window, air conditioner, and TV.
[0035] S104: Recommend a device linkage plan that includes the currently bound device and the target devices.
[0036] In this application, after determining the target devices, in order to determine the corresponding device linkage plan and recommend it, a linkage plan that includes the currently bound device and the target devices can be recommended. Specifically, a device linkage plan that includes the currently bound device and all the determined target devices can be recommended. That is to say, the currently bound device and all the determined target devices are simultaneously used for device linkage. It is also possible to perform permutation and combination on the currently bound device and the determined target devices, and determine and recommend the device linkage plan according to the result of the permutation and combination.
[0037] In the process of performing permutation and combination on the currently bound device and the determined target devices, a specified number of devices are selected from the currently bound device and the determined target devices for permutation and combination. Among them, the specified number can be two, three, etc. For example, if the currently bound device is the air conditioner and the target devices are the lamp and the curtain, the target linkage device plans can be air conditioner, lamp; air conditioner, curtain; and air conditioner, lamp, and curtain.
[0038] Since in the embodiments of this application, based on the currently bound device and the target scenario selected by the user, the device linkage plans that can be selected in the target scenario can be determined and recommended, the user experience is improved.
[0039] To determine the target device in the target scenario, based on the above embodiments, in the embodiments of the present application, the determining the target device other than the current bound device in the target scenario according to the historical device linkage data includes:
[0040] Determine a first candidate device other than the current bound device in the target scenario according to the historical device linkage data;
[0041] Determine a second candidate device having an association relationship with the current bound device according to the nodes corresponding to each device, the connection relationships between the nodes, and the current bound device in the pre-stored knowledge graph;
[0042] Determine the device that is the same as the second candidate device among the first candidate devices as the target device.
[0043] In the present application, when determining the target device other than the current bound device in the target scenario, all devices other than the current bound device among the devices included in the target scenario can be determined as the target device. In order to enhance the association between devices, after determining all devices other than the current bound device among the devices included in the target scenario, devices with a relatively strong association with the current bound device among all these other devices can also be determined as the target device.
[0044] Specifically, the electronic device can determine a first candidate device other than the current bound device in the target scenario according to the historical device linkage data, where the first candidate device is all devices other than the current bound device among the devices included in the target scenario. To determine devices with a relatively strong association with the current bound device, in the present application, a knowledge graph is pre-stored. According to the nodes corresponding to each device, the connection relationships between the nodes, and the current bound device in the pre-stored knowledge graph, a second candidate device having an association relationship with the current bound device is determined. Among them, the association relationship can be a direct connection relationship or an indirect connection relationship. To determine the target device, devices having an association with the current bound device are screened out among the first candidate devices, that is, the device that is the same as the second candidate device among the first candidate devices is determined as the target device.
[0045] For example, if the target scenario is the "going home" scenario and the currently bound device is the door, and there are two pieces of device linkage data corresponding to the "going home" scenario in the historical device linkage data. Among them, the device identification information in the first piece of device linkage data corresponding to the "going home" scenario includes the door, window, and air conditioner, and the device identification information in the second piece of device linkage data corresponding to the "going home" scenario includes the door, window, and TV. Then, the device identification information included in the target scenario is the door, window, air conditioner, and TV, and the first candidate devices other than the currently bound device in this target scenario are the window, air conditioner, and TV. If it is determined according to the nodes corresponding to each device, the connection relationships between the nodes, and the currently bound device in the pre-stored knowledge graph that the second candidate devices having an association relationship with the currently bound device are the window and the air conditioner, then the target devices are the window and the air conditioner.
[0046] In order to determine the second candidate devices having an association relationship with the currently bound device, based on the above embodiments, in the embodiments of the present application, the determining, according to the nodes corresponding to each device, the connection relationships between the nodes, and the currently bound device in the pre-stored knowledge graph, the second candidate devices having an association relationship with the currently bound device includes:
[0047] According to the nodes corresponding to each device in the pre-stored knowledge graph and the currently bound device, the devices corresponding to the nodes whose number of nodes separated from the node corresponding to the currently bound device is less than a pre-set node quantity threshold are determined as the second candidate devices.
[0048] In the present application, in order to determine the second candidate devices having an association relationship with the currently bound device, it is possible to first determine the nodes corresponding to the devices directly connected to the node corresponding to the currently bound device in the knowledge graph, and the nodes of the devices indirectly connected to the currently bound device, and then determine all devices as the second candidate devices having an association relationship with the currently bound device. However, if there are too many nodes separated between the devices corresponding to the nodes indirectly connected to the node corresponding to the currently bound device in the knowledge graph, it will result in a low degree of association between the currently bound device and the indirectly connected devices. Therefore, in order to improve the screening of the second candidate devices having a relatively high degree of association with the currently bound device, in the present application, the devices corresponding to the nodes whose number of nodes separated from the node corresponding to the currently bound device is less than a pre-set node quantity threshold can be determined as the second candidate devices, where the pre-set node quantity threshold can be 3 or 5, etc. Specifically, the pre-set node threshold can be set according to requirements.
[0049] For example, if the currently bound device is a window, and in the knowledge graph, there are five devices associated with this window, and the paths formed by the devices that have a connection relationship with this window are window - curtain, window - curtain - air conditioner, window - curtain - air conditioner - door, window - curtain - air conditioner - door - TV, window - curtain - air conditioner - door - TV - projector. If the pre - set node quantity threshold is 4, then the second candidate devices are the curtain, the air conditioner, the door, and the TV.
[0050] In order to determine the second candidate devices, based on the above - mentioned embodiments, in the embodiments of the present application, the step of determining the devices corresponding to the nodes whose number of nodes spaced from the node corresponding to the current bound device is less than the pre - set node quantity threshold as the second candidate devices includes:
[0051] Based on the attribute information corresponding to the connection relationship between the nodes in the knowledge graph, search for a target word in at least two words that the user is interested in and saved in advance and that matches the attribute information;
[0052] According to the first vector corresponding to at least two words that the user is interested in and saved in advance, where each component in the first vector corresponds to a numerical value corresponding to each word that the user is interested in, determine the target numerical value corresponding to the target word in the first vector, update the target numerical value to a preset first numerical value, and update the other numerical values in the first vector except the target numerical value to a preset second numerical value to obtain a second vector;
[0053] According to the first vector, the second vector, the association degree between the current bound device in the knowledge graph and the third candidate devices corresponding to the nodes whose number of nodes spaced from the node corresponding to the current bound device is less than the pre - set node quantity threshold, and a preset function, determine the target score corresponding to the third candidate devices, and sort the third candidate devices from high to low according to the target score;
[0054] Determine the set number of the third candidate devices ranked at the front as the second candidate devices.
[0055] In the present application, in order to determine the second candidate devices, all the devices corresponding to the nodes whose number of nodes spaced from the node corresponding to the current bound device is less than the pre - set node quantity threshold can be determined as the second candidate devices. Since the number of all the devices corresponding to the nodes whose number of nodes spaced from the node corresponding to the current bound device is less than the pre - set node quantity threshold that can be found in the knowledge graph may be very large, in order to ensure the accuracy of the determined second candidate devices, the devices that the user prefers more can be selected from all the devices corresponding to the nodes whose number of nodes spaced from the node corresponding to the current bound device is less than the pre - set node quantity threshold as the second candidate devices.
[0056] Specifically, in this application, attribute information corresponding to the connection relationship between nodes in the knowledge graph is set in advance, where the attribute information can be used to characterize the effect to be achieved when the devices corresponding to the two connected nodes are linked. For example, the attribute information corresponding to the connection relationship between the node of the air conditioner and the node of the window is "efficient cooling".
[0057] In order to screen out the devices that the user prefers more from all these devices as the second candidate devices, in this application, it can be determined whether there are words that the user is interested in among the attribute information of the connection relationship between nodes. That is, based on the attribute information corresponding to the connection relationship between nodes in the knowledge graph, a target word that matches the attribute information is searched for among at least two pre-saved words that the user is interested in. For example, at least two pre-saved words that the user is interested in are "efficient", "privacy protection", "security", "resource saving", "cooling", "going home", "leaving home", "before going to bed", "getting up", and "leisure", and it is determined that the user's currently bound device is an air conditioner, and the attribute information corresponding to the connection relationship between the node of the air conditioner and the node of the window is "efficient cooling". Therefore, first, the attribute information is segmented to obtain "efficient" and "cooling", and each segmented word is matched among at least two pre-saved words that the user is interested in. According to the matching results, the target words that match the attribute information "efficient cooling" are "efficient" and "cooling".
[0058] In addition, among all the devices corresponding to the nodes whose number of nodes separated from the node corresponding to the current bound device is less than a preset node quantity threshold, for some devices, the nodes are directly connected to the node corresponding to the current bound device, and for some devices, the corresponding nodes are indirectly connected to the node corresponding to the current bound device. If the node corresponding to the device is indirectly connected to the node corresponding to the current bound device, since the attribute information corresponding to the connection relationships between the directly connected nodes in the path formed by the node corresponding to the device and the node corresponding to the current bound device may be different. Therefore, in order to determine the attribute information of the connection relationship between the node corresponding to the current bound device and the node corresponding to the device, the common attribute information among the attribute information corresponding to the connection relationships between all the directly connected nodes on this path can be determined first, and then this common attribute information is determined as the attribute information of the connection relationship between the node corresponding to the current bound device and the node corresponding to the device.
[0059] For example, the path corresponding to the node of the window and the node of the bedroom table lamp is window - curtain - bedroom table lamp. If the attribute information corresponding to the connection relationship between the two nodes of window - curtain is "privacy protection", and the attribute information corresponding to the connection relationship between the two nodes of curtain - bedroom table lamp is also "privacy protection", then the attribute information of the connection relationship between the window and the bedroom table lamp is "privacy protection". If the attribute information corresponding to the connection relationship between the two nodes of window - curtain is "privacy protection", and the attribute information corresponding to the connection relationship between the two nodes of curtain - bedroom table lamp is "resource conservation", then the attribute information corresponding to the connection relationship between the window and the bedroom table lamp does not exist.
[0060] For the convenience of description, the node corresponding to the current bound device is called the first node, and the node whose number of nodes separated from the first node is less than a preset node quantity threshold is called the second node. To determine the attribute information corresponding to the connection relationship between the node corresponding to the current bound device and the node corresponding to the device, it is also possible to first determine the path including the first node and the second node, then determine the target node directly connected to the second node on this path, then determine the target attribute information corresponding to the target node and the second node, and then, according to the target attribute information, search for the target word that matches the target attribute information among at least two words of interest to the user pre - saved.
[0061] For example, the path corresponding to the window and the bedroom table lamp is window - curtain - bedroom table lamp. If the attribute information corresponding to the connection relationship between the two nodes of window - curtain is "privacy protection", and the attribute information corresponding to the connection relationship between the two nodes of curtain - bedroom table lamp is "resource conservation", then the attribute information corresponding to the connection relationship between the window and the bedroom table lamp is "resource conservation", and according to at least two words of interest pre - saved by the user, the target word that matches "resource conservation" is determined to be "resource conservation".
[0062] In this application, at least two first vectors corresponding to the words of interest to the user are pre - saved. Among them, each component in the first vector corresponds to the value corresponding to each word of interest to the user. Since each word in the words of interest to the user corresponds to a value, and the target word is the matching word found among at least two words of interest to the user pre - saved, therefore, after determining the target word, the target value corresponding to the target word in the first vector can be determined, and after determining the target value, the target value is updated to a preset first value, where the first value is 1. Then the other values in the first vector except the target value are updated to a preset second value, where the second value is 0, and the vector obtained after updating the target value and the other values except the target value is determined as the second vector.
[0063] For example, if the words the user is interested in are "efficient" and "refrigeration", and the first vectors corresponding to "efficient" and "refrigeration" pre - saved are (0.6, 0.8), then 0.6 is the value corresponding to "efficient" among the words the user is interested in, and 0.8 is the value corresponding to "refrigeration" among the words the user is interested in. If the target word is determined to be "efficient", since the target value corresponding to this target word in the first vector is 0.6, update this target value to 1, and update the other values except the target value to 0, obtaining the second vector as (1, 0).
[0064] For the convenience of description, all devices corresponding to nodes whose number of nodes spaced from the node corresponding to the current bound device is less than a preset node quantity threshold are called third - candidate devices. To screen out the devices that the user prefers more from these third - candidate devices as second - candidate devices, first sort the third - candidate devices according to the user's preference degree. Specifically, in this application, after obtaining the first vector and the second vector, according to the first vector, the second vector, the association degree between the current bound device and the third - candidate devices in the knowledge graph, and a preset function, determine the target score corresponding to the third - candidate devices, and sort the third - candidate devices from high to low according to this target score. Among them, the higher the target score corresponding to a third - candidate device, the greater the user's preference degree for this third - candidate device. That is to say, the higher the ranking of a third - candidate device, the greater the user's preference degree for this third - candidate device.
[0065] To screen out the devices that the user prefers more from these third - candidate devices as second - candidate devices, in this application, determine the second - candidate devices as the set number of third - candidate devices ranked in the front. Among them, the set number can be 3, or 5, etc. Specifically, the set number can be set according to requirements.
[0066] To determine the first vectors corresponding to at least two words that the user is interested in and pre - saved, based on the above - mentioned embodiments, in the embodiments of this application, determining the first vectors corresponding to at least two words that the user is interested in and pre - saved includes:
[0067] Determine the first vectors corresponding to the at least two words that the user is interested in and pre - saved according to the at least two words that the user is interested in and pre - saved and the word - vector generation model that has been pre - trained.
[0068] In order to determine the first vector corresponding to at least two words of interest to the pre-saved user, in the present application, a word vector generation model is pre-trained in advance, and the at least two words of interest to the pre-saved user are input into the pre-trained word vector generation model to obtain the first vector corresponding to the at least two words of interest to the pre-saved user. Among them, based on the pre-trained word vector generation model, determining the first vector corresponding to the at least two words of interest to the pre-saved user is the prior art and will not be elaborated here.
[0069] For example, if the at least two words of interest to the pre-saved user are respectively "efficient", "privacy protection", "security", "resource saving", "refrigeration", "going home", "leaving home", "before going to bed", "getting up", and "leisure", then after inputting these words "efficient", "privacy protection", "security", "resource saving", "refrigeration", "going home", "leaving home", "before going to bed", "getting up", and "leisure" into the pre-trained word vector generation model in sequence, the first vector corresponding to the at least two words of interest to the pre-saved user obtained is (0.6, 0.8, 0.8, 0.5, 0.2, 1, 1, 1, 1, 1), where 0.6 is the value corresponding to the word "efficient" among the words of interest to the user, 0.8 is the value corresponding to the word "privacy protection" among the words of interest to the user, and so on.
[0070] In order to determine the target score corresponding to the third candidate device, based on the above embodiments, in the embodiment of the present application, the determining the target score corresponding to the third candidate device according to the first vector, the second vector, the degree of association between the current bound device in the knowledge graph and the nodes corresponding to the third candidate device whose number of nodes separated from the node corresponding to the current bound device is less than a preset node quantity threshold, and a preset function includes:
[0071] Determine the dot product of the first vector and the second vector;
[0072] Determine the sum value of the dot product and the degree of association between the current bound device and the third candidate device in the knowledge graph, and determine the sum value as the target score corresponding to the third candidate device.
[0073] In this application, to determine the target score corresponding to the third candidate device, after determining the first vector and the second vector, first perform a dot product on the first vector and the second vector, and then determine the sum of the dot product and the degree of association between the current bound device and the third candidate device in the knowledge graph, and determine the sum as the target score corresponding to the third candidate device. For example, if the first vector is (0.6, 0.8, 0.8) and the second vector is (1, 0, 0), then the dot product of the first vector and the second vector is 0.6. If the currently bound device is a door and the third candidate device is a window, and the degree of association between the door and the window in the knowledge graph is determined to be 0.2, then the target score corresponding to the window is 0.8.
[0074] Based on the above embodiments, in the embodiments of this application, to determine the degree of association between the current bound device and the third candidate device in the knowledge graph, determining the degree of association between the current bound device and the third candidate device in the knowledge graph includes:
[0075] Determine whether the node of the current bound device and the node of the third candidate device are directly connected. If not, determine the path where the node of the current bound device and the node of the third candidate device are located;
[0076] Determine the weighted sum according to the degree of association between two directly connected nodes in the path and the preset weight value, and determine the weighted sum as the degree of association between the current bound device and the third candidate device in the knowledge graph.
[0077] In this application, in the knowledge graph, the node of the current bound device and the node of the third candidate device may be directly connected or indirectly connected. Since the pre - saved association degree in the knowledge graph is that between two directly - connected nodes, in order to determine the association degree between the current bound device and the third candidate device in the knowledge graph, first, it is determined whether the node of the current bound device and the node of the third candidate device are directly connected. If they are directly connected, the association degree between the current bound device and the third candidate device can be directly determined based on the knowledge graph; if they are not directly connected, that is, if they are indirectly connected, in order to determine the association degree between the current bound device and the third candidate device, in this application, first, the path where the node of the current bound device and the node of the third candidate device are located is determined. Then, according to the knowledge graph, the association degrees between every two directly - connected nodes in this path are determined, and the weighted sum is determined according to the association degrees between every two directly - connected nodes in this path and the pre - set weight value, and this weighted sum is determined as the association degree between the current bound device and the third candidate device in the knowledge graph. Among them, the pre - set weight value is set according to requirements, and the weight value corresponding to the connection between a node closer to the current bound device and the node connected to it is larger. In this application, a time forgetting mechanism can be introduced, that is, the weight value corresponding to the connection relationship between every two nodes is set to e -γ , where γ represents the number of the connection relationship starting from the current bound device for the connection relationship between the two nodes.
[0078] For example, the door and the bedroom table lamp are indirectly connected, and the path where the node of the door and the node of the bedroom table lamp are located in the knowledge graph is: door - window - curtain - bedroom table lamp. And the association degree between the node of the door and the node of the window is 0.81, the association degree between the node of the window and the node of the curtain is 0.85, and the association degree between the node of the curtain and the node of the bedroom table lamp is 0.78. Then the association degree R(entrance door, bedroom table lamp) in the knowledge graph = 0.81 * e -1 * 0.85 * e -2 * 0.78 * e -3 = 0.001.
[0079] On the basis of the above - mentioned embodiments, in order to determine the pre - saved knowledge graph, in the embodiment of this application, the process of determining the pre - saved knowledge graph includes:
[0080] According to the historical device linkage data, obtain the information of the devices and the information of the association relationships between the devices;
[0081] Create corresponding nodes according to the obtained information of the devices, and connect the corresponding nodes according to the information of the association relationships between the devices;
[0082] Determine the correlation degree between two nodes with a connection relationship according to the historical device linkage data;
[0083] Determine the attribute information between two nodes with a connection relationship according to the pre - saved corresponding relationship between attribute information and devices;
[0084] Save the correlation degree and the attributes in the knowledge graph.
[0085] In this application, in order to determine the pre - saved knowledge graph, according to the historical device linkage data, obtain the information of the devices in the historical device linkage data and the information of the association relationship between the devices. Among them, the information of the device can be the identification information of the device recorded in the historical device linkage data, and the identification information can be the name of the device. When determining whether there is an association relationship between any two devices, it can be determined whether the two devices appear in a historical device linkage data at the same time in the historical device linkage data. If so, it means that the two devices have an association relationship. If not, it means that there is no association relationship between the two devices.
[0086] After obtaining the information of the devices and the information of the association relationship between the devices, create corresponding nodes according to the obtained information of the devices, where one node is created according to the information of one device. And connect the corresponding nodes according to the association relationship between the devices.
[0087] In this application, in order to determine the correlation degree between two nodes with a connection relationship, in this application, according to the historical device linkage data, determine the correlation degree between two nodes with a connection relationship. In order to determine the attribute information between two nodes with a connection relationship, in this application, the corresponding relationship between attribute information and devices is pre - saved. According to the pre - saved corresponding relationship between attribute information and devices, determine the attribute information between two nodes with a connection relationship. And after determining the correlation degree between two nodes with a connection relationship and the attribute information between two nodes with a connection relationship, save the correlation degree and the attribute information in the knowledge graph. Among them, the attribute information is the effect that the devices corresponding to the two connected nodes want to achieve when they are linked. Specifically, the attribute information can be "efficient refrigeration", "energy saving", etc.
[0088] Figure 2 A schematic diagram of the display of historical device linkage data provided by some embodiments of this application Figure 3 A schematic diagram of a knowledge graph constructed based on historical device linkage data provided by some embodiments of this application. Now, for Figure 2 and Figure 3 make an explanation:
[0089] Multiple device linkage records are recorded in the historical device linkage data. Each device linkage record stores the identification value corresponding to the record, that is, the id, as well as the names of the linked devices, the linked scenarios, and the usage time. For example, when the id is 001, the linked scenario corresponding to this device linkage is the home mode, the names of the linked devices include the entrance door and the air conditioner, and the usage time is 2020-08-11.
[0090] Obtain the information of the devices and the association relationships between the devices from the historical device linkage data, and determine that the devices include the entrance door, the air conditioner, the fan, the living room light, the window, the curtain, the floor cleaning robot, the security camera, the TV, the bedroom table lamp, the water heater, the purifier, and the rice cooker. Create corresponding nodes based on these devices, that is, create nodes corresponding to the entrance door, the air conditioner, the fan, the living room light, the window, the curtain, the floor cleaning robot, the security camera, the TV, the bedroom table lamp, the water heater, the purifier, and the rice cooker.
[0091] According to the association relationships between the devices, determine the association degree between two nodes with a connection relationship. For example, when the id is 001, the linked scenario corresponding to this device linkage is the home mode, and the linked devices include the entrance door and the air conditioner, indicating that there is a connection relationship between the entrance door and the air conditioner. Then connect the node corresponding to the entrance door with the node corresponding to the air conditioner. When the id is 002, the linked scenario corresponding to this device linkage is the home mode, and the linked devices include the entrance door, the living room light, the security camera, and the air conditioner, indicating that there are connection relationships between the entrance door and the living room light, the security camera, and the air conditioner respectively. Then connect the node corresponding to the entrance door with the node corresponding to the living room light, connect the node corresponding to the entrance door with the node corresponding to the security camera, and connect the node corresponding to the entrance door with the node corresponding to the air conditioner.
[0092] According to the pre-saved correspondence between the attribute information and the devices, determine the attribute information between two nodes with a connection relationship. Among them, the pre-saved correspondence between the attribute information and the devices is the correspondence between the attribute information and two devices with a connection relationship, that is, two devices with a connection relationship correspond to one attribute information. For example, according to the pre-saved correspondence between the attribute information and the devices, determine that the attribute information between the node corresponding to the entrance door and the node corresponding to the air conditioner is "efficient cooling".
[0093] According to the historical device linkage data, determine the association degree between two nodes with a connection relationship. For example, there are 11 records containing the entrance door and the air conditioner in the historical device linkage data, and 22 records containing the entrance door or the air conditioner. Therefore, the association degree between the entrance door and the air conditioner is 0.5.
[0094] To determine the correlation degree between two nodes with a connection relationship in the knowledge graph, based on the above embodiments, in the embodiments of the present application, the determining the correlation degree between two nodes with a connection relationship in the knowledge graph according to the historical device linkage data includes:
[0095] According to the historical device linkage data, determine the first occurrence number of the devices corresponding to the two nodes with a connection relationship appearing in the same historical device linkage data, and determine the second occurrence number of any one of the devices corresponding to the two nodes with a connection relationship appearing alone in a historical device linkage data;
[0096] Determine the quotient value of the first occurrence number and the second occurrence number as the correlation degree between the two nodes with a connection relationship in the knowledge graph.
[0097] In the present application, to determine the correlation degree between two nodes with a connection relationship in the knowledge graph, according to the historical device linkage data, first determine the first occurrence number of the devices corresponding to the two nodes with a connection relationship appearing in the same historical device linkage data, and determine the second occurrence number of any one of the devices corresponding to the two nodes with a connection relationship appearing alone in a historical device linkage data, and then determine the quotient value of the first occurrence number and the second occurrence number, and determine this quotient value as the correlation degree between the two nodes with a connection relationship in the knowledge graph. Among them, the second occurrence number can be the sum value of the number of times each device appears alone in a historical device linkage data, or the maximum value of the number of times each device appears alone in the historical device linkage data can be determined as the second occurrence number. For example, if there is a connection relationship between the indoor door node and the air conditioner node, where the first occurrence number of the indoor door and the air conditioner appearing in the same historical device linkage data in the historical device linkage data is 11, and the second occurrence number of any one of the indoor door and the air conditioner appearing alone in a historical device linkage data is 22, then the correlation degree between the indoor door node and the air conditioner node in this knowledge graph is
[0098] Figure 4 This is a schematic diagram of the process for determining a device linkage scheme provided by some embodiments of the present application, and now it is described for Figure 4 explanation.
[0099] Historical device linkage data is pre - saved in the electronic device. First, based on this historical device linkage data, information about the devices and information about the association relationships between the devices are obtained. Corresponding nodes are constructed according to the information about the devices, and the corresponding nodes are connected according to the information about the association relationships between the devices. According to the historical device linkage data, the association degree between two nodes with a connection relationship is determined, and according to the pre - saved corresponding relationship between the devices and the attribute information, the attribute information between two nodes with a connection relationship is determined. Finally, the association degree and the attribute information between the connected nodes are saved in this knowledge graph, and the constructed knowledge graph is saved.
[0100] After receiving a scene selection instruction, the target scene is determined according to the scene selection instruction. The first candidate devices other than the current bound device in the target scene are determined, and the second candidate devices associated with the current bound device in the knowledge graph are calculated. The association degree between the candidate devices associated with the current bound device is calculated, and according to the user's preference degree for each device, the target score of the candidate device is determined. The candidate devices are sorted according to the target score, the devices that are the same as the second candidate devices among the first candidate devices are determined as the target devices, and then the target devices and the current bound device are arranged in combination to determine and recommend a device linkage scheme, and the device linkage scheme is saved in the database.
[0101] Figure 5 The following is a schematic structural diagram of a device linkage scheme recommendation device provided by some embodiments of the present application. The device includes:
[0102] A determination module 501, configured to determine and output the candidate scenes corresponding to the current bound device according to the corresponding relationship between the device and the scene; determine the target scene according to the received scene selection instruction; determine the target devices other than the current bound device in the target scene according to the historical device linkage data;
[0103] A recommendation module 502, configured to recommend a device linkage scheme including the current bound device and the target devices.
[0104] In a possible implementation manner, the determination module 501 is specifically configured to determine the first candidate devices other than the current bound device in the target scene according to the historical device linkage data; determine the second candidate devices associated with the current bound device according to each device - corresponding node, the connection relationship between the nodes, and the current bound device in the pre - saved knowledge graph; determine the devices that are the same as the second candidate devices among the first candidate devices as the target devices.
[0105] In a possible implementation manner, the determining module 501 is specifically configured to determine, according to nodes corresponding to each device in a pre-stored knowledge graph and the currently bound device, devices corresponding to nodes whose number of nodes spaced from the node corresponding to the currently bound device is less than a preset node quantity threshold as second candidate devices.
[0106] In a possible implementation manner, the determining module 501 is specifically configured to search, based on attribute information corresponding to connection relationships between nodes in the knowledge graph, for a target word that matches the attribute information among at least two words of user interest pre-stored; determine, according to a first vector corresponding to at least two words of user interest pre-stored, where each component in the first vector corresponds to a value of each word of user interest, a target value corresponding to the target word in the first vector, update the target value to a preset first value, and update other values in the first vector except the target value to a preset second value to obtain a second vector; determine, according to the first vector, the second vector, a relevance degree between the currently bound device in the knowledge graph and a third candidate device corresponding to a node whose number of nodes spaced from the node corresponding to the currently bound device is less than a preset node quantity threshold, and a preset function, a target score corresponding to the third candidate device, and sort the third candidate devices from high to low according to the target score; and determine a set number of the third candidate devices ranked at the front as the second candidate devices.
[0107] In a possible implementation manner, the determining module 501 is specifically configured to determine, according to at least two words of user interest pre-stored and a word vector generation model that has been pre-trained, a first vector corresponding to the at least two words of user interest pre-stored.
[0108] In a possible implementation manner, the determining module 501 is specifically configured to determine a dot product of the first vector and the second vector; determine a sum value of the dot product and a relevance degree between the currently bound device and the third candidate device in the knowledge graph, and determine the sum value as the target score corresponding to the third candidate device.
[0109] In a possible implementation manner, the determining module 501 is specifically configured to determine whether a node of the currently bound device and a node of the third candidate device are directly connected, and if not, determine a path where the node of the currently bound device and the node of the third candidate device are located; determine a weight sum according to relevance degrees between each two directly connected nodes in the path and a preset weight value, and determine the weight sum as the relevance degree between the currently bound device and the third candidate device in the knowledge graph.
[0110] In a possible implementation manner, the determining module 501 is specifically configured to obtain information about devices and information about the association relationship between devices according to the historical device linkage data; create corresponding nodes according to the obtained device information, and connect the corresponding nodes according to the information about the association relationship between devices; determine the association degree between two nodes with a connection relationship according to the historical device linkage data; determine the attribute information between two nodes with a connection relationship according to the corresponding relationship between the pre-stored attribute information and the devices; and save the association degree and the attributes in the knowledge graph.
[0111] In a possible implementation manner, the determining module 501 is specifically configured to determine the first occurrence number of the devices corresponding to two nodes with a connection relationship in a historical device linkage data, and determine the second occurrence number of any one of the devices corresponding to the two nodes with a connection relationship in a historical device linkage data; and determine the quotient of the first occurrence number and the second occurrence number as the association degree between the two nodes with a connection relationship in the knowledge graph.
[0112] Based on the above embodiments, some embodiments of the present application further provide an electronic device, as Figure 6 shown, including: a processor 601, a communication interface 602, a memory 603, and a communication bus 604, where the processor 601, the communication interface 602, and the memory 603 complete communication with each other through the communication bus 604.
[0113] A computer program is stored in the memory 603. When the program is executed by the processor 601, the processor 601 is caused to execute the following steps:
[0114] Determine and output candidate scenarios corresponding to the currently bound device according to the corresponding relationship between the device and the scenario;
[0115] Determine a target scenario according to the received scenario selection instruction;
[0116] Determine target devices other than the currently bound device in the target scenario according to the historical device linkage data;
[0117] Recommend a device linkage solution including the currently bound device and the target devices.
[0118] Further, the processor 501 is further configured to determine a first candidate device other than the current bound device in the target scenario according to historical device linkage data; determine a second candidate device having an association relationship with the current bound device according to nodes corresponding to each device, connection relationships between the nodes, and the current bound device in a pre-stored knowledge graph; and determine a device identical to the second candidate device among the first candidate devices as the target device.
[0119] Further, the processor 501 is further configured to determine, according to nodes corresponding to each device in a pre-stored knowledge graph and the currently bound device, a device corresponding to a node whose number of nodes spaced from the node corresponding to the current bound device is less than a pre-set node quantity threshold as the second candidate device.
[0120] Further, the processor 501 is further configured to search for a target word matching the attribute information in at least two words of user interest pre-stored based on the attribute information corresponding to the connection relationship between nodes in the knowledge graph; determine a target value corresponding to the target word in a first vector corresponding to at least two words of user interest pre-stored, where each component in the first vector corresponds to a value of each word of user interest, update the target value to a preset first value, and update other values in the first vector except the target value to a preset second value to obtain a second vector; determine a target score corresponding to the third candidate device according to the first vector, the second vector, the association degree between the current bound device in the knowledge graph and the third candidate device corresponding to a node whose number of nodes spaced from the node corresponding to the current bound device is less than a pre-set node quantity threshold, and a preset function, and sort the third candidate devices from high to low according to the target score; and determine a set number of the third candidate devices ranked at the front as the second candidate devices.
[0121] Further, the processor 501 is further configured to determine a first vector corresponding to at least two words of user interest pre-stored according to the at least two words of user interest pre-stored and a pre-trained word vector generation model.
[0122] Further, the processor 501 is further configured to determine a dot product of the first vector and the second vector; determine a sum value of the dot product and the association degree between the current bound device in the knowledge graph and the third candidate device, and determine the sum value as the target score corresponding to the third candidate device.
[0123] Further, the processor 501 is further configured to determine whether the node of the currently bound device is directly connected to the node of the third candidate device. If not, it determines the path where the node of the currently bound device and the node of the third candidate device are located; determines the sum of weights according to the correlation degree between two directly connected nodes in the path and a preset weight value, and determines the sum of weights as the correlation degree between the currently bound device and the third candidate device in the knowledge graph.
[0124] Further, the processor 501 is further configured to obtain information about devices and information about the association relationships between devices according to the historical device linkage data; create corresponding nodes according to the obtained device information, and connect the corresponding nodes according to the information about the association relationships between devices; determine the correlation degree between two nodes with a connection relationship according to the historical device linkage data; determine the attribute information between two nodes with a connection relationship according to the corresponding relationship between the pre-stored attribute information and the devices; and save the correlation degree and the attributes in the knowledge graph.
[0125] Further, the processor 501 is further configured to determine the first number of times that the devices corresponding to two nodes with a connection relationship appear in a historical device linkage data at the same time according to the historical device linkage data, and determine the second number of times that any one of the devices corresponding to the two nodes with a connection relationship appears alone in a historical device linkage data; and determine the quotient of the first number and the second number as the correlation degree between the two nodes with a connection relationship in the knowledge graph.
[0126] The communication bus mentioned in the above server may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of simplicity of representation, only a thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0127] The communication interface 502 is used for communication between the above electronic device and other devices.
[0128] The memory may include a Random Access Memory (RAM), or may also include a Non-Volatile Memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located far from the aforementioned processor.
[0129] The above-mentioned processor can be a general-purpose processor, including a central processing unit, a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit, a field-programmable gate array, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0130] Based on the above embodiments, some embodiments of the present application further provide a computer-readable storage medium. The computer-readable storage medium stores a computer program executable by an electronic device. When the program runs on the electronic device, the electronic device is caused to execute the following steps when executing:
[0131] A computer program is stored in the memory. When the program is executed by the processor, the processor is caused to execute the following steps:
[0132] Determine and output a candidate scene corresponding to the currently bound device according to the corresponding relationship between the device and the scene;
[0133] Determine a target scene according to the received scene selection instruction;
[0134] Determine a target device other than the currently bound device in the target scene according to historical device linkage data;
[0135] Recommend a device linkage solution including the currently bound device and the target device.
[0136] Further, the determining a target device other than the currently bound device in the target scene according to historical device linkage data includes:
[0137] Determine a first candidate device other than the currently bound device in the target scene according to historical device linkage data;
[0138] Determine a second candidate device having an association relationship with the currently bound device according to the nodes corresponding to each device, the connection relationship between the nodes, and the currently bound device in the pre-stored knowledge graph;
[0139] Determine the devices in the first candidate devices that are the same as the second candidate devices as the target devices.
[0140] Further, the determining a second candidate device having an association relationship with the currently bound device according to the nodes corresponding to each device, the connection relationship between the nodes, and the currently bound device includes:
[0141] Based on the nodes corresponding to each device in the pre-stored knowledge graph and the currently bound device, determine the devices corresponding to the nodes whose number of nodes separated from the node corresponding to the currently bound device is less than a pre-set node quantity threshold as the second candidate devices.
[0142] Further, the determining the devices corresponding to the nodes whose number of nodes separated from the node corresponding to the currently bound device is less than a pre-set node quantity threshold as the second candidate devices includes:
[0143] Based on the attribute information corresponding to the connection relationship between nodes in the knowledge graph, search for a target word that matches the attribute information among at least two words of interest to the user pre-stored.
[0144] According to the first vector corresponding to at least two words of interest to the user pre-stored, where each component in the first vector corresponds to the value of each word of interest to the user, determine the target value corresponding to the target word in the first vector, update the target value to a preset first value, and update the other values in the first vector except the target value to a preset second value to obtain a second vector.
[0145] According to the first vector, the second vector, the association degree between the currently bound device in the knowledge graph and the third candidate devices corresponding to the nodes whose number of nodes separated from the node corresponding to the currently bound device is less than a pre-set node quantity threshold, and a preset function, determine the target score corresponding to the third candidate devices, and sort the third candidate devices from high to low according to the target score.
[0146] Determine the set number of the third candidate devices ranked ahead as the second candidate devices.
[0147] Further, determining the first vector corresponding to at least two words of interest to the user pre-stored includes:
[0148] According to at least two words of interest to the user pre-stored and in a pre-trained word vector generation model, determine the first vector corresponding to at least two words of interest to the user pre-stored.
[0149] Further, the determining the target score corresponding to the third candidate devices according to the first vector, the second vector, the association degree between the currently bound device in the knowledge graph and the third candidate devices corresponding to the nodes whose number of nodes separated from the node corresponding to the currently bound device is less than a pre-set node quantity threshold, and a preset function includes:
[0150] Determine the dot product of the first vector and the second vector.
[0151] Determine the sum value of the dot product and the degree of association between the current bound device and the third candidate device in the knowledge graph, and determine the sum value as the target score corresponding to the third candidate device.
[0152] Further, determining the degree of association between the current bound device and the third candidate device in the knowledge graph includes:
[0153] Determine whether the node of the current bound device and the node of the third candidate device are directly connected. If not, determine the path where the node of the current bound device and the node of the third candidate device are located;
[0154] Determine the weighted sum according to the degree of association between two directly connected nodes in the path and the preset weight value, and determine the weighted sum as the degree of association between the current bound device and the third candidate device in the knowledge graph.
[0155] Further, the process of determining the pre-saved knowledge graph includes:
[0156] Obtain the information of the devices and the information of the association relationships between the devices according to the historical device linkage data;
[0157] Create corresponding nodes according to the obtained information of the devices, and connect the corresponding nodes according to the information of the association relationships between the devices;
[0158] Determine the degree of association between two nodes with a connection relationship according to the historical device linkage data;
[0159] Determine the attribute information between two nodes with a connection relationship according to the corresponding relationship between the pre-saved attribute information and the devices;
[0160] Save the degree of association and the attributes in the knowledge graph.
[0161] Further, the determining the degree of association between two nodes with a connection relationship in the knowledge graph according to the historical device linkage data includes:
[0162] According to the historical device linkage data, determine the first occurrence number of the devices corresponding to two nodes with a connection relationship appearing in a historical device linkage data at the same time, and determine the second occurrence number of any one of the devices corresponding to the two nodes with a connection relationship appearing alone in a historical device linkage data;
[0163] Determine the quotient value of the first occurrence number and the second occurrence number as the degree of association between two nodes with a connection relationship in the knowledge graph.
[0164] Since in the embodiments of the present application, the device linkage solutions that can be selected in the target scenario can be determined and recommended based on the currently bound device and the target scenario selected by the user, the user experience is improved.
[0165] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0166] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the specified functions in Figure 1 one or more flows Figure 1 or a combination of multiple flows and / or blocks
[0167] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including instruction means, and the instruction means implements the specified functions in Figure 1 one or more flows Figure 1 or a combination of multiple flows and / or blocks
[0168] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the specified functions in Figure 1 one or more flows Figure 1 or a combination of multiple flows and / or blocks
[0169] Obviously, those skilled in the art can make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalent technologies, this application is also intended to include these modifications and variations.
Claims
1. A method for recommending a device linkage solution, characterized in that, The method includes: Determine and output candidate scenarios corresponding to the currently bound device according to the correspondence between the device and the scenario; Determine the target scenario according to the received scenario selection instruction; Determine the first candidate devices other than the currently bound device in the target scenario according to the historical device linkage data; Determine the second candidate devices having an association relationship with the currently bound device according to the nodes corresponding to each device, the connection relationships between the nodes, and the currently bound device in the pre-stored knowledge graph; Determine the devices that are the same among the first candidate devices and the second candidate devices as the target devices; Recommend a device linkage scheme including the currently bound device and the target device; The process of determining the pre-stored knowledge graph includes: Obtain the information of the devices and the information of the association relationships between the devices according to the historical device linkage data; Create corresponding nodes according to the obtained information of the devices, and connect the corresponding nodes according to the information of the association relationships between the devices; Determine the first occurrence number of the devices corresponding to the two nodes having a connection relationship appearing in a historical device linkage data at the same time according to the historical device linkage data, and determine the second occurrence number of any one of the devices corresponding to the two nodes having a connection relationship appearing alone in a historical device linkage data; Determine the quotient value of the first occurrence number and the second occurrence number as the association degree between the two nodes having a connection relationship in the knowledge graph; Determine the attribute information between the two nodes having a connection relationship according to the correspondence between the pre-stored attribute information and the devices; Save the association degree and the attribute in the knowledge graph.
2. The method according to claim 1, wherein The determining the second candidate devices having an association relationship with the currently bound device according to the nodes corresponding to each device, the connection relationships between the nodes, and the currently bound device in the pre-stored knowledge graph includes: According to the nodes corresponding to each device and the currently bound device in the pre-stored knowledge graph, determine the devices corresponding to the nodes whose number of nodes separated from the node corresponding to the currently bound device is less than a preset node quantity threshold as the second candidate devices.
3. The method according to claim 2, wherein The determining the devices corresponding to the nodes whose number of nodes separated from the node corresponding to the currently bound device is less than a preset node quantity threshold as the second candidate devices includes: Based on the attribute information corresponding to the connection relationship between the nodes in the knowledge graph, search for a target word matching the attribute information among at least two words of interest to the user pre-stored; According to the first vector corresponding to at least two words of interest to the user pre-stored, wherein each component in the first vector corresponds to a numerical value corresponding to each word of interest to the user, determine the target numerical value corresponding to the target word in the first vector, update the target numerical value to a preset first numerical value, and update the other numerical values in the first vector except the target numerical value to a preset second numerical value to obtain a second vector; Determine the target score corresponding to the third candidate device according to the first vector, the second vector, the degree of association between the current bound device in the knowledge graph and the third candidate device corresponding to the nodes whose number of nodes separated from the node corresponding to the current bound device is less than a preset node quantity threshold, and a preset function, and sort the third candidate devices in descending order of the target score; Determine the set number of the third candidate devices ranked ahead as the second candidate devices.
4. The method according to claim 3, wherein The determining the target score corresponding to the third candidate device according to the first vector, the second vector, the degree of association between the current bound device in the knowledge graph and the third candidate device corresponding to the nodes whose number of nodes separated from the node corresponding to the current bound device is less than a preset node quantity threshold, and a preset function includes: Determine the dot product of the first vector and the second vector; Determine the sum value of the dot product and the degree of association between the current bound device and the third candidate device in the knowledge graph, and determine the sum value as the target score corresponding to the third candidate device.
5. The method according to claim 4, characterized in that, Determining the degree of association between the current bound device and the third candidate device in the knowledge graph includes: Determine whether the node of the current bound device and the node of the third candidate device are directly connected. If not, determine the path where the node of the current bound device and the node of the third candidate device are located; Determine the weight sum according to the degree of association between two directly connected nodes in the path and a preset weight value, and determine the weight sum as the degree of association between the current bound device and the third candidate device in the knowledge graph.
6. An electronic device, characterized in that, The electronic device includes a processor, and the processor is configured to implement the steps of the method according to any one of claims 1-5 when executing a computer program stored in a memory.
7. A computer-readable storage medium, characterized in that, It stores a computer program, and when the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-5.
Citation Information
Patent Citations
Voice control method, device, storage medium and intelligent housing system
CN109754804A
Device linkage method and device, electronic device and storage medium
CN111142398A
Configuration method and device for smart home scene, and electronic equipment
CN112947107A