CN117689020A - Method and device for constructing intelligent home body based on large model and electronic equipment - Google Patents

Method and device for constructing intelligent home body based on large model and electronic equipment Download PDF

Info

Publication number
CN117689020A
CN117689020A CN202410153801.5A CN202410153801A CN117689020A CN 117689020 A CN117689020 A CN 117689020A CN 202410153801 A CN202410153801 A CN 202410153801A CN 117689020 A CN117689020 A CN 117689020A
Authority
CN
China
Prior art keywords
target
intelligent home
relation
model
expansion
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202410153801.5A
Other languages
Chinese (zh)
Other versions
CN117689020B (en
Inventor
邓邱伟
田云龙
牛丽
王淼
杜永杰
赵乾
李永华
张楚君
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Haier Technology Co Ltd
Qingdao Haier Intelligent Home Appliance Technology Co Ltd
Haier Uplus Intelligent Technology Beijing Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Qingdao Haier Intelligent Home Appliance Technology Co Ltd
Haier Uplus Intelligent Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Haier Technology Co Ltd, Qingdao Haier Intelligent Home Appliance Technology Co Ltd, Haier Uplus Intelligent Technology Beijing Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202410153801.5A priority Critical patent/CN117689020B/en
Priority claimed from CN202410153801.5A external-priority patent/CN117689020B/en
Publication of CN117689020A publication Critical patent/CN117689020A/en
Application granted granted Critical
Publication of CN117689020B publication Critical patent/CN117689020B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Stored Programmes (AREA)

Abstract

The application discloses a method and a device for constructing an intelligent home body based on a large model, and electronic equipment, and relates to the technical field of intelligent home, wherein the method for constructing the intelligent home body based on the large model comprises the following steps: performing low-rank adaptive fine adjustment on the large language model according to the standard intelligent home ontology to obtain a target large model; obtaining the expansion relation of the new objects through the target large model according to the intelligent home relation in the standard intelligent home body and the description information of the new objects; and expanding the standard intelligent home body according to the expansion relation of the new things to construct a target intelligent home body. According to the standard intelligent home ontology, low-rank adaptive fine tuning is performed on the large language model, a target large model is obtained, and then according to the existing intelligent home relationship and description information of newly added things, the accurately and abundant expansion relationship can be obtained through the newly added things which are simply described by the target large model, so that the complexity of information sources required by the intelligent home ontology during expansion is reduced.

Description

Method and device for constructing intelligent home body based on large model and electronic equipment
Technical Field
The application relates to the technical field of intelligent home, in particular to a method and device for constructing an intelligent home body based on a large model, and electronic equipment.
Background
The intelligent home uses the home as a platform, integrates facilities related to home life by utilizing a comprehensive wiring technology, a network communication technology, a security technology, an automatic control technology and an audio-video technology, builds an efficient management system of home facilities and family schedule matters, improves the safety, convenience, comfort and artistry of the home, and realizes an environment-friendly and energy-saving living environment. The body provides a standardized way for describing things in the real world, and is applied to the field of smart home, and the smart home body can be used for describing various entities, attributes and relations among the entities, the attributes and the relations in a smart home system, and is often represented by a directed graph. Through the application of the intelligent home body, various complex relations in the intelligent home system can be better understood and described, and stronger support is provided for intelligent management and control of the system. With the rapid development of technology in the field of intelligent home of the internet of things, the intelligent home ontology may lack description and application of the emerging concepts. How to expand the existing smart home ontology and improve the usability and expandability of the ontology is a problem to be solved at present.
In the related technology, the expansion of the intelligent home ontology is realized by an incremental construction mode, which comprises the steps of obtaining normalized domain knowledge from an information source, extracting tuples from unstructured and structured information by a knowledge tuple extraction module, normalizing vocabulary in the tuples by a normalization module by using word reduction and synonym recognition, finding and constructing the most similar concepts and relations in the ontology by a similarity algorithm contrast vector group, and finally obtaining a final result by a manual repair method.
In the process of implementing the embodiments of the present disclosure, it is found that at least the following problems exist in the related art:
in the related art, a knowledge tuple extraction algorithm for covering the context information and a knowledge tuple extraction model based on the structured information are provided for semi-automatically constructing the model, and the method needs highly accurate information of the information sources and has rich relations, so that the information sources needed by the expansion of the intelligent home ontology are complex.
It should be noted that the information disclosed in the foregoing background section is only for enhancing understanding of the background of the present application and thus may include information that does not form the prior art that is already known to those of ordinary skill in the art.
Disclosure of Invention
The following presents a simplified summary in order to provide a basic understanding of some aspects of the disclosed embodiments. This summary is not an extensive overview, and is intended to neither identify key/critical elements nor delineate the scope of such embodiments, but is intended as a prelude to the more detailed description that follows.
The embodiment of the disclosure provides a method and a device for constructing an intelligent home body based on a large model and electronic equipment, so as to reduce the complexity of information sources required when the intelligent home body is expanded.
In some embodiments, the method for building the smart home ontology based on the large model includes: performing low-rank adaptive fine adjustment on the large language model according to the standard intelligent home ontology to obtain a target large model; obtaining the expansion relation of the new objects through the target large model according to the intelligent home relation in the standard intelligent home body and the description information of the new objects; and expanding the standard intelligent home body according to the expansion relation of the new things to construct a target intelligent home body.
Optionally, performing low-rank adaptive fine tuning on the large language model according to the standard smart home ontology to obtain a target large model, including: converting the standard intelligent home ontology into vector data; embedding vector data into a vector database to obtain a fine tuning data set; and performing low-rank adaptive fine tuning on the large language model by using the fine tuning data set to obtain a target large model.
Optionally, converting the standard smart home ontology into vector data includes: converting the standard intelligent home ontology into a web ontology language (OWL (Ontology Web Language, web ontology language) file based on a set format; the OWL file is converted into vector data.
Optionally, performing low-rank adaptive fine tuning on the large language model using the fine tuning dataset to obtain a target large model, including: after freezing the initial weight of the large language model, adding a trainable rank decomposition matrix in each layer of transducer architecture of the large language model; training the rank decomposition matrix by utilizing the fine adjustment data set to obtain an update matrix; and integrating the updated matrix with the large language model to obtain the target large model.
Optionally, the smart home relationship includes a general relationship and an initial triplet relationship of the smart home; according to the intelligent home relation in the standard intelligent home body and the description information of the new things, the expansion relation of the new things is obtained through the target large model, and the method comprises the following steps: inputting the general relation, the initial triplet relation and the description information of the newly added things of the intelligent home into a target large model; acquiring a target text which is output by a target large model and contains a target triplet relation corresponding to the newly added object; and analyzing the target triplet relation in the target text to obtain the expansion relation of the new thing.
Optionally, analyzing the target triplet relationship in the target text to obtain the extended relationship of the newly added object, including: acquiring primary expansion relations of a plurality of newly-added things in a target triplet relation; determining the primary expansion relationship of the target newly-added objects in the primary expansion relationships of the plurality of newly-added objects; wherein the output times of the primary expansion relation of the new object are larger than the preset times; the primary expansion relationship of the new object is used as the expansion relationship of the new object.
Optionally, obtaining the extended relationship of the newly added object through the target big model includes: obtaining the expansion relation output by the target large model in the process of obtaining the expansion relation of the new objects through the target large model; and inputting a fine tuning instruction based on the output expansion relation of the target large model, so that the target large model adjusts the output expansion relation according to the fine tuning instruction.
Optionally, expanding the standard smart home body according to the expansion relation of the newly added things to construct the target smart home body, including: acquiring the name, the newly added service and the newly added attribute of the newly added object in the expansion relation of the newly added object; and expanding the triple relation in the standard intelligent home body according to the name, the newly added service and the newly added attribute of the newly added object to obtain the target intelligent home body.
In some embodiments, the apparatus for building a smart home ontology based on a large model includes a processor and a memory storing program instructions, the processor being configured to perform the method for building a smart home ontology based on a large model as described above when the program instructions are executed.
In some embodiments, the electronic device comprises: an electronic device body; the device for constructing the intelligent home body based on the large model is installed on the electronic equipment body.
The embodiment of the disclosure also provides a computer-readable storage medium storing program instructions that, when executed, are configured to cause a computer to perform the method for building an intelligent home ontology based on a large model as described above.
The method and device for constructing the intelligent home body based on the large model, and the electronic equipment provided by the embodiment of the disclosure can realize the following technical effects:
in the embodiment of the disclosure, the large language model is subjected to low-rank adaptive fine tuning according to the standard intelligent home ontology to obtain the target large model, so that the number of trainable parameters of a downstream task in the target large model can be reduced, and the training speed and performance of the target large model are improved. According to the existing intelligent home relation and the description information of the new things, the more comprehensive expansion relation of the new things relative to the intelligent home body can be obtained through the adjusted target large model, and finally the standard intelligent home body is expanded according to the expansion relation. The accurate and rich expansion relation can be obtained through the new object of the large target model for simple description, so that the requirement of expanding the intelligent home body is met, and the complexity of information sources required during the expansion of the intelligent home body is reduced.
The foregoing general description and the following description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
Fig. 1 is a schematic diagram of a hardware environment of a method for constructing an intelligent home ontology based on a large model according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram of a method for constructing an intelligent home ontology based on a large model according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram of a method for performing lore fine tuning on a large language model according to a standard smart home ontology in a method for constructing a smart home ontology based on a large model according to an embodiment of the present disclosure;
fig. 4 is a schematic diagram of using WashingMachine as a new thing and expanding an intelligent home body through a large model in a method for constructing the intelligent home body based on the large model according to an embodiment of the present disclosure;
fig. 5 is a schematic diagram of a template of a method for constructing an intelligent home ontology based on a large model according to an embodiment of the present disclosure;
fig. 6 is a schematic diagram of an apparatus for building an intelligent home ontology based on a large model according to an embodiment of the present disclosure.
Detailed Description
In order to make the present application solution better understood by those skilled in the art, the following description will be made in detail and with reference to the accompanying drawings in the embodiments of the present application, it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
It should be noted that, in the technical solutions described in this application, the terms "first," "second," and the like are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to one aspect of the disclosed embodiments, a method for building an intelligent home ontology based on a large model is provided. The method for constructing the intelligent Home ontology based on the large model is widely applied to full-house intelligent digital control application scenes such as intelligent Home (Smart Home), intelligent Home equipment ecology, intelligent Home (Intelligence House) ecology and the like. Optionally, in this embodiment, the method for building an intelligent home body based on the large model may be applied to a hardware environment formed by the terminal device 102 and the server 104 as shown in fig. 1, where the server builds a target intelligent home body by using the method for building an intelligent home body based on the large model provided in the embodiment of the present disclosure, and then sends the target intelligent home body to the terminal device through a network, so that the terminal device may use the target intelligent home body to provide better experience for a user. As shown in fig. 1, the server 104 is connected to the terminal device 102 through a network, and may be used to provide services (such as application services and the like) for a terminal or a client installed on the terminal, a database may be set on the server or independent of the server, for providing data storage services for the server 104, and cloud computing and/or edge computing services may be configured on the server or independent of the server, for providing data computing services for the server 104.
The network may include, but is not limited to, at least one of: wired network, wireless network. The wired network may include, but is not limited to, at least one of: a wide area network, a metropolitan area network, a local area network, and the wireless network may include, but is not limited to, at least one of: WIFI (Wireless Fidelity ), bluetooth. The terminal device 102 may not be limited to a PC, a mobile phone, a tablet computer, an intelligent air conditioner, an intelligent smoke machine, an intelligent refrigerator, an intelligent oven, an intelligent cooking range, an intelligent washing machine, an intelligent water heater, an intelligent washing device, an intelligent dish washer, an intelligent projection device, an intelligent television, an intelligent clothes hanger, an intelligent curtain, an intelligent video, an intelligent socket, an intelligent sound box, an intelligent fresh air device, an intelligent kitchen and toilet device, an intelligent bathroom device, an intelligent sweeping robot, an intelligent window cleaning robot, an intelligent mopping robot, an intelligent air purifying device, an intelligent steam box, an intelligent microwave oven, an intelligent kitchen appliance, an intelligent purifier, an intelligent water dispenser, an intelligent door lock, and the like.
Referring to fig. 2, a method for constructing an intelligent home body based on a large model according to an embodiment of the present disclosure includes:
s001, the server carries out low-rank adaptive fine adjustment on the large language model according to the standard intelligent home ontology to obtain a target large model.
S002, the server obtains the expansion relation of the new objects through the target large model according to the intelligent home relation in the standard intelligent home body and the description information of the new objects.
S003, the server expands the standard intelligent home body according to the expansion relation of the newly added things, and a target intelligent home body is constructed.
The large language model has high intelligent semantic understanding capability, is mainly used for natural language generation and understanding tasks, and can understand questions of users and give reliable replies. The big model is trained based on general knowledge, which may lack deep understanding in a specific field, cannot be well adapted to some specific downstream tasks, and has huge parameter quantity, which is unfavorable for overall fine adjustment, so in the embodiment of the disclosure, the big model is first subjected to Low-Rank Adaptation (LoRA) fine adjustment according to the standard intelligent home ontology to obtain the target big model, so that the number of trainable parameters of the downstream tasks in the target big model can be reduced, and the training speed and performance of the target big model are improved. In a standard smart home ontology, a large number of smart home relationships are stored for describing the properties, entities and relationships between existing smart home. The newly added things represent the smart home relationship that is not related to the newly added things in the smart home ontology. According to the intelligent home relation in the standard intelligent home body and the description information of the new things, the more comprehensive expansion relation of the new things relative to the intelligent home body, including the names of the new things, the new services and the new attributes, can be obtained through the target large model, and finally the standard intelligent home body is expanded according to the expansion relation. The accurate and rich expansion relation can be obtained through the large model for the new things which are simply described, so that the requirement of expanding the intelligent home body is met, and the complexity of information sources required during the expansion of the intelligent home body is reduced.
Optionally, performing low-rank adaptive fine tuning on the large language model according to the standard smart home ontology to obtain a target large model, including: converting the standard intelligent home ontology into vector data; embedding vector data into a vector database to obtain a fine tuning data set; and performing low-rank adaptive fine tuning on the large language model by using the fine tuning data set to obtain a target large model.
In the process of performing the LoRA fine tuning on the large language model according to the standard smart home ontology, as the large language model cannot directly understand the smart home ontology, the smart home ontology needs to be converted into vector data which can be understood by the large language model, including graph vector data, text vector data and voice vector data. And embedding the vector data into a vector database to be used as a fine tuning data set for performing RoLA fine tuning on the large language model.
Optionally, converting the standard smart home ontology into vector data includes: converting the standard intelligent home ontology into an OWL file based on a set format; the OWL file is converted into vector data.
The intelligent home ontology is used as a formalized knowledge expression for describing attributes, entities and relations among the attributes and the entities in the intelligent home field. Smart home ontologies can be represented by OWL files, which is a semantic language used to describe and define resources on a network, using a manner similar to natural language to describe and define relationships between concepts, classes, and attributes. The smart home ontology can be exported as an XML-based OWL file using protein. Protein is a semantic editor used to build and edit OWL and link data. After the OWL file is obtained, the OWL2vec-star method is used for generating vector data from the OWL file, and the obtained vector data can be optimized according to the needs by adjusting various options and parameters. And finally, embedding the obtained vector data into a Qdrant vector database to obtain the required fine tuning data set.
Optionally, performing low-rank adaptive fine tuning on the large language model using the fine tuning dataset to obtain a target large model, including: after freezing the initial weight of the large language model, adding a trainable rank decomposition matrix in each layer of the Transformer architecture of the large language model; training the rank decomposition matrix by utilizing the fine adjustment data set to obtain an update matrix; and integrating the updated matrix with the large language model to obtain the target large model.
The large language model has huge parameters and high training cost, and the cost of performing full fine tuning on the large language model is too high under the condition of encountering a downstream task. LoRA fine tuning is a method for efficient fine tuning of parameters, which fine tunes a large model with a small number of learnable parameters. The LoRA fine-tuning will freeze the initial weights of the large language model first and inject a trainable rank decomposition matrix into each layer of the transducer architecture of the large language model. Training the rank decomposition matrix by using the fine adjustment data set as input, continuously updating the weight of the rank decomposition matrix to obtain an updated matrix, and finally, re-integrating the updated matrix into the large language model to obtain the target large model.
Optionally, the smart home relationship includes a general relationship and an initial triplet relationship of the smart home; according to the intelligent home relation in the standard intelligent home body and the description information of the new things, the expansion relation of the new things is obtained through the target large model, and the method comprises the following steps: inputting the general relation, the initial triplet relation and the description information of the newly added things of the intelligent home into a target large model; acquiring a target text which is output by a target large model and contains a target triplet relation corresponding to the newly added object; and analyzing the target triplet relation in the target text to obtain the expansion relation of the new thing.
Because the smart home body is used for describing the attributes, entities and the relationships among the attributes, entities in the smart home field, a large number of smart home relationships are stored in the standard smart home body. The smart home relationship includes a general relationship and an initial triplet relationship of the smart home. The general relationship of the smart home includes (Device, hasService) for describing a relationship between devices and services, (Device, hasDeviceLocation) for describing a relationship between devices and locations, (Service, hasProperty, property) for describing a relationship between services and properties, (Service, hasact, action) for describing a relationship between services and executable actions, and (Service, hasEvent, event) for describing a relationship between services and related events. Based on the above general relationships, the smart home relationship further includes an initial triplet relationship for describing a location, a service, or an attribute of a specific smart home device, and the initial triplet relationship for describing a smart lamp (Light) in a smart home is described as an example, including: (Light, isA, lighting) indicates that the smart lamp is a Lighting Device, (Light, isA, device) indicates that the Lighting Device is a Device, (Light, hasDeviceLocation, livingRoom) indicates that the smart lamp is disposed in a living room, (Light, hasService, deviceInformation) indicates that the smart lamp has a service providing Device information, (Light, hasService, light) indicates that the smart lamp has a service of Lighting, and (Light, hasProperty, on) indicates that the Lighting service has an attribute of being on. All initial triples in the smart home relationship describe the classification of the various devices, as well as the services, attributes and location of each device. And inputting the general relation, the initial triplet relation and the description information of the newly added things into the target large model, and obtaining a target text which is output by the target large model and contains the target triplet relation corresponding to the newly added things. The target big model outputs a target text in the form of XML, and in combination with the description information of the new thing using WashingMachine as shown in fig. 4, the target big model provided by the embodiment of the present disclosure outputs the XML text as shown in fig. 4. The newly generated XML text comprises a target triplet relation formed based on services and attributes of the WashingMachine, the XML text is analyzed, the expansion relation of the new thing WashingMachine can be obtained, and finally the intelligent home ontology is expanded according to the expansion relation.
Optionally, analyzing the target triplet relationship in the target text to obtain the extended relationship of the newly added object, including: acquiring primary expansion relations of a plurality of newly-added things in a target triplet relation; determining the primary expansion relationship of the target newly-added objects in the primary expansion relationships of the plurality of newly-added objects; wherein the output times of the primary expansion relation of the new object are larger than the preset times; the primary expansion relationship of the new object is used as the expansion relationship of the new object.
In this embodiment, the output of the target large model may be acquired multiple times, with the result of each output being the primary expansion relationship of one new thing. The primary expansion relationship of a plurality of newly-added objects is analyzed, and under the condition that the occurrence frequency of the primary expansion relationship of the target newly-added object is larger than the preset frequency, the primary expansion relationship of the target newly-added object is accurate, and the primary expansion relationship of the target newly-added object is used as the expansion relationship of the newly-added object, so that the reliability of the output of the target large model can be further improved. The number of occurrences of the primary expansion relationship of the target newly-added object is greater than a preset number of occurrences, including a case where the number of occurrences of the primary expansion relationship of the target newly-added object is greater than half of all primary expansion relationships of the category.
Optionally, obtaining the extended relationship of the newly added object through the target big model includes: obtaining the expansion relation output by the target large model in the process of obtaining the expansion relation of the new objects through the target large model; and inputting a fine tuning instruction based on the output expansion relation of the target large model, so that the target large model adjusts the output expansion relation according to the fine tuning instruction.
In the process of outputting the expansion relation of the new things by the target large model, in order to improve the accuracy of the output information of the target large model, the target large model is required to be subjected to instruction fine adjustment to obtain a more accurate expansion relation. The fine tuning instructions need to be output in a structured form, clear and specific instructions are written through the prompt to serve as the fine tuning instructions, the large model is guided to think in a thinking chain mode, and a small number of examples can be provided to improve the accuracy of the answer of the large model.
In an alternative embodiment, the template of the template includes: generatePrompt (X) =instructions () +rules () +sample () +cot () +input (X) +output template (). The Instructions () function provides natural language Instructions for the target big model, so that the target big model obtains the capability of executing the Instructions, and the capability and the controllability of the target big model are enhanced. The Rules () function contains descriptions of smart home ontology abstraction Rules. The outputTemplate () function specifies the output format for the target big model. Input () is an Input text, and the Input may be a simple device name such as "washing machine", "smart lamp", etc., or may describe the device simply. The sample () function is an Example of a small number of samples provided. The CoT () function directs the target big model to think for the chain of thinking, generating the result. In conjunction with the template of promt shown in fig. 5, in this embodiment, the use of the template of promt may guide the answer output by the target large model to be more expected.
Optionally, analyzing the target triplet relationship in the target text to obtain the extended relationship of the newly added object, including: acquiring primary expansion relations of a plurality of newly-added things in a target triplet relation; in the primary expansion relationship of the plurality of newly-added objects, when the output times of the primary expansion relationship of the target newly-added object is larger than the preset times, the primary expansion relationship of the target newly-added object is used as the expansion relationship of the newly-added object.
In this embodiment, the output of the target large model may be acquired multiple times, with the result of each output being the primary expansion relationship of one new thing. The primary expansion relationship of a plurality of newly-added objects is analyzed, and under the condition that the occurrence frequency of the primary expansion relationship of the target newly-added object is larger than the preset frequency, the primary expansion relationship of the target newly-added object is accurate, and the primary expansion relationship of the target newly-added object is used as the expansion relationship of the newly-added object, so that the reliability of the output of the target large model can be further improved.
Optionally, expanding the standard smart home body according to the expansion relation of the newly added things to construct the target smart home body, including: acquiring the name, the newly added service and the newly added attribute of the newly added object in the expansion relation of the newly added object; and expanding the triple relation in the standard intelligent home body according to the name, the newly added service and the newly added attribute of the newly added object to obtain the target intelligent home body.
With reference to fig. 4, after the XML text representing the expansion relationship of the new thing WashingMachine is obtained, only the name of the new thing, the new service and the new attribute for representing the expansion relationship in the XML text need to be analyzed to construct the target triplet relationship, so that the expansion of the initial triplet relationship in the standard smart home body can be realized according to the target triplet relationship. For example, according to < WashingMachine >, the root element of the XML document can be parsed into a washing machine, and the XML document is used to describe attributes and relationships of a washing machine. < isA > intelligentHousehold appliances </isA > means that the washing machine belongs to the class of "intelligentHousehold appliances", i.e. the washing machine is an intelligent home appliance. < isadevice </isA > means that the washing machine also belongs to the "Device" category, i.e. the washing machine is a Device. < hasService > means that the washing machine provides some services, < Service > means general Service description, < hasProperty > DeviceInformation </hasProperty > means that this Service provides device information. < WashingService > < isA > Service < hasProperty > WashingProperty > < hasAction > StartWashingService > < hasEvent > WashingCompacted </WashingService > means that "WashingService" is a Service, and "WashingService" has the attribute of "WashingProperty", the action of "StartWashingService" and the event of "WashingCompacted". < hasDeviceLocation > < Location > WashRoom </hasDeviceLocation > means that the washing machine is located at "WashRoom". It can be seen in this XML document that the washing machine is not only a device, but also a smart home device, which can provide device information and laundry services. Laundry services include initiating laundry, completing laundry, and the like, and are placed in a laundry room. By parsing the XML text, a target triplet relationship similar to the initial triplet relationship can be obtained, and the target triplet relationship describes services and attributes of a device named "WashingMachine". Taking a target triplet relationship for describing the relationship between the washing machine and the device and the intelligent home device as an example, the method comprises the following steps: (WashingMachine, isA, intelligent Household appdevices), (WashingMachine, isA, device). And expanding the standard intelligent home body based on the target triplet relation to finally obtain the target intelligent home body.
By adopting the method for constructing the intelligent home body based on the large model, the efficiency of constructing the intelligent home body is improved, the intelligent home body can be automatically expanded by simply describing the newly added things, and the requirement on the complexity of an information source is reduced.
As shown in connection with fig. 6, an embodiment of the present disclosure provides an apparatus 300 for building a smart home ontology based on a large model, including a processor (processor) 400 and a memory (memory) 401. Optionally, the apparatus may further comprise a communication interface (Communication Interface) 402 and a bus 403. The processor 400, the communication interface 402, and the memory 401 may communicate with each other via the bus 403. The communication interface 402 may be used for information transfer. The processor 400 may call logic instructions in the memory 401 to perform the method of building a smart home ontology based on a large model of the above-described embodiments.
Further, the logic instructions in the memory 401 described above may be implemented in the form of software functional units and may be stored in a computer readable storage medium when sold or used as a stand alone product.
The memory 401 is a computer readable storage medium, and may be used to store a software program, a computer executable program, such as program instructions/modules corresponding to the methods in the embodiments of the present disclosure. The processor 400 executes the program instructions/modules stored in the memory 401 to perform the function application and the data processing, that is, to implement the method for building the smart home ontology based on the large model in the above embodiment.
Memory 401 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, at least one application program required for a function; the storage data area may store data created according to the use of the terminal device, etc. In addition, memory 401 may include high-speed random access memory, and may also include nonvolatile memory.
The embodiment of the disclosure provides an electronic device, comprising: the electronic equipment body and the device for constructing the intelligent home body based on the large model are installed on the electronic equipment body. The mounting relationship described herein is not limited to being placed inside the electronic device, but also includes mounting connections with other components of the electronic device, including but not limited to physical connections, electrical connections, or signal transmission connections, etc. Those skilled in the art will appreciate that the device for building an intelligent home ontology based on a large model may be adapted to a feasible electronic device main body, thereby implementing other feasible embodiments.
Embodiments of the present disclosure provide a computer-readable storage medium storing computer-executable instructions configured to perform the above method of building a smart home ontology based on a large model.
Embodiments of the present disclosure may be embodied in a software product stored on a storage medium, including one or more instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of a method according to embodiments of the present disclosure. And the aforementioned storage medium may be a non-transitory storage medium including: a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk or an optical disk, or the like, which can store program codes.
The foregoing is merely a preferred embodiment of the present application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present application and are intended to be comprehended within the scope of the present application.

Claims (10)

1. The method for constructing the intelligent home body based on the large model is characterized by comprising the following steps of:
performing low-rank adaptive fine adjustment on the large language model according to the standard intelligent home ontology to obtain a target large model;
obtaining the expansion relation of the new objects through the target large model according to the intelligent home relation in the standard intelligent home body and the description information of the new objects;
and expanding the standard intelligent home body according to the expansion relation of the new things to construct a target intelligent home body.
2. The method of claim 1, wherein performing low-rank adaptive fine tuning on the large language model according to the standard smart home ontology to obtain the target large model comprises:
converting the standard intelligent home ontology into vector data;
embedding vector data into a vector database to obtain a fine tuning data set;
and performing low-rank adaptive fine tuning on the large language model by using the fine tuning data set to obtain a target large model.
3. The method of claim 2, wherein converting standard smart home ontologies into vector data comprises:
converting the standard intelligent home ontology into a web ontology language OWL file based on a set format;
the OWL file is converted into vector data.
4. The method of claim 2, wherein performing low-rank adaptive fine tuning on the large language model using the fine-tuning dataset to obtain the target large model comprises:
after freezing the initial weight of the large language model, adding a trainable rank decomposition matrix in each layer of converter architecture of the large language model;
training the rank decomposition matrix by utilizing the fine adjustment data set to obtain an update matrix;
and integrating the updated matrix with the large language model to obtain the target large model.
5. The method of claim 1, wherein the smart home relationship comprises a global relationship and an initial triplet relationship of the smart home; according to the intelligent home relation in the standard intelligent home body and the description information of the new things, the expansion relation of the new things is obtained through the target large model, and the method comprises the following steps:
inputting the general relation, the initial triplet relation and the description information of the newly added things of the intelligent home into a target large model;
acquiring a target text which is output by a target large model and contains a target triplet relation corresponding to the newly added object;
and analyzing the target triplet relation in the target text to obtain the expansion relation of the new thing.
6. The method of claim 5, wherein parsing the target triplet relationships in the target text to obtain extended relationships for the newly added thing comprises:
acquiring primary expansion relations of a plurality of newly-added things in a target triplet relation;
determining the primary expansion relationship of the target newly-added objects in the primary expansion relationships of the plurality of newly-added objects; wherein the output times of the primary expansion relation of the new object are larger than the preset times;
the primary expansion relationship of the new object is used as the expansion relationship of the new object.
7. The method of claim 1, wherein obtaining the extended relationship of the newly added thing by the target large model comprises:
obtaining the expansion relation output by the target large model in the process of obtaining the expansion relation of the new objects through the target large model;
and inputting a fine tuning instruction based on the output expansion relation of the target large model, so that the target large model adjusts the output expansion relation according to the fine tuning instruction.
8. The method according to any one of claims 1 to 7, wherein expanding the standard smart home body according to the expansion relation of the newly added things to construct the target smart home body comprises:
acquiring the name, the newly added service and the newly added attribute of the newly added object in the expansion relation of the newly added object;
and expanding the triple relation in the standard intelligent home body according to the name, the newly added service and the newly added attribute of the newly added object to obtain the target intelligent home body.
9. An apparatus for building a smart home ontology based on a large model, comprising a processor and a memory storing program instructions, wherein the processor is configured to perform the method for building a smart home ontology based on a large model according to any one of claims 1 to 8 when the program instructions are run.
10. An electronic device, comprising:
an electronic device body;
the apparatus for building a smart home ontology based on a large model according to claim 9, being mounted to the electronic device ontology.
CN202410153801.5A 2024-02-04 Method and device for constructing intelligent home body based on large model and electronic equipment Active CN117689020B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410153801.5A CN117689020B (en) 2024-02-04 Method and device for constructing intelligent home body based on large model and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410153801.5A CN117689020B (en) 2024-02-04 Method and device for constructing intelligent home body based on large model and electronic equipment

Publications (2)

Publication Number Publication Date
CN117689020A true CN117689020A (en) 2024-03-12
CN117689020B CN117689020B (en) 2024-05-24

Family

ID=

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111476219A (en) * 2020-06-02 2020-07-31 苏州科技大学 Image target detection method in intelligent home environment
CN115524990A (en) * 2022-06-13 2022-12-27 青岛海尔智能家电科技有限公司 Intelligent household control method, device, system and medium based on digital twins
CN115840824A (en) * 2022-11-29 2023-03-24 海尔优家智能科技(北京)有限公司 Smart home user spoken language understanding system oriented to environmental information amplification
CN117283549A (en) * 2023-09-25 2023-12-26 北京欧珀通信有限公司 Robot control method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111476219A (en) * 2020-06-02 2020-07-31 苏州科技大学 Image target detection method in intelligent home environment
WO2021244079A1 (en) * 2020-06-02 2021-12-09 苏州科技大学 Method for detecting image target in smart home environment
CN115524990A (en) * 2022-06-13 2022-12-27 青岛海尔智能家电科技有限公司 Intelligent household control method, device, system and medium based on digital twins
CN115840824A (en) * 2022-11-29 2023-03-24 海尔优家智能科技(北京)有限公司 Smart home user spoken language understanding system oriented to environmental information amplification
CN117283549A (en) * 2023-09-25 2023-12-26 北京欧珀通信有限公司 Robot control method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
吴俊杰;谢碧玲;: "基于物联网优化APP的智能家居控制平台设计", 太原师范学院学报(自然科学版), no. 01, 25 March 2019 (2019-03-25) *
吴志勇;丁香乾;候瑞春;于树松;耿圣凯;: "基于语义推理的智能家居系统研究", 电视技术, no. 07, 17 July 2016 (2016-07-17) *

Similar Documents

Publication Publication Date Title
EP3796110A1 (en) Method and apparatus for determining controlled object, and storage medium and electronic device
US20200050500A1 (en) Natural language interface to web api
CN106647645A (en) Method and system for home control adjustment
CN107909998A (en) Phonetic order processing method, device, computer equipment and storage medium
CN112217697A (en) Intelligent control system of Internet of things equipment
Huber et al. Using semantic queries to enable dynamic service invocation for processes in the internet of things
CN115327932A (en) Scene creation method and device, electronic equipment and storage medium
CN115356939A (en) Control command transmission method, control device, storage medium, and electronic device
Li et al. Intelligent control system of smart home for context awareness
CN117689020B (en) Method and device for constructing intelligent home body based on large model and electronic equipment
CN109155129B (en) Language program control system
CN117689020A (en) Method and device for constructing intelligent home body based on large model and electronic equipment
WO2023173596A1 (en) Statement text intention recognition method and apparatus, storage medium, and electronic apparatus
CN115237967A (en) Scene recommendation method, electronic device, storage medium and product
CN114911535B (en) Application program component configuration method, storage medium and electronic device
CN117765949B (en) Semantic dependency analysis-based statement multi-intention recognition method and device
Ketsmur et al. Contribute for an Ontology for Smart Homes and their Conversational Assistants
CN117807215B (en) Statement multi-intention recognition method, device and equipment based on model
CN117742792B (en) Instruction execution device selection method, device, equipment and medium based on large model
CN117706954B (en) Method and device for generating scene, storage medium and electronic device
CN117010378A (en) Semantic conversion method and device, storage medium and electronic device
CN117809629B (en) Interaction system updating method and device based on large model and storage medium
CN115576216B (en) Information filling method and device based on voice control intelligent household appliance
CN116913274A (en) Scene generation method, device and storage medium based on generation type large model
Filipe et al. Ambient intelligence interaction via dialogue systems

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant