CN107454066A - The method and apparatus of communication between devices is realized based on natural language - Google Patents
The method and apparatus of communication between devices is realized based on natural language Download PDFInfo
- Publication number
- CN107454066A CN107454066A CN201710575886.6A CN201710575886A CN107454066A CN 107454066 A CN107454066 A CN 107454066A CN 201710575886 A CN201710575886 A CN 201710575886A CN 107454066 A CN107454066 A CN 107454066A
- Authority
- CN
- China
- Prior art keywords
- target device
- target
- information
- message
- equipment
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/08—Protocols for interworking; Protocol conversion
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/18—Multiprotocol handlers, e.g. single devices capable of handling multiple protocols
Abstract
In the embodiment of the present invention, a kind of method that communication between devices are realized based on natural language is proposed, including:Equipment is asked to obtain the target information related at least one communication protocol that target device can be supported based on natural language;All or part of information of the request equipment in the target information sends message to the target device;In this scenario, the target information related to communication protocol is obtained using natural language, because the versatility of natural language is high, therefore, even if request equipment does not prestore the target information related to the communication protocol that target device is supported, the target information related to the communication protocol that target device is supported can also be obtained by natural language, it can subsequently be communicated using obtained target information with target device, therefore, can solve not prestore the defects of agreement of relevant device can not just be communicated with the kind equipment in the prior art, expand the scope of application scenarios.
Description
Technical field
The present invention relates to communication technical field, more particularly to a kind of method that communication between devices are realized based on natural language
And equipment.
Background technology
With the development of the communication technology, it is various can communication equipment species it is also more and more, and some equipment are probably not
Same manufacturer production, these communication between devices need to meet some requirements, and therefore, realize the technology of communication between devices
It is very important technology in the communications field.
Mainly realize the communication between equipment using following several ways at present:
One kind establishes network connection for each equipment is networked successively, and Virtual network;When each equipment networking, it is necessary to
Mutually transmit respective Role Information and data processing of information and mutually preserve, until by Role Information corresponding to all devices and
Data processing of information mutually transmits completion, terminates the transmission of Role Information and data processing of information;Next, when an equipment needs
When the transmission of information and data message is controlled with other equipment, the equipment is according to the information of itself and the other equipment of storage
Role Information and data processing of information, carry out data exchange to the other equipment that is matched with the equipment;In this method, two
The agreement of other side is known a priori by before communication between equipment, is communicated according to the agreement being known a priori by, but ordinary circumstance
Under, a kind of agreement for the other equipment that equipment can obtain in advance is limited, and the equipment therefore, it is possible to communication is also limited
's;
Another method is the converter using multiplex roles communications protocol, can be a variety of different types of on hardware
Communication interface, the field apparatus with different communication protocol standards, by the calculation process of this converter, conversion, directly with one
Individual communication interface, a kind of unified communications protocol are communicated.The protocol finite that can be changed due to converter, it is difficult to realize more
Free communication between the equipment of kind different type/version, therefore, the miscellaneous equipment that this next equipment of mode can communicate
Species be also limited, the defects of being limited there is also application scenarios;
Also a kind of is that the communication between equipment is carried out using natural language;Present this mode is more used in intelligent family
Field is occupied, with the development of mobile Internet and Internet of Things, people enter the smart home epoch, compare more technologies just now
It is that user is sent an instruction in server, the speech/text information that user sends is converted into each equipment by server to be known
The control command not received, and equipment is sent to, so as to realize a kind of intelligent control to intelligent home device, meanwhile, each intelligence
Its running status can also be fed back to user by energy home equipment.But in this method, also needed before two communication between devices
Prestore the agreement of other side, but a kind of agreement of other equipment that can obtain in advance of equipment be it is limited, therefore, this
The type for the equipment that can be communicated in kind of mode with other equipment be also it is limited, therefore, equally exist application scenarios by
The defects of limit.
The content of the invention
In view of the above problems, it is proposed that the present invention, overcome above mentioned problem to provide one kind or solve at least in part
A kind of method and apparatus that communication between devices are realized based on natural language of above mentioned problem, for solving to exist in the prior art
Equipment can not the equipment of agreement corresponding with not storing the defects of being communicated, expand application scenarios.
According to the first aspect of the present invention, there is provided a kind of method that communication between devices are realized based on natural language, bag
Include:
The target information related at least one communication protocol that target device can be supported is obtained based on natural language;
All or part of information in the target information sends message to the target device.
In one embodiment, method described according to the abovementioned embodiments of the present invention, it is described to be obtained based on natural language
The target information related at least one communication protocol that target device can be supported, including:
Request message is sent to target device based on natural language, the request message is used to ask and the target device
The target information for the communication protocol correlation that can be supported;
The response message that the target device returns is received, being carried in the response message can with the target device
The target information at least one communication protocol correlation supported.
In certain embodiments, the method according to any of the above-described embodiment of the present invention, take in the request message
Band instruction protocol-identifier;The response message for receiving the target device and returning, including:
Receive the response message that the target device returns according to the instruction protocol-identifier.
In certain embodiments, the method according to any of the above-described embodiment of the present invention, it is described to be based on natural language
The target information related at least one communication protocol that target device can be supported is obtained, including:
Request message is sent to the target device, the request message is used to ask to prop up with the target device
The target information for the communication protocol correlation held;
The response message that the target device is returned based on natural language is received, is carried and the mesh in the response message
The target information at least one communication protocol correlation that marking device can be supported.
In certain embodiments, the method according to any of the above-described embodiment of the present invention, it is described to be sent out to target device
Request message is sent, including:
Receive the command information that user sends;
Obtain the semantic analysis result of the command information;
It is determined that request message corresponding with the semantic analysis result, and the request message is sent to the target and set
It is standby.
In certain embodiments, the method according to any of the above-described embodiment of the present invention, the target information include
Protocol-identifier and/or protocol definition information.
In certain embodiments, the method according to any of the above-described embodiment of the present invention, the protocol definition information
At least one of information, the format information of message and signaling process information are defined including message coffret.
In certain embodiments, the method according to any of the above-described embodiment of the present invention, the form letter of the message
Breath includes digital encoding format;
Wherein, the digital encoding format includes the field, length, value model for the data that the target device can receive
Enclose, at least one of data type.
In certain embodiments, the method according to any of the above-described embodiment of the present invention, the protocol-identifier can
Characterized with characterization information;
Wherein, mark ID of the characterization information including the target device, the type of the target device, the target
At least one of the software and hardware version number of equipment and production firm's information of the target device.
In certain embodiments, the method according to any of the above-described embodiment of the present invention, it is described according to the target
All or part of information in information sends message to the target device, including:
Agreement according to corresponding to the characterization information determines the characterization information;
Message is sent to the target device using the agreement of determination.
In certain embodiments, the method according to any of the above-described embodiment of the present invention, it is described according to the sign
Information determines the agreement corresponding to the characterization information, including:
Pass through protocol information corresponding to the acquisition of the 3rd equipment;
Wherein, the 3rd equipment is at least one in Internet Server, search engine, natural language interactive engine
Kind.
In certain embodiments, the method according to any of the above-described embodiment of the present invention, it is described according to the target
All or part of information in information sends message to the target device, including:
Judge at least one agreement that the target device supported and the local at least one agreement supported whether phase
Matching;
If matched, message is directly sent to the target device using agreement corresponding to the target information;
Otherwise, return related at least one communication protocol that target device can be supported based on natural language acquisition
The step of target information.
In certain embodiments, the method according to any of the above-described embodiment of the present invention, the natural language is language
Sound and/or text.
According to the second aspect of the present invention, there is provided a kind of electronic equipment, including:
Acquiring unit, for obtaining at least one communication protocol phase that can be supported with target device based on natural language
The target information of pass;
Transmitting element, send and disappear to the target device for all or part of information in the target information
Breath.
In one embodiment, equipment described according to the abovementioned embodiments of the present invention, the transmitting element are additionally operable to, base
Request message is sent to target device in natural language, the request message is used to ask to support with the target device
The related target information of communication protocol;
The acquiring unit obtains at least one communication protocol phase that can be supported with target device based on natural language
During the target information of pass, it is specially:
The response message that the target device returns is received, being carried in the response message can with the target device
The target information at least one communication protocol correlation supported.
In certain embodiments, the equipment according to any of the above-described embodiment of the present invention, take in the request message
Band instruction protocol-identifier;
When the acquiring unit receives the response message that the target device returns, it is specially:
Receive the response message that the target device returns according to the instruction protocol-identifier.
In certain embodiments, the equipment according to any of the above-described embodiment of the present invention, the transmitting element are also used
In to target device transmission request message, the request message is used to ask the communication that can be supported with the target device
Protocol-dependent target information;
The acquiring unit obtains at least one communication protocol phase that can be supported with target device based on natural language
During the target information of pass, it is specially:
The response message that the target device is returned based on natural language is received, is carried and the mesh in the response message
The target information at least one communication protocol correlation that marking device can be supported.
In certain embodiments, the equipment according to any of the above-described embodiment of the present invention, described device also include connecing
Unit and semantic analysis unit are received, wherein:
The receiving unit, for receiving the command information of user's transmission;
The semantic analysis unit, for obtaining the semantic analysis result of the command information;
When the transmitting element is to target device transmission request message, it is specially:
It is determined that request message corresponding with the semantic analysis result, and the request message is sent to the target and set
It is standby.
In certain embodiments, the equipment according to any of the above-described embodiment of the present invention, the target information include
Protocol-identifier and/or protocol definition information.
In certain embodiments, the equipment according to any of the above-described embodiment of the present invention, the protocol definition information
At least one of information, the format information of message and signaling process information are defined including message coffret.
In certain embodiments, the equipment according to any of the above-described embodiment of the present invention, the form letter of the message
Breath includes digital encoding format;
Wherein, the digital encoding format includes the field, length, value model for the data that the target device can receive
Enclose, at least one of data type.
In certain embodiments, the equipment according to any of the above-described embodiment of the present invention, the protocol-identifier can
Characterized with characterization information;
Wherein, mark ID of the characterization information including the target device, the type of the target device, the target
At least one of the software and hardware version number of equipment and production firm's information of the target device.
In certain embodiments, according to the present invention any of the above-described embodiment described in equipment, the transmitting element according to
All or part of information in the target information to the target device send message when, be specially:
Agreement according to corresponding to the characterization information determines the characterization information;
Message is sent to the target device using the agreement of determination.
In certain embodiments, according to the present invention any of the above-described embodiment described in equipment, the transmitting element according to
When the characterization information determines the agreement corresponding to the characterization information, it is specially:
Pass through protocol information corresponding to the acquisition of the 3rd equipment;
Wherein, the 3rd equipment is at least one in Internet Server, search engine, natural language interactive engine
Kind.
In certain embodiments, according to the present invention any of the above-described embodiment described in equipment, the transmitting element according to
All or part of information in the target information to the target device send message when, be specially:
Judge at least one agreement that the target device supported and at least one association that the request equipment is supported
Whether view matches;
If it is determined that at least one agreement that the target device is supported and the request equipment supported at least one
Kind agreement matches, and directly sends message to the target device using agreement corresponding to the target information;
Otherwise, return related at least one communication protocol that target device can be supported based on natural language acquisition
The step of target information.
In certain embodiments, the equipment according to any of the above-described embodiment of the present invention, the natural language is language
Sound and/or text.
According to the third aspect of the present invention, a kind of electronic equipment is additionally provided, including:
Memory and one or more processors;
Wherein, the memory is connected with one or more of processor communications, and being stored with the memory can quilt
The instruction of one or more of computing devices, the instruction is by one or more of computing devices, so that described one
Individual or multiple processors can realize method as described above.
In the embodiment of the present invention, a kind of method that communication between devices are realized based on natural language is proposed, including:Based on certainly
Right language obtains the target information related at least one communication protocol that target device can be supported;Believed according to the target
All or part of information in breath sends message to the target device;In this scenario, using natural language come obtain with
The related target information of communication protocol, because the versatility of natural language is high, therefore, though request equipment do not prestore with
The target information for the communication protocol correlation that target device is supported, can also be propped up by natural language to obtain with target device
The target information for the communication protocol correlation held, can subsequently be communicated using obtained target information with target device, therefore, can
To solve not prestoring the defects of agreement of relevant device can not just be communicated with the kind equipment in the prior art, expand
The scopes of application scenarios.
Described above is only the general introduction of technical solution of the present invention, in order to better understand the technological means of the present invention,
And can be practiced according to the content of specification, and in order to allow above and other objects of the present invention, feature and advantage can
Become apparent, below especially exemplified by the embodiment of the present invention.
Brief description of the drawings
By reading the detailed description of hereafter preferred embodiment, it is various other the advantages of and benefit it is common for this area
Technical staff will be clear understanding.Accompanying drawing is only used for showing the purpose of preferred embodiment, and is not considered as to the present invention
Limitation.And in whole accompanying drawing, identical part is denoted by the same reference numerals.In the accompanying drawings:
Fig. 1 is that what is proposed according to an embodiment of the invention realize a kind of flow of communication between devices based on natural language
Figure;
Fig. 2A is that what is proposed according to an embodiment of the invention realize another stream of communication between devices based on natural language
Cheng Tu;
Fig. 2 B are that what is proposed according to an embodiment of the invention realize another stream of communication between devices based on natural language
Cheng Tu;
Fig. 3 is the schematic diagram of the request equipment proposed according to an embodiment of the invention;
Fig. 4 is the schematic diagram of the target device proposed according to an embodiment of the invention.
Embodiment
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although the disclosure is shown in accompanying drawing
Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here
Limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure
Completely it is communicated to those skilled in the art.
First the technical term that may relate in the application is briefly described below.
Communication protocol, is a kind of agreement for being different from natural language form and being communicated, including disappearing of defining of communicating pair
Cease form (including message encoding format, such as 00001- represent closing television), signaling process, message channel definition (such as TCP
(Transmission Control Protocol, transmission control protocol) port numbers etc.), but these contents are all to set in advance
Fixed.
Interface message is equal to communication protocol sometimes, can be replaced, but both are still distinguishing, for example,
Interface message can also include hardware electric interfaces, and this is non negotiable part, and communication protocol then more embodies negotiable property,
Therefore, typically hardware electric interfaces information is not included in communication protocol.Wherein, interface message includes interface type, interface is determined
Justice and interface specification book etc..
Interface type (ether interface, USB (Universal Serial Bus, USB) interface etc.), typically
Defined including hardware electric interfaces, and based on the message definition on the hardware interface, signaling process, equipment behavior etc..For
Interface set in advance, typically supported by corresponding communication protocol, such as Ethernet interface, there is corresponding Ethernet protocol.
The definition of interface:Including hardware interface and protocol interface, including above-mentioned message definition, signaling process, equipment behavior
Deng.Message definition can include the digital encoding format of message.
Interface specification book (can also be called protocol specification book):Including contents such as message definition, signaling process, equipment behaviors,
It can be presented with arbitrary forms such as natural language form, form, charts.
Signaling process refers to the message sequence (procedure) that both sides exchange.
Digital encoding format refers to the mode for representing information digitalization, belongs to the content that can arrange in agreement.Than
Such as, " the opening control instruction " of a TV can be represented with 4bit binary system, such as b0001, and this 4bit
Binary data b0001 by the way of certain message sink coding or channel coding are encoded by can just be called digital coding
Form, including compression.Fig. 1 schematically show according to one kind of embodiment of the present invention based on natural language realize equipment it
Between the method 10 that communicates, including:
Step 100:Request equipment obtains at least one communication protocols that can be supported with target device based on natural language
Discuss related target information;
Step 110:All or part of information of the request equipment in the target information is set to the target
Preparation send message.
In the embodiment of the present invention described natural language actually refer to be for recipient non-preset content nature
Language, rather than the natural language form of immobilized substance.Wherein, the natural language of non-default content mean recipient need into
Row semantic analysis;And the natural language of preset content, recipient directly carry out string matching.For example, non-default interior
In the case of the natural language of appearance, " good heat today ", either " today, temperature was good high " or " fast solarization today is in the dust ", although interior
Hold different, but identical when implication is substantial, can with any expression way.In another example in non-default content
In the case of natural language, " Current Temperatures " and " present temperature ", although expression-form is different, semanteme is identical, is adopted
Also can with any one statement.
In the embodiment of the present invention, the expression way of natural language has a variety of, for example, it may be speech form, or also may be used
To be textual form (such as by IP (Internet Protocol, procotol) Web broadcast), speech form and textual form
Can be by the way of ultrasonic wave.Wherein, the text that text is specifically as follows picture character or Quick Response Code form shows
Word, speech form can be music, of course, it is also possible to there is other forms, be not specifically limited herein.
Certainly, request equipment can also define specification by FTP download protocols.
In the embodiment of the present invention, alternatively, request equipment obtains what can be supported with target device based on natural language
The related target information of at least one communication protocol, including:
It is described request equipment be based on natural language to target device send request message, the request message be used for ask with
The target information for the communication protocol correlation that the target device can be supported;
The request equipment receives the response message that the target device returns, and is carried and the mesh in the response message
The target information at least one communication protocol correlation that marking device can be supported.
That is natural language is used when asking equipment to send request message to target device, still, target is set
The standby form that response message is returned to request equipment is not specifically limited, and can use the form of natural language, or can also
The agreement that request equipment is specified, for example, carrying instruction protocol-identifier in the request message;
Now, alternatively, the request equipment receives the response message that the target device returns, including:
The request equipment receives the response message that the target device returns according to the instruction protocol-identifier.
Certainly, target device returns to response message to request equipment can also use other forms, not do specific limit herein
It is fixed.
Previously described is that request equipment sends message to target device and uses natural language, but target device is to request
The form that equipment sends message is not specifically limited, and in the embodiment of the present invention or target device is sent to request equipment
Message uses natural language, but asks equipment to send the form of message to target device and be not specifically limited.
Therefore, equipment is asked to obtain at least one communication protocol phase that can be supported with target device based on natural language
The target information of pass, including:
The request equipment sends request message to target device, and the request message is used to ask and the target device
The target information for the communication protocol correlation that can be supported;
The request equipment receives the response message that the target device is returned based on natural language, in the response message
Carry the target information related at least one communication protocol that the target device can be supported.
In the embodiment of the present invention, equipment is asked to have to the mode of target device transmission request message a variety of, it is alternatively possible to
In the following way:
The request equipment receives the command information that user sends;
The request equipment obtains the semantic analysis result of the command information;
The request equipment determines request message corresponding with the semantic analysis result, and the request message is sent
To the target device.
Wherein, when the request equipment obtains the semantic analysis result of the command information, command information can be carried out
Semantic analysis, obtain semantic analysis result;It is of course also possible to pass through cloud device or server for request device target equipment
After carrying out semantic analysis, then semantic analysis result is returned to and asks device target equipment, be not specifically limited herein.
Previously described is the semantic analysis result for asking equipment to obtain command information, certainly, to obtain other and be based on certainly
The method class of semantic analysis result of the method for the semantic analysis result of the message of right linguistic form with obtaining the command information
Seemingly, no longer it is described in detail herein.
In the embodiment of the present invention, request message can be for directly request and communication protocol relevant information message, than
Such as:First application program is sent to the second application program in the form of natural language to disappear for inquiring with communication protocol relevant information
Breath, the second application program are replied and communication protocol relevant information then to the first application program.
Or request message can also be the message for indirect or implicit request and communication protocol relevant information, as long as
Trigger the second application program and the message for including target information is returned to the first application program, such as:First application program with
Natural language form sends username and password (implicit mode) to the second application program, and the second application program should then to first
Replied and communication protocol relevant information (implicit response) with program.
Previously described is the direct mode of request message, or implicit, indirect mode, and similarly, response also may be used
To be response or implicit, the indirect response directly against the clear and definite information request of the first application program.Herein
No longer it is described in detail.
Because the mode that request equipment sends request message to target device can be using natural language, can not also adopt
With natural language, therefore, above-mentioned specific implementation can both be applicable request equipment and be sent using natural language to target device
The mode of request message, request equipment can also be applied by the way of other modes send request message to target device,
This is not specifically limited.
Aforesaid way can specifically use following form to realize:
The request equipment receives the command information that user sends, and the command information is converted into format data;
The format data is normalized to obtain the semantic analysis result of the command information;
And request message corresponding with the semantic analysis result is determined, and the request message is sent to the target
Equipment.
For example, user against remote control has said one, " outside is good cold, and I has just get home within 20 minutes again, opens in advance empty
Adjust ", remote control will carry out semantic analysis to the words, show that user thinks to open air-conditioning in advance, and heat, then, remote control root
The semantic results obtained according to parsing send request message corresponding with the semantic results, such as " open air-conditioning heating, setting temperature is
What kind of 30 DEG C of data format is ", wherein, request message can be sent in the form of natural language.
In the embodiment of the present invention, alternatively, the target information includes protocol-identifier and/or protocol definition information, certainly,
Other information can also be included, be not specifically limited herein.
In the embodiment of the present invention, alternatively, the protocol definition information includes message coffret and defines information, message
At least one of format information and signaling process information, it is, of course, also possible to including other information, it is not specifically limited herein.
Data transmission interface include physical layer electrical characteristic definition (such as transmission voltage swing, signal power size, bus type, when
Clock frequency etc.), physical layer data reads sequential (such as reading and writing data sequential, dutycycle regulation etc.), transport layer protocol (for example is believed
Road coding, transfer check mechanism, retransmission mechanism etc.), network layer transport protocol (such as IP address, UDP (User
DatagramProtocol, UDP) or TCP port number etc.).
Signaling process is described by taking the signaling process for obtaining temperature data as an example below:
Step 1:When asking equipment to need to obtain temperature, temp_req message is sent to target device;
Step 2:Target device sends temp_data message to request equipment.
If asking equipment to be not received by temp_data message in 1s, request equipment is sent to target device again
Temp_req message.
It is above-mentioned simply to be illustrated by taking the signaling process for obtaining temperature data as an example, it is not limited to this.
In the embodiment of the present invention, alternatively, the format information of the message includes digital encoding format;
Wherein, the digital encoding format includes field (filed), the length for the data that the target device can receive
(length), at least one of span (range), data type (type).Wherein, the format information of message can be with
Including compressed format.
Digital encoding format can be the form of form, the example as shown in table 1,2.
The digital encoding format of table 1
Field | Type | Length | Span | Side information |
Temperature data (temp_data) | Integer | 8 bits | - 40 to+60 | Carried in a manner of IP/UDP (port=10001) |
The digital encoding format of table 2
Field | Type | Length | Span | Side information |
Temperature request (temp_req) | Integer | 1 bit | 0,1 | Carried in a manner of IP/UDP (port=10001) |
In table 2,0 represents no longer to need temperature data in span item;1 represents to need to receive temperature data.
Wherein, alternatively, form can be graphic form, or can also be the document of rich text form, not do herein
It is specific to limit.
In the embodiment of the present invention, alternatively, the protocol-identifier can be characterized with characterization information;
Wherein, the characterization information includes the ID (Identification, mark) of the target device, the target is set
At least one of production firm's information of standby type, the software and hardware version number of the target device and the target device.
Now, all or part of information of the request equipment in the target information is sent out to the target device
Message is sent, including:
Agreement of the request equipment according to corresponding to the characterization information determines the characterization information;
Message is sent to the target device using the agreement of determination.
In the embodiment of the present invention, alternatively, the request equipment determines the characterization information institute according to the characterization information
Corresponding agreement, including:
The request equipment passes through protocol information corresponding to the acquisition of the 3rd equipment;
Wherein, the 3rd equipment is at least one in Internet Server, search engine, natural language interactive engine
Kind.
For example, request equipment obtains its own device id fed back by server in a manner of natural language, equipment is asked
Using the ID as keyword, download to obtain the protocol definition of target device support by internet search engine.In a word, agreement is obtained
The mode of definition is unlimited.A code segment is write in equipment is asked, as spatial term module, when itself and target device
When being communicated, then ask equipment firstly generate on inquire on target device interface define with data transmission format from
The relevant information of right language (such as voice or text), and send;, can on the information of its interface type/data transmission format
To be to inquire the type of target device, software and hardware version number, production firm etc. or to direct access inquiry interface definition/say
Bright book, is not specifically limited herein.
In actual applications, the digital encoding format that can be supported that target device is fed back and request equipment institute energy
The possible disunity of digital encoding format enough supported, now, can hold consultation therebetween, therefore, in the embodiment of the present invention,
Alternatively, all or part of information of the request equipment in the target information is sent to the target device disappears
Breath, including:
The request equipment judges at least one agreement that the target device supported and described asks equipment to be supported
At least one agreement whether match;
If the request equipment judges at least one agreement that the target device supported and described asks equipment institute
At least one agreement of support matches, and is directly sent and disappeared to the target device using agreement corresponding to the target information
Breath;
Otherwise, the request equipment is returned at least one that can be supported with target device based on natural language acquisition and led to
The step of believing protocol-dependent target information.
For example, after air-conditioning have sent the digital encoding format that it is supported to remote control, if remote control do not support it is this
Digital encoding format, then air-conditioning and remote control can continue to hold consultation in a manner of natural language between the two, specifically can be with
Message as " otherwise 1111 in rear 4 bits of first character section represent and heated " is sent to sky to air-conditioning for remote control
Adjust, after air-conditioning receives this message, adjust its digital encoding format by parsing and find that this new numeral can be applied to compile
Code mode, then it can be to message as remote control feedback " good ", so as to which the two has just consulted a kind of new digital coding side
Formula, communicated using the digital encoding scheme for consulting to obtain.
It should be noted that if request equipment returns at least one communication protocols that obtains and can be supported with target device
After the step of discussing related target information, if the request equipment judges at least one association that the target device is supported
If at least one agreement that the request equipment is supported of negotiating peace does not match that, it can be further continued for obtaining, untill matching,
It is not specifically limited herein.
Method 10 is illustrated below.
For example, user is said against remote control " opening air conditioner refrigerating, temperature is 26 DEG C ", remote control to the words it
Afterwards, sent to air-conditioning and " open air conditioner refrigerating, what kind of the data format for setting temperature to be 26 DEG C is", air-conditioning is received with voice
Or after this message of textual form expression, the digital encoding format that oneself is supported is sent to remote control with natural language again
Device, such as " digital encoding format that I is supported is such, and length is two bytes totally 16 bit, preceding the 4 of first character section
Individual bit represents to open (1111)/closing (0000), rear 4 bits expression heating (0000)/refrigeration (1111), second byte
Temperature is represented with binary form, for example 26 DEG C are 00011010, and the above is with IP/UDP's (port=10001)
Mode carries ".After the remote control message can by it is this it is digitally coded in a manner of to air-conditioning be transmitted message, such as
The message of " 111111110001010 " is sent, the message is used to represent to open air conditioner refrigerating, and temperature setting is 26 DEG C.
In the embodiment of the present invention, target device possibly can not understand that request equipment is sent after request message is received
Request message, now, ask equipment and target device that communications can be repeated, up to target device can parse request
The request message that equipment is sent, therefore, in the embodiment of the present invention, after request equipment sends request message to target device, connect
Before receiving the response message, methods described also includes:
If the target device can not understand the request message, the request equipment continues to carry out ditch with target device
It is logical, until the target device can parse the request message.Wherein, in specific implementation process, such as lower section can be used
Formula:
If the target device can not understand the request message, the request equipment continues to send to the target device
Request message, until the target device is it will be appreciated that the request message.
Previously described is the request message that target device can not understand request equipment, it is of course also possible to be set in the presence of request
The standby response message that can not be understood target device and send, now, request equipment can also be linked up repeatedly with target device, until please
Equipment is asked to parse response message, therefore, in the embodiment of the present invention, the request equipment receives the target device and returned
Response message after, to the target device send message before, further, methods described also includes:
If the request equipment can not understand the response message, the request equipment continues to carry out with the target device
Link up, until request equipment can parse the response message of target device transmission.In specific implementation process, it can use such as
Under type:
If the request equipment can not understand the response message, the request equipment continues to the target device hair
The response message sent, until the request equipment is it will be appreciated that the response message.
In this scenario, the target information related to communication protocol is obtained using natural language, due to natural language
Versatility is high, therefore, even if request equipment does not prestore the target letter related to the communication protocol that target device is supported
Breath, can also obtain the target information related to the communication protocol that target device is supported by natural language, subsequently can be with
Communicated using obtained target information with target device, therefore, can solve not prestore correlation in the prior art and set
The defects of standby agreement can not just be communicated with the kind equipment, expand the scope of application scenarios.
Further, due to digital encoding format transmission specified in agreement after target information is obtained, can be used to disappear
Breath, and use the efficiency of digital encoding format transmission data higher, therefore, the method that the embodiment of the present invention proposes can also improve
Efficiency of transmission.
Fig. 2A is schematically shown to be realized between equipment according to the another kind of embodiment of the present invention based on natural language
The method 20A or 20B of communication, including:
Method 20A is:
Step 200A:Target device receives the request message that request equipment is sent based on natural language, the request message
For asking the target information related to the communication protocol that the target device can be supported;
Step 210A:Response message is sent to the request equipment, is carried and the target device in the response message
The target information at least one communication protocol correlation that can be supported.
Method 20B is:
Step 200B:The target device receives the request message that request equipment is sent, and the request message is used to ask
The target information related to the communication protocol that the target device can be supported;
Step 210B:Response message is sent to the request equipment based on natural language, carry in the response message with
The target information at least one communication protocol correlation that the target device can be supported.
In the embodiment of the present invention described natural language actually refer to be for recipient non-preset content nature
Language, rather than the natural language form of immobilized substance.Wherein, the natural language of non-default content mean recipient need into
Row semantic analysis;And the natural language of preset content, recipient directly carry out string matching.For example, non-default interior
In the case of the natural language of appearance, " good heat today ", either " today, temperature was good high " or " fast solarization today is in the dust ", although interior
Hold different, but identical when implication is substantial, can with any expression way.In another example in non-default content
In the case of natural language, " Current Temperatures " and " present temperature ", although expression-form is different, semanteme is identical, is adopted
Also can with any one statement.
In the embodiment of the present invention, the expression way of natural language has a variety of, for example, it may be speech form, or also may be used
To be textual form (such as being broadcasted by IP network), speech form and textual form can be by the way of ultrasonic waves.Wherein,
The word that text is specifically as follows picture character or Quick Response Code form shows, speech form can be music, certainly, also
There may be other forms, be not specifically limited herein.
It should be noted that target device needs after the request message that request equipment is sent based on natural language is received
The semantic analysis result of request message is obtained, wherein, can be to request message when obtaining the semantic analysis result of request message
Semantic analysis is carried out, obtains semantic analysis result;Or, or semantic analysis is carried out by cloud device or server
Afterwards, then by semantic analysis result target device is returned to, it is, of course, also possible to there are other modes, be not specifically limited herein.
Previously described is the semantic analysis result that target device obtains request message, certainly, to obtain other and be based on certainly
The method class of semantic analysis result of the method for the semantic analysis result of the message of right linguistic form with obtaining the request message
Seemingly, no longer it is described in detail herein.
In the embodiment of the present invention, instruction protocol-identifier alternatively, in request message is carried;
Now, alternatively, the target device sends response message to the request equipment, including:
The target device returns to response message according to the instruction protocol-identifier to the request equipment.
Certainly, target device returns to response message to request equipment can also use other forms, not do specific limit herein
It is fixed.
In the embodiment of the present invention, alternatively, the target information includes protocol-identifier and/or protocol definition information, certainly,
Other information can also be included, be not specifically limited herein.
In the embodiment of the present invention, alternatively, the protocol definition information includes message coffret and defines information, message
At least one of format information and signaling process information, it is, of course, also possible to including other information, it is not specifically limited herein.
Data transmission interface include physical layer electrical characteristic definition (such as transmission voltage swing, signal power size, bus type, when
Clock frequency etc.), physical layer data reads sequential (such as reading and writing data sequential, dutycycle regulation etc.), transport layer protocol (for example is believed
Road coding, transfer check mechanism, retransmission mechanism etc.), network layer transport protocol (such as IP address, UDP (User
DatagramProtocol, UDP) or TCP port number etc.).
Signaling process is described by taking the signaling process for obtaining temperature data as an example below:
Step 1:When asking equipment to need to obtain temperature, temp_req message is sent to target device;
Step 2:Target device sends temp_data message to request equipment.
If asking equipment to be not received by temp_data message in 1s, request equipment is sent to target device again
Temp_req message.
It is above-mentioned simply to be illustrated by taking the signaling process for obtaining temperature data as an example, it is not limited to this.
In the embodiment of the present invention, alternatively, the format information of the message includes digital encoding format;
Wherein, the digital encoding format includes the field, length, value model for the data that the target device can receive
Enclose, at least one of data type.Wherein, the format information of message can also include compressed format.
Digital encoding format can be the form of form, the example as shown in table 1,2.Wherein, alternatively, form can be
Graphic form, or can also be the document of rich text form, it is not specifically limited herein.
In the embodiment of the present invention, alternatively, protocol-identifier can be characterized with characterization information;
Wherein, mark ID of the characterization information including the target device, the type of the target device, the target
At least one of the software and hardware version number of equipment and production firm's information of the target device.
In actual applications, the digital encoding format that can be supported that target device is fed back and request equipment institute energy
The possible disunity of digital encoding format enough supported, now, can hold consultation therebetween, therefore, in the embodiment of the present invention,
Alternatively, after the target device sends response message to the request equipment, methods described also includes:
If at least one association that at least one agreement and the request equipment that the target device is supported are supported
View mismatches, and the target device continues to send response message to the request equipment.
For example, after air-conditioning have sent the digital encoding format that it is supported to remote control, if remote control do not support it is this
Digital encoding format, then air-conditioning and remote control can continue to hold consultation in a manner of natural language between the two, specifically can be with
Message as " otherwise 1111 in rear 4 bits of first character section represent and heated " is sent to sky to air-conditioning for remote control
Adjust, after air-conditioning receives this message, adjust its digital encoding format by parsing and find that this new numeral can be applied to compile
Code mode, then it can be to message as remote control feedback " good ", so as to which the two has just consulted a kind of new digital coding side
Formula, communicated using the digital encoding scheme for consulting to obtain.
Method 20B is illustrated below.
For example, user is said against remote control " opening air conditioner refrigerating, temperature is 26 DEG C ", remote control to the words it
Afterwards, sent to air-conditioning and " open air conditioner refrigerating, what kind of the data format for setting temperature to be 26 DEG C is", air-conditioning is received with voice
Or after this message of textual form expression, the digital encoding format that oneself is supported is sent to remote control with natural language,
For example " digital encoding format that I is supported is such, and length is two bytes totally 16 bit, first 4 of first character section
Bit represents to open (1111)/close (0000), and rear 4 bits represent heating (0000)/refrigeration (1111), second byte with
Binary form represents temperature, for example 26 DEG C are 00011010, and the above is with IP/UDP (port=10001) side
Formula carries ".After the remote control message can by it is this it is digitally coded in a manner of to air-conditioning be transmitted message, for example send out
The message of " 111111110001010 " is sent, the message is used to represent to open air conditioner refrigerating, and temperature setting is 26 DEG C.
In the embodiment of the present invention, target device possibly can not understand that request equipment is sent after request message is received
Request message, now, ask equipment and target device that communications can be repeated, up to target device can parse request
The request message that equipment is sent, therefore, in the embodiment of the present invention, if the target device can not understand the request message, institute
Target device is stated to continue to be linked up with the request equipment.
Previously described is the request message that target device can not understand request equipment, it is of course also possible to be set in the presence of request
The standby response message that can not be understood target device and send, now, request equipment can also be linked up repeatedly with target device, until please
Equipment is asked to parse response message, therefore, in the embodiment of the present invention, if the request equipment can not understand that the response disappears
Breath, the target device continue to be linked up with the request equipment.
In this scenario, the target information related to communication protocol is obtained using natural language, due to natural language
Versatility is high, therefore, even if request equipment does not prestore the target letter related to the communication protocol that target device is supported
Breath, can also obtain the target information related to the communication protocol that target device is supported by natural language, subsequently can be with
Communicated using obtained target information with target device, therefore, can solve not prestore correlation in the prior art and set
The defects of standby agreement can not just be communicated with the kind equipment, expand the scope of application scenarios.
Further, due to digital encoding format transmission specified in agreement after target information is obtained, can be used to disappear
Breath, and use the efficiency of digital encoding format transmission data higher, therefore, the method that the embodiment of the present invention proposes can also improve
Efficiency of transmission.
As shown in fig.3, in the embodiment of the present invention, a kind of request equipment 30 is proposed, including:
Acquiring unit 300, for obtaining at least one communication protocols that can be supported with target device based on natural language
Discuss related target information;
Transmitting element 310, sent out for all or part of information in the target information to the target device
Send message.
In the embodiment of the present invention described natural language actually refer to be for recipient non-preset content nature
Language, rather than the natural language form of immobilized substance.Wherein, the natural language of non-default content mean recipient need into
Row semantic analysis;And the natural language of preset content, recipient directly carry out string matching.For example, non-default interior
In the case of the natural language of appearance, " good heat today ", either " today, temperature was good high " or " fast solarization today is in the dust ", although interior
Hold different, but identical when implication is substantial, can with any expression way.In another example in non-default content
In the case of natural language, " Current Temperatures " and " present temperature ", although expression-form is different, semanteme is identical, is adopted
Also can with any one statement.
In the embodiment of the present invention, the expression way of natural language has a variety of, for example, it may be speech form, or also may be used
To be textual form (such as being broadcasted by IP network), speech form and textual form can be by the way of ultrasonic waves.Wherein,
The word that text is specifically as follows picture character or Quick Response Code form shows, speech form can be music, certainly, also
There may be other forms, be not specifically limited herein.Certainly, request equipment can also define specification by FTP download protocols.
In the embodiment of the present invention, the transmitting element 310 is additionally operable to, and sending request to target device based on natural language disappears
Breath, the request message are used to ask the target information related to the communication protocol that the target device can be supported;
Alternatively, the acquiring unit 300 obtains at least one that can be supported with target device based on natural language
During the target information of communication protocol correlation, it is specially:
The response message that the target device returns is received, being carried in the response message can with the target device
The target information at least one communication protocol correlation supported.
That is natural language, still, target are used when asking equipment 30 to send request message to target device
The form that equipment returns to response message to request equipment 30 is not specifically limited, and can use the form of natural language, Huo Zheye
The agreement that equipment 30 can be asked to specify, for example, carrying instruction protocol-identifier in the request message;
Now, alternatively, when the acquiring unit 300 receives the response message that the target device returns, it is specially:
Receive the response message that the target device returns according to the instruction protocol-identifier.
Certainly, target device returns to response message to request equipment 30 can also use other forms, not do herein specific
Limit.
Previously described is that request equipment 30 sends message to target device and uses natural language, but target device is to please
Ask equipment 30 send message form be not specifically limited, in the embodiment of the present invention or target device to request equipment
30 transmission message use natural language, but ask equipment 30 to send the form of message to target device and be not specifically limited.
Therefore, the transmitting element 310 is additionally operable to, and sends request message to target device, the request message is used for please
Seek the target information related to the communication protocol that the target device can be supported;
The acquiring unit 300 obtains at least one communication protocol that can be supported with target device based on natural language
During the target information of correlation, it is specially:The response message that the target device is returned based on natural language is received, the response disappears
The target information related at least one communication protocol that the target device can be supported is carried in breath.
In the embodiment of the present invention, alternatively, described device also includes receiving unit 320 and semantic analysis unit 330, its
In:
Receiving unit 320, for receiving the command information of user's transmission;
Semantic analysis unit 330, for obtaining the semantic analysis result of the command information;
When the transmitting element 310 is to target device transmission request message, it is specially:It is determined that with the semantic analysis result
Corresponding request message, and the request message is sent to the target device.
Wherein, when the request equipment 30 obtains the semantic analysis result of the command information, command information can be entered
Row semantic analysis, obtains semantic analysis result;Either device target equipment can also be asked to pass through cloud device or server
After carrying out semantic analysis, then semantic analysis result is returned to and asks the target device of equipment 30, be not specifically limited herein.
Previously described is the semantic analysis result for asking equipment 30 to obtain command information, certainly, to obtain other and be based on
The method of semantic analysis result of the method for the semantic analysis result of the message of natural language form with obtaining the command information
It is similar, no longer it is described in detail herein.
Due to request equipment 30 to target device send request message mode can be using natural language, can also not
Using natural language, therefore, above-mentioned specific implementation can both be applicable request equipment 30 and use natural language to target device
The mode of request message is sent, the side that request equipment 30 sends request message using other modes to target device can also be applied
Formula, it is not specifically limited herein.
Aforesaid way can specifically use following form to realize:
The command information that user sends is received, and the command information is converted into format data;
Be normalized to obtain the semantic analysis result of the command information to the format data, and determine with
Request message corresponding to the semantic analysis result;
Transmitting element 310 sends the request message to the target device.
For example, user against remote control has said one, " outside is good cold, and I has just get home within 20 minutes again, opens in advance empty
Adjust ", remote control will carry out semantic analysis to the words, show that user thinks to open air-conditioning in advance, and heat, then, remote control root
The semantic results obtained according to parsing send request message corresponding with the semantic results, such as " open air-conditioning heating, setting temperature is
What kind of 30 DEG C of data format is ", wherein, request message can be sent in the form of natural language.
In the embodiment of the present invention, alternatively, the target information includes protocol-identifier and/or protocol definition information, certainly,
Other information can also be included, be not specifically limited herein.
In the embodiment of the present invention, alternatively, the protocol definition information includes message coffret and defines information, message
At least one of format information and signaling process information.It is, of course, also possible to including other information, it is not specifically limited herein.
Data transmission interface include physical layer electrical characteristic definition (such as transmission voltage swing, signal power size, bus type, when
Clock frequency etc.), physical layer data reads sequential (such as reading and writing data sequential, dutycycle regulation etc.), transport layer protocol (for example is believed
Road coding, transfer check mechanism, retransmission mechanism etc.), network layer transport protocol (such as IP address, UDP or TCP port number etc.).
Signaling process is described by taking the signaling process for obtaining temperature data as an example below:
Step 1:When asking equipment 30 to need to obtain temperature, temp_req message is sent to target device;
Step 2:Target device sends temp_data message to request equipment 30.
If asking equipment 30 to be not received by temp_data message in 1s, request equipment 30 is again to target device
Send temp_req message.
It is above-mentioned simply to be illustrated by taking the signaling process for obtaining temperature data as an example, it is not limited to this.
In the embodiment of the present invention, alternatively, the format information of the message includes digital encoding format;
Wherein, the digital encoding format includes the field, length, value model for the data that the target device can receive
Enclose, at least one of data type.Wherein, the format information of message can also include compressed format.
Digital encoding format can be the form of form, the example as shown in table 1,2.Wherein, alternatively, form can be
Graphic form, or can also be the document of rich text form, it is not specifically limited herein.
In the embodiment of the present invention, alternatively, the protocol-identifier can be characterized with characterization information;
Wherein, mark ID of the characterization information including the target device, the type of the target device, the target
At least one of the software and hardware version number of equipment and production firm's information of the target device.
Now, all or part of information of the transmitting element 310 in the target information is set to the target
When preparation send message, it is specially:
Agreement according to corresponding to the characterization information determines the characterization information;
Message is sent to the target device using the agreement of determination.
In the embodiment of the present invention, alternatively, the transmitting element 310 determines the characterization information according to the characterization information
During corresponding agreement, it is specially:
Pass through protocol information corresponding to the acquisition of the 3rd equipment;
Wherein, the 3rd equipment is at least one in Internet Server, search engine, natural language interactive engine
Kind.
For example, request equipment 30 obtains its own device id fed back by server in a manner of natural language, request is set
Standby 30 using the ID as keyword, downloads to obtain the protocol definition of target device support by internet search engine.In a word, obtain
The mode of protocol definition is unlimited.A code segment is write in equipment 30 is asked, as spatial term module, when itself and mesh
When marking device will be communicated, then equipment 30 is asked to firstly generate on inquiry on target device interface definition and data transfer
The relevant information of the natural language (such as voice or text) of form, and send;On its interface type/data transmission format
Information, can inquire the type of target device, software and hardware version number, production firm etc. or to direct access inquiry interface
Definition/specification, is not specifically limited herein.
In actual applications, the digital encoding format that can be supported that target device is fed back and request equipment 30 institute
The possible disunity of digital encoding format that can be supported, now, can hold consultation therebetween, therefore, the embodiment of the present invention
In, alternatively, all or part of information of the transmitting element 310 in the target information is sent out to the target device
When sending message, it is specially:
Judge at least one agreement that the target device supported and at least one that the request equipment 30 is supported
Whether agreement matches;
If it is determined that at least one agreement and the request equipment 30 that the target device is supported are supported at least
A kind of agreement matches, and directly sends message to the target device using agreement corresponding to the target information;
Otherwise, return related at least one communication protocol that target device can be supported based on natural language acquisition
The step of target information.
For example, after air-conditioning have sent the digital encoding format that it is supported to remote control, if remote control do not support it is this
Digital encoding format, then air-conditioning and remote control can continue to hold consultation in a manner of natural language between the two, specifically can be with
Message as " otherwise 1111 in rear 4 bits of first character section represent and heated " is sent to sky to air-conditioning for remote control
Adjust, after air-conditioning receives this message, adjust its digital encoding format by parsing and find that this new numeral can be applied to compile
Code mode, then it can be to message as remote control feedback " good ", so as to which the two has just consulted a kind of new digital coding side
Formula, communicated using the digital encoding scheme for consulting to obtain.
Communicated it should be noted that if request equipment 30 returns to obtain with least one that target device can be supported
After the step of protocol-dependent target information, if the request equipment 30 judges the target device is supported at least one
If at least one agreement that kind agreement and the request equipment 30 are supported does not match that, it can be further continued for obtaining, until
Untill matching somebody with somebody, it is not specifically limited herein.Method 10 is illustrated below.
For example, user is said against remote control " opening air conditioner refrigerating, temperature is 26 DEG C ", remote control to the words it
Afterwards, sent to air-conditioning and " open air conditioner refrigerating, what kind of the data format for setting temperature to be 26 DEG C is", air-conditioning is received with voice
Or after this message of textual form expression, the digital encoding format that oneself is supported is sent to remote control with natural language again
Device, such as " digital encoding format that I is supported is such, and length is two bytes totally 16 bit, preceding the 4 of first character section
Individual bit represents to open (1111)/closing (0000), rear 4 bits expression heating (0000)/refrigeration (1111), second byte
Temperature is represented with binary form, for example 26 DEG C are 00011010, and the above is with IP/UDP's (port=10001)
Mode carries ".After the remote control message can by it is this it is digitally coded in a manner of to air-conditioning be transmitted message, such as
The message of " 111111110001010 " is sent, the message is used to represent to open air conditioner refrigerating, and temperature setting is 26 DEG C.
In the embodiment of the present invention, target device possibly can not understand that request equipment 30 is sent out after request message is received
The request message sent, now, ask equipment 30 and target device that communication can be repeated, until target device can parse
The request message for asking equipment 30 to send, therefore, in the embodiment of the present invention, request equipment 30 sends request message to target device
Afterwards, before receiving the response message, methods described also includes:
If the target device can not understand the request message, the request equipment 30 continues to carry out ditch with target device
It is logical, until the target device can parse the request message.Wherein, in specific implementation process, such as lower section can be used
Formula:
If the target device can not understand the request message, the request equipment 30 continues to send out to the target device
Request message is sent, until the target device is it will be appreciated that the request message.
Previously described is the request message that target device can not understand request equipment 30, it is of course also possible to request be present
Equipment 30 can not understand the response message that target device is sent, and now, request equipment 30 can also be linked up repeatedly with target device,
Until request equipment 30 can parse response message, therefore, in the embodiment of the present invention, the request equipment 30 receives the mesh
After the response message that marking device returns, before sending message to the target device, further, methods described also includes:
If the request equipment 30 can not understand the response message, the request equipment 30 continues and the target device
Linked up, until request equipment 30 can parse the response message of target device transmission., can be with specific implementation process
In the following way:
If the request equipment 30 can not understand the response message, the request equipment 30 continues to the target and set
The response message that preparation is sent, until the request equipment 30 is it will be appreciated that the response message.
In this scenario, the target information related to communication protocol is obtained using natural language, due to natural language
Versatility is high, therefore, even if request equipment 30 does not prestore the target related to the communication protocol that target device is supported
Information, the target information related to the communication protocol that target device is supported can also be obtained by natural language, subsequently may be used
To communicate with target device using obtained target information, therefore, can solve not prestore correlation in the prior art
The defects of agreement of equipment can not just be communicated with the kind equipment, expand the scope of application scenarios.
As shown in fig.4, the embodiment of the present invention, proposes a kind of target device 40, including:
Receiving unit 400, the request message sent for receiving request equipment based on natural language, the request message are used
In the request target information related to the communication protocol that the target device 40 can be supported;Transmitting element 410, for institute
State request equipment and send response message, at least one that can be supported with the target device 40 is carried in the response message
The related target information of communication protocol;Or
The receiving unit 400, for receive request equipment send request message, the request message be used for ask with
The target information for the communication protocol correlation that the target device 40 can be supported;The transmitting element 410, for based on nature
Language sends response message to the request equipment, carries what can be supported with the target device 40 in the response message
The related target information of at least one communication protocol.
In the embodiment of the present invention described natural language actually refer to be for recipient non-preset content nature
Language, rather than the natural language form of immobilized substance.Wherein, the natural language of non-default content mean recipient need into
Row semantic analysis;And the natural language of preset content, recipient directly carry out string matching.For example, non-default interior
In the case of the natural language of appearance, " good heat today ", either " today, temperature was good high " or " fast solarization today is in the dust ", although interior
Hold different, but identical when implication is substantial, can with any expression way.In another example in non-default content
In the case of natural language, " Current Temperatures " and " present temperature ", although expression-form is different, semanteme is identical, is adopted
Also can with any one statement.
In the embodiment of the present invention, the expression way of natural language has a variety of, for example, it may be speech form, or also may be used
To be textual form (such as being broadcasted by IP network), speech form and textual form can be by the way of ultrasonic waves.Wherein,
The word that text is specifically as follows picture character or Quick Response Code form shows, speech form can be music, certainly, also
There may be other forms, be not specifically limited herein.
It should be noted that target device 40 is after the request message that is sent based on natural language of request equipment is received,
The semantic analysis result of acquisition request message being needed, wherein, when obtaining the semantic analysis result of request message, request can be disappeared
Breath carries out semantic analysis, obtains semantic analysis result;Or, or carry out semantic point by cloud device or server
After analysis, then semantic analysis result returned into target device 40, it is, of course, also possible to there are other modes, be not specifically limited herein.
Previously described is the semantic analysis result that target device 40 obtains request message, certainly, to obtain other and be based on
The method of semantic analysis result of the method for the semantic analysis result of the message of natural language form with obtaining the request message
It is similar, no longer it is described in detail herein.
In the embodiment of the present invention, instruction protocol-identifier alternatively, in the request message is carried;
Now, alternatively, when the transmitting element 410 is to the request equipment transmission response message, it is specially:
Response message is returned to the request equipment according to the instruction protocol-identifier.
Certainly, target device 40 returns to response message to request equipment can also use other forms, not do herein specific
Limit.
In the embodiment of the present invention, alternatively, the target information includes protocol-identifier and/or protocol definition.
In the embodiment of the present invention, alternatively, the protocol definition information includes message coffret and defines information, message
At least one of format information and signaling process information.It is, of course, also possible to including other information, it is not specifically limited herein.
Data transmission interface include physical layer electrical characteristic definition (such as transmission voltage swing, signal power size, bus type, when
Clock frequency etc.), physical layer data reads sequential (such as reading and writing data sequential, dutycycle regulation etc.), transport layer protocol (for example is believed
Road coding, transfer check mechanism, retransmission mechanism etc.), network layer transport protocol (such as IP address, UDP (User
DatagramProtocol, UDP) or TCP port number etc.).
Signaling process is described by taking the signaling process for obtaining temperature data as an example below:
Step 1:When asking equipment to need to obtain temperature, temp_req message is sent to target device 40;
Step 2:Target device 40 sends temp_data message to request equipment.
If asking equipment to be not received by temp_data message in 1s, request equipment is sent out to target device 40 again
Send temp_req message.
It is above-mentioned simply to be illustrated by taking the signaling process for obtaining temperature data as an example, it is not limited to this.The present invention is implemented
In example, alternatively, the format information of the message includes digital encoding format;
Wherein, the digital encoding format includes field, length, the value for the data that the target device 40 can receive
At least one of scope, data type.Wherein, the format information of message can also include compressed format.
Digital encoding format can be the form of form, the example as shown in table 1,2.Wherein, alternatively, form can be
Graphic form, or can also be the document of rich text form, it is not specifically limited herein.
In the embodiment of the present invention, alternatively, protocol-identifier can be characterized with characterization information;
Wherein, the type, described of the mark ID of the characterization information including the target device 40, the target device 40
At least one of the software and hardware version number of target device 40 and production firm's information of the target device 40.
In actual applications, the digital encoding format that can be supported that target device 40 is fed back and request equipment institute
The possible disunity of digital encoding format that can be supported, now, can hold consultation therebetween, therefore, the embodiment of the present invention
In, alternatively, the equipment also includes matching unit 420, at least one association supported for judging the target device 40
Whether at least one agreement that the request equipment is supported of negotiating peace matches;
The transmitting element 410 is additionally operable to, and at least one that the target device 40 supported is determined in the matching unit
At least one agreement that kind agreement and the request equipment are supported mismatches, and continues to disappear to the request equipment transmission response
Breath.
For example, after air-conditioning have sent the digital encoding format that it is supported to remote control, if remote control do not support it is this
Digital encoding format, then air-conditioning and remote control can continue to hold consultation in a manner of natural language between the two, specifically can be with
Message as " otherwise 1111 in rear 4 bits of first character section represent and heated " is sent to sky to air-conditioning for remote control
Adjust, after air-conditioning receives this message, adjust its digital encoding format by parsing and find that this new numeral can be applied to compile
Code mode, then it can be to message as remote control feedback " good ", so as to which the two has just consulted a kind of new digital coding side
Formula, communicated using the digital encoding scheme for consulting to obtain.
Method 20B is illustrated below.
For example, user is said against remote control " opening air conditioner refrigerating, temperature is 26 DEG C ", remote control to the words it
Afterwards, sent to air-conditioning and " open air conditioner refrigerating, what kind of the data format for setting temperature to be 26 DEG C is", air-conditioning is received with voice
Or after this message of textual form expression, the digital encoding format that oneself is supported is sent to remote control with natural language,
For example " digital encoding format that I is supported is such, and length is two bytes totally 16 bit, first 4 of first character section
Bit represents to open (1111)/close (0000), and rear 4 bits represent heating (0000)/refrigeration (1111), second byte with
Binary form represents temperature, for example 26 DEG C are 00011010, and the above is with IP/UDP (port=10001) side
Formula carries ".After the remote control message can by it is this it is digitally coded in a manner of to air-conditioning be transmitted message, for example send out
The message of " 111111110001010 " is sent, the message is used to represent to open air conditioner refrigerating, and temperature setting is 26 DEG C.
In the embodiment of the present invention, target device 40 possibly can not understand request equipment hair after request message is received
The request message sent, now, ask equipment and target device 40 that communication can be repeated, until target device 40 can parse
The request message for going out to ask equipment to send, therefore, in the embodiment of the present invention, if the target device 40 can not understand the request
Message, the target device 40 continue to be linked up with the request equipment.
Previously described is the request message that target device 40 can not understand request equipment, it is of course also possible to request be present
Equipment can not understand the response message that target device 40 is sent, and now, request equipment can also be linked up repeatedly with target device 40,
Until request equipment can parse response message, therefore, in the embodiment of the present invention, if the request equipment can not understand it is described
Response message, the target device 40 continue to be linked up with the request equipment.
In this scenario, the target information related to communication protocol is obtained using natural language, due to natural language
Versatility is high, therefore, even if request equipment does not prestore the target related to the communication protocol that target device 40 is supported
Information, can also be by natural language come the related target information of the communication protocol that obtains to target device 40 is supported, subsequently
It can be communicated using obtained target information with target device 40, therefore, can solve not prestore in the prior art
The defects of agreement of relevant device can not just be communicated with the kind equipment, expand the scope of application scenarios.
Further, due to digital encoding format transmission specified in agreement after target information is obtained, can be used to disappear
Breath, and use the efficiency of digital encoding format transmission data higher, therefore, the method that the embodiment of the present invention proposes can also improve
Efficiency of transmission.
Method and apparatus are not inherently related to any certain computer, virtual system or miscellaneous equipment provided herein.
Various general-purpose systems can also be used together with teaching based on this.As described above, required by constructing this kind of device
Structure be obvious.In addition, the present invention is not also directed to any certain programmed language.It should be understood that it can utilize various
Programming language realizes the content of invention described herein, and the description done above to language-specific is to disclose this hair
Bright preferred forms.
In the specification that this place provides, numerous specific details are set forth.It is to be appreciated, however, that the implementation of the present invention
Example can be put into practice in the case of these no details.In some instances, known method, structure is not been shown in detail
And technology, so as not to obscure the understanding of this description.
Similarly, it will be appreciated that in order to simplify the disclosure and help to understand one or more of each inventive aspect,
Above in the description to the exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes
In example, figure or descriptions thereof.However, the method for the disclosure should be construed to reflect following intention:I.e. required guarantor
The application claims of shield features more more than the feature being expressly recited in each claim.More precisely, such as right
As claim reflects, inventive aspect is all features less than single embodiment disclosed above.Therefore, it then follows tool
Thus claims of body embodiment are expressly incorporated in the embodiment, wherein the conduct of each claim in itself
The separate embodiments of the present invention.
Those skilled in the art, which are appreciated that, to be carried out adaptively to the module in the device in embodiment
Change and they are arranged in one or more devices different from the embodiment.Can be some modules in embodiment
A module or unit or component are combined into, and multiple submodule or subelement or sub-component can be divided into addition.
In addition at least some in such feature and/or process or module exclude each other, any combinations pair can be used
All features and so disclosed any method disclosed in this specification (including adjoint claim, summary and accompanying drawing)
Or all processes or unit of equipment are combined.Unless expressly stated otherwise, this specification (including adjoint right will
Ask, make a summary and accompanying drawing) disclosed in each feature can be replaced by providing identical, equivalent or similar purpose alternative features.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments
In included some features rather than further feature, but the combination of the feature of different embodiments means in of the invention
Within the scope of and form different embodiments.For example, in detail in the claims, embodiment claimed it is one of any
Mode it can use in any combination.
Each device embodiment of the present invention can be realized with hardware, or to be run on one or more processor
Software module realize, or realized with combinations thereof.It will be understood by those of skill in the art that it can use in practice
Microprocessor or digital signal processor (DSP) realize some or all moulds in device according to embodiments of the present invention
The some or all functions of block.The present invention is also implemented as the part or complete for performing method as described herein
The program of device (for example, computer program and computer program product) in portion.Such program for realizing the present invention can store
On a computer-readable medium, or can the form with one or more signal.Such signal can be from internet
Download and obtain on website, either provide on carrier signal or provided in the form of any other.
It should be noted that the present invention will be described rather than limits the invention for above-described embodiment, and ability
Field technique personnel can design alternative embodiment without departing from the scope of the appended claims.In the claims,
Any reference symbol between bracket should not be configured to limitations on claims.Word "comprising" does not exclude the presence of not
Element or step listed in the claims.Word "a" or "an" before element does not exclude the presence of multiple such
Element.The present invention can be by means of including the hardware of some different elements and being come by means of properly programmed computer real
It is existing.In if the unit claim of equipment for drying is listed, several in these devices can be by same hardware branch
To embody.The use of word first, second, and third does not indicate that any order.These words can be explained and run after fame
Claim.
Claims (10)
1. a kind of method that communication between devices are realized based on natural language, including:
The target information related at least one communication protocol that target device can be supported is obtained based on natural language;
All or part of information in the target information sends message to the target device.
2. the method as described in claim 1, it is characterised in that described obtained based on natural language can prop up with target device
The target information at least one communication protocol correlation held, including:
Request message is sent to target device based on natural language, the request message is used to ask and target device institute energy
The target information for the communication protocol correlation enough supported;
The response message that the target device returns is received, being carried in the response message can support with the target device
The related target information of at least one communication protocol.
3. method as claimed in claim 2, it is characterised in that instruction protocol-identifier is carried in the request message;It is described to connect
The response message that the target device returns is received, including:
Receive the response message that the target device returns according to the instruction protocol-identifier.
4. the method as described in claim any one of 1-3, it is characterised in that described based on natural language acquisition and target device
The target information at least one communication protocol correlation that can be supported, including:
Request message is sent to the target device, the request message is used to ask what can be supported with the target device
The related target information of communication protocol;
The response message that the target device is returned based on natural language is received, carries in the response message and is set with the target
The related target information of the standby at least one communication protocol that can be supported.
5. method as claimed in claim 2, it is characterised in that it is described to send request message to target device, including:
Receive the command information that user sends;
Obtain the semantic analysis result of the command information;
It is determined that request message corresponding with the semantic analysis result, and the request message is sent to the target device.
6. a kind of electronic equipment, including:
Acquiring unit is related at least one communication protocol that target device can be supported for being obtained based on natural language
Target information;
Transmitting element, message is sent to the target device for all or part of information in the target information.
7. equipment as claimed in claim 6, it is characterised in that the transmitting element is additionally operable to, based on natural language to target
Equipment sends request message, and it is related to the communication protocol that the target device can be supported that the request message is used for request
Target information;
The acquiring unit is obtained related at least one communication protocol that target device can be supported based on natural language
During target information, it is specially:
The response message that the target device returns is received, being carried in the response message can support with the target device
The related target information of at least one communication protocol.
8. equipment as claimed in claim 7, it is characterised in that instruction protocol-identifier is carried in the request message;
When the acquiring unit receives the response message that the target device returns, it is specially:
Receive the response message that the target device returns according to the instruction protocol-identifier.
9. the equipment as described in claim any one of 6-8, it is characterised in that the transmitting element is additionally operable to, to target device
Request message is sent, the request message is used to ask the target related to the communication protocol that the target device can be supported
Information;
The acquiring unit is obtained related at least one communication protocol that target device can be supported based on natural language
During target information, it is specially:
The response message that the target device is returned based on natural language is received, carries in the response message and is set with the target
The related target information of the standby at least one communication protocol that can be supported.
10. a kind of electronic equipment, including:
Memory and one or more processors;
Wherein, the memory is connected with one or more of processor communications, and being stored with the memory can be described
The instruction that one or more processors perform, the instruction by one or more of computing devices so that it is one or
Multiple processors can realize the method as any one of claim 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710575886.6A CN107454066B (en) | 2017-07-14 | 2017-07-14 | Method and equipment for realizing communication between equipment based on natural language |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710575886.6A CN107454066B (en) | 2017-07-14 | 2017-07-14 | Method and equipment for realizing communication between equipment based on natural language |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107454066A true CN107454066A (en) | 2017-12-08 |
CN107454066B CN107454066B (en) | 2020-09-04 |
Family
ID=60488106
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710575886.6A Active CN107454066B (en) | 2017-07-14 | 2017-07-14 | Method and equipment for realizing communication between equipment based on natural language |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107454066B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113573369A (en) * | 2021-07-26 | 2021-10-29 | 申瓯通信设备有限公司 | Integrated access equipment based on digital voice |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103365836A (en) * | 2012-04-01 | 2013-10-23 | 郭佳 | Natural language utilized distributed intelligent interaction achieving method and system thereof |
US20150026267A1 (en) * | 2013-07-18 | 2015-01-22 | International Business Machines Corporation | Targeted message response |
CN105677635A (en) * | 2015-12-29 | 2016-06-15 | 聚熵信息技术(上海)有限公司 | Method, device and system for natural languages interaction |
CN106547208A (en) * | 2015-09-16 | 2017-03-29 | 北京北信源软件股份有限公司 | A kind of novel intelligent home control system and control method |
-
2017
- 2017-07-14 CN CN201710575886.6A patent/CN107454066B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103365836A (en) * | 2012-04-01 | 2013-10-23 | 郭佳 | Natural language utilized distributed intelligent interaction achieving method and system thereof |
US20150026267A1 (en) * | 2013-07-18 | 2015-01-22 | International Business Machines Corporation | Targeted message response |
CN106547208A (en) * | 2015-09-16 | 2017-03-29 | 北京北信源软件股份有限公司 | A kind of novel intelligent home control system and control method |
CN105677635A (en) * | 2015-12-29 | 2016-06-15 | 聚熵信息技术(上海)有限公司 | Method, device and system for natural languages interaction |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113573369A (en) * | 2021-07-26 | 2021-10-29 | 申瓯通信设备有限公司 | Integrated access equipment based on digital voice |
Also Published As
Publication number | Publication date |
---|---|
CN107454066B (en) | 2020-09-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10970951B2 (en) | Data management method, apparatus, device, system and storage medium for smart lock | |
Li et al. | An intelligent wireless sensor networks system with multiple servers communication | |
CN111770014A (en) | Data information processing method, edge gateway and system for processing data information | |
CN104581647A (en) | Network access method and device of intelligent equipment | |
CN105185085A (en) | Data communication system, method and device | |
CN105471917A (en) | Data transmission method and system | |
CN108431701A (en) | Control method, control panel and the control system of smart home device | |
CN106688197A (en) | Beamforming configuration scheme | |
Ayoub et al. | Implementation of SCHC in NS-3 and Comparison with 6LoWPAN | |
TW201830928A (en) | Electronic device and method for communication | |
CN111585801A (en) | ZigBee device upgrading method and related device | |
US20130202018A1 (en) | Power line communcation method and power line communication system | |
CN107454066A (en) | The method and apparatus of communication between devices is realized based on natural language | |
CN107395584A (en) | The method and apparatus of communication between devices is realized based on natural language | |
CN113115346A (en) | Gateway multi-protocol conversion device based on 5G and method thereof | |
CN112559080A (en) | TBOX equipment adaptation method based on CAN bus | |
CN109298866A (en) | TLV format protocol fast resolving method based on C language | |
CN107395583A (en) | The method and device to be communicated between different application is realized based on natural language | |
CN116437377A (en) | Communication method, system, electronic device and medium for device control communication protocol | |
CN106411963B (en) | Instant messaging message transmission method and device | |
CN207883112U (en) | A kind of gateway applied to environmental protection equipment information collection | |
Gupta et al. | An autonomous address translation scheme to integrate modbus with ieee 802.15. 4 networks | |
CN109495425B (en) | Data transmission method, communication module, upper computer and data transmission system | |
CN115968543A (en) | Resource mapping method, device, equipment and storage medium | |
CN106412657B (en) | A kind of method and system of set-top box programming sequence code |
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 | ||
GR01 | Patent grant |