Data transmission method and communication equipment
The method improves IoT device data transmission efficiency by identifying devices through device addresses and status information, eliminating the need for fixed identifiers and enhancing resource management.
Patent Information
- Application Number
- CN202411219289.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-12-13
AI Technical Summary
Existing communication systems for IoT devices using RS-485 protocol require setting fixed identifiers for each device, leading to inefficient data transmission and resource management.
A data transmission method that identifies IoT devices using device addresses, generating object model information without fixed identifiers, and improves data transmission efficiency by recognizing devices through device addresses and status information.
This method enhances data transmission efficiency by eliminating the need for fixed identifiers, saving resources and improving device identification and management in IoT networks.
Smart Images

Figure CN119135711A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a data transmission method and communication equipment. Background Art
[0002] In application scenarios such as industrial automation, remote monitoring, and intelligent control, 485 devices (various devices using RS-485 communication protocol) usually need to be connected to a higher-level system for centralized management and control. In this case, the information of the 485 device can be converted into a serial port message that can be recognized by the communication device through a conversion device (such as a smart switch), so as to communicate with the cloud or other systems through the communication device.
[0003] In the related art, a smart switch is used to convert the information of a 485 device into serial port information with a fixed identifier and send it to a communication device. The communication device converts the serial port information with a fixed identifier into cloud information and sends it to the cloud, wherein the fixed identifier is used to identify the 485 device and a certain function of the 485 device. When there are multiple 485 devices connected to the cloud, corresponding fixed identifiers are set for the functions of different 485 devices. For example, the switch function of the light, the fixed identifier is set to 1001; the switch function of the air conditioner, the fixed identifier is set to 1002; the switch function of the bathroom heater device, the fixed identifier is set to 1003. It can be seen that when any new 485 device is connected to the communication device, a corresponding fixed identifier must be set for each function of the new 485 device. This access method causes the cloud or communication device to maintain a large amount of device data, resulting in low data transmission efficiency during the access and control process of the 485 device. Summary of the invention
[0004] In view of this, the present application provides a data transmission method and a communication device to solve the problem that the network card enabled in the IoT device is improper, affecting the working efficiency of the IoT device.
[0005] A first aspect of an embodiment of the present application provides a data transmission method, which is applied to a communication device, and the method includes: responding to a status reporting instruction of an access device sent by an intelligent switch, and determining a device address and status information of the access device according to the status reporting instruction; determining the device information of the access device according to the device address; generating physical model information of the access device based on the device information and the status information, and sending the physical model information to a server.
[0006] In some embodiments, determining the device information of the access device based on the device address includes: determining the device identification and device type of the access device based on the device address; and determining the device information based on the device identification and device type.
[0007] In some embodiments, the method further includes: matching the device address of the access device with a preset device list; if there is no address matching the device address in the preset device list, determining that the access device is a newly added device.
[0008] In some embodiments, before determining the device information of the access device based on the device address, the method also includes: if the access device is a newly added device, generating a device identifier of the access device when the device address of the access device is received; updating the association between the device address and the device identifier to the preset device list, and sending the association to the server.
[0009] In some embodiments, generating the physical model information of the access device based on the device information and the status information includes: defining attribute information of the physical model according to the device information and the status information; and generating the physical model information according to the attribute information.
[0010] A second aspect of an embodiment of the present application provides a data transmission method applied to an intelligent switch, the method comprising: when obtaining a device address and status information of an access device, generating a status reporting instruction according to the status information and the device address; and sending the status reporting instruction to a communication device.
[0011] In some embodiments, the method further includes: upon receiving device type query information sent by the communication device, parsing the device type query information to determine the device address to be queried; obtaining the device type to be queried based on the device address to be queried; and sending the device type to be queried to the communication device.
[0012] In some embodiments, the method further includes: if the interface communication protocol of the intelligent switch is the same as the communication protocol of the access device, generating a status reporting instruction according to the status information and the device address.
[0013] In some embodiments, the smart switch includes a wired communication module, the access device is communicatively connected to the wired communication module, and the wired communication module includes at least one of the following: a communication unit based on the 485 communication standard, a communication unit based on the 232 communication standard, and an Ethernet communication unit.
[0014] A third aspect of an embodiment of the present application provides a communication device, including a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, wherein the processor implements the above-mentioned data transmission method when executing the computer-readable instructions.
[0015] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions implement the above-mentioned data transmission method when executed by a processor.
[0016] In the data transmission method provided in the embodiment of the present application, the access device is identified by the device address. In the process of realizing the status reporting of the access device, the intelligent switch encapsulates the device address status information of the access device into the status reporting instruction, and sends the status reporting instruction to the communication device. The communication device receives the status reporting instruction, parses the status reporting instruction to obtain the device address and status information of the access device, determines the device information of the access device according to the device address, and generates the object model information of the access device based on the device information and the status information, and reports the object model information to the server. This method identifies the access device by the device address, does not need to set up a fixed identifier, can save resources, and improves data transmission efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application 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 any creative labor.
[0018] Figure 1 This is an application scenario diagram of the data transmission method provided in an embodiment of the present application.
[0019] Figure 2 It is an implementation flow chart of the data transmission method provided in the embodiment of the present application.
[0020] Figure 3 It is an implementation flow chart of a data transmission method provided by another embodiment of the present application.
[0021] Figure 4 It is a structural diagram of the data transmission device provided in an embodiment of the present application.
[0022] Figure 5 It is a structural diagram of the communication device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0023] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0024] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way.
[0025] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those generally understood by technicians in the technical field in this application. The terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. It should be understood that, unless otherwise specified in this application, " / " means or. For example, A / B can represent A or B. "And / or" in this application is only a description of the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. "At least one" means one or more. "Multiple" means two or more than two. For example, at least one of a, b or c can represent: a, b, c, a and b, a and c, b and c, a, b and c seven situations.
[0026] See also Figure 1 As shown in FIG. 1 , it is an application scenario diagram of the data transmission method provided in the embodiment of the present application. Figure 1 As shown, the smart switch 200 includes a wired communication module, and the access device 100 is connected to the wired communication module by wired communication. The smart switch 200 is connected to the communication device 300 through a network, and the communication device 300 is connected to the server 400 through a network. The network includes but is not limited to a wired network and a wireless network.
[0027] In order to implement remote monitoring and management of the access device 100, the server 400 needs to obtain the device status information of the access device 100. The access device 100 can actively report the status information, or respond to a status acquisition instruction and report the status information according to the status acquisition instruction.
[0028] The smart switch 200 receives the status information sent by the access device 100, synchronously obtains the device address of the access device 100, and then converts the device address and status information of the access device 100 into a message format that the communication device 300 can understand and process, for example, encapsulating the device address and status information of the access device 100 to generate a status reporting instruction, and sending the status reporting instruction to the communication device 300.
[0029] The communication device 300 responds to the status reporting instruction and determines the device address and status information of the access device 100 according to the status reporting instruction. According to the device address of the access device 100, the communication device 300 can determine the device information of the access device 100. After obtaining the device information and status information of the access device 100, the communication device 300 can generate the object model information of the access device 100 based on the device information and status information, and send the object model information to the server 400. The server 400 receives the object model information of the access device 100 and can update the pre-stored device status information of the access device 100 according to the object model information.
[0030] In some embodiments, the correspondence between the function identifier and the function may be stored in the communication device 300 or the server 400. The function identifier is used to uniquely identify a certain function, for example, 1000 is used to identify a switch function. The same function of different access devices 100 has the same function identifier.
[0031] In an embodiment of the present application, the identity of the access device 100 is determined by utilizing the device address of the access device 100, thereby distinguishing the identification device from the identification function, thereby allowing a unified identification for the same functions of different devices, without the need to set function identifications for each function of the access device 100, thereby saving storage space and effectively improving the efficiency of data transmission.
[0032] In some embodiments, the wired communication module of the intelligent switch 200 includes at least one of the following: a communication unit based on 485 communication standard (RS-485), a communication unit based on 232 communication standard (RS-232), and an Ethernet communication unit.
[0033] In some embodiments, the communication device 300 may be a device such as a gateway. The server 400 may be a cloud server, an independent server, or a server cluster. The communication device 300 may be connected by wire to electrically connect the gateway to the bottom housing circuit board in the smart switch, thereby connecting the communication device 300 to the smart switch 200.
[0034] Figure 1The scenarios shown are only illustrative examples, and the device control method provided in this application can also be applied in other scenarios. For example, in some scenarios, multiple access devices 100 may be included; in some scenarios, multiple servers 400 may be included; in some scenarios, other types of devices may also be included. The embodiments of this application do not limit the specific application scenarios of the device control method.
[0035] See also Figure 2 The figure is a flowchart of the implementation of the data transmission method provided in the embodiment of the present application. The method is applied to a communication device. The embodiment of the present application is applied to the method in Figure 1 The communication device 300 in FIG. 1 is used as an example for explanation. The method includes the following steps.
[0036] S11: responding to the status reporting instruction of the access device sent by the intelligent switch, and determining the device address and status information of the access device according to the status reporting instruction.
[0037] In some embodiments, the status reporting instruction includes the device address and status information of the access device. The communication device can obtain the device address and status information of the access device by parsing the status reporting instruction.
[0038] In some embodiments, the status information includes information such as function identification and status identification. The same function of different access devices has the same corresponding function identification. For example, when the access device is an air conditioner, the function identification of the switch function of the air conditioner is 1000, and when the access device is a smart light, the function identification of the smart switch function is also 1000.
[0039] In some embodiments, the device address is used to determine the identity of the access device. The function identifier is used to determine which function type reported by the access device corresponds to the status information. For example, when the function identifier of the switch function is 1000, if the function identifier is determined to be 1000, the communication device can determine that the access device reports the update information of the device switch status. The status identifier is used to characterize the type of status. For example, for the switch function, when the status identifier is 1, it indicates the on state, and when the status identifier is 0, it indicates the off state. The communication device can determine the status of the corresponding function of the access device based on the function identifier and the corresponding status identifier.
[0040] S12: Determine device information of the access device according to the device address.
[0041] In some embodiments, the device information includes but is not limited to the device type and device identification. The device type is used to characterize the category information of the access device. The device identification is used to identify the access device in the upper network (such as a server).
[0042] In some embodiments of the present application, the communication device determines the device information of the access device based on the device address, including: determining the device identification and device type of the access device based on the device address; determining the device information based on the device identification and device type.
[0043] In some embodiments, the communication device may pre-store the correspondence between the device address and the device identification. After acquiring the device address of the access device, the communication device may match and obtain the device identification of the access device according to the device address.
[0044] In the process of determining the device type of the access device, the communication device can generate a device type acquisition request based on the device address of the access device, and send the acquisition request to the smart switch. The smart switch receives the acquisition request, parses the acquisition request, obtains the device address, obtains the device type of the access device based on the device address, and returns the device type to the communication device.
[0045] In some embodiments, after the communication device obtains the device type and device identification of the access device, the relevant information including the device type and the device identification may be used as the device information of the access device.
[0046] In some embodiments of the present application, before determining the device information of the access device based on the device address, the method also includes: if the access device is a newly added device, generating a device identifier of the access device when the device address of the access device is received; updating the association between the device address and the device identifier to a preset device list, and sending the association to the server.
[0047] In some embodiments, the preset device list is used to store associations between different device addresses and device identifiers. The device identifier is used to identify access devices in an upper layer network (eg, a server).
[0048] In some embodiments, when the communication device determines a newly added device to the access device, it can generate a device identifier for the access device based on the device address of the access device, update the association between the device address and the device identifier of the access device to a preset device list, and send the association to the server.
[0049] In some embodiments, the communication device and the server store the association between the device address and the device identifier of the access device, so that when the information of the access device is received again, such as status reporting instructions and other information, the access device can be quickly located and the relevant information of the device can be obtained, or the relevant information of the device can be updated to improve data transmission efficiency.
[0050] After the association relationship between the device address and the device identifier of the access device is sent to the server, the server can determine the identity of the access device by identifying the device identifier.
[0051] In some embodiments of the present application, the device address of the access device is matched with a preset device list; if there is no address matching the device address in the preset device list, it is determined that the access device is a newly added device.
[0052] In some embodiments, the preset device list stores information that uniquely identifies the access device, such as the device address of the access device with the interaction history. Therefore, the communication device can determine whether the access device is a newly added device by matching the device address of the access device with the preset device list. If there is no address matching the device address in the preset device list, the access device is determined to be a newly added device. If there is an address matching the device address in the preset device list, the access device is determined to be a non-newly added device.
[0053] In some embodiments, the communication device may periodically maintain the preset device list. For example, the device data in the preset device list that has been stored for a period exceeding the preset period may be deleted. The preset period may be customizable. For the deleted device data, if the communication device receives the device address and other relevant device information of the device corresponding to the device data, the communication device may still regard the device as a newly added device.
[0054] In other embodiments, the method of determining whether the access device is a newly added device may further include determining whether the access device is a newly added device through an intelligent switch. If the access device is determined to be a newly added device, an instruction for the newly added device is generated according to the device address of the access device, and the instruction for the newly added device is sent to the communication device. The communication device may determine that the access device is a newly added device according to the instruction for the newly added device.
[0055] In this embodiment, when a new device is connected, the identity of the new device is determined by the device address, and there is no need to configure a fixed identifier to uniquely identify the device, which can save resources.
[0056] S13: Generate object model information of the access device based on the device information and status information, and send the object model information to the server.
[0057] In some embodiments, the object model is an abstract representation of the access device in the IoT environment, which is used to describe the attributes, services (or functions), events, tags and other dimensions of the access device, so that the (cloud) server can understand and operate the access device. The communication device or server can define the object model based on a description language in a format such as JavaScript Object Notation (JSON).
[0058] In some embodiments of the present application, physical model information of an access device is generated based on device information and status information, including: defining attribute information of the physical model according to the device information and status information; and generating physical model information according to the attribute information.
[0059] In some embodiments, the attribute information of the object model includes, but is not limited to, information describing the attributes of the access device, services (or functions), events, and other dimensions.
[0060] In some embodiments, the communication device can generate information describing the attributes of the access device based on the device information of the access device (including the device identification and device type), and can determine information describing the services (or functions) and events of the access device based on the status information of the access device. For example, the attributes of the access device include the device identification, device type, manufacturer information, etc. The services (or functions) of the access device may include operations or functions that the server can perform on the access device, such as turning on an operation (function) or turning off an operation (function). The access device includes actions triggered by the access device under certain conditions, such as when the status identification of the switch function is 1, it is determined that the access device is turned on.
[0061] In the data transmission method provided in the embodiment of the present application, the access device is identified by the device address. In the process of realizing the status reporting of the access device, the intelligent switch encapsulates the status information of the device address of the access device into the status reporting instruction, and sends the status reporting instruction to the communication device. The communication device receives the status reporting instruction, parses the status reporting instruction to obtain the device address and status information of the access device, determines the device information of the access device according to the device address, and generates the object model information of the access device based on the device information and status information, and reports the object model information to the server. The use of this method can save resources and improve data transmission efficiency.
[0062] See also Figure 3 , Figure 3 The figure is a flowchart of the implementation of the data transmission method provided by another embodiment of the present application. The method is applied to the smart switch. The embodiment of the present application is applied to the method as follows Figure 1 The intelligent switch 200 shown in FIG. Figure 3 As shown, the data transmission method provided in this embodiment includes steps S21 to S23, and the specific steps are as follows.
[0063] S21: When obtaining the device address and status information of the access device, a status reporting instruction is generated according to the status information and the device address.
[0064] In some embodiments, the smart switch obtains the device address and status information of the access device, and can convert the device address and status information of the access device into a message format that can be recognized by the communication device through the bottom shell of the smart switch. For example, in this embodiment, the smart switch generates a status reporting instruction based on the status information and the device address, and sends the status reporting instruction to the communication device.
[0065] In some embodiments, when the access device is first connected to the smart switch, the smart switch can obtain the device address of the access device and send the device address of the access device to the communication device. The communication device can generate a corresponding device identifier based on the device address of the access device, store the association between the device address of the access device and the device identifier, and send the association to the server.
[0066] In some embodiments, the intelligent switch can determine whether the access device is a newly added device based on the device address of the access device and other information used to uniquely identify the access device. If the device address of the access device is repeated with the device address in the historical record, the access device is determined to be a non-newly added device; if the device address of the access device is not repeated with the device address in the historical record, the access device is determined to be a newly added device.
[0067] S22: Sending a status reporting instruction to the communication device.
[0068] In some embodiments, the communication device receives the status reporting instruction and can parse the status reporting instruction to obtain the device address and status information of the access device. The communication device can obtain the device identification and device type of the access device according to the device address of the access device.
[0069] In the process of acquiring the device type of the access device, the communication device may generate device type query information according to the device address of the access device, and send the device type query information to the smart switch.
[0070] In some embodiments of the present application, when the smart switch receives device type query information sent by the communication device, it parses the device type query information to determine the device address to be queried; obtains the device type to be queried based on the device address to be queried; and sends the device type to be queried to the communication device.
[0071] In this embodiment, the device address to be queried includes the device address of the access device, and the device type to be queried includes the device type of the access device. The device type of the access device is used to indicate the category information of the access device.
[0072] In some embodiments, the intelligent switch can send a query instruction to the access device according to the access device address, obtain the device type of the access device, and then convert the device type of the access device into a message format recognizable by the communication device and send it to the communication device.
[0073] In some embodiments of the present application, if the interface communication protocol of the intelligent switch is the same as the communication protocol of the access device, a status reporting instruction is generated according to the status information and the device address.
[0074] In some embodiments, the premise for the access device and the smart switch to exchange data via a wired communication connection includes that the interface communication protocol supported by the smart switch is the same as the communication protocol of the access device. For example, a 485 device communicates based on the RS-485 communication protocol, so if the access device and the smart switch exchange data via a wired communication connection, the interface communication protocol of the smart switch needs to support the RS-485 communication protocol.
[0075] In some embodiments of the present application, the intelligent switch includes a wired communication module, the access device is communicatively connected to the wired communication module, and the wired communication module includes at least one of the following: a communication unit based on the 485 communication standard (RS-485), a communication unit based on the 232 communication standard (RS-232), and an Ethernet communication unit.
[0076] In other embodiments, the wired communication module may further include other communication units. The embodiment of the present application does not limit the wired communication module.
[0077] In the data transmission method provided in the embodiment of the present application, the identity of the access device is recognized through the device address of the access device, and there is no need to create a new fixed identifier for identifying the device identity, which can save resources and improve data transmission efficiency.
[0078] 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.
[0079] See also Figure 4 , Figure 4 The structure diagram of the data transmission device provided in the embodiment of the present application is shown, which can implement the details of the data transmission method in the above embodiment and achieve the same effect. Figure 4 As shown, the data transmission device 10 can be applied to a communication device with a data processing function, and the data transmission device 10 includes: a response module 11, which is used to respond to a status reporting instruction of an access device sent by a smart switch, and determine a device address and status information of the access device according to the status reporting instruction; a determination module 12, which is used to determine the device information of the access device according to the device address; a sending module 13, which is used to generate physical model information of the access device based on the device information and status information, and send the physical model information to the server.
[0080] For the specific definition of the data transmission device 10, please refer to the definition of the data transmission method above, which will not be repeated here. Each module in the above-mentioned data transmission device 10 can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the communication device in the form of hardware, or can be stored in the memory in the communication device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0081] See also Figure 5 , Figure 5 The structure diagram of a communication device provided in an embodiment of the present application is shown. The communication device 300 includes but is not limited to a gateway, etc. The network where the communication device 300 is located includes but is not limited to the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (VPN), etc.
[0082] like Figure 5 As shown, the communication device 300 includes a communication module 301, a memory 302, a processor 303, an input / output (I / O) interface 304 and a bus 305. The processor 303 is coupled to the communication module 301, the memory 302 and the I / O interface 304 through the bus 305.
[0083] The communication module 301 may be a wireless communication module or a mobile communication module. The wireless communication module may provide wireless communication solutions including wireless local area networks (WLAN) (e.g., wireless fidelity (Wi-Fi) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication technology (NFC), infrared technology (IR), etc., applied to the communication device 300. The mobile communication module may provide wireless communication solutions including 2G / 3G / 4G / 5G, etc., applied to the communication device 300.
[0084] The memory 302 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM). The random access memory can be directly read and written by the processor 303, and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, and can also be used to store user and application data. The random access memory may include static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM, such as the fifth generation DDR SDRAM is generally referred to as DDR5 SDRAM), etc.
[0085] The non-volatile memory may also store executable programs and user and application data, etc., and may be loaded into the random access memory in advance for direct reading and writing by the processor 303. The non-volatile memory may include a disk storage device and a flash memory.
[0086] The memory 302 is used to store one or more computer programs. The one or more computer programs are configured to be executed by the processor 303. The one or more computer programs include multiple instructions. When the multiple instructions are executed by the processor 303, the data transmission method executed on the communication device 300 can be implemented.
[0087] In other embodiments, the communication device 300 further includes an external memory interface for connecting to an external memory to expand the storage capacity of the communication device 300 .
[0088] The processor 303 may include one or more processing units, for example, the processor 303 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0089] The processor 303 provides computing and control capabilities. For example, the processor 303 is used to execute a computer program stored in the memory 302 to implement the above-mentioned data transmission method.
[0090] The I / O interface 304 is used to provide a channel for user input or output. For example, the I / O interface 304 can be used to connect various input and output devices, such as a mouse, keyboard, touch device, display screen, etc., so that the user can enter information or visualize information.
[0091] The bus 305 is at least used to provide a channel for mutual communication among the communication module 301 , the memory 302 , the processor 303 , and the I / O interface 304 in the communication device 300 .
[0092] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the communication device 300. In other embodiments of the present application, the communication device 300 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0093] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. The computer program includes program instructions. The method implemented when the program instructions are executed can refer to the data transmission method in the above-mentioned embodiments of the present application.
[0094] The computer-readable storage medium may be an internal memory of the communication device described in the above embodiment, such as a hard disk or memory of the communication device. The computer-readable storage medium may also be an external storage device of the communication device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the communication device.
[0095] Furthermore, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the communication device, etc.
[0096] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present application and are not intended to limit it. Although the present application has been described in detail with reference to the preferred embodiments, a person of ordinary skill in the art should understand that the technical solution of the present application may be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present application.
Claims
1. A data transmission method, applied to a communication device, characterized in that: The method comprises: Responding to the status reporting instruction of the access device sent by the intelligent switch, and determining the device address and status information of the access device according to the status reporting instruction; Determining device information of the access device according to the device address; Based on the device information and the status information, object model information of the access device is generated, and the object model information is sent to a server.
2. The data transmission method according to claim 1, characterized in that: The determining, according to the device address, device information of the access device includes: Determine the device identification and device type of the access device according to the device address; The device information is determined according to the device identification and the device type.
3. The data transmission method according to claim 2, characterized in that: The method further comprises: Matching the device address of the access device with a preset device list; If there is no address matching the device address in the preset device list, it is determined that the access device is a newly added device.
4. The data transmission method according to claim 3, characterized in that: Before determining the device information of the access device according to the device address, the method further includes: If the access device is a newly added device, upon receiving the device address of the access device, generating a device identifier of the access device; The association relationship between the device address and the device identifier is updated to the preset device list, and the association relationship is sent to the server.
5. The data transmission method according to claim 1, characterized in that: The generating, based on the device information and the state information, the object model information of the access device includes: Defining attribute information of the object model according to the device information and the state information; The object model information is generated according to the attribute information.
6. A data transmission method, applied to an intelligent switch, characterized in that: The method comprises: When obtaining the device address and status information of the access device, generating a status reporting instruction according to the status information and the device address; The status reporting instruction is sent to the communication device.
7. The data transmission method according to claim 6, characterized in that: The method further comprises: When receiving the device type query information sent by the communication device, parsing the device type query information to determine the device address to be queried; According to the address of the device to be queried, obtaining the type of the device to be queried; The device type to be queried is sent to the communication device.
8. The data transmission method according to claim 6, characterized in that: The method further comprises: If the interface communication protocol of the intelligent switch is the same as the communication protocol of the access device, a status reporting instruction is generated according to the status information and the device address.
9. The data transmission method according to claim 6, characterized in that: The intelligent switch includes a wired communication module, the access device is communicatively connected to the wired communication module, and the wired communication module includes at least one of the following: a communication unit based on the 485 communication standard, a communication unit based on the 232 communication standard, and an Ethernet communication unit.
10. A communication device, characterized in that: The method comprises a memory, a processor and computer-readable instructions stored in the memory and executable on the processor, wherein the computer-readable instructions, when executed by the processor, implement the data transmission method according to any one of claims 1 to 5.
