A data transmission method, device, computer device and Internet of Things system
Patent Information
- Application Number
- CN202310893806.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-19
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2043-07-19
AI Technical Summary
[0003]为解决现有的复杂系统数据传输速度慢、稳定性差问题,本申请提供一种方法、装置及计算机设备,能够基于各个智能设备之间的距离规划信息传输的最佳路径,提高系统的稳定性和可靠性
[0044]另一方面,提供了一种计算机程序产品或计算机程序,该计算机程序产权或计算机程序包括计算机程序指令,该计算机程序指令存储于计算机可读存储介质中。处理器从计算机可读存储介质读取该计算机指令,并执行还计算机指令,使得该计算机设备执行上述实施例中任一所述的数据传输方法。
Smart Images

Figure CN117221210B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a data transmission method, apparatus, computer equipment, and Internet of Things system. Background Technology
[0002] In various IoT systems, smart manufacturing systems, and smart home systems, the transmission and interaction of data, information, and control commands are crucial to the reliability and stability of system operation. However, as the number of devices included in these systems increases, the collaborative operation between different systems becomes increasingly close and diverse, and the information transmission methods between different devices become more complex. In scenarios with numerous systems and devices, the interaction of information and commands may be insufficient, potentially leading to slow data transmission speeds and poor reliability. Summary of the Invention
[0003] To address the issues of slow data transmission speed and poor stability in existing complex systems, this application provides a method, apparatus, and computer equipment that can plan the optimal path for information transmission based on the distance between various intelligent devices, thereby improving the stability and reliability of the system.
[0004] On the one hand, a data transmission method is provided, the method comprising:
[0005] Data to be transmitted is received based on a type of device; the number of such devices is at least one; the data to be transmitted carries target device information.
[0006] If the target device information corresponds to a target type II device, then the type I device that is closest to the target type II device is selected as the target type I device; the number of type II devices is at least one.
[0007] The data to be transmitted is sent from the target type one device to the target type two device.
[0008] In some embodiments, before receiving the data to be transmitted based on a type of device, the method further includes:
[0009] Based on pre-stored device classification rules, each device is divided into either Category I or Category II devices. Category I devices belong to Category I areas, and Category II devices belong to Category II areas.
[0010] In some embodiments, classifying devices into Class I or Class II devices based on pre-stored device classification rules includes:
[0011] Establish a coordinate system and determine the position coordinates of each device;
[0012] Based on the distance relationship of location coordinates and the device classification rules, each device is classified into either Category I or Category II devices.
[0013] In some embodiments, obtaining the device closest to the target type II device as the target type I device includes:
[0014] The device closest to the target device is selected as the candidate device.
[0015] Determine whether the candidate device is currently performing a data transmission task;
[0016] If the candidate device does not have a data transmission task in progress, then the candidate device will be used as the target device.
[0017] In some embodiments, obtaining the device closest to the target type II device as the target type I device further includes:
[0018] If the candidate device is performing a data transmission task, then the device that is second closest to the target device is selected as the candidate device.
[0019] Determine whether the candidate device is currently performing a data transmission task;
[0020] If the candidate device does not have a data transmission task in progress, then the candidate device will be used as the target device.
[0021] In some embodiments, sending the data to be transmitted from the target type-one device to the target type-two device includes:
[0022] When the target type one device starts executing a data transmission task, it will no longer receive new data transmission tasks until it receives feedback data sent by the target type two device.
[0023] On the other hand, a data transmission apparatus is provided, the apparatus comprising:
[0024] A data receiving module is used to receive data to be transmitted based on a type of device; the number of such devices is at least one; the data to be transmitted carries target device information.
[0025] The target device selection module is used to select the closest Class I device as the target Class I device if the target device information corresponds to a Class II target device; the number of Class II devices is at least one.
[0026] The data transmission module is used to send the data to be transmitted from the target type one device to the target type two device.
[0027] In some embodiments, the apparatus further includes a device partitioning module, configured to:
[0028] Based on pre-stored device classification rules, each device is divided into either Category I or Category II devices. Category I devices belong to Category I areas, and Category II devices belong to Category II areas.
[0029] In some embodiments, the device partitioning module is specifically used for:
[0030] Establish a coordinate system and determine the position coordinates of each device;
[0031] Based on the distance relationship of location coordinates and the device classification rules, each device is classified into either Category I or Category II devices.
[0032] In some embodiments, the target device selection module is specifically used for:
[0033] The device closest to the target device is selected as the candidate device.
[0034] Determine whether the candidate device is currently performing a data transmission task;
[0035] If the candidate device does not have a data transmission task in progress, then the candidate device will be used as the target device.
[0036] In some embodiments, the target device selection module is specifically used for:
[0037] If the candidate device is performing a data transmission task, then the device that is second closest to the target device is selected as the candidate device.
[0038] Determine whether the candidate device is currently performing a data transmission task;
[0039] If the candidate device does not have a data transmission task in progress, then the candidate device will be used as the target device.
[0040] In some embodiments, the data transmission module is specifically used for:
[0041] When the target type one device starts executing a data transmission task, it will no longer receive new data transmission tasks until it receives feedback data sent by the target type two device.
[0042] On the other hand, a computer device is provided, which includes a processor and a memory. The memory stores at least one instruction, at least one program, code set, or instruction set. The processor can load and execute at least one instruction, at least one program, code set, or instruction set to implement the data transmission method provided in the above-mentioned embodiments.
[0043] On the other hand, a computer-readable storage medium is provided, which stores at least one instruction, at least one program, code set, or instruction set. A processor can load and execute at least one instruction, at least one program, code set, or instruction set to implement the data transmission method provided in the embodiments of this application.
[0044] On the other hand, a computer program product or computer program is provided, which includes computer program instructions stored in a computer-readable storage medium. A processor reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform any of the data transmission methods described in the above embodiments.
[0045] The beneficial effects of the technical solution provided in this application include at least the following: Embodiments of the present invention provide a data transmission method, apparatus, computer equipment, and Internet of Things (IoT) system. The method includes receiving data to be transmitted based on a first type of device; the number of the first type of device is at least one; the data to be transmitted carries target device information; if the target device information corresponds to a target second type of device, then obtaining the first type of device closest to the target second type of device as the target first type of device; the number of the second type of device is at least one; and sending the data to be transmitted from the target first type of device to the target second type of device. The method provided by embodiments of the present invention can plan the optimal path for information transmission based on the distance between various smart devices, thereby efficiently and reliably controlling multiple smart devices distributed in multiple locations, improving system stability and reliability, and enhancing the user experience. Attached Figure Description
[0046] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0047] Figure 1 The illustration shows a schematic diagram of the implementation flow of a data transmission method provided in an exemplary embodiment of this application;
[0048] Figure 2 An example diagram of region division in a data transmission method provided by an exemplary embodiment of this application is shown;
[0049] Figure 3 This invention provides a structural diagram of a data transmission apparatus according to an exemplary embodiment of the present application.
[0050] Figure 4A schematic diagram of the structure of a computer device corresponding to a data transmission method provided in an exemplary embodiment of this application is shown. Detailed Implementation
[0051] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0052] The data transmission method provided in this application can plan the optimal path for information transmission based on the distance between various smart devices, thereby improving the stability and reliability of the system.
[0053] Example 1
[0054] In the control of intelligent devices, there are situations where it is necessary to control devices that are far away or outside the system across systems and regions. When the distance between the device to be controlled and the controller is too far or direct communication is hindered, the technical solution provided in this application can achieve more convenient and reliable control and information interaction.
[0055] Figure 1 The diagram illustrates the implementation flow of a data transmission method provided by an embodiment of the present invention.
[0056] See Figure 1 The data transmission method provided in this embodiment of the invention may include steps 101 to 103.
[0057] Prior to step 101, the method further includes a partitioning device:
[0058] Based on pre-stored device classification rules, each device is divided into either Category I or Category II devices. Category I devices belong to Category I areas, and Category II devices belong to Category II areas.
[0059] In some embodiments, classifying devices into Class I or Class II devices based on pre-stored device classification rules includes:
[0060] Establish a coordinate system and determine the position coordinates of each device;
[0061] Based on the distance relationship of location coordinates and the device classification rules, each device is classified into either Category I or Category II devices.
[0062] The equipment categories are not limited to Class I and Class II equipment; they can include multiple categories.
[0063] The terms "Category I" and "Category II" are used only to distinguish categories, not to limit functionality. In this embodiment, data transmission can be performed not only from Category I devices to Category II devices, but also from Category II devices to Category I devices; all types of devices have the same functionality.
[0064] Step 101: Receive data to be transmitted based on a type of device; the number of such devices is at least one; the data to be transmitted carries target device information;
[0065] Step 102: If the target device information corresponds to a target type II device, then obtain the type I device that is closest to the target type II device as the target type I device; the number of type II devices is at least one.
[0066] In some embodiments, step 102 includes:
[0067] The device closest to the target device is selected as the candidate device.
[0068] Determine whether the candidate device is currently performing a data transmission task;
[0069] If the candidate device does not have a data transmission task in progress, then the candidate device will be used as the target device.
[0070] In some embodiments, obtaining the device closest to the target type II device as the target type I device further includes:
[0071] If the candidate device is performing a data transmission task, then the device that is second closest to the target device is selected as the candidate device.
[0072] Determine whether the candidate device is currently performing a data transmission task;
[0073] If the candidate device does not have a data transmission task in progress, then the candidate device will be used as the target device.
[0074] Optionally, select a Class I device that is closest to the target Class II device and is not currently performing a data transmission task as the target Class I device.
[0075] Step 103: Send the data to be transmitted from the target type one device to the target type two device.
[0076] In some embodiments, step 103 includes:
[0077] When the target type one device starts executing a data transmission task, it will no longer receive new data transmission tasks until it receives feedback data sent by the target type two device.
[0078] Similarly, when the target type II device starts performing a data receiving task, it will no longer receive new data transmission tasks until it sends feedback data to the target type I device.
[0079] The data transmission method provided in this invention can plan the optimal path for information transmission based on the distance between various smart devices, thereby efficiently and reliably controlling multiple smart devices distributed in multiple locations, improving system stability and reliability, and enhancing user experience.
[0080] Example 2
[0081] The following specific example further illustrates the implementation of the present invention.
[0082] First, establish a coordinate system and determine the position coordinates of each device within the coordinate system.
[0083] Optionally, the location of each device can be determined by using the host of the IoT system as the origin of the coordinate system.
[0084] Based on the spatial relationships of the devices or their actual application scenarios, devices can be divided into different areas. For example, in the field of smart manufacturing, devices in the same workshop are grouped into one area; in the field of smart homes, devices in the same room are grouped into one area; or the areas can be divided according to the existing system architecture, with devices connected to the same controller grouped into one area.
[0085] Figure 2 An example diagram of region division in the method provided by an embodiment of the present invention is shown.
[0086] In a specific example, the first area is called area A, and the second area is called area B. The devices in area A include a1, a2, a3, a4, etc., and the devices in area B include b1, b2, b3, b4, etc.
[0087] When a user issues a control command to device b1 in area A, the device closest to device b1 in area A is determined based on the location coordinates of each device, such as a1.
[0088] Determine whether the nearest device a1 in region A is performing other data transmission tasks, and whether the current data transmission task can be executed.
[0089] If device a1 can perform its current data transmission task, it will transmit the data to device b1. While device a1 is executing its current data transmission task, it will not perform any other data transmission tasks to protect the speed and quality of data transmission. Only after device a1 receives feedback information from device b1 can it end its current data transmission task. When device b1 receives data and instructions from device a1, it will also not perform any other data receiving or sending tasks until it sends feedback information to device a1, thus ensuring the reliability and stability of data transmission.
[0090] In summary, the data transmission method provided by the embodiments of the present invention can effectively realize the control of multiple intelligent devices across regions and systems, improve the stability and reliability of the system, and enhance the user experience.
[0091] Example 3
[0092] Figure 3 A schematic diagram of the data transmission device provided in an embodiment of the present invention is shown.
[0093] See Figure 3 The data transmission device provided in this embodiment of the invention may include:
[0094] A data receiving module is used to receive data to be transmitted based on a type of device; the number of such devices is at least one; the data to be transmitted carries target device information.
[0095] The target device selection module is used to select the closest Class I device as the target Class I device if the target device information corresponds to a Class II target device; the number of Class II devices is at least one.
[0096] The data transmission module is used to send the data to be transmitted from the target type one device to the target type two device.
[0097] In some embodiments, the apparatus further includes a device partitioning module, configured to:
[0098] Based on pre-stored device classification rules, each device is divided into either Category I or Category II devices. Category I devices belong to Category I areas, and Category II devices belong to Category II areas.
[0099] In some embodiments, the device partitioning module is specifically used for:
[0100] Establish a coordinate system and determine the position coordinates of each device;
[0101] Based on the distance relationship of location coordinates and the device classification rules, each device is classified into either Category I or Category II devices.
[0102] In some embodiments, the target device selection module is specifically used for:
[0103] The device closest to the target device is selected as the candidate device.
[0104] Determine whether the candidate device is currently performing a data transmission task;
[0105] If the candidate device does not have a data transmission task in progress, then the candidate device will be used as the target device.
[0106] In some embodiments, the target device selection module is specifically used for:
[0107] If the candidate device is performing a data transmission task, then the device that is second closest to the target device is selected as the candidate device.
[0108] Determine whether the candidate device is currently performing a data transmission task;
[0109] If the candidate device does not have a data transmission task in progress, then the candidate device will be used as the target device.
[0110] In some embodiments, the data transmission module is specifically used for:
[0111] When the target type one device starts executing a data transmission task, it will no longer receive new data transmission tasks until it receives feedback data sent by the target type two device.
[0112] In summary, the device provided by the embodiments of the present invention can plan the optimal path for information transmission based on the distance between various smart devices, thereby efficiently and reliably controlling multiple smart devices distributed in multiple locations, improving the stability and reliability of the system, and enhancing the user experience.
[0113] Example 4
[0114] Figure 4 This application shows a schematic diagram of the structure of a computer device provided in an exemplary embodiment, the computer device comprising:
[0115] The processor 301 includes one or more processing cores. The processor 301 executes various functional applications and data processing by running software programs and modules.
[0116] The receiver 302 and transmitter 303 can be implemented as a communication component, which can be a communication chip. Optionally, this communication component can include signal transmission functionality. That is, the transmitter 303 can be used to transmit control signals to the image acquisition device and the scanning device, and the receiver 302 can be used to receive corresponding feedback commands.
[0117] The memory 304 is connected to the processor 301 via the bus 305.
[0118] The memory 304 can be used to store at least one instruction, and the processor 301 is used to execute the at least one instruction to implement steps 101 to 103 in the above-described data transmission method embodiment.
[0119] Those skilled in the art will understand that Figure 4This is merely an example of a computer device and does not constitute a limitation on the computer device. It may include more or fewer components than shown, or combine certain components, or different components. For example, the computer device may also include network access devices, etc.
[0120] The processor 301 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0121] The memory 304 can be an internal storage unit of the computer device, such as a hard drive or RAM. The memory 304 can also be an external storage device of the computer device, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, the memory 304 can include both internal and external storage units. The memory 304 is used to store the computer program and other programs and data required by the terminal device. The memory 304 can also be used to temporarily store data that has been output or will be output.
[0122] Example 5
[0123] This application also provides an Internet of Things (IoT) system, including at least two smart devices and the aforementioned computer equipment.
[0124] Example 6
[0125] This application also provides a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, which can be loaded and executed by a processor to implement the above-described data transmission method.
[0126] Optionally, the computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), solid-state drives (SSDs), or optical discs, etc. The random access memory may include resistive random access memory (ReRAM) and dynamic random access memory (DRAM).
[0127] Example 7
[0128] This application also provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform any of the data transmission methods described in the above embodiments.
[0129] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the implementation.
[0130] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware, or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to 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 embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0131] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0132] Those skilled in the art will recognize that the units and algorithm steps of the various examples 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 implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0133] The computer program includes computer program code, which can be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium can include any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.
[0134] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A data transmission method, characterized in that, The method includes: Data to be transmitted is received based on a type of device; the number of such devices is at least one; the data to be transmitted carries target device information. If the target device information corresponds to a target Class II device, then the Class I device that is closest to the target Class II device is selected as a candidate Class I device; it is determined whether the candidate Class I device is currently performing a data transmission task; if the candidate Class I device is not currently performing a data transmission task, then the candidate Class I device is selected as the target Class I device; the number of Class II devices is at least one. The data to be transmitted is sent from the target type one device to the target type two device; The step of sending the data to be transmitted from the target type one device to the target type two device includes: When the target type one device starts executing a data transmission task, it will no longer receive new data transmission tasks until it receives feedback data sent by the target type two device.
2. The method according to claim 1, characterized in that, Before receiving data to be transmitted based on a type of device, the method further includes: Based on pre-stored device classification rules, each device is classified into either Category I or Category II devices.
3. The method according to claim 2, characterized in that, The pre-stored device classification rules categorize each device into Class I or Class II devices, including: Establish a coordinate system and determine the position coordinates of each device; Based on the distance relationship of location coordinates and the device classification rules, each device is classified into either Category I or Category II devices.
4. The method according to claim 1, characterized in that, The method further includes: If the candidate device is performing a data transmission task, then the device that is second closest to the target device is selected as the candidate device. Determine whether the candidate device is currently performing a data transmission task; If the candidate device does not have a data transmission task in progress, then the candidate device will be used as the target device.
5. A data transmission device, characterized in that, The device includes: A data receiving module is used to receive data to be transmitted based on a type of device; the number of such devices is at least one; the data to be transmitted carries target device information. The target device selection module is used to: if the target device information corresponds to a target type II device, then obtain the type I device that is closest to the target type II device as a candidate type I device; determine whether the candidate type I device is currently performing a data transmission task; if the candidate type I device is not currently performing a data transmission task, then designate the candidate type I device as the target type I device; the number of type II devices is at least one. The data transmission module is used to send the data to be transmitted from the target type one device to the target type two device.
6. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing at least one instruction, at least one program, code set, or instruction set, the at least one instruction, at least one program, code set, or instruction set being loaded and executed by the processor to implement the data transmission method as described in any one of claims 1 to 4.
7. An Internet of Things (IoT) system, characterized in that, It includes at least two smart devices and the computer device as described in claim 6.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, at least one program, code set, or instruction set is loaded and executed by a processor to implement the data transmission method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Positioning method, terminal and storage medium
CN111770438A