A data acquisition method and apparatus
By pre-acquiring the protocol packets of IoT devices and establishing a connector, the problem of data collection failure when the IoT platform malfunctions is solved, thus achieving efficient data collection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING GRIDSUM TECH CO LTD
- Filing Date
- 2023-05-18
- Publication Date
- 2026-04-21
AI Technical Summary
When the IoT platform malfunctions, the management system is unable to collect data from IoT devices.
Acquire the protocol packets of the target IoT device in advance, including the device interface, control interface, and data interface, and establish a connector to collect data.
Even if the IoT platform malfunctions, data can still be collected normally; the process is simple and efficient.
Smart Images

Figure CN119011613B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data acquisition technology, and in particular to a data acquisition method and apparatus. Background Technology
[0002] With the continuous development of science and technology, the application of Internet of Things (IoT) technology is becoming more and more widespread, giving rise to management systems to control and manage IoT devices.
[0003] When the management system controls and manages IoT devices, it first needs to collect data from the IoT devices through the IoT platform between the management system and the IoT devices, and then determine whether to send relevant control commands to the IoT devices based on the collected data.
[0004] However, the problem with this method is that if the IoT platform malfunctions, the management system will be unable to collect data from the IoT devices. Summary of the Invention
[0005] In view of the above problems, the present invention provides a data acquisition method and apparatus, the main purpose of which is to solve the problem that when the IoT platform malfunctions, the management system will be unable to collect data from IoT devices.
[0006] To solve the above-mentioned technical problems, the present invention proposes the following solution:
[0007] In a first aspect, the present invention provides a data acquisition method, the method comprising:
[0008] Detect whether the IoT platform is malfunctioning;
[0009] If a fault occurs, a target protocol packet is obtained, which includes the device interface and control interface of the target IoT device and its subordinate devices, the data interface for obtaining data from the target IoT device and its subordinate devices, and the data acquisition protocol.
[0010] A connector is established based on the target protocol packet, and the connector is used to connect the target IoT device;
[0011] The target data in the target IoT device is collected based on the connector.
[0012] In a second aspect, the present invention provides a data acquisition device, the device comprising:
[0013] The detection unit is used to detect whether the IoT platform is malfunctioning.
[0014] The acquisition unit is used to acquire a target protocol packet if the detection unit detects a fault. The target protocol packet includes the device interface and control interface of the target IoT device and its subordinate devices, the data interface for acquiring data in the target IoT device and its subordinate devices, and the data acquisition protocol.
[0015] An establishment unit is used to establish a connector based on the target protocol packet obtained by the acquisition unit, and the connector is used to connect the target IoT device;
[0016] The acquisition unit is used to acquire target data from the target IoT device based on the connector established by the establishment unit.
[0017] To achieve the above objectives, according to a third aspect of the present invention, a storage medium is provided, the storage medium including a stored program, wherein, when the program is executed, the device on which the storage medium is located controls the execution of the data acquisition method of the first aspect.
[0018] To achieve the above objectives, according to a fourth aspect of the present invention, an electronic device is provided, the electronic device including at least one processor, and at least one memory and bus connected to the processor; wherein the processor and the memory communicate with each other through the bus; the processor is used to call program instructions in the memory to execute the data acquisition method of the first aspect described above.
[0019] By employing the above technical solution, the data acquisition method and apparatus provided by this invention can pre-set the target protocol packet for the target IoT device. Thus, if the original IoT platform malfunctions while collecting data from the target IoT device, the target protocol packet can still be obtained. Then, based on the device interface, control interface, and data interface for acquiring data from the target IoT device and its subordinate devices within the target protocol packet, a connector for connecting to the target IoT device can be created. After creation, the target data from the target IoT device can be collected using the connector. In this way, even if the IoT platform malfunctions, data can still be collected normally, and the process is simple, requiring only the acquisition of the pre-deployed protocol packet and the creation of the connector, resulting in high efficiency.
[0020] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0021] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0022] Figure 1 A flowchart of a data acquisition method provided by an embodiment of the present invention is shown;
[0023] Figure 2 A flowchart of another data acquisition method provided by an embodiment of the present invention is shown;
[0024] Figure 3 This diagram illustrates a data acquisition device according to an embodiment of the present invention.
[0025] Figure 4 This invention provides a block diagram of another data acquisition device according to an embodiment of the invention.
[0026] Figure 5 A block diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0027] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0028] With the continuous development of science and technology, the application of Internet of Things (IoT) technology is becoming increasingly widespread, leading to the emergence of management systems to control and manage IoT devices. When controlling and managing IoT devices, the management system first needs to collect data from the IoT devices through an IoT platform between the management system and the devices, and then determine whether to send relevant control commands to the IoT devices based on the collected data. However, the problem with this method is that if the IoT platform malfunctions, the management system will be unable to collect data from the IoT devices. Therefore, this invention provides a data acquisition method that can still collect data from IoT devices even when the IoT platform malfunctions. The specific execution steps are as follows: Figure 1 As shown, it includes:
[0029] 101. Check if the IoT platform is faulty.
[0030] 102. If a fault occurs, obtain the target protocol packet.
[0031] Since the general process of the management system collecting data from IoT devices is carried out through the IoT platform, it is necessary for the management system to detect the IoT platform in step 101 to prevent the system from continuing to use it when it is unavailable, which would result in the inability to obtain data and affect subsequent work.
[0032] If step 101 detects that the IoT platform is normal, then the IoT platform can continue to be used to collect data. If step 101 detects that the IoT platform is faulty, then step 102 can be executed.
[0033] In this invention, the development documentation for the target IoT device provided by the manufacturer can be obtained in advance. Then, a target protocol package for the IoT device is constructed based on the development documentation. This target protocol package includes device interfaces, control interfaces, and data acquisition protocols for the target IoT device and its subordinate devices, as well as data interfaces for acquiring data from the target IoT device and its subordinate devices. The target protocol package can then be saved to the database of the management system. Therefore, when the management system detects a fault in the IoT platform in step 101, the target protocol package can be obtained in step 202.
[0034] 103. Establish a connector based on the target protocol packet.
[0035] 104. Collect target data from target IoT devices based on connectors.
[0036] After obtaining the target protocol packet, in step 103, the loader can be used to load the target protocol packet. After loading the target protocol packet, a connector can be constructed based on the device interface, control interface, data interface for acquiring data from the target IoT device and its subordinate devices, and data acquisition protocol in the target IoT device and its subordinate devices. In this way, the connector includes the device interface, data interface, control interface, and data acquisition protocol. Then, in step 104, the device interface in the connector can be used to connect the target IoT device and its subordinate devices, and then the data interface and data acquisition protocol can be used to collect data from the target IoT device.
[0037] Subsequently, if the target IoT device is found to be abnormal, such as the value exceeding the set threshold, control commands can be sent to the target IoT device using the control interface in the connector.
[0038] In this invention, any IoT device can be the target IoT device, and it is not only about using and controlling the target IoT device. It is just described from the perspective of the target IoT device. It is also possible to collect data from the lower-level devices in the target IoT device while collecting data from the target IoT device, and to control the lower-level devices.
[0039] Based on the above Figure 1 As can be seen from the implementation method, the data acquisition method provided by this invention can pre-set the target protocol packet of the target IoT device. In this way, if the original IoT platform fails when collecting data from the target IoT device, the target protocol packet can be obtained. Then, based on the device interface, control interface, and data interface for acquiring data from the target IoT device and its subordinate devices in the target protocol packet, a connector for connecting to the target IoT device can be created. After creation, the target data in the target IoT device can be collected according to the connector. In this way, even if the IoT platform fails, data can still be collected normally, and the process is simple, only requiring the acquisition of the pre-deployed protocol packet and the creation of the connector, which is highly efficient.
[0040] Furthermore, as a response to Figure 1 Further refinement and extension of the illustrated embodiment: This invention also provides another data acquisition method, such as... Figure 2 As shown, the specific steps are as follows:
[0041] 201. Check if the IoT platform is faulty.
[0042] 202. If a fault occurs, obtain the target protocol packet.
[0043] 203. Establish a connector based on the target protocol packet.
[0044] The implementation methods of steps 201 to 203 are the same as those of steps 101 to 103, and can achieve the same technical effect and solve the same technical problem, so they will not be repeated here.
[0045] 204. Collect target data from target IoT devices based on connectors.
[0046] In this step, when building the connector, a preset time interval for data collection is also set. It should be noted that the connector is located in the management system, and the execution subject of this invention is the management system.
[0047] The preset timing module in the management system can be consistent with the preset time interval in the connector. After the preset time interval is reached, the preset timing module can send a data acquisition request for the target IoT device to the preset acquisition module in the management system. The data acquisition request includes the name of the target IoT device. The reason for including the device name is to distinguish multiple IoT devices when collecting data from multiple IoT devices at the same time.
[0048] After the preset data acquisition module receives the data acquisition request, it can collect the target data from the IoT device according to the data interface and data acquisition protocol in the connector.
[0049] 205. Filter the target data to obtain the specified data.
[0050] After the preset acquisition module obtains the target data, it can be parsed to obtain the parsed target data. Additionally, some data within the target data may be useless, such as duplicate data. This portion of data has no beneficial value. Therefore, the data processing rules in the connector can be used to filter the parsed target data, obtaining the filtered specified data. This saves bandwidth used during data transmission.
[0051] 206. Send the specified data to the preset transmission module, and use the preset transmission module to transfer the specified data to the preset storage module.
[0052] After obtaining the specified data, the specified data can be sent to the preset transmission module in the management system, and then the specified data can be transferred to the preset storage module of the management system via the preset transmission module.
[0053] Specifically, when sending specified data to a preset transmission module, the quantity of specified data and the number of preset transmission modules can be determined first. If there are multiple specified data and multiple preset transmission modules, sending all the specified data to a single preset transmission module may be too slow. Therefore, the current processing status and preset processing threshold of each preset transmission module can be determined first. Then, based on the current processing status and preset processing threshold of each preset transmission module, the remaining processing capacity of each preset transmission module can be determined. Finally, the specified data is sent to the preset transmission module according to the quantity of specified data and the remaining processing capacity of each preset transmission module.
[0054] For example, if there are three preset transmission modules, namely A, B and C, and A has 3 data transmissions remaining, B has 2 data transmissions remaining, and C has 1 data transmission remaining, and the specified number of data is 6, then 3 specified data can be assigned to preset transmission module A, 2 specified data can be assigned to preset transmission module B, and 1 specified data can be assigned to preset transmission module C.
[0055] In addition, when using the preset transmission module to transfer specified data to the preset storage module, the transmission needs to be carried out according to the protocol. Specifically, the selection of the transmission protocol can be to first obtain multiple historical transmission data, then determine the data characteristics of the multiple historical transmission data, and then determine the data characteristics of the specified data.
[0056] The system then compares the characteristics of the specified data with those of historical data to determine which historical data shares the same characteristics. Once the historical data with the same characteristics is identified, the system examines the protocol used to transmit that data. Based on this protocol type, it matches the corresponding transmission protocol packet in the database. The transmission protocol included in this packet is then determined as the necessary protocol for transmitting the specified data. In this way, by acquiring historical data, the system can automatically match the transmission protocol for the specified data. Compared to existing technologies, this method eliminates the need for manual specification of the transmission protocol, making it faster and more intelligent.
[0057] It should be noted that the target protocol packet contains the data acquisition protocol, which is responsible for collecting data from IoT devices, while the transmission protocol is responsible for transmitting the processed specified data to the preset storage module of the management system. The two can be the same or different.
[0058] After transmitting the specified data to the preset storage module, it is possible to determine whether there is any risky data in the specified data based on the preset thresholds corresponding to the target IoT device. If so, the risky data can be specially marked when the specified data is sent to the display terminal for display, so as to remind the staff to pay attention.
[0059] In addition, if the management system determines that there is risky data, it can control the relevant functions in the target IoT device corresponding to the risky data. The control method can be to send control commands through the control interface of the connector.
[0060] It should be noted that after storing the specified data in the preset storage module, the front end can also call it independently. Specifically, it can initiate a call request on the preset front end interface, and the back end of the management system can immediately return the data result to the front end after receiving the request.
[0061] Furthermore, as a response to the above Figure 1 In addition to the implementation of the method shown, this embodiment of the invention also provides a data acquisition device for the above-described data acquisition. Figure 1 The method shown is used for implementation. This device embodiment corresponds to the foregoing method embodiment. For ease of reading, this device embodiment will not repeat the details of the foregoing method embodiment, but it should be clear that the device in this embodiment can implement all the contents of the foregoing method embodiment. Figure 3 As shown, the device includes:
[0062] Detection unit 301 is used to detect whether the IoT platform is faulty;
[0063] The acquisition unit 302 is used to acquire a target protocol packet if the detection unit 301 detects a fault. The target protocol packet includes the device interface and control interface of the target IoT device and its subordinate devices, the data interface for acquiring data in the target IoT device and its subordinate devices, and the data acquisition protocol.
[0064] Establishment unit 303 is used to establish a connector based on the target protocol packet obtained by acquisition unit 302, the connector being used to connect the target IoT device;
[0065] The acquisition unit 304 is used to acquire target data in the target IoT device based on the connector established by the establishment unit 303.
[0066] Furthermore, as a response to the above Figure 2 In addition to the method shown, this embodiment of the invention also provides another data acquisition device for the above-described data acquisition method. Figure 2 The method shown is used for implementation. This device embodiment corresponds to the foregoing method embodiment. For ease of reading, this device embodiment will not repeat the details of the foregoing method embodiment, but it should be clear that the device in this embodiment can implement all the contents of the foregoing method embodiment. Figure 4 As shown, the device includes:
[0067] Detection unit 301 is used to detect whether the IoT platform is faulty;
[0068] The acquisition unit 302 is used to acquire a target protocol packet if the detection unit 301 detects a fault. The target protocol packet includes the device interface and control interface of the target IoT device and its subordinate devices, the data interface for acquiring data in the target IoT device and its subordinate devices, and the data acquisition protocol.
[0069] Establishment unit 303 is used to establish a connector based on the target protocol packet obtained by acquisition unit 302, the connector being used to connect the target IoT device;
[0070] The acquisition unit 304 is used to acquire target data in the target IoT device based on the connector established by the establishment unit 303.
[0071] In one optional implementation, the acquisition unit 304 includes:
[0072] The request sending module 3041 is used to send a data acquisition request for the target IoT device to the preset acquisition module according to a preset time interval in the connector using a preset timing module. The data acquisition request includes the name of the target IoT device.
[0073] The data acquisition module 3042 is used to acquire target data in the target IoT device based on the connector after the preset acquisition module receives the data acquisition request sent by the request sending module 3041.
[0074] In an optional embodiment, after the acquisition unit 304 acquires target data from the target IoT device using the preset acquisition module based on the connector, the device further includes a data processing unit 305, the data processing unit 305 comprising:
[0075] Data parsing module 3051 is used to parse the target data using the preset acquisition module to obtain parsed target data;
[0076] Data filtering module 3052 is used to filter the target data parsed by data parsing module 3051 based on the data processing rules in the connector, so as to obtain the specified filtered data.
[0077] The data transmission module 3053 is used to send the specified data filtered by the data filtering module 3052 to the preset transmission module, and use the preset transmission module to transmit the specified data to the preset storage module.
[0078] In one optional implementation, when the data transmission module 3053 sends the specified data to the preset transmission module, it includes:
[0079] The quantity determination submodule 30531 is used to determine the quantity of the specified data and the quantity of the preset transmission modules;
[0080] The threshold determination submodule 30532 is used to determine the current processing status and preset processing threshold of each preset transmission module if the quantity determination submodule 30531 determines that the number of preset transmission modules and the number of specified data are both multiple.
[0081] The situation determination submodule 30533 is used to determine the remaining processable status of each preset transmission module based on the current processing status of each preset transmission module determined by the threshold determination submodule 30532 and the preset processing threshold.
[0082] The data sending submodule 30534 is used to send the specified data to the preset transmission module based on the quantity of the specified data and the remaining processing capacity of each preset transmission module determined by the situation determination submodule 30533.
[0083] In one optional implementation, when the data transmission module 3053 transmits the specified data to the preset storage module using the preset transmission module, it includes:
[0084] The data acquisition submodule 30535 is used to acquire multiple historical transmission data.
[0085] Feature determination submodule 30536 is used to determine multiple historical data features of the multiple historical transmission data and the specified data features of the specified data acquired by the data acquisition submodule 30535;
[0086] Protocol determination submodule 30537 is used to determine the transmission protocol for transmitting the specified data based on multiple historical data features determined by the feature determination submodule 30536 and the specified data features;
[0087] The data transmission submodule 30538 is used to transmit the specified data to the preset storage module using the transmission protocol determined by the protocol determination submodule 30537.
[0088] In one optional implementation, the protocol determination submodule 30537 is specifically used for:
[0089] The protocol type of the specified data is determined based on the multiple historical data features and the specified data features.
[0090] Based on the protocol type, a corresponding transport protocol packet is matched in the database, and the transport protocol packet includes the transport protocol required to transmit data.
[0091] The transport protocol in the transport protocol packet is determined to be the transport protocol for transmitting the specified data.
[0092] In an optional embodiment, after the data transmission submodule 30538 transmits the specified data to the preset storage module using the transmission protocol, the device further includes a data display unit 306, the data display unit 306 comprising:
[0093] Risk data determination module 3061 is used to determine whether risk data exists in the specified data;
[0094] The risk data marking module 3062 is used to mark the risk data in the display terminal when the specified data is displayed, if the risk data determination module 3061 determines that the risk data is true.
[0095] Furthermore, embodiments of the present invention also provide a storage medium for storing a computer program, wherein the computer program, when running, controls the device where the storage medium is located to execute the above-described... Figure 1-2The data acquisition method described herein.
[0096] Furthermore, embodiments of the present invention also provide an electronic device, including: at least one processor, and at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other via the bus; the processor is used to call program instructions in the memory to execute the above-mentioned... Figure 1-2 The data acquisition method described in [the document].
[0097] Furthermore, embodiments of the present invention provide an electronic device, such as... Figure 5 As shown, Figure 5 A block diagram of an electronic device 50 according to an embodiment of the present invention is shown. The electronic device 50 includes at least one processor 501, at least one memory 502 connected to the processor 501, and a bus 503; wherein the processor 501 and the memory 502 communicate with each other via the bus 503. The processor 501 is used to call program instructions in the memory 502 to execute the aforementioned data acquisition method. The device described herein may be a server, PC, PAD, mobile phone, etc.
[0098] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0099] It is understood that the relevant features in the above methods and apparatus can be referenced interchangeably. Furthermore, the terms "first," "second," etc., in the above embodiments are used to distinguish between embodiments and do not represent the superiority or inferiority of any particular embodiment.
[0100] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0101] The algorithms and displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings herein. The required structure for constructing such systems is apparent from the above description. Furthermore, this invention is not directed to any particular programming language. It should be understood that the contents of the invention described herein can be implemented using various programming languages, and the above description of specific languages is for the purpose of disclosing the best mode of implementation of the invention.
[0102] In addition, the memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0103] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0104] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0105] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0106] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0107] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0108] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, like read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0109] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0110] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0111] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0112] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A data acquisition method, characterized in that, The method includes: Detect whether the IoT platform is malfunctioning; If a fault occurs, a target protocol packet is obtained. The target protocol packet includes the device interface and control interface of the target IoT device and its subordinate devices, the data interface for obtaining data from the target IoT device and its subordinate devices, and the data acquisition protocol. The target protocol packet is constructed based on the development documentation of the target IoT device provided by the manufacturer. The target protocol packet is saved to the database of the management system. The target protocol packet is loaded using a loader, and a connector is established based on the target protocol packet. The connector is used to connect the target IoT device. The connector includes the device interface, the data interface, the control interface, and the data acquisition protocol. The connector is located in the management system. The target data in the target IoT device is collected based on the connector.
2. The method according to claim 1, characterized in that, Based on the connector, target data in the target IoT device is collected, including: Using a preset timing module, a data acquisition request for the target IoT device is sent to a preset acquisition module at preset time intervals in the connector. The data acquisition request includes the name of the target IoT device. After receiving the data acquisition request, the preset acquisition module uses the preset acquisition module to acquire target data in the target IoT device based on the connector.
3. The method according to claim 2, characterized in that, After collecting target data from the target IoT device using the preset acquisition module and based on the connector, the method further includes: The target data is parsed using the preset acquisition module to obtain the parsed target data; The parsed target data is filtered based on the data processing rules in the connector to obtain the filtered specified data. The specified data is sent to a preset transmission module, and the specified data is then transmitted to a preset storage module using the preset transmission module.
4. The method according to claim 3, characterized in that, Sending the specified data to a preset transmission module includes: Determine the quantity of the specified data and the quantity of the preset transmission modules; If both the number of preset transmission modules and the number of specified data are multiple, then determine the current processing status and preset processing threshold of each preset transmission module. The remaining processable status of each preset transmission module is determined based on its current processing status and preset processing threshold. The specified data is sent to the preset transmission module based on the quantity of the specified data and the remaining processing capacity of each preset transmission module.
5. The method according to claim 3, characterized in that, The process of transmitting the specified data to the preset storage module using the preset transmission module includes: Retrieve multiple historical transmission data; Determine multiple historical data features of the multiple historical transmitted data and specified data features of the specified data; The transmission protocol for transmitting the specified data is determined based on the multiple historical data features and the specified data features. The specified data is transmitted to the preset storage module using the transmission protocol.
6. The method according to claim 5, characterized in that, Determining the transmission protocol for transmitting the specified data based on the multiple historical data features and the specified data features includes: The protocol type of the specified data is determined based on the multiple historical data features and the specified data features. Based on the protocol type, a corresponding transport protocol packet is matched in the database, and the transport protocol packet includes the transport protocol required to transmit data. The transport protocol in the transport protocol packet is determined to be the transport protocol for transmitting the specified data.
7. The method according to claim 5, characterized in that, After transmitting the specified data to the preset storage module using the transmission protocol, the method further includes: Determine whether there is any risky data in the specified data; If so, when displaying the specified data to the display terminal, the risk data will be marked as risk in the display terminal.
8. A data acquisition device, characterized in that, The device includes: The detection unit is used to detect whether the IoT platform is malfunctioning. The acquisition unit is used to acquire a target protocol packet if the detection unit detects a fault. The target protocol packet includes the device interface and control interface of the target IoT device and its subordinate devices, the data interface for acquiring data from the target IoT device and its subordinate devices, and a data acquisition protocol. The target protocol packet is constructed based on the development documentation of the target IoT device provided by the manufacturer. The target protocol packet is saved in the database of the management system. The establishment unit is used to load the target protocol packet using a loader, and establish a connector based on the target protocol packet obtained by the acquisition unit. The connector is used to connect the target IoT device. The connector includes the device interface, the data interface, the control interface, and the data acquisition protocol. The connector is located in the management system. The acquisition unit is used to acquire target data from the target IoT device based on the connector established by the establishment unit.
9. A storage medium, characterized in that, The storage medium includes a stored program, wherein, when the program is executed, it controls the device containing the storage medium to perform the data acquisition method as described in any one of claims 1 to 7.
10. An electronic device, characterized in that, include: At least one processor, and at least one memory and bus connected to the processor; wherein the processor and the memory communicate with each other via the bus; The processor is used to invoke program instructions in the memory to execute the data acquisition method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Novel industrial Internet of Things architecture and implementation method thereof
CN109981692A
Edge internet-of-things agent node operation and maintenance method and system, storage medium and computing equipment
CN113726556A
Rice supply chain digital twinborn model construction method based on identification analysis system
CN115345987A