CN112347170A - Data acquisition method, device, equipment and computer readable storage medium - Google Patents

Data acquisition method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN112347170A
CN112347170A CN202011160163.8A CN202011160163A CN112347170A CN 112347170 A CN112347170 A CN 112347170A CN 202011160163 A CN202011160163 A CN 202011160163A CN 112347170 A CN112347170 A CN 112347170A
Authority
CN
China
Prior art keywords
data
configuration table
time
data acquisition
industrial equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011160163.8A
Other languages
Chinese (zh)
Other versions
CN112347170B (en
Inventor
汪云
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Inovance Technology Co Ltd
Original Assignee
Shenzhen Inovance Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Inovance Technology Co Ltd filed Critical Shenzhen Inovance Technology Co Ltd
Priority to CN202011160163.8A priority Critical patent/CN112347170B/en
Publication of CN112347170A publication Critical patent/CN112347170A/en
Application granted granted Critical
Publication of CN112347170B publication Critical patent/CN112347170B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/254Extract, transform and load [ETL] procedures, e.g. ETL data flows in data warehouses
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2308Concurrency control
    • G06F16/2315Optimistic concurrency control
    • G06F16/2322Optimistic concurrency control using timestamps
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Computer And Data Communications (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides a data acquisition method, a device, equipment and a computer readable storage medium, wherein the method comprises the following steps: receiving a data acquisition instruction issued by a cloud server; searching a real-time data configuration table corresponding to the industrial equipment according to the identification of the industrial equipment, and monitoring the operation data of the industrial equipment in real time according to the communication address and the communication protocol type of the industrial equipment and the data type to be monitored in the real-time data configuration table; judging whether the monitored operation data of the industrial equipment meets the data storage triggering condition in the black box data configuration table; and if the data storage triggering condition is met, storing the corresponding data according to the data type needing to be stored and the period of the stored data in the black box data configuration table. The embodiment of the invention can adopt different drivers to collect industrial data aiming at the industrial equipment supporting different communication protocols, and simultaneously supports the data collection of the industrial equipment adopting different communication protocol types.

Description

Data acquisition method, device, equipment and computer readable storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a data acquisition method, apparatus, device, and computer-readable storage medium.
Background
At present, data acquisition is generally to transmit data of the industrial equipment to a cloud server through an acquisition device. For the data collection of the industrial equipment, the industrial data in the industrial equipment with different communication protocols cannot be collected due to the fact that the types of the industrial equipment are multiple and the communication protocols are different. Moreover, because the storage space of the industrial equipment is small, the industrial data cannot be stored in a large amount, and the industrial data needs to be transmitted to other storage equipment in time.
Disclosure of Invention
The invention mainly aims to provide a data acquisition method, a data acquisition device, data acquisition equipment and a computer readable storage medium, and aims to call a corresponding driver to acquire industrial data generated by industrial equipment according to a communication protocol supported by the industrial equipment.
In order to achieve the above object, the present invention provides a data acquisition method applied to a data acquisition device, where the data acquisition device is in communication connection with a cloud server and at least one industrial device, a real-time data configuration table and a black box data configuration table corresponding to the industrial device are pre-configured in the data acquisition device, the real-time data configuration table at least includes an identifier of the industrial device and a data type of the industrial device to be monitored, and the black box data configuration table at least includes a data storage trigger condition, a data type to be stored, and a data storage period, where the data acquisition method includes:
receiving a data acquisition instruction issued by the cloud server, wherein the data acquisition instruction carries an identifier, a communication address and a communication protocol type of industrial equipment to be acquired;
searching a real-time data configuration table corresponding to the industrial equipment according to the identification of the industrial equipment, and monitoring the operation data of the industrial equipment in real time according to the communication address and the communication protocol type of the industrial equipment and the data type to be monitored in the real-time data configuration table;
judging whether the monitored operation data of the industrial equipment meets a data storage triggering condition in the black box data configuration table;
and if the data storage triggering condition is met, storing corresponding data according to the data type to be stored and the period of the stored data in the black box data configuration table.
Optionally, saving the corresponding data according to the data type to be saved and the period of the saved data in the black box data configuration table includes:
if the cloud server is online, judging whether the data type required to be stored in the black box data configuration table exists in the operation data monitored by the real-time data configuration table;
and if the operation data exists in the operation data monitored by the real-time data configuration table, packaging the operation data corresponding to the data type to be stored according to the period of the stored data and a preset format, adding a communication protocol version used for collecting the operation data, and then sending the packaged operation data to the cloud server for storage.
Optionally, if the cloud server is online, the determining whether the data type to be stored in the black box data configuration table exists in the operating data monitored by the real-time data configuration table further includes:
and if the fault information does not exist in the operation data monitored by the real-time data configuration table, sending corresponding fault prompt information to the cloud server.
Optionally, saving the corresponding data according to the data type to be saved and the period of the saved data in the black box data configuration table includes:
if the cloud server is offline, judging whether the local storage capacity of the data acquisition equipment exceeds the limit;
if the local storage capacity of the data acquisition equipment exceeds the limit, after sleeping for a preset time, returning to the step of judging whether the monitored running data meets the data storage triggering condition in the black box data configuration table;
if the local storage capacity of the data acquisition equipment is not over-limit, judging whether the data type to be stored in the black box data configuration table exists in the operation data monitored by the real-time data configuration table;
if the operation data exists in the operation data monitored by the real-time data configuration table, the operation data corresponding to the data type needing to be stored is packaged according to the period of the stored data and a preset format, a communication protocol version used for collecting the operation data is added, and then the packaged operation data is stored to the local part of the data collection equipment.
Optionally, after the determining whether the data type required to be stored in the black box data configuration table exists in the operation data monitored by the real-time data configuration table, the method further includes:
and if the fault information does not exist in the operation data monitored by the real-time data configuration table, generating corresponding fault prompt information, and sending the fault prompt information to the cloud server when the cloud server is on line.
Optionally, the storing the packed operating data to the local of the data acquisition device includes:
judging whether the system time of the data acquisition equipment is synchronous with the time of the cloud server or not;
if the time is synchronous, storing the packed operating data into a local updated timestamp folder of the data acquisition equipment;
and if the time is not synchronous, storing the packed operating data into a local non-updated timestamp folder of the data acquisition equipment.
Optionally, if the time is not synchronized, after storing the packed operation data in a local non-updated timestamp file of the data acquisition device, the method includes:
monitoring whether the system time of the data acquisition equipment is synchronized with the time of the cloud server;
if the time synchronization with the cloud server is achieved, whether the timestamp file to be updated in the timestamp folder is to be updated or not is inquired;
and if the time stamp file is to be updated, updating the time stamp of the time stamp file to be updated, writing the file with the updated time stamp into the updated time stamp folder, and deleting the time stamp file to be updated from the time stamp folder to be updated.
In addition, in order to achieve the above object, the present invention also provides a data acquisition apparatus, comprising:
the instruction acquisition module is used for receiving a data acquisition instruction issued by the cloud server, wherein the data acquisition instruction carries an identifier, a communication address and a communication protocol type of industrial equipment to be acquired;
the data monitoring module is used for searching a real-time data configuration table corresponding to the industrial equipment according to the identification of the industrial equipment and monitoring the operation data of the industrial equipment in real time according to the communication address and the communication protocol type of the industrial equipment and the data type to be monitored in the real-time data configuration table;
the condition judgment module is used for judging whether the monitored operation data of the industrial equipment meets the data storage triggering condition in the black box data configuration table;
and the data storage module is used for storing corresponding data according to the data type to be stored and the period of the stored data in the black box data configuration table if the data storage triggering condition is met.
Optionally, the data saving module may include:
the type judging unit is used for judging whether the data type needing to be stored in the black box data configuration table exists in the operation data monitored by the real-time data configuration table or not if the cloud server is online;
and if the operation data exists in the operation data monitored by the real-time data configuration table, the data storage unit packs the operation data corresponding to the data type to be stored according to the period of the stored data and a preset format, adds a communication protocol version used for collecting the operation data, and then sends the packed operation data to the cloud server for storage.
Optionally, the data saving module may further include:
the storage capacity judging unit is used for judging whether the local storage capacity of the data acquisition equipment exceeds the limit or not if the cloud server is offline;
a condition returning unit, configured to return to the step of judging whether the monitored operation data meets the data storage triggering condition in the black box data configuration table after sleeping for a preset time if the local storage capacity of the data acquisition device exceeds the limit;
the data monitoring unit is used for judging whether the data type required to be stored in the black box data configuration table exists in the operation data monitored by the real-time data configuration table or not if the local storage capacity of the data acquisition equipment is not over limit;
and if the operation data exists in the operation data monitored by the real-time data configuration table, the data storage unit packs the operation data corresponding to the data type to be stored according to the period of the stored data and a preset format, adds a communication protocol version used for collecting the operation data, and then stores the packed operation data to the local part of the data acquisition equipment.
In addition, in order to achieve the above object, the present invention also provides a data acquisition apparatus, comprising: a memory, a processor and a data acquisition program stored on the memory and executable on the processor, the data acquisition program when executed by the processor implementing the steps of the data acquisition method as described above.
In addition, to achieve the above object, the present invention also provides a computer readable storage medium having a data acquisition program stored thereon, the data acquisition program, when executed by a processor, implementing the steps of the data acquisition method as described above.
The invention provides a data acquisition method, a data acquisition device, equipment and a computer readable storage medium, wherein a data acquisition instruction issued by a cloud server is received, and the data acquisition instruction carries an identifier, a communication address and a communication protocol type of industrial equipment to be acquired; searching a real-time data configuration table corresponding to the industrial equipment according to the identification of the industrial equipment, and monitoring the operation data of the industrial equipment in real time according to the communication address and the communication protocol type of the industrial equipment and the data type to be monitored in the real-time data configuration table; judging whether the monitored operation data of the industrial equipment meets a data storage triggering condition in the black box data configuration table; and if the data storage triggering condition is met, storing corresponding data according to the data type to be stored and the period of the stored data in the black box data configuration table. By the mode, the data acquisition of the industrial equipment which simultaneously supports various communication protocol types can be realized, and the industrial data generated by the industrial equipment can be stored under the conditions of insufficient storage space of the industrial equipment and unstable network; the function of collecting industrial data under the condition of less influence on equipment can be realized.
Drawings
FIG. 1 is a block diagram of a data acquisition system in an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a first embodiment of a data acquisition method according to the present invention;
FIG. 3 is a schematic flow chart of a data acquisition method according to a second embodiment of the present invention;
fig. 4 is a schematic flow chart of a data acquisition method according to a third embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The main solution of the embodiment of the invention is as follows: receiving a data acquisition instruction issued by the cloud server, wherein the data acquisition instruction carries an identifier, a communication address and a communication protocol type of industrial equipment to be acquired; searching a real-time data configuration table corresponding to the industrial equipment according to the identification of the industrial equipment, and monitoring the operation data of the industrial equipment in real time according to the communication address and the communication protocol type of the industrial equipment and the data type to be monitored in the real-time data configuration table; judging whether the monitored operation data of the industrial equipment meets a data storage triggering condition in the black box data configuration table; and if the data storage triggering condition is met, storing corresponding data according to the data type to be stored and the period of the stored data in the black box data configuration table.
The existing data acquisition is that data of the industrial equipment is transmitted to a cloud server through an acquisition device. For the data collection of the industrial equipment, the industrial data in the industrial equipment with different communication protocols cannot be collected due to the fact that the types of the industrial equipment are multiple and the communication protocols are different. Moreover, because the storage space of the industrial equipment is small, the industrial data cannot be stored in a large amount, and the industrial data needs to be transmitted to other storage equipment in time.
The invention aims to call the corresponding driver to acquire the industrial data generated by the industrial equipment according to the communication protocol supported by the industrial equipment.
Fig. 1 is an architecture diagram of a data acquisition system according to an embodiment of the present invention. Only the portions related to the present embodiment are shown for convenience of explanation.
Referring to fig. 1, the data acquisition system in the embodiment of the present invention includes a cloud server 1, a data acquisition device 2, and at least one industrial device 3, where the cloud server 1 and the at least one industrial device 3 are both in communication connection with the data acquisition device 2. And the data acquisition equipment 2 calls different drivers to acquire industrial data in at least one industrial equipment 3 according to the communication protocol type supported by the at least one industrial equipment 3, and uploads the industrial data to the cloud server 1 for storage. Preferably, the data acquisition device 2 includes, but is not limited to, an edge gateway, and the like, and the industrial device 2 includes, but is not limited to, a PLC device.
Based on the architecture diagram of the data acquisition system, the embodiment of the data acquisition method is provided. Fig. 2 is a schematic flow chart of a specific implementation of the data acquisition method according to the embodiment of the present invention.
Referring to fig. 2, a real-time data configuration table and a black box data configuration table corresponding to the industrial device 1 are preconfigured in the data acquisition device 2, where the real-time data configuration table at least includes an identifier of the industrial device and a data type of the industrial device to be monitored, and the black box data configuration table at least includes a data acquisition trigger condition, a data type to be stored, and a period for storing data, and the data acquisition method provided in this embodiment includes the following steps performed by the middle data acquisition device 2 of the system shown in fig. 1:
step S10, receiving a data acquisition instruction issued by the cloud server, wherein the data acquisition instruction carries an identifier, a communication address and a communication protocol type of industrial equipment to be acquired;
in this embodiment, in order to acquire data of different types of industrial equipment, the data acquisition device receives a data acquisition instruction issued by the cloud server, where the data acquisition instruction carries an identifier, a communication address, and a communication protocol type of the industrial equipment to be acquired. Wherein, the data acquisition equipment can be an edge gateway; industrial equipment is typically controlled to operate by a PLC.
Step S20, searching a real-time data configuration table corresponding to the industrial equipment according to the identification of the industrial equipment, and monitoring the operation data of the industrial equipment in real time according to the communication address, the communication protocol type and the data type to be monitored in the real-time data configuration table of the industrial equipment;
in this embodiment, after the data acquisition device acquires the data acquisition instruction, the identifier of the industrial device in the data acquisition instruction of the data acquisition device searches for the real-time data configuration table corresponding to the industrial device, and monitors the operation data of the industrial device in real time according to the communication address and the communication protocol type of the industrial device in the data acquisition instruction of the data acquisition device and the data type to be monitored in the real-time data configuration table.
Step S30, judging whether the monitored operation data of the industrial equipment meets the data acquisition triggering condition in the black box data configuration table;
in this embodiment, after the data acquisition device monitors the operation data of the industrial device, the data acquisition device determines whether the monitored operation data of the industrial device meets the data acquisition triggering condition in the black box data configuration table.
And step S40, if the data acquisition triggering condition is met, storing corresponding data according to the data type to be stored and the period of the stored data in the black box data configuration table.
In this embodiment, when the data acquisition device determines that the monitored operation data of the industrial device meets the data acquisition triggering condition in the black box data configuration table, the data acquisition device stores corresponding data according to the data type and the data storage period that need to be stored in the black box data configuration table.
According to the scheme, the data acquisition instruction issued by the cloud server is received, and the data acquisition instruction carries the identification, the communication address and the communication protocol type of the industrial equipment to be acquired; searching a real-time data configuration table corresponding to the industrial equipment according to the identification of the industrial equipment, and monitoring the operation data of the industrial equipment in real time according to the communication address and the communication protocol type of the industrial equipment and the data type to be monitored in the real-time data configuration table; judging whether the monitored operation data of the industrial equipment meets a data storage triggering condition in the black box data configuration table; and if the data storage triggering condition is met, storing corresponding data according to the data type to be stored and the period of the stored data in the black box data configuration table. Therefore, data acquisition of industrial equipment supporting multiple communication protocol types can be realized, and industrial data generated by the industrial equipment is stored under the conditions of insufficient storage space of the industrial equipment and unstable network; the function of collecting industrial data under the condition of less influence on equipment is realized.
Further, referring to fig. 3, fig. 3 is a schematic flow chart of a data acquisition method according to a second embodiment of the present invention. Based on the above embodiment shown in fig. 2, the step S40 of saving the corresponding data according to the data type to be saved and the period of the saved data in the black box data configuration table may include:
step S41, if the cloud server is on-line, judging whether the data type required to be stored in the black box data configuration table exists in the operation data monitored by the real-time data configuration table;
in this embodiment, after the data acquisition device determines that the monitored operation data of the industrial device meets the data acquisition triggering condition in the black box data configuration table, if the data acquisition device determines that the cloud server is online, the data acquisition device determines whether the data type to be stored in the black box data configuration table exists in the operation data monitored by the real-time data configuration table.
After the step S41 determines whether the data type to be stored in the black box data configuration table exists in the operation data monitored by the real-time data configuration table, the step S41 may include:
and b, if the fault information does not exist in the operation data monitored by the real-time data configuration table, sending corresponding fault prompt information to the cloud server.
In this embodiment, when the data acquisition device determines that the data type required to be stored in the black box data configuration table does not exist in the operating data monitored by the real-time data configuration table, the data acquisition device sends corresponding fault prompt information to the cloud server, so that a user can obtain the fault prompt information of the fault of the acquisition device or the industrial device through the cloud server.
Step S42, if the operation data exists in the operation data monitored by the real-time data configuration table, packing the operation data corresponding to the data type to be stored according to the period of the stored data and a preset format, adding a communication protocol version used for collecting the operation data, and then sending the packed operation data to the cloud server for storage.
In this embodiment, when the data acquisition device determines that the data type to be stored in the black box data configuration table exists in the operation data monitored by the real-time data configuration table, the data acquisition device packages the operation data corresponding to the data type to be stored according to a preset format according to the period of the storage data, adds a communication protocol version used for acquiring the operation data, and then sends the packaged operation data to the cloud server for storage.
According to the scheme, the data acquisition instruction issued by the cloud server is received, and the data acquisition instruction carries the identification, the communication address and the communication protocol type of the industrial equipment to be acquired; searching a real-time data configuration table corresponding to the industrial equipment according to the identification of the industrial equipment, and monitoring the operation data of the industrial equipment in real time according to the communication address and the communication protocol type of the industrial equipment and the data type to be monitored in the real-time data configuration table; judging whether the monitored operation data of the industrial equipment meets a data storage triggering condition in the black box data configuration table; if the data storage triggering condition is met and the cloud server is online, judging whether the data type needing to be stored in the black box data configuration table exists in the operation data monitored by the real-time data configuration table; and if the operation data exists in the operation data monitored by the real-time data configuration table, packaging the operation data corresponding to the data type to be stored according to the period of the stored data and a preset format, adding a communication protocol version used for collecting the operation data, and then sending the packaged operation data to the cloud server for storage. Therefore, data acquisition of industrial equipment supporting multiple communication protocol types can be realized, and industrial data generated by the industrial equipment is stored under the conditions of insufficient storage space of the industrial equipment and unstable network; the function of collecting industrial data under the condition of less influence on equipment is realized. The function of calibrating the time of the industrial data is realized.
Further, referring to fig. 4, fig. 4 is a schematic flow chart of a data acquisition method according to a third embodiment of the present invention. Based on the above embodiment shown in fig. 2, step S40 stores corresponding data according to the data type to be stored and the period of the stored data in the black box data configuration table, and may further include:
step S43, if the cloud server is off-line, judging whether the local storage capacity of the data acquisition equipment exceeds the limit;
in this embodiment, after the data acquisition device determines that the monitored operating data of the industrial device meets the data acquisition triggering condition in the black box data configuration table, if the data acquisition device determines that the cloud server is offline, the data acquisition device determines whether the local storage capacity of the data acquisition device exceeds the limit.
Step S44, if the local storage capacity of the data acquisition equipment is over-limit, after sleeping for a preset time, returning to the step of judging whether the monitored running data meets the data storage triggering condition in the black box data configuration table;
and when the data acquisition equipment judges that the local storage capacity of the data acquisition equipment exceeds the limit, the data acquisition equipment enters the dormancy state. After the data collecting apparatus has been dormant for the preset time, step S30 is executed.
Step S45, if the local storage capacity of the data acquisition device is not exceeded, determining whether the data type to be stored in the black box data configuration table exists in the operation data monitored by the real-time data configuration table;
in this embodiment, when the data acquisition device determines that the local storage capacity of the data acquisition device is not exceeded, it is determined whether the data type to be stored in the black box data configuration table exists in the operation data monitored by the real-time data configuration table.
After the step S45 determines whether the data type to be stored in the black box data configuration table exists in the operation data monitored by the real-time data configuration table, the step S45 may include:
and c, if the fault information does not exist in the operation data monitored by the real-time data configuration table, sending corresponding fault prompt information to the cloud server.
In this embodiment, when the data acquisition device determines that the data type required to be stored in the black box data configuration table does not exist in the operating data monitored by the real-time data configuration table, the data acquisition device sends corresponding fault prompt information to the cloud server, so that a user can obtain the fault prompt information of the fault of the acquisition device or the industrial device through the cloud server.
And step S46, if the operation data exists in the operation data monitored by the real-time data configuration table, packing the operation data corresponding to the data type to be stored according to the period of the stored data and a preset format, adding a communication protocol version used for collecting the operation data, and then storing the packed operation data to the local part of the data collection equipment.
In this embodiment, when the data acquisition device determines that the data type to be stored in the black box data configuration table exists in the operation data monitored by the real-time data configuration table, the data acquisition device packages the operation data corresponding to the data type to be stored according to a preset format according to the period of the storage data, adds a communication protocol version used for acquiring the operation data, and then sends the packaged operation data to the cloud server for storage.
Step S46 is to store the packed operation data locally in the data acquisition device, and may include:
step c1, judging whether the system time of the data acquisition equipment is synchronous with the time of the cloud server;
in this embodiment, after the data acquisition device stores the packed operation data to the local of the data acquisition device, it is determined whether the system time of the data acquisition device is synchronized with the time of the cloud server.
Step c2, if the time is synchronous, storing the packed operation data into a local updated time stamp folder of the data acquisition equipment;
in this embodiment, when the data acquisition device determines that the system time of the data acquisition device is synchronized with the time of the cloud server, the data acquisition device stores the packed operating data into a local updated timestamp folder of the data acquisition device.
And c3, if the time is not synchronous, storing the packed operation data into a local non-updated time stamp folder of the data acquisition equipment.
In this embodiment, when the data acquisition device determines that the system time of the data acquisition device is not synchronized with the time of the cloud server, the data acquisition device stores the packed operating data in a local non-updated timestamp folder of the data acquisition device.
If the time is not synchronized, step c3 may include storing the packaged operation data in a local non-updated timestamp folder of the data collection device
D1, monitoring whether the system time of the data acquisition equipment is synchronized with the time of the cloud server;
in this embodiment, after the data acquisition device stores the packed operating data in the local non-updated timestamp folder of the data acquisition device, the data acquisition device monitors whether the system time of the data acquisition device is synchronized with the time of the cloud server.
Step d2, if the time synchronization with the cloud server is finished, inquiring whether the timestamp file to be updated is to be updated in the timestamp folder;
in this embodiment, when the data acquisition device determines that the system time for monitoring the data acquisition device is synchronized with the time of the cloud server, the data acquisition device queries whether the timestamp file to be updated is to be updated in the timestamp folder.
And d3, if the timestamp file is to be updated, updating the timestamp of the timestamp file to be updated, writing the file with the updated timestamp into the updated timestamp folder, and deleting the timestamp file to be updated from the timestamp folder to be updated.
In this embodiment, when the data acquisition device queries that the timestamp folder to be updated has the timestamp file to be updated, the data acquisition device updates the timestamp of the timestamp file to be updated, writes the file with the updated timestamp into the updated timestamp folder, and deletes the timestamp file to be updated from the timestamp folder to be updated.
According to the scheme, the data acquisition instruction issued by the cloud server is received, and the data acquisition instruction carries the identification, the communication address and the communication protocol type of the industrial equipment to be acquired; searching a real-time data configuration table corresponding to the industrial equipment according to the identification of the industrial equipment, and monitoring the operation data of the industrial equipment in real time according to the communication address and the communication protocol type of the industrial equipment and the data type to be monitored in the real-time data configuration table; judging whether the monitored operation data of the industrial equipment meets a data storage triggering condition in the black box data configuration table; if the data storage triggering condition is met and the cloud server is offline, judging whether the local storage capacity of the data acquisition equipment exceeds the limit; if the local storage capacity of the data acquisition equipment exceeds the limit, after sleeping for a preset time, returning to the step of judging whether the monitored running data meets the data storage triggering condition in the black box data configuration table; if the local storage capacity of the data acquisition equipment is not over-limit, judging whether the data type to be stored in the black box data configuration table exists in the operation data monitored by the real-time data configuration table; if the operation data exists in the operation data monitored by the real-time data configuration table, the operation data corresponding to the data type needing to be stored is packaged according to the period of the stored data and a preset format, a communication protocol version used for collecting the operation data is added, and then the packaged operation data is stored to the local part of the data collection equipment. Therefore, data acquisition of industrial equipment supporting multiple communication protocol types can be realized, and industrial data generated by the industrial equipment is stored under the conditions of insufficient storage space of the industrial equipment and unstable network; the function of collecting industrial data under the condition of less influence on equipment is realized. The function of calibrating the time of the industrial data is realized.
The invention also provides a data acquisition device.
The instruction acquisition module is used for receiving a data acquisition instruction issued by the cloud server, wherein the data acquisition instruction carries an identifier, a communication address and a communication protocol type of industrial equipment to be acquired;
the data monitoring module is used for searching a real-time data configuration table corresponding to the industrial equipment according to the identification of the industrial equipment and monitoring the operation data of the industrial equipment in real time according to the communication address and the communication protocol type of the industrial equipment and the data type to be monitored in the real-time data configuration table;
the condition judgment module is used for judging whether the monitored operation data of the industrial equipment meets the data storage triggering condition in the black box data configuration table;
and the data storage module is used for storing corresponding data according to the data type to be stored and the period of the stored data in the black box data configuration table if the data storage triggering condition is met.
Optionally, the data saving module may include:
the type judging unit is used for judging whether the data type needing to be stored in the black box data configuration table exists in the operation data monitored by the real-time data configuration table or not if the cloud server is online;
and if the operation data exists in the operation data monitored by the real-time data configuration table, the data storage unit packs the operation data corresponding to the data type to be stored according to the period of the stored data and a preset format, adds a communication protocol version used for collecting the operation data, and then sends the packed operation data to the cloud server for storage.
Optionally, the data saving module may further include:
the storage capacity judging unit is used for judging whether the local storage capacity of the data acquisition equipment exceeds the limit or not if the cloud server is offline;
a condition returning unit, configured to return to the step of judging whether the monitored operation data meets the data storage triggering condition in the black box data configuration table after sleeping for a preset time if the local storage capacity of the data acquisition device exceeds the limit;
the data monitoring unit is used for judging whether the data type required to be stored in the black box data configuration table exists in the operation data monitored by the real-time data configuration table or not if the local storage capacity of the data acquisition equipment is not over limit;
and if the operation data exists in the operation data monitored by the real-time data configuration table, the data storage unit packs the operation data corresponding to the data type to be stored according to the period of the stored data and a preset format, adds a communication protocol version used for collecting the operation data, and then stores the packed operation data to the local part of the data acquisition equipment.
The invention also provides data acquisition equipment.
The data acquisition device of the present invention comprises: a memory, a processor and a data acquisition program stored on the memory and executable on the processor, the data acquisition program when executed by the processor implementing the steps of the data acquisition method as described above.
The method implemented when the data acquisition program running on the processor is executed may refer to each embodiment of the data acquisition method of the present invention, and details are not described here.
The invention also provides a computer readable storage medium.
The computer-readable storage medium of the present invention has stored thereon a data acquisition program which, when executed by a processor, implements the steps of the data acquisition method as described above.
The method implemented when the data acquisition program running on the processor is executed may refer to each embodiment of the data acquisition method of the present invention, and details are not described here.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are only for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A data acquisition method is characterized in that the method is applied to data acquisition equipment, the data acquisition equipment is in communication connection with a cloud server and at least one industrial equipment, a real-time data configuration table and a black box data configuration table corresponding to the industrial equipment are pre-configured in the data acquisition equipment, the real-time data configuration table at least comprises an identification of the industrial equipment and a data type of the industrial equipment needing to be monitored, the black box data configuration table at least comprises a data storage triggering condition, a data type needing to be stored and a data storage period, and the data acquisition method comprises the following steps:
receiving a data acquisition instruction issued by the cloud server, wherein the data acquisition instruction carries an identifier, a communication address and a communication protocol type of industrial equipment to be acquired;
searching a real-time data configuration table corresponding to the industrial equipment according to the identification of the industrial equipment, and monitoring the operation data of the industrial equipment in real time according to the communication address and the communication protocol type of the industrial equipment and the data type to be monitored in the real-time data configuration table;
judging whether the monitored operation data of the industrial equipment meets a data storage triggering condition in the black box data configuration table;
and if the data storage triggering condition is met, storing corresponding data according to the data type to be stored and the period of the stored data in the black box data configuration table.
2. The data collection method of claim 1, wherein saving the corresponding data according to the type of data to be saved in the black box data configuration table and the period of saving the data comprises:
if the cloud server is online, judging whether the data type required to be stored in the black box data configuration table exists in the operation data monitored by the real-time data configuration table;
and if the operation data exists in the operation data monitored by the real-time data configuration table, packaging the operation data corresponding to the data type to be stored according to the period of the stored data and a preset format, adding a communication protocol version used for collecting the operation data, and then sending the packaged operation data to the cloud server for storage.
3. The data collection method of claim 2, wherein if the cloud server is online, determining whether the data type to be stored in the black box data configuration table exists in the operation data monitored by the real-time data configuration table further comprises:
and if the fault information does not exist in the operation data monitored by the real-time data configuration table, sending corresponding fault prompt information to the cloud server.
4. The data collection method of claim 1, wherein saving the corresponding data according to the type of data to be saved in the black box data configuration table and the period of saving the data comprises:
if the cloud server is offline, judging whether the local storage capacity of the data acquisition equipment exceeds the limit;
if the local storage capacity of the data acquisition equipment exceeds the limit, after sleeping for a preset time, returning to the step of judging whether the monitored running data meets the data storage triggering condition in the black box data configuration table;
if the local storage capacity of the data acquisition equipment is not over-limit, judging whether the data type to be stored in the black box data configuration table exists in the operation data monitored by the real-time data configuration table;
if the operation data exists in the operation data monitored by the real-time data configuration table, the operation data corresponding to the data type needing to be stored is packaged according to the period of the stored data and a preset format, a communication protocol version used for collecting the operation data is added, and then the packaged operation data is stored to the local part of the data collection equipment.
5. The data collection method of claim 4, wherein said determining whether the type of data to be stored in the black box data configuration table exists in the operating data monitored by the real-time data configuration table further comprises:
and if the fault information does not exist in the operation data monitored by the real-time data configuration table, generating corresponding fault prompt information, and sending the fault prompt information to the cloud server when the cloud server is on line.
6. The data collection method of claim 4, wherein storing the packed operational data locally to the data collection device comprises:
judging whether the system time of the data acquisition equipment is synchronous with the time of the cloud server or not;
if the time is synchronous, storing the packed operating data into a local updated timestamp folder of the data acquisition equipment;
and if the time is not synchronous, storing the packed operating data into a local non-updated timestamp folder of the data acquisition equipment.
7. The data collection method of claim 6, wherein storing the packed operating data in a local non-updated timestamp file of the data collection device if the time is not synchronized comprises:
monitoring whether the system time of the data acquisition equipment is synchronized with the time of the cloud server;
if the time synchronization with the cloud server is achieved, whether the timestamp file to be updated in the timestamp folder is to be updated or not is inquired;
and if the time stamp file is to be updated, updating the time stamp of the time stamp file to be updated, writing the file with the updated time stamp into the updated time stamp folder, and deleting the time stamp file to be updated from the time stamp folder to be updated.
8. A data acquisition device, characterized in that the data acquisition device comprises:
the instruction acquisition module is used for receiving a data acquisition instruction issued by the cloud server, wherein the data acquisition instruction carries an identifier, a communication address and a communication protocol type of industrial equipment to be acquired;
the data monitoring module is used for searching a real-time data configuration table corresponding to the industrial equipment according to the identification of the industrial equipment and monitoring the operation data of the industrial equipment in real time according to the communication address and the communication protocol type of the industrial equipment and the data type to be monitored in the real-time data configuration table;
the condition judgment module is used for judging whether the monitored operation data of the industrial equipment meets the data storage triggering condition in the black box data configuration table;
and the data storage module is used for storing corresponding data according to the data type to be stored and the period of the stored data in the black box data configuration table if the data storage triggering condition is met.
9. A data acquisition device, characterized in that the data acquisition device comprises: memory, a processor and a data acquisition program stored on the memory and running on the processor, the data acquisition program when executed by the processor implementing the steps of the data acquisition method according to any one of claims 1 to 7.
10. A computer-readable storage medium, in which a data acquisition program is stored, which when executed by a processor implements the steps of the data acquisition method according to any one of claims 1 to 8.
CN202011160163.8A 2020-10-26 2020-10-26 Data acquisition method, device, equipment and computer readable storage medium Active CN112347170B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011160163.8A CN112347170B (en) 2020-10-26 2020-10-26 Data acquisition method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011160163.8A CN112347170B (en) 2020-10-26 2020-10-26 Data acquisition method, device, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN112347170A true CN112347170A (en) 2021-02-09
CN112347170B CN112347170B (en) 2024-08-13

Family

ID=74359035

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011160163.8A Active CN112347170B (en) 2020-10-26 2020-10-26 Data acquisition method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN112347170B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112558578A (en) * 2021-02-26 2021-03-26 奇力士(武汉)智慧水务科技有限公司 Automatic assembly method and system for bottom layer data of secondary water supply platform
CN113472862A (en) * 2021-06-18 2021-10-01 广州鲁邦通物联网科技有限公司 Intelligent gateway, data acquisition method and Internet of things system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107544837A (en) * 2016-06-24 2018-01-05 腾讯科技(深圳)有限公司 Cloud service device performance data acquisition system, method and apparatus
CN108022323A (en) * 2016-10-31 2018-05-11 比亚迪股份有限公司 Data storage method, apparatus, system and vehicle
CN108877178A (en) * 2018-07-05 2018-11-23 成都希格玛光电科技有限公司 A kind of industry spot remote data acquisition method and acquisition system
CN109740132A (en) * 2018-12-06 2019-05-10 杭州电子科技大学 Industrial equipment data processing method and device based on template
CN110460521A (en) * 2019-09-19 2019-11-15 北京中电普华信息技术有限公司 A kind of edge calculations AnyRouter
CN111447109A (en) * 2020-03-23 2020-07-24 京东方科技集团股份有限公司 Monitoring management apparatus and method, computer readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107544837A (en) * 2016-06-24 2018-01-05 腾讯科技(深圳)有限公司 Cloud service device performance data acquisition system, method and apparatus
CN108022323A (en) * 2016-10-31 2018-05-11 比亚迪股份有限公司 Data storage method, apparatus, system and vehicle
CN108877178A (en) * 2018-07-05 2018-11-23 成都希格玛光电科技有限公司 A kind of industry spot remote data acquisition method and acquisition system
CN109740132A (en) * 2018-12-06 2019-05-10 杭州电子科技大学 Industrial equipment data processing method and device based on template
CN110460521A (en) * 2019-09-19 2019-11-15 北京中电普华信息技术有限公司 A kind of edge calculations AnyRouter
CN111447109A (en) * 2020-03-23 2020-07-24 京东方科技集团股份有限公司 Monitoring management apparatus and method, computer readable storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112558578A (en) * 2021-02-26 2021-03-26 奇力士(武汉)智慧水务科技有限公司 Automatic assembly method and system for bottom layer data of secondary water supply platform
CN112558578B (en) * 2021-02-26 2021-05-11 奇力士(武汉)智慧水务科技有限公司 Automatic assembly method for bottom layer data of secondary water supply platform
CN113472862A (en) * 2021-06-18 2021-10-01 广州鲁邦通物联网科技有限公司 Intelligent gateway, data acquisition method and Internet of things system

Also Published As

Publication number Publication date
CN112347170B (en) 2024-08-13

Similar Documents

Publication Publication Date Title
CN108039969B (en) Network automatic configuration method, device, system, storage medium and target computer
CN112347170A (en) Data acquisition method, device, equipment and computer readable storage medium
CN101340371B (en) Session keeping method and load balance apparatus
CN109672580B (en) Full link monitoring method, device, terminal equipment and storage medium
CN106790131B (en) Parameter modification method and device and distributed platform
CN103905397A (en) Data synchronization method and system
CN101764751A (en) Method, system and equipment for forwarding roaming messages for wireless user terminal travelling across VLAN
CN109547524B (en) User behavior storage method, device, equipment and storage medium based on Internet of things
CN109768980B (en) Server access method, device, mobile terminal and computer readable storage medium
CN101848107A (en) SNMP (Simple Network Management Protocol) network element and communication method of SNMP network element and proprietary protocol network element
CN101702782B (en) Digital television webpage monitoring server, system and method
CN107070978B (en) Method and system for cross-network proxy Web map service and proxy server
CN109802842B (en) Application topology generation method and related equipment
CN101019373A (en) A method and device for controlling the configuration of configuration parameter set of the remote device
CN113342764A (en) Data synchronization method and device among different cloud servers
CN110519080B (en) Session monitoring adjustment method, device, storage medium and apparatus
CN116095120A (en) EIP object model-based data acquisition method and gateway
CN109005203B (en) Data synchronization method and device, storage medium, processor and terminal
CN101977371A (en) Method, platform and system for querying subscriber home network information
JP2005509207A (en) Requirements in communication systems
CN112910830B (en) Data transmission system, data uploading method and data issuing method of Internet of vehicles
JPH07321783A (en) Network monitor equipment
CN113596795A (en) Equipment binding method and device and computer readable storage medium
CN108011920B (en) Cloud backup method, electronic equipment, storage medium and system for all-in-one machine
CN111818192B (en) Communication method of gateway cluster, network equipment and gateway cluster system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant