Data conversion device and method and storage medium
Through the design of data conversion equipment, the control and state understanding problems caused by the differences in the protocols of smart devices of different manufacturers are solved, unified control and convenient use are achieved, and smart home experience is improved.
Patent Information
- Application Number
- CN202411386192.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2044-09-30
AI Technical Summary
Smart devices from different manufacturers use different protocols, making it difficult for users to control and understand the status of the device.
A data conversion device is designed, including a main control unit, an interface unit and a communication unit. By receiving the connection information and attribute information of electrical equipment, it determines its data protocol and performs data conversion to realize the interoperability of different protocols. Users can use the APP Centrally control smart devices from different manufacturers.
It enables users to easily use smart devices with different protocols and standards, and uniformly control devices from multiple different manufacturers, solving the problem that users have difficulty understanding the device status and controlling smart devices, and providing a convenient and flexible smart home experience.
Smart Images

Figure CN119276952A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of home appliance control technology, and in particular, relates to a data conversion device, method and storage medium. Background Art
[0002] With the improvement of intelligence, more and more smart devices have appeared in our lives, such as smart lamps, smart speakers, smart appliances, etc. Since these smart devices come from different manufacturers, they may use different protocols, which makes it difficult for users to use them. They need to download different APPs to use them. Summary of the invention
[0003] The embodiment of the present application provides a data conversion device, method and storage medium. The present application adopts a data conversion device, including: a main control unit, an interface unit and a communication unit connected to the main control unit; the interface unit is used to establish a connection with an electrical device and forward the data exchanged between the electrical device and the main control unit; the main control unit is used to establish a communication connection with an external device through the communication unit; wherein the main control unit is also used to send the connection information of the electrical device to the external device through the communication unit when the electrical device is connected to the interface unit, and determine the data protocol applied by the electrical device according to the attribute information of the electrical device received by the communication unit; the attribute information of the electrical device is determined according to the connection information of the electrical device and fed back by the external device; the interface unit is also used to convert the data exchanged between the electrical device and the main control unit according to the data protocol applied by the electrical device. It is realized that users can use smart devices with different protocols and standards, and devices of multiple different manufacturers can also be uniformly controlled and used, so that users can centrally control smart devices of different manufacturers.
[0004] According to the first aspect of the present application, an embodiment of the present application provides a data conversion device, including: a main control unit, and an interface unit and a communication unit connected to the main control unit; the interface unit is used to establish a connection with an electrical device and forward data exchanged between the electrical device and the main control unit; the main control unit is used to establish a communication connection with an external device through the communication unit; wherein the main control unit is also used to send the connection information of the electrical device to the external device through the communication unit when the electrical device is connected to the interface unit, and determine the data protocol applied by the electrical device according to the attribute information of the electrical device received by the communication unit; the attribute information of the electrical device is determined according to the connection information of the electrical device and fed back by the external device; the interface unit is also used to convert the data exchanged between the electrical device and the main control unit according to the data protocol applied by the electrical device.
[0005] In some embodiments, a prompt unit connected to the main control unit is further included, and the prompt unit is used to issue prompt information according to the control of the main control unit. The prompt information includes information that the external device is successfully connected to the electrical device through the data conversion device.
[0006] In some embodiments, a power supply unit connected to the main control unit is further included, and the power supply unit is configured to use the power provided by the electrical device to power other units in the data conversion device when the electrical device is connected to the interface unit.
[0007] In some embodiments, the main control unit is configured to send and receive data according to a serial port protocol; the serial port protocol includes an asynchronous receiver / transmitter serial port protocol.
[0008] In the second aspect, the present application also proposes a data conversion method implemented by the data conversion device described in any one of the first aspects, comprising the following steps: in response to the access of the electrical device, sending the connection information of the electrical device to an external device; receiving the attribute information of the electrical device fed back by the external device; wherein the attribute information of the electrical device is determined based on the connection information of the electrical device; determining the data protocol applied by the electrical device based on the attribute information of the electrical device; and performing data conversion on the data interacting with the electrical device according to the data protocol applied by the electrical device.
[0009] In some embodiments, the step of sending the connection information of the electrical device to an external device includes: sending the connection information of the electrical device to a server, so that the server forwards it to a user-end device, so that the user can select the attribute information of the electrical device through the connection information of the electrical device prompted by the user-end device; the step of receiving the attribute information of the electrical device fed back by the external device includes: receiving the attribute information of the electrical device forwarded by the server, wherein the attribute information of the electrical device is fed back by the user-end device.
[0010] In some embodiments, the method further includes the following steps: outputting prompt information when receiving the attribute information of the electrical device, wherein the prompt information includes information that the external device is successfully connected to the electrical device through the data conversion device.
[0011] In some embodiments, the step of converting data interacting with the electrical device according to the data protocol applied by the electrical device includes: converting the instructions sent by the main control unit into instructions recognizable by the electrical device according to the data protocol applied by the electrical device; wherein the instructions sent by the main control unit include control instructions sent by the external device; and sending the instructions recognizable by the electrical device to the electrical device.
[0012] In some embodiments, the step of converting data interacting with the electrical device according to the data protocol applied by the electrical device includes: converting the data received from the electrical device into data recognizable by the main control unit according to the data protocol applied by the electrical device, and sending the data to the main control unit; the main control unit extracts data of a specified flag bit from the received data based on the attribute information of the electrical device, and determines the type and status of the electrical device according to the data of the specified flag bit.
[0013] In a third aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements a method as described in any one of the second aspects.
[0014] Compared with the prior art, the embodiments of the present application have the following beneficial effects: it enables users to use smart devices with different protocols and standards, and devices from multiple different manufacturers can also be uniformly controlled and used, so that users can centrally control smart devices from different manufacturers. Users can easily understand the historical working status and current working status of electrical equipment, which solves the problem in the prior art that it is difficult for users to understand the status of smart devices because smart devices from different manufacturers use different protocols. It completes the control of electrical equipment by users without using the manufacturer's protocol, which solves the problem in the prior art that it is difficult for users to control smart devices because smart devices from different manufacturers use different protocols. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0016] Figure 1 A schematic diagram of the structure of a data conversion device provided in an embodiment of the present application;
[0017] Figure 2 A working interaction diagram of a data conversion device provided for the implementation of this application;
[0018] Figure 3 A schematic diagram of the implementation flow of a data conversion method provided for the implementation of this application. DETAILED DESCRIPTION
[0019] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0020] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0021] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0022] As used in the specification of this application and the appended claims, the term "if" can be interpreted as "when" or "once" or "in response to determining" or "in response to being controlled to" depending on the context. Similarly, the phrases "if it is determined" or "if it is controlled to" can be interpreted as meaning "once it is determined" or "in response to determining" or "once it is controlled to" or "in response to being controlled to" depending on the context.
[0023] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0024] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the phrases "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. appearing in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways.
[0025] As the level of intelligence increases, more and more smart devices appear in our lives, such as smart lamps, smart speakers, smart appliances, etc. Since these smart devices come from different manufacturers, they may use different protocols, which makes it difficult for users to use them and they need to download different apps to use them.
[0026] Based on the technical problems existing in the prior art, an embodiment of the present application provides a data conversion device, including: a main control unit 22, and an interface unit 21 and a communication unit 23 connected to the main control unit 22.
[0027] One end of the interface unit 21 is connected to the main control unit 22, and the other end is used to connect to the electrical device 10. After the interface unit 21 is connected to the electrical device 10, the interface unit 21 can forward the data exchanged between the electrical device 10 and the main control unit 22. The external device includes a server 31 and a user terminal device 32.
[0028] The main control unit 22 is connected to the interface unit 21 and the communication unit 23 at the same time, and can establish a communication connection with an external device through the communication unit 23 .
[0029] When the interface unit 21 is connected to the electrical device 10 for the first time, the interface unit 21 generates a connection information, which is sent to the server 31 after passing through the main control unit 22 and the communication unit 23. The server 31 will send the connection information to the user terminal device 32. The user terminal device 32 of the user is equipped with an APP. When the user terminal device 32 receives the connection information, it can find the connected electrical device 10 in the APP. The user can set the attribute information of the electrical device 10 on the APP, wherein the attribute information at least includes the manufacturer information of the manufacturer of the electrical device 10. The attribute information set by the user will be sent to the server 31 through the APP. The server 31 sends the attribute information to the conversion device according to the connection information, and the attribute information set by the user can be associated with the electrical device 10 through the connection information.
[0030] Next, the server 31 will send the attribute information to the main control unit 22 through the communication unit 23 of the conversion device. After receiving the attribute information, the main control unit 22 will determine the conversion protocol for data conversion of the electrical device 10 according to the attribute information, and notify the interface unit 21 of the conversion protocol, so that the interface unit 21 can use the conversion protocol to convert the data that the electrical device 10 needs to send into the data of the asynchronous receiver-transmitter serial port protocol (UART serial port communication protocol). At the same time, the interface unit 21 can also convert the data sent by the main control unit 22 to the electrical device 10 into data in a protocol format that matches the electrical device 10 according to the conversion protocol.
[0031] There are two conversion directions of the data conversion device in this application. One is to send the data that the electrical device 10 needs to output to the server 31 after conversion by the interface unit 21 and the main control unit 22. The other is that the user sends instructions to the electrical device 10 through the user terminal device 32 equipped with the APP or the server 31 sends data to the electrical device 10.
[0032] In the process of sending the data of the electrical device 10 to the server 31, the data output by the electrical device 10 is first converted into data of the UART serial communication protocol type by the interface unit 21 according to the conversion protocol, and the data of the UART serial communication protocol type is sent to the main control unit 22. After receiving the data of the UART serial communication protocol type, the main control unit 22 extracts key information from the data.
[0033] Since the data of the UART serial communication protocol type contains a designated flag bit, the main control unit 22 will identify the designated flag bit of the data after receiving the data of the UART serial communication protocol type, and extract the key information in the data according to the identified designated flag bit. The key data here includes: the type of the electrical device 10 and the data that the electrical device 10 needs to send out, etc.
[0034] In some embodiments, the main control unit 22 can send the extracted key data to the server 31, and then the server 31 sends it to the APP of the user terminal device 32, so as to realize real-time monitoring of the electrical device 10 through the APP. Of course, it can also be stored on the server 31, and when the user needs it, the user terminal device 32 can obtain historical data from the server 31, so that the user can easily understand the historical working status and current working status of the electrical device 10, which solves the problem in the prior art that it is difficult for users to understand the status of smart devices well because smart devices of different manufacturers use different protocols.
[0035] In the process of the user issuing instructions to the electrical device 10 through the user terminal device 32 equipped with the APP or the server 31 sending data to the electrical device 10, the user can edit instructions or other operation steps on the APP, send these edited contents to the server 31, and the server 31 sends them to the communication unit 23 of the conversion device. After receiving the data from the server 31, the communication unit 23 sends the data to the main control unit 22, and the main control unit 22 sends the data to the interface unit 21. The interface unit 21 converts the data into data of the device type of the electrical device 10 according to the conversion protocol, thereby completing the user's control of the electrical device 10 without the manufacturer's protocol, and solving the problem in the prior art that the smart devices of different manufacturers use different protocols, which makes it difficult for users to control the smart devices well.
[0036] Of course, it is also possible to preset control instructions in the server 31, and the server 31 sends data to the conversion device through the preset control instructions.
[0037] The data conversion device in the present application can be set to an independent power supply form, that is, the power consumption of the conversion device is supplied by itself, but this method will increase the size of the conversion device and there will be battery life problems. Therefore, in some embodiments, a power supply unit 24 is provided on the conversion device of the present application, and the power supply unit 24 is connected to the communication unit 23, the main control unit 22 and the interface unit 21. When the interface unit 21 is connected to the electrical device 10, the power supply unit 24 can draw power from the electrical device 10 and supply power to the main control unit 22, the interface unit 21 and the communication unit 23.
[0038] In order to allow the user to better understand whether the connection between the conversion device and the electrical device 10 and the user terminal device 32 is successful, in some embodiments, the conversion device further includes: a prompt unit 25.
[0039] The prompt unit 25 is connected to the main control unit 22, and is used to issue prompt information according to the control of the main control unit 22. The prompt information includes information that the external device is successfully connected to the electrical device 10 through the data conversion device.
[0040] When the electrical device 10 is successfully connected to the user terminal device 32 through the conversion device, the main control unit 22 controls the prompt unit 25 to send a reminder message. The prompt unit 25 can be an LED light, and the prompt message can be different light states or flashing states of the LED light. Of course, the communication unit 23 in this application can be WIFI, or it can be 5G, Bluetooth, other communication technologies of the Internet of Things, which is not limited in this application.
[0041] The data conversion device can convert data for electrical devices 10 from different manufacturers, making it convenient for users to use smart devices with different protocols and standards, and enabling devices from multiple different manufacturers to be controlled and used in a unified manner, providing users with a more convenient and intelligent smart home experience.
[0042] By using the server 31 as an intermediary to process and transmit the connection information, the user can select the manufacturer information of the connected electrical device 10 through the APP without directly operating the electronic device or electrical device 10. In this way, the usability and user experience of the system are greatly improved, and the smart home system is made more flexible and scalable.
[0043] like Figure 2 As shown, the interaction between the electrical device 10, the conversion device, the server 31 and the user terminal device 32 in this application is as follows:
[0044] When the conversion device is connected to the electrical device 10 for the first time, the conversion device will send connection information to the server 31, and the connection information will be sent to the user-end device 32 by the server 31. When the user-end device 32 receives the connection information, it can find the connected electrical device 10 through the APP on the user-end device 32, and the user can set the attribute information of the electrical device 10. The set attribute information will be sent to the server 31, and then sent to the conversion device via the server 31.
[0045] The main control unit 22 in the conversion device can determine the conversion protocol used by the interface unit 21 to implement data conversion based on the attribute information, and notify the interface unit 21 of the conversion protocol, so that the interface unit 21 can convert the data that the electrical device 10 needs to send into the serial port protocol data through the conversion protocol, and can also convert the data that needs to be input into the electrical device 10 into the data of the preset protocol of the electrical device 10.
[0046] After the configuration of the conversion device is completed, the data of the electrical device 10 can be obtained through the conversion device or the electrical device 10 can be controlled through the conversion device.
[0047] In the process of sending data from the electrical device 10, the interface unit 21 obtains the data sent by the electrical device 10, and then converts the data sent by the electrical device 10 into serial port protocol data through a conversion protocol. The main control unit 22 identifies the specified flag bit of the serial port protocol data, extracts key data from the serial port protocol data according to the specified flag bit, and sends the key data to the server 31.
[0048] When the electrical device is controlled through the conversion device, the user presets instructions or operation data in the user terminal device 32, and the instructions or operation data are sent to the server 31, and then sent to the conversion device via the server 31. The interface unit 21 in the conversion device converts the instructions or operation data into data of the preset protocol of the electrical device 10 according to the conversion protocol, and sends it to the electrical device 10 to realize the control of the electrical device.
[0049] Embodiment 2:
[0050] In view of the problems existing in the prior art, such as Figure 3 As shown, the present application provides a data conversion method, which is applied to electronic production equipment, and the electronic production equipment can be a server, a mobile terminal, a computer, a cloud platform, and a conversion device. The function implemented by the production equipment data processing provided in the embodiment of the present application can be implemented by calling a program code by a processor of the electronic production equipment, wherein the program code can be stored in a computer storage medium. The conversion method includes:
[0051] Step S1: In response to the access of an electrical device, the connection information of the electrical device is sent to an external device.
[0052] In some embodiments, step S1 “sending the connection information of the electrical device to an external device” includes:
[0053] Step S11: sending the connection information of the electrical device to a server, so that the server forwards it to a user terminal device, so that the user can select the attribute information of the electrical device through the connection information of the electrical device prompted by the user terminal device.
[0054] When the interface unit is connected to the electrical device for the first time, the interface unit generates a connection information, which is sent to the server through the main control unit and the communication unit. The user's client device is equipped with an APP, and the user can set the attribute information of the electrical device on the APP, where the attribute information at least includes the manufacturer of the electrical device. The attribute information set by the user will be sent to the server through the APP. Since there is connection information generated by the conversion device at this time, the attribute information set by the user can be associated with the electrical device through the connection information.
[0055] Step S2: receiving the attribute information of the electrical device fed back by the external device, wherein the attribute information of the electrical device is determined according to the connection information of the electrical device.
[0056] In some embodiments, step S2 of “receiving attribute information of the electrical device fed back by the external device” includes:
[0057] Step S21: receiving the attribute information of the electrical device forwarded by the server, wherein the attribute information of the electrical device is fed back by the user terminal device.
[0058] Step S3: Determine the data protocol applied by the electrical device based on the attribute information of the electrical device.
[0059] The server will send the attribute information to the main control unit through the communication unit of the conversion device. After receiving the attribute information, the main control unit will determine the conversion protocol for data conversion of the electrical device according to the attribute information, and notify the interface unit of the conversion protocol, so that the interface unit can use the conversion protocol to convert the data that the electrical device needs to send into the data of the asynchronous receiver-transmitter serial port protocol (UART serial port communication protocol). At the same time, the interface unit can also convert the data sent by the main control unit to the electrical device into data in a protocol format that matches the electrical device according to the conversion protocol.
[0060] Step S4: converting the data interacting with the electrical device according to the data protocol applied by the electrical device.
[0061] There are two conversion directions of the data conversion device in this application. One is to send the data that the electrical device needs to output to the server after conversion by the interface unit and the main control unit. The other is that the user sends instructions to the electrical device through the user terminal device equipped with the APP or the server sends data to the electrical device.
[0062] In some embodiments, step S4 "converting the data interacting with the electrical device according to the data protocol applied by the electrical device" includes:
[0063] Step S41: according to the data protocol used by the electrical device, convert the instruction sent by the main control unit into an instruction recognizable by the electrical device, wherein the instruction sent by the main control unit includes the control instruction sent by the external device.
[0064] Step S42: Sending a command recognizable by the electrical device to the electrical device.
[0065] When a user issues instructions to an electrical device through a user-end device equipped with an APP or a server sends data to an electrical device, the user can edit instructions or other operating steps on the APP, send these edited contents to the server, and the server sends them to the communication unit of the conversion device. After receiving the data from the server, the communication unit sends the data to the main control unit, and the main control unit sends the data to the interface unit. The interface unit converts the data into data of the device type of the electrical device according to the conversion protocol, thereby completing the user's control of the electrical device without going through the manufacturer's protocol. This solves the problem in the prior art that it is difficult for users to control smart devices well because smart devices from different manufacturers use different protocols.
[0066] Of course, it is also possible to preset control instructions in the server, and the server sends data to the conversion device through the preset control instructions.
[0067] In some embodiments, step S4 "converting the data interacting with the electrical device according to the data protocol applied by the electrical device" further includes:
[0068] Step S43: According to the data protocol applied by the electrical device, the data received from the electrical device is converted into data recognizable by the main control unit, and sent to the main control unit.
[0069] Step S44: the main control unit extracts data of a designated flag bit from the received data based on the attribute information of the electrical device, and determines the type and state of the electrical device according to the data of the designated flag bit.
[0070] In the process of sending the data of the electrical device to the server, the data output by the electrical device is first converted into UART serial communication protocol type data by the interface unit according to the conversion protocol, and the UART serial communication protocol type data is sent to the main control unit. After receiving the UART serial communication protocol type data, the main control unit will extract key information from the data.
[0071] Since the data of the UART serial communication protocol type contains designated flag bits, the main control unit will identify the designated flag bits of the data after receiving the data of the UART serial communication protocol type, and extract the key information in the data according to the identified special standard bits. The key data here include: the type of electrical equipment and the data that the electrical equipment needs to send out, etc.
[0072] In some embodiments, the main control unit can send the extracted key data to the server, which is then sent to the APP of the user terminal device, so that the real-time monitoring of the electrical equipment can be realized through the APP. Of course, it can also be stored on the server. When the user needs it, the historical data can be obtained from the server through the user terminal device, so that the user can easily understand the historical working status and current working status of the electrical equipment, which solves the problem in the prior art that it is difficult for users to understand the status of smart devices well because smart devices from different manufacturers use different protocols.
[0073] In order to allow the user to better understand whether the connection between the conversion device and the electrical device and the user-end device is successful, in some embodiments, the method further includes the steps of:
[0074] Step S5: outputting prompt information when receiving the attribute information of the electrical device, wherein the prompt information includes information that the external device is successfully connected to the electrical device through the data conversion device.
[0075] When the electrical device is successfully connected to the user-end device through the conversion device, the main control unit will control the prompt unit to send a reminder message. The prompt unit can be an LED light, and the prompt message can be different light states or flashing states of the LED light. Of course, the communication unit in this application can be WIFI, or 5G, other communication technologies of the Internet of Things, which are not limited in this application.
[0076] The data conversion method can convert data between electrical devices from different manufacturers, making it convenient for users to use smart devices with different protocols and standards, and enables devices from multiple different manufacturers to be uniformly controlled and used, providing users with a more convenient and intelligent smart home experience.
[0077] Embodiment 3:
[0078] In a third aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method as described in any one of the first aspects is implemented.
[0079] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0080] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0081] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0082] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0083] In the embodiments provided in the present application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0084] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0085] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A data conversion device, characterized in that: include: A main control unit, and an interface unit and a communication unit connected to the main control unit; The interface unit is used to establish a connection with the electrical device and forward the data exchanged between the electrical device and the main control unit; The main control unit is used to establish a communication connection with an external device through the communication unit; The main control unit is further used for sending the connection information of the electrical device to the external device through the communication unit when the electrical device is connected to the interface unit, and determining the data protocol applied by the electrical device according to the attribute information of the electrical device received by the communication unit; the attribute information of the electrical device is determined according to the connection information of the electrical device and fed back by the external device; The interface unit is further used to convert data exchanged between the electrical device and the main control unit according to a data protocol applied by the electrical device.
2. The data conversion device according to claim 1, characterized in that: It also includes a prompt unit connected to the main control unit, and the prompt unit is used to issue prompt information according to the control of the main control unit. The prompt information includes information that the external device is successfully connected to the electrical device through the data conversion device.
3. The data conversion device according to claim 1, characterized in that: It also includes a power supply unit connected to the main control unit. The power supply unit is configured to, when the electrical device is connected to the interface unit, use the electrical energy provided by the electrical device to supply power to other units in the data conversion device.
4. The data conversion device according to any one of claims 1 to 3, characterized in that: The main control unit is configured to send and receive data according to a serial port protocol; The serial port protocol includes an asynchronous receiver / transmitter serial port protocol.
5. A data conversion method implemented by the data conversion device according to any one of claims 1 to 4, characterized in that: The following steps are involved: In response to the access of the electrical device, sending the connection information of the electrical device to the external device; Receiving attribute information of the electrical device fed back by the external device; wherein the attribute information of the electrical device is determined according to connection information of the electrical device; Determining a data protocol applied by the electrical device based on the attribute information of the electrical device; According to the data protocol applied by the electrical device, data conversion is performed on the data interacting with the electrical device.
6. The method according to claim 5, characterized in that The step of sending the connection information of the electrical device to an external device comprises: Sending the connection information of the electrical device to a server, so that the server forwards it to a user terminal device, so that the user can select the attribute information of the electrical device through the connection information of the electrical device prompted by the user terminal device; The step of receiving the attribute information of the electrical device fed back by the external device comprises: Receive the attribute information of the electrical device forwarded by the server, wherein the attribute information of the electrical device is fed back by the user terminal device.
7. The method according to claim 6, characterized in that The method further comprises the following steps: When the attribute information of the electrical device is received, prompt information is output, wherein the prompt information includes information that the external device is successfully connected to the electrical device through the data conversion device.
8. The method according to claim 5, characterized in that The step of converting the data interacting with the electrical device according to the data protocol applied by the electrical device comprises: According to the data protocol used by the electrical device, convert the instruction sent by the main control unit into an instruction recognizable by the electrical device; wherein the instruction sent by the main control unit includes the control instruction sent by the external device; A command recognizable by the electrical device is sent to the electrical device.
9. The method according to claim 5, characterized in that The step of converting the data interacting with the electrical device according to the data protocol applied by the electrical device comprises: According to the data protocol applied by the electrical device, the data received from the electrical device is converted into data recognizable by the main control unit, and sent to the main control unit; The main control unit extracts data of a designated flag bit from received data based on the attribute information of the electrical device, and determines the type and state of the electrical device according to the data of the designated flag bit.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 5 to 9 is implemented.
Citation Information
Patent Citations
Intelligent home furnishing equipment control method, device and system
CN104580464A
Gateway equipment and information processing method
CN104660498A
Intelligent device control method, device, electronic device and storage medium
CN108388140A
Control method and device of intelligent home, storage medium, and robot
CN110618614A
Device network configuration method and apparatus, electronic device and storage medium
CN113412469A