Data acquisition method and device
By detecting IoT platform failures and using pre-set target protocol packages to establish connectors, the problem of data acquisition and disconnection caused by IoT platform failures is solved, and data acquisition capabilities are achieved in the case of failures are improved, and the stability and efficiency of the system are improved. .
Patent Information
- Application Number
- CN202310564854.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-18
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2043-05-18
AI Technical Summary
When the IoT platform fails, the management system cannot collect data from the IoT device, affecting control management.
Provide a data acquisition method and device, by detecting the failure of the IoT platform, obtaining pre-set target protocol packages, establishing a connector to connect to the IoT device, collecting data, and ensuring that data can be collected normally even if the IoT platform fails.
It realizes the function of still being able to collect IoT device data when the IoT platform fails. The process is simple and efficient, and avoids data acquisition and interruption.
Smart Images

Figure CN119011613A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data acquisition, and in particular to a data acquisition method and device. Background Art
[0002] With the continuous development of science and technology, the application of Internet of Things technology is becoming more and more extensive, and a management system has emerged to achieve the control and management of Internet of Things devices.
[0003] When the management system controls and manages the IoT devices, it needs to first collect data from the IoT devices through the IoT platform between the management system and the IoT devices, and then determine whether it needs to send relevant control instructions to the IoT devices based on the collected data from the IoT devices.
[0004] But the problem with this method is that once the IoT platform fails, the management system will not be able to collect data from the IoT devices. Summary of the invention
[0005] In view of the above problems, the present invention provides a data collection method and device, the main purpose of which is to solve the problem that when an IoT platform fails, the management system will be unable to collect data from IoT devices.
[0006] In order to solve the above technical problems, the present invention proposes the following solutions:
[0007] In a first aspect, the present invention provides a data collection method, the method comprising:
[0008] Check whether the IoT platform is faulty;
[0009] If a fault occurs, a target protocol package is obtained, wherein the target protocol package includes a device interface of the target IoT device and its subordinate devices, a control interface, a data interface for obtaining data in the target IoT device and its subordinate devices, and a data acquisition protocol;
[0010] Establishing a connector based on the target protocol packet, wherein 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] A detection unit, used to detect whether the IoT platform is faulty;
[0014] an acquisition unit, configured to acquire a target protocol package if the detection unit detects a fault, wherein the target protocol package includes a device interface of a target IoT device and a subordinate device of the target IoT device, a control interface, a data interface for acquiring data in the target IoT device and a subordinate device of the target IoT device, and a data acquisition protocol;
[0015] an establishing unit, configured to establish a connector based on the target protocol packet acquired by the acquiring unit, wherein the connector is used to connect the target IoT device;
[0016] A collection unit is used to collect target data in the target IoT device based on the connector established by the establishment unit.
[0017] In order to achieve the above-mentioned purpose, according to a third aspect of the present invention, a storage medium is provided, wherein the storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the data acquisition method of the first aspect.
[0018] In order to achieve the above-mentioned purpose, according to the fourth aspect of the present invention, an electronic device is provided, which includes 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 through the bus; and the processor is used to call the program instructions in the memory to execute the data acquisition method of the first aspect mentioned above.
[0019] Through the above technical scheme, a data acquisition method and device provided by the present invention can pre-set the target protocol package of the target IoT device. In this way, if the original IoT platform fails when collecting data in the target IoT device, the target protocol package can be obtained, and then a connector connecting the target IoT device can be created based on the device interface, control interface, and data interface for obtaining data in the target IoT device and the subordinate devices of the target IoT device in the target protocol package. After the creation is completed, the target data in the target IoT device can be collected based on the connector. In this way, even if the IoT platform fails, data can still be collected normally, and the process is simple. It only needs to obtain the pre-deployed protocol package and then create a connector, which is highly efficient.
[0020] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0022] Figure 1 A flow chart of a data collection method provided by an embodiment of the present invention is shown;
[0023] Figure 2 Another data collection method flow chart provided by an embodiment of the present invention is shown;
[0024] Figure 3 A block diagram showing a data acquisition device according to an embodiment of the present invention is shown;
[0025] Figure 4 A block diagram showing another data acquisition device provided by an embodiment of the present invention is shown;
[0026] Figure 5 A block diagram of an electronic device according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0027] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0028] With the continuous development of science and technology, the application of Internet of Things technology is becoming more and more extensive, and a management system has been created to realize the control and management of Internet of Things devices. When the management system controls and manages the Internet of Things devices, it is necessary to first collect the data in the Internet of Things devices through the Internet of Things platform between the management system and the Internet of Things devices, and then determine whether it is necessary to send relevant control instructions to the Internet of Things devices based on the collected data in the Internet of Things devices. However, the problem with this method is that once the Internet of Things platform fails, the management system will not be able to collect the data in the Internet of Things devices. To this end, the present invention provides a data collection method, which can still collect data from the Internet of Things devices when the Internet of Things platform fails. The specific execution steps are as follows: Figure 1 As shown, including:
[0029] 101. Check whether the IoT platform is faulty.
[0030] 102. If a failure occurs, obtain the target protocol packet.
[0031] Since the general process of the management system collecting data from IoT devices is through the IoT platform, it is necessary for the management system to detect the IoT platform in step 101 to prevent the IoT platform from being used 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, the IoT platform can continue to be used to collect data. If step 101 detects that the IoT platform is faulty, step 102 can be executed.
[0033] In the present invention, the development documents of the target IoT device provided by the manufacturer can be obtained in advance, and then the target protocol package of the IoT device can be constructed according to the development documents, wherein the target protocol package includes the device interface, control interface and data acquisition protocol of the target IoT device and the subordinate device of the target IoT device, and the data interface for obtaining the data in the target IoT device and the subordinate device of the target IoT device, and then the target protocol package can be saved in the database of the management system. In this way, 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 package.
[0035] 104. Collect target data in the target IoT device based on the connector.
[0036] After obtaining the target protocol package, the target protocol package can be loaded using a loader in step 103. After the target protocol package is loaded, a connector can be constructed according to the device interface, control interface, data interface for obtaining data in the target IoT device and the subordinate devices of the target IoT device in the target protocol package, and data acquisition protocol. In this way, the connector includes the device interface, data interface, control interface and data acquisition protocol. Afterwards, in step 104, the device interface in the connector can be used to connect the target IoT device and the subordinate devices of the target IoT device, and then the data interface and data acquisition protocol can be used to collect data in the target IoT device.
[0037] Afterwards, if the collected target IoT device has an abnormality, for example, the value exceeds the set threshold, the control interface in the connector can be used to send control instructions to the target IoT device.
[0038] In the present invention, any IoT device can be a target IoT device, and it does not mean that only the target IoT device is used and controlled. It is just explained from the perspective of the target IoT device. While collecting data from the target IoT device, it is also possible to collect data from the lower-level devices in the target IoT device and control the lower-level devices.
[0039] Based on the above Figure 1 It can be seen from the implementation method that a data acquisition method provided by the present invention can pre-set the target protocol package of the target IoT device. In this way, if the original IoT platform fails when collecting data in the target IoT device, the target protocol package can be obtained, and then a connector connecting the target IoT device can be created based on the device interface, control interface, and data interface for obtaining data in the target IoT device and the subordinate devices of the target IoT device in the target protocol package. After the creation is completed, the target data in the target IoT device can be collected based on the connector. In this way, even if the IoT platform fails, data can still be collected normally, and the process is simple. It only needs to obtain the pre-deployed protocol package and then create a connector, which is highly efficient.
[0040] Furthermore, as a Figure 1 The embodiment shown in the figure is refined and expanded. The embodiment of the present invention also provides another data collection method, such as Figure 2 As shown, the specific steps are as follows:
[0041] 201. Check whether the IoT platform is faulty.
[0042] 202. If a failure occurs, obtain the target protocol packet.
[0043] 203. Establish a connector based on the target protocol packet.
[0044] Among them, the implementation methods of steps 201 to 203 are the same as the implementation contents of steps 101 to 103, and can achieve the same technical effects and solve the same technical problems, and will not be repeated here.
[0045] 204. Collect target data in the target IoT device based on the connector.
[0046] In this step, when constructing the connector, a preset time interval for collecting data is also set. It should be noted that the connector is located in the management system, and the executor of the present 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 expires, the preset timing module can send a data collection request for the target IoT device to the preset collection module in the management system, and the data collection request includes the name of the target IoT device. The reason for including the device name is to distinguish between 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 in the IoT device according to the data interface and data acquisition protocol in the connector.
[0049] 205. Filter the target data to obtain designated data.
[0050] After the preset acquisition module obtains the target data, the target data can be parsed to obtain the parsed target data. In addition, some of the target data may be useless, such as duplicate data, which does not have any beneficial effect. Therefore, the parsed target data can be filtered using the data processing rules in the connector to obtain the filtered specified data. In this way, the bandwidth occupied when transmitting data can be saved.
[0051] 206. Send the designated data to a preset transmission module, and use the preset transmission module to transmit the designated data to a preset storage module.
[0052] After the designated data is obtained, the designated data may be sent to a preset transmission module in the management system, and then the designated data may be transmitted to a preset storage module of the management system via the preset transmission module.
[0053] Specifically, when sending designated data to a preset transmission module, the amount of designated data and the amount of preset transmission modules may be determined first. This is because if both the amount of designated data and the amount of preset transmission modules are multiple, sending all designated data to one preset transmission module for transmission may be too slow. Therefore, the current processing status and the preset processing threshold of each preset transmission module may be determined first, and then the remaining processing status of each preset transmission module may be determined based on the current processing status and the preset processing threshold of each preset transmission module. After that, the designated data may be sent to the preset transmission module based on the amount of designated data and the remaining processing status of each preset transmission module.
[0054] For example, if there are three preset transmission modules, namely A, B, and C, the remaining processable situation of A is that 3 data can be transmitted, the remaining processable situation of B is that 2 data can be transmitted, and the remaining processable situation of C is that 1 data can be transmitted, and the number of designated data is 6, then 3 designated data can be assigned to the preset transmission module A, 2 designated data can be assigned to the preset transmission module B, and 1 designated data can be assigned to the preset transmission module C.
[0055] In addition, when using the preset transmission module to transmit specified data to the preset storage module, it is necessary to transmit 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] After that, the data features of the specified data can be compared with the features of the historical data to determine which historical data has the same data features as the data features of the specified data. After determining the historical data with the same features, you can see which protocol was used to transmit the historical data with the same data features at that time, and then match the corresponding transmission protocol package in the database according to the protocol type of this protocol. After that, the transmission protocol included in the transmission protocol package can be determined as the transmission protocol required to transmit the specified data. In this way, by obtaining historical data, the transmission protocol for transmitting the specified data can be automatically matched. Compared with the existing technology, there is no need to manually specify the transmission protocol, which is faster and smarter.
[0057] It should be noted that the target protocol package contains a data acquisition protocol, which is responsible for collecting data from IoT devices, and the transmission protocol is a protocol 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 the designated data is transmitted to the preset storage module, it is possible to first determine whether there is risk data in the designated data based on the preset thresholds corresponding to the target IoT device. If so, the risk data can be specially marked when the designated data is sent to the display terminal for display, so as to alert the staff.
[0059] In addition, if the management system determines that there is risk data, it can control the relevant functions in the target IoT device corresponding to the risk data, and the control method can be to send control instructions using the control interface of the connector.
[0060] It should be noted that after the specified data is stored in the preset storage module, the front end can also call it autonomously, specifically by initiating a call request in the preset front end interface. After receiving the request, the back end of the management system can immediately return the data results to the front end.
[0061] Furthermore, as a response to the above Figure 1 In order to realize the method shown in the figure, the embodiment of the present invention also provides a data acquisition device for Figure 1 The device embodiment corresponds to the aforementioned method embodiment. For ease of reading, this device embodiment will not repeat the details of the aforementioned method embodiment one by one, but it should be clear that the device in this embodiment can correspond to all the contents of the aforementioned method embodiment. Figure 3 As shown, the device comprises:
[0062] A detection unit 301 is used to detect whether the IoT platform is faulty;
[0063] An acquisition unit 302 is configured to acquire a target protocol package if the detection unit 301 detects a fault, wherein the target protocol package includes a device interface of a target IoT device and a subordinate device of the target IoT device, a control interface, a data interface for acquiring data in the target IoT device and a subordinate device of the target IoT device, and a data acquisition protocol;
[0064] An establishing unit 303, configured to establish a connector based on the target protocol packet acquired by the acquiring unit 302, wherein the connector is used to connect the target IoT device;
[0065] The collecting unit 304 is used to collect the target data in the target IoT device based on the connector established by the establishing unit 303.
[0066] Furthermore, as a response to the above Figure 2 In order to realize the method shown in the figure, the embodiment of the present invention also provides another data acquisition device for Figure 2 The device embodiment corresponds to the aforementioned method embodiment. For ease of reading, this device embodiment will not repeat the details of the aforementioned method embodiment one by one, but it should be clear that the device in this embodiment can correspond to all the contents of the aforementioned method embodiment. Figure 4 As shown, the device comprises:
[0067] A detection unit 301 is used to detect whether the IoT platform is faulty;
[0068] An acquisition unit 302 is configured to acquire a target protocol package if the detection unit 301 detects a fault, wherein the target protocol package includes a device interface of a target IoT device and a subordinate device of the target IoT device, a control interface, a data interface for acquiring data in the target IoT device and a subordinate device of the target IoT device, and a data acquisition protocol;
[0069] An establishing unit 303 is used to establish a connector based on the target protocol packet acquired by the acquiring unit 302, wherein the connector is used to connect the target IoT device;
[0070] The collecting unit 304 is used to collect the target data in the target IoT device based on the connector established by the establishing unit 303.
[0071] In an optional implementation, the acquisition unit 304 includes:
[0072] A request sending module 3041 is used to use a preset timing module to send a data collection request of the target IoT device to a preset collection module according to a preset time interval in the connector, wherein the data collection request includes the name of the target IoT device;
[0073] The data acquisition module 3042 is used to collect the target data in the target IoT device based on the connector using the preset acquisition module after the preset acquisition module receives the data acquisition request sent by the request sending module 3041.
[0074] In an optional implementation, after the acquisition unit 304 uses the preset acquisition module to acquire the target data in the target IoT device based on the connector, the device further includes a data processing unit 305, and the data processing unit 305 includes:
[0075] The data analysis module 3051 is used to analyze the target data using the preset acquisition module to obtain the analyzed target data;
[0076] The data filtering module 3052 is used to filter the target data parsed by the data parsing module 3051 based on the data processing rules in the connector to obtain the filtered designated 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 an optional implementation manner, 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 the preset processing threshold of each preset transmission module if the quantity determination submodule 30531 determines that the quantity of the preset transmission modules and the quantity of the specified data are both plural;
[0081] A situation determination submodule 30533, configured to determine the remaining processable situation of each preset transmission module based on the current processing situation 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 amount of the specified data and the remaining processable situation of each preset transmission module determined by the situation determination submodule 30533.
[0083] In an optional implementation manner, when the data transmission module 3053 uses the preset transmission module to transmit the specified data to the preset storage module, it includes:
[0084] The data acquisition submodule 30535 is used to acquire a plurality of historical transmission data;
[0085] A feature determination submodule 30536, used to determine the multiple historical data features of the multiple historical transmission data acquired by the data acquisition submodule 30535 and the specified data features of the specified data;
[0086] A protocol determination submodule 30537, configured to determine a transmission protocol for transmitting the specified data based on the multiple historical data features determined by the feature determination submodule 30536 and the specified data feature;
[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 an optional implementation manner, the protocol determination submodule 30537 is specifically used to:
[0089] Determining a protocol type of the designated data based on the plurality of historical data features and the designated data features;
[0090] Matching a corresponding transmission protocol package in a database based on the protocol type, wherein the transmission protocol package includes a transmission protocol required for transmitting data;
[0091] The transmission protocol in the transmission protocol packet is determined as the transmission protocol for transmitting the specified data.
[0092] In an optional implementation manner, 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, and the data display unit 306 includes:
[0093] A risk data determination module 3061 is used to determine whether there is risk data in the specified data;
[0094] The risk data marking module 3062 is used to mark the risk data as a risk in the display terminal when displaying the designated data on the display terminal if the risk data determination module 3061 determines that the risk data is yes.
[0095] Furthermore, an embodiment of the present invention further provides a storage medium, wherein the storage medium is used to store a computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute the above Figure 1-2The data collection method described in .
[0096] Furthermore, an embodiment of the present invention also provides an electronic device, comprising: 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 through the bus; the processor is used to call the program instructions in the memory to execute the above Figure 1-2 The data collection method described in .
[0097] Furthermore, an embodiment of the present invention provides an electronic device, such as Figure 5 As shown, Figure 5 A block diagram of an electronic device 50 is shown according to an embodiment of the present invention. 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 through the bus 503. The processor 501 is used to call the program instructions in the memory 502 to execute the above-mentioned data acquisition method. The device in this article can be a server, a PC, a PAD, a mobile phone, etc.
[0098] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0099] It is understandable that the related features in the above methods and devices can be referenced to each other. In addition, the "first", "second" and the like in the above embodiments are used to distinguish the embodiments, but do not represent the advantages and disadvantages of the embodiments.
[0100] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0101] The algorithm and display provided herein are not inherently related to any particular computer, virtual system or other device. Various general purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious that the structure required for constructing such systems. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages can be utilized to realize the content of the present invention described herein, and the description of the above specific languages is for disclosing the best mode of the present invention.
[0102] In addition, the memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0103] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0104] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0105] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0106] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function 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] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0109] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules 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 technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0110] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0111] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0112] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A data collection method, characterized in that: The method comprises: Check whether the IoT platform is faulty; If a fault occurs, a target protocol package is obtained, wherein the target protocol package includes a device interface of the target IoT device and its subordinate devices, a control interface, a data interface for obtaining data in the target IoT device and its subordinate devices, and a data acquisition protocol; Establishing a connector based on the target protocol packet, wherein the connector is used to connect the target IoT device; The target data in the target IoT device is collected based on the connector.
2. The method according to claim 1, characterized in that Collecting target data in the target IoT device based on the connector includes: Using a preset timing module, sending a data collection request of the target IoT device to a preset collection module according to a preset time interval in the connector, wherein the data collection request includes the name of the target IoT device; After the preset acquisition module receives the data acquisition request, the preset acquisition module is used to acquire target data in the target IoT device based on the connector.
3. The method according to claim 2, characterized in that After using the preset acquisition module to acquire the target data in the target IoT device based on the connector, the method further includes: Utilizing the preset acquisition module to parse the target data to obtain parsed target data; Filter the parsed target data based on the data processing rules in the connector to obtain filtered designated data; The designated data is sent to a preset transmission module, and the preset transmission module is used to transmit the designated data to a preset storage 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 the number of the preset transmission modules and the number of the designated data are both plural, determining the current processing status and the preset processing threshold of each preset transmission module; Determine the remaining processing status of each preset transmission module based on the current processing status of each preset transmission module and the preset processing threshold; The designated data is sent to the preset transmission module based on the amount of the designated data and the remaining processing capacity of each preset transmission module.
5. The method according to claim 3, characterized in that: Utilizing the preset transmission module to transmit the specified data to the preset storage module includes: Get multiple historical transmission data; Determining a plurality of historical data features of the plurality of historical transmission data and a specified data feature of the specified data; Determining a transmission protocol for transmitting the specified data based on the multiple historical data characteristics and the specified data characteristics; The designated data is transmitted to the preset storage module using the transmission protocol.
6. The method according to claim 5, characterized in that Determining a transmission protocol for transmitting the specified data based on the multiple historical data features and the specified data features includes: Determining a protocol type of the designated data based on the plurality of historical data features and the designated data features; Matching a corresponding transmission protocol package in a database based on the protocol type, wherein the transmission protocol package includes a transmission protocol required for transmitting data; The transmission protocol in the transmission protocol packet is determined as the transmission protocol for transmitting the specified data.
7. The method according to claim 5, characterized in that After transmitting the designated data to the preset storage module by using the transmission protocol, the method further includes: Determining whether there is risk data in the specified data; If so, when the designated data is displayed on the display terminal, the risk data is marked as risk in the display terminal.
8. A data acquisition device, characterized in that: The device comprises: A detection unit, used to detect whether the IoT platform is faulty; an acquisition unit, configured to acquire a target protocol package if the detection unit detects a fault, wherein the target protocol package includes a device interface of a target IoT device and a subordinate device of the target IoT device, a control interface, a data interface for acquiring data in the target IoT device and a subordinate device of the target IoT device, and a data acquisition protocol; an establishing unit, configured to establish a connector based on the target protocol packet acquired by the acquiring unit, wherein the connector is used to connect the target IoT device; A collection unit is used to collect target data in 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, the device where the storage medium is located is controlled to execute the data acquisition method according to 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 a bus connected to the processor; wherein the processor and the memory communicate with each other through the bus; The processor is used to call the program instructions in the memory to execute the data acquisition method according to any one of claims 1 to 7.
Citation Information
Patent Citations
IOT (internet-of-thing) gateway realization device
CN107508753A
Novel industrial Internet of Things architecture and implementation method thereof
CN109981692A
Message blacklist generation method for electric power Internet-of-Things management platform
CN112261069A
Internet-of-things application management system and method
CN112733062A
Internet-of-Things center, system and communication method
CN112769926A
