CN109412737B - Control method of data acquisition system, data acquisition system and storage medium - Google Patents

Control method of data acquisition system, data acquisition system and storage medium Download PDF

Info

Publication number
CN109412737B
CN109412737B CN201811429686.0A CN201811429686A CN109412737B CN 109412737 B CN109412737 B CN 109412737B CN 201811429686 A CN201811429686 A CN 201811429686A CN 109412737 B CN109412737 B CN 109412737B
Authority
CN
China
Prior art keywords
data
acquisition
terminal
acquisition terminal
time
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.)
Active
Application number
CN201811429686.0A
Other languages
Chinese (zh)
Other versions
CN109412737A (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 Aerospace Industry Technology Research Institute Co ltd
Aerospace Science and Industry Shenzhen Group Co Ltd
Original Assignee
Shenzhen Aerospace Industry Technology Research Institute Co ltd
Aerospace Science and Industry Shenzhen Group 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 Aerospace Industry Technology Research Institute Co ltd, Aerospace Science and Industry Shenzhen Group Co Ltd filed Critical Shenzhen Aerospace Industry Technology Research Institute Co ltd
Priority to CN201811429686.0A priority Critical patent/CN109412737B/en
Publication of CN109412737A publication Critical patent/CN109412737A/en
Application granted granted Critical
Publication of CN109412737B publication Critical patent/CN109412737B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Arrangements For Transmission Of Measured Signals (AREA)

Abstract

The invention discloses a control method of a data acquisition system, which comprises the following steps: when receiving a synchronous signal sent by a first acquisition terminal, a second acquisition terminal determines an acquisition time point according to the synchronous signal, wherein the first terminal sends the synchronous signal to each second acquisition terminal in a data acquisition system at regular time; and when the acquisition time point arrives, acquiring data. The invention also discloses a data acquisition system and a computer readable storage medium. The invention realizes the synchronous acquisition of the data acquired by each acquisition terminal in the distributed data acquisition system.

Description

Control method of data acquisition system, data acquisition system and storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a control method for a data acquisition system, and a computer-readable storage medium.
Background
Along with the continuous development of urban power distribution network construction in China, the importance of the ring main unit is more and more prominent, and the market puts higher requirements on the intellectualization of the ring main unit. In order to realize the intellectualization, people need to master various dynamic behavior data of the ring main units in an all-around manner, so that an acquisition terminal can be arranged for each ring main unit to acquire the data of the ring main units.
At present, in a data acquisition system with a distributed characteristic constructed according to a plurality of acquisition terminals, due to the decentralized characteristic of the distributed system, the acquisition terminals are relatively independent, application islands are easily formed one by one, it is difficult to uniformly control the acquisition terminals to synchronously acquire data of an acquisition object (such as a ring main unit), and if the time of the acquired data is not uniform, the omnibearing analysis of the operation state of the acquisition object based on a certain time point cannot be realized.
Disclosure of Invention
The invention mainly aims to provide a control method of a data acquisition system, the data acquisition system and a computer readable storage medium, which realize synchronous acquisition of data acquired by each acquisition terminal in a distributed data acquisition system.
In order to achieve the above object, the present invention provides a method for controlling a data acquisition system, including the steps of:
when receiving a synchronous signal sent by a first acquisition terminal, a second acquisition terminal determines an acquisition time point according to the synchronous signal, wherein the first terminal sends the synchronous signal to each second acquisition terminal in a data acquisition system at regular time;
and when the acquisition time point arrives, acquiring data.
Preferably, the step of acquiring data when the acquisition time point arrives comprises:
when the acquisition time point arrives, controlling a sensor connected with each acquisition terminal to acquire data of an acquisition object at a preset acquisition frequency;
and generating collected data according to the data collected by the sensor.
Preferably, the acquired data is cross-sectional data, and the step of generating the acquired data according to the data acquired by the sensor includes:
generating time data according to sampling time corresponding to the data acquired by the sensor and the preset sampling frequency;
generating the cross-sectional data from the time data and the data collected by the sensor.
Preferably, the time of the order of seconds of the time data is expressed in centuries of seconds, wherein the time of the order of seconds in the time data is divided into representations according to the preset sampling frequency.
Preferably, the acquisition terminal comprises a plurality of sensors, and the sensors are accessed into the acquisition terminal through a preset acquisition channel.
Preferably, after the step of acquiring data when the acquisition time point arrives, the method further includes:
storing the acquired data in a data cache unit of each acquisition terminal;
and uploading the complete acquired data in the data cache unit to a database.
Preferably, the control method of the data acquisition system further includes:
and when the synchronous signal sent by the first acquisition terminal is not received within a preset time, voting is carried out on each second acquisition terminal, and the second acquisition terminal with the highest vote is updated to be the first acquisition terminal.
In order to achieve the above object, the present invention further provides a data acquisition system, which includes a first acquisition terminal and a second acquisition terminal, wherein: the first acquisition terminal is used for sending a synchronization signal for controlling data synchronous acquisition and acquiring data of an acquisition object according to the synchronization signal; the second acquisition terminal is used for acquiring the data of the acquisition object according to the synchronous signal; the data acquisition system includes:
the data acquisition system comprises a memory, a processor and a control program of the data acquisition system, wherein the control program of the data acquisition system is stored on the memory and can run on the processor, and when being executed by the processor, the control program of the data acquisition system realizes the steps of the control method of the data acquisition system.
In order to achieve the above object, the present invention further provides a computer-readable storage medium, on which a control program of a data acquisition system is stored, and the control program of the data acquisition system, when executed by a processor, implements the steps of the control method of the data acquisition system.
The invention provides a control method of a data acquisition system, the data acquisition system and a computer readable storage medium, wherein one acquisition terminal in the data acquisition system is obtained as a first acquisition terminal, and the data acquisition system comprises a plurality of acquisition terminals which are connected in a distributed manner; controlling the first acquisition terminal to transmit a synchronization signal to the acquisition terminal at a preset time interval; and controlling the first acquisition terminal and the acquisition terminal, and uploading acquired acquisition data to a database according to the synchronous signal. Therefore, the first acquisition terminal in the data acquisition system outputs the synchronous signals for controlling the data uploading to other acquisition terminals in the system, and each acquisition terminal simultaneously acquires the acquired data according to the synchronous signals, so that the synchronous acquisition of the acquired data of each acquisition terminal in the distributed data acquisition system is realized.
Drawings
Fig. 1 is a schematic diagram of a hardware operating environment of a terminal according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart illustrating a first embodiment of a control method of the data acquisition system according to the present invention;
FIG. 3 is a schematic flow chart illustrating a control method of the data acquisition system according to a second embodiment of the present invention;
FIG. 4 is a schematic flow chart illustrating a control method of the data acquisition system according to a third embodiment of the present invention;
FIG. 5 is a schematic flow chart illustrating a fourth embodiment of a control method of the data acquisition system according to the present invention;
fig. 6 is a schematic flow chart of a fifth embodiment of the control method of the data acquisition system according to 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 invention provides a control method of a data acquisition system, which is characterized in that a first acquisition terminal in the data acquisition system outputs a synchronous signal for controlling data uploading to other acquisition terminals in the system, and each acquisition terminal uploads acquired data according to the synchronous signal at the same time, so that the uploading synchronization of the acquired data of each acquisition terminal in a distributed data acquisition system is realized.
As shown in fig. 1, fig. 1 is a schematic diagram of a hardware operating environment of a terminal according to an embodiment of the present invention;
the terminal of the embodiment of the invention can be a data acquisition system.
As shown in fig. 1, the terminal may include: a processor 1001, such as a CPU, a memory 1002, and a communication bus 1003. The communication bus 1003 is used for implementing connection communication between the components in the terminal. The memory 1002 may be a high-speed RAM memory or a non-volatile memory (e.g., a disk memory). The memory 1002 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the configuration of the terminal shown in fig. 1 is not intended to be limiting of the terminal of embodiments of the present invention and may include more or less components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, the memory 1002, which is a kind of computer storage medium, may include therein a control program of the data acquisition system.
In the terminal shown in fig. 1, the processor 1001 may be configured to call a control program of the data acquisition system stored in the memory 1002, and perform the following operations:
when receiving a synchronous signal sent by a first acquisition terminal, a second acquisition terminal determines an acquisition time point according to the synchronous signal, wherein the first terminal sends the synchronous signal to each second acquisition terminal in a data acquisition system at regular time;
and when the acquisition time point arrives, acquiring data.
Further, the processor 1001 may call a control program of the data acquisition system stored in the memory 1002, and further perform the following operations:
when the acquisition time point arrives, controlling a sensor connected with each acquisition terminal to acquire data of an acquisition object at a preset acquisition frequency;
and generating collected data according to the data collected by the sensor.
Further, the acquired data is cross-sectional data, and the processor 1001 may call a control program of the data acquisition system stored in the memory 1002, and further perform the following operations:
generating time data according to sampling time corresponding to the data acquired by the sensor and the preset sampling frequency;
generating the cross-sectional data from the time data and the data collected by the sensor.
Further, the processor 1001 may call a control program of the data acquisition system stored in the memory 1002, and further perform the following operations:
the time of the second order of the time data is expressed in century seconds, wherein the time of the second order of the time data is expressed according to the preset sampling frequency division.
Further, the processor 1001 may call a control program of the data acquisition system stored in the memory 1002, and further perform the following operations:
the acquisition terminal comprises a plurality of sensors, and the sensors are connected into the acquisition terminal through a preset acquisition channel.
Further, the processor 1001 may call a control program of the data acquisition system stored in the memory 1002, and further perform the following operations:
storing the acquired data in a data cache unit of each acquisition terminal;
and uploading the complete acquired data in the data cache unit to a database.
Further, the processor 1001 may call a control program of the data acquisition system stored in the memory 1002, and further perform the following operations:
and when the synchronous signal sent by the first acquisition terminal is not received within a preset time, voting is carried out on each second acquisition terminal, and the second acquisition terminal with the highest vote is updated to be the first acquisition terminal.
Referring to fig. 2, in an embodiment, the method for controlling the data acquisition system includes:
and step S10, when the second acquisition terminal receives the synchronous signal sent by the first acquisition terminal, determining an acquisition time point according to the synchronous signal, wherein the first terminal sends the synchronous signal to each second acquisition terminal in the data acquisition system at regular time.
In this embodiment, the data acquisition system includes a plurality of acquisition terminals that are connected in a distributed manner, and the acquisition terminal includes a plurality of sensors, and the sensors are accessed to the acquisition terminal through a preset acquisition channel. The data acquisition system is constructed by the acquisition terminals based on distributed connection, is easy to install and free of maintenance, and greatly simplifies the engineering difficulty.
Taking the collection object of the data collection system as the ring main unit as an example, the ring main unit mainly realizes the distribution automation function by additionally installing a Data Transfer Unit (DTU) data collection unit at a terminal of a box station. The DTU is used as the acquisition terminal of the ring main unit, and has the main task of acquiring voltage and current data, but the DTU has single function, few types of acquired data and small information quantity, and can not meet the requirement of multi-sensor access. When a distributed data acquisition system with a plurality of DTUs as acquisition terminals is constructed, application islands are easily formed due to relative independence between the DTUs.
Therefore, in order to meet the requirements that the acquisition terminal of the ring main unit can be connected with a plurality of sensors and connected with sensors of different types, a preset acquisition channel can be set at the acquisition terminal, and the preset acquisition channel can be a sensor acquisition channel comprising 8 paths of analog quantity, 16 paths of digital quantity and multi-path protocol communication type, so that the access of most sensors on the market can be met. It should be noted that the analog quantity refers to a direct current or alternating current signal, the digital quantity refers to binary codes of 0 and 1, and the multi-channel communication protocol may include a Modbus network communication protocol, an IEC101 protocol, an IEC61850 protocol, a user-defined protocol, and the like.
It should be noted that, each acquisition terminal in the data acquisition system preferably selects a high-performance arm port-M4 kernel processing chip, the main frequency of the arm port-M4 kernel processing chip can reach 200MHz, and the internal device can provide multi-path 16-bit AD synchronous high-speed sampling and IEEE1588 ethernet processing.
The application adopts the interface of unified standard on the hardware design of the acquisition terminal, and can support the access of a plurality of paths of analog sensors, digital sensors, communication protocol sensors and other sensors.
The function module of acquisition terminal sets up to general signal input output module, and acquisition terminal's signal interface includes: the universal analog Acquisition Interface (AI) can be connected with a sensor with a direct current output range within 0-20mA (0-5V) and an alternating current output range within +/-20 mA; a general state quantity acquisition interface (DI) which can be accessed to a proximity switch, a travel switch, an optical signal switch and the like; a general control output interface (DO) which can be connected with a control relay and the like; and a common communication interface (COM) CAN be accessed to a serial port, an Ethernet and a CAN bus protocol sensor.
It should be noted that the signal interface of the acquisition terminal includes all data input/output interfaces that the ring main unit needs to process, and can meet the requirements of various users. Taking a certain type of voltage acceleration sensor as an example, the output voltage is proportional to the vibration speed, and the output voltage is as follows: 0-5V, so external direct current (AI) interface that can be directly accessed to the acquisition terminal: vi1+ Vi 1-.
In the data acquisition system, each acquisition terminal can be used as a first acquisition terminal. The terminal may be a first acquisition terminal that acquires one acquisition terminal preset when the data acquisition system is constructed. It should be noted that the terminal in this example may also be an acquisition terminal having the first acquisition terminal characteristic.
The first acquisition terminal can generate and output a synchronization signal for controlling each acquisition terminal (including the first acquisition terminal) in the data acquisition system to synchronously acquire data of the ring main unit. It should be noted that the collected data may be data collected by each collection terminal from the ring main unit through a sensor.
The second acquisition terminal may be the rest of the acquisition terminals except the first acquisition terminal in the distributed data acquisition system.
Because the acquisition terminals adopt a distributed connection mode, and each acquisition terminal is independently installed in different intervals of the ring main unit, the problem that a plurality of CPUs (central processing units) simultaneously coordinate to work exists, namely timing and synchronous processing needs to be carried out among the acquisition terminals. The synchronous signal is an IO pulse heartbeat signal, and the first acquisition terminal outputs a synchronous pulse signal to the other acquisition terminals in the acquisition system at regular time, namely the second acquisition terminal.
It should be noted that the timing time may be set according to different acquisition objects or according to actual requirements on the acquired data, such as every second, every minute, every hour, and the like, and optionally, the timing time is set to every second. For example, the first acquisition terminal may output a synchronization pulse signal to the second acquisition terminal every second at regular time.
Therefore, each acquisition terminal in the data acquisition system can have a synchronous signal. The first acquisition terminal and the second acquisition terminal of the data acquisition system can determine the acquisition time point when the data of the acquisition object is acquired according to the synchronous signal so as to acquire the data simultaneously.
And step S20, when the acquisition time point is reached, acquiring data.
And generating and outputting the synchronous signal at the first acquisition terminal, receiving the synchronous signal at the second acquisition terminal in the data acquisition system, and determining an acquisition time point according to the synchronous signal, so that each acquisition terminal in the data acquisition system has a synchronous signal.
When the determined acquisition time point is reached, the first acquisition terminal and the second acquisition terminal can simultaneously control the sensors connected with the acquisition terminals to acquire data of an acquisition object (such as a ring main unit) and generate the acquisition data at a preset acquisition frequency.
Of course, the determination of the acquisition time point may also be that the second acquisition terminal performs data acquisition immediately upon receiving the synchronization signal, and accordingly, the internal processing circuit performs acquisition delay processing on the first acquisition terminal, so that the first acquisition terminal and the second acquisition terminal acquire data synchronously.
Therefore, the distributed characteristics of easy installation and construction and flexible networking of the data acquisition system can be reserved, and the problem that synchronous acquisition of data is difficult to realize due to decentralization of the distributed system can be solved.
In one embodiment, when receiving a synchronization signal sent by a first acquisition terminal, a second acquisition terminal determines an acquisition time point according to the synchronization signal, wherein the first terminal sends the synchronization signal to each second acquisition terminal in a data acquisition system at regular time; and when the acquisition time point arrives, acquiring data. Therefore, the first acquisition terminal in the data acquisition system outputs the synchronous signals for controlling the data uploading to other acquisition terminals in the system, and each acquisition terminal simultaneously acquires the acquired data according to the synchronous signals, so that the synchronous acquisition of the acquired data of each acquisition terminal in the distributed data acquisition system is realized.
In a second embodiment, as shown in fig. 3, based on the embodiment shown in fig. 2, the step of controlling the sensors connected to the respective acquisition terminals to acquire data of the acquisition object and generate the acquired data at a preset acquisition frequency includes:
and step S30, controlling the sensors connected with each acquisition terminal to acquire the data of the acquisition object at a preset acquisition frequency when the acquisition time point is reached.
And step S31, generating collected data according to the data collected by the sensor.
In this embodiment, the acquired data is cross-sectional data. It should be noted that the cross-sectional data may be data of different subjects at the same time point or the same time period. The preset sampling frequency can be selected to be 1.6kHz, 3.2kHz or 6.4 kHz.
Specifically, the first acquisition terminal and the second acquisition terminal acquire data of an acquisition object through a sensor and generate the section data according to the synchronous signal at the same time with a preset acquisition frequency.
The capacity of each group of section data is set to be 48 bytes, the first 6 bytes correspond to the time data, and the last 42 bytes correspond to the data acquired by different sensors respectively. In the time data with the capacity of 6 bytes, century second time of 4 bytes and synchronous serial numbers of 2 bytes (when the preset sampling frequency is 1.6kHz, the corresponding serial numbers are 0-1599) are included, and the resolution of the acquisition time can be accurate to microsecond by the method.
It should be noted that century seconds are Unix time stamps (Unix time), or Unix time (Unix time), POSIX time (POSIX time), which is a time representation defined as the total number of seconds from 1970, 01, 00 min 00 s to the present. For example, 2016, 10, 27, 16: 00: 00, century second 1477555200. Of course, a century seconds can be converted to the corresponding Unix format to achieve that a century seconds can be expressed in 4-byte capacity.
It should be noted that, in the cross-sectional data, the range of the synchronization sequence number of the time data is from 0 to the sampling frequency value (not containing the sampling frequency value), which means that a whole second is equally divided into the number of parts corresponding to the sampling frequency value, so as to record the sampling time more accurately. For example, if the preset sampling frequency of the data acquisition system is 1600Hz, a whole second is equally divided into 1600 shares (each share is 1/1600 seconds, i.e. 625us), the range of the synchronization sequence number is [0,1600 ], and if the synchronization sequence number is equal to 100, it indicates that the current sampling time is in the interval of the 100 th share of the current second, i.e. the current time is 625ms after the last whole second. In this way, it is possible to divide the time of the time data smaller than the second order into representations according to the preset sampling frequency.
When each acquisition terminal generates section data, time data is divided into the first 6 bytes of capacity of the section data, data acquired by the sensor is divided into the last 42 bytes of capacity of the section data, and when the time data is generated, time of the order of seconds is expressed in century seconds, and time smaller than the order of seconds is divided and expressed according to the preset sampling frequency. In this way, the generation of cross-sectional data is achieved.
Specifically, when the first acquisition terminal and the second acquisition terminal acquire the acquired data according to the synchronization signal, the data synchronization sequence number is reset according to the synchronization signal, the synchronization sequence number of the time data in the cross-sectional data starting at the second is 0, and the software timer count is reset at the same time, so that the timer count of each acquisition terminal can be adjusted, the timing acquisition interruption of the acquisition terminals is kept consistent, then synchronous refreshing is performed, and acquisition of the acquired data is restarted.
Based on the section data, the unified management of the collected data by the collection terminal can be facilitated after the multi-sensor is connected to the collection terminal, and various states of a collected object (such as a ring main unit) in the operation process can be continuously recorded.
In one embodiment, a sensor connected with each acquisition terminal is controlled to acquire data of an acquisition object at a preset acquisition frequency; generating time data according to sampling time corresponding to the data collected by the sensor and the preset sampling frequency, wherein the time of the time data in the order of seconds is expressed in century seconds, and the time of the time data smaller than the order of seconds is expressed by dividing according to the preset sampling frequency; generating the cross-sectional data from the time data and the data collected by the sensor. Therefore, the accurate acquisition and recording of the data of the acquired object are realized by embedding the time data accurate to microsecond into the section data.
In a third embodiment, as shown in fig. 4, on the basis of the above embodiments of fig. 2 to 3, before the step of generating the collected data according to the data collected by the sensor, the method further includes:
and step S40, preprocessing the data collected by the sensor, wherein the preprocessing comprises waveform amplification and/or noise filtration.
And step S41, performing analog-to-digital conversion on the preprocessed data acquired by the sensor.
In this embodiment, before each acquisition terminal generates cross-sectional data according to data acquired by the sensors, the data acquired by each sensor is preprocessed.
Specifically, the analog signal of the acquisition object acquired by the sensor is filtered and amplified, and/or the analog signal is subjected to noise filtration by the filtering unit to be converted into a standard signal which can be identified by a CPU chip of the acquisition terminal, and then the acquisition terminal performs analog-to-digital conversion on the preprocessed analog signal into a digital signal.
It should be noted that the acquisition terminal may perform AD analog-to-digital real-time data sampling, specifically, the acquisition terminal uses a K60 chip based on a Cortex-M4 kernel as a CPU, and the real-time data sampling may use an ADC analog-to-digital conversion module of the K60 chip. The ADC analog-to-digital conversion module carried by the K60 chip has the highest conversion precision of 16 bits, 4 pairs of differential analog input channels and 24 single-ended analog input channels at most, and four optional clocks of input clocks, namely bus _ clock, bus _ clock/2, ALCK and ADACK. Preferably, the ADC analog-to-digital conversion module is set to 16-bit precision, the clock source is bus _ clock, and the output mode is an interrupt mode output mode.
Taking the analog signal collected by the voltage acceleration sensor as an example, the analog signal can be converted into a standard signal recognizable by the CPU of the collection terminal through the differential amplification circuit and the proportional amplification circuit, and then the standard signal is accessed to the ADC analog-to-digital conversion module of the CPU of the collection terminal to perform analog-to-digital conversion into a digital signal.
In one embodiment, the data collected by the sensor is preprocessed, wherein the preprocessing comprises waveform amplification and/or noise filtering; and performing analog-to-digital conversion on the preprocessed data acquired by the sensor. Therefore, the data collected by the sensors of different types accessed to the collection terminal are preprocessed and subjected to analog-to-digital conversion, so that the data collected by the sensors are converted into the data which can be stored or transmitted by the collection terminal.
In a fourth embodiment, as shown in fig. 5, on the basis of the above embodiments of fig. 2 to 4, after the step of performing data acquisition when the acquisition time point arrives, the method further includes:
and step S50, storing the collected data in a data cache unit of each collecting terminal.
And step S51, uploading the complete acquired data in the data cache unit to a database.
In this embodiment, each acquisition terminal has a data cache unit, and the data capacity of the data cache unit can cache data of 20 cross-sectional data sizes at least. When each acquisition terminal generates section data, the section data can be stored in the data cache unit, and after each time the acquisition terminal establishes communication connection with the database or a superior battle site server, the complete section data is extracted from the data cache unit and uploaded to the database or the superior site server corresponding to each acquisition terminal.
The database or the upper site server is provided with a Redis database, and can store and display data.
When the acquisition terminal uploads data, the acquisition terminal is in channel connection (TCP/IP connection) with a superior site server, wherein the superior site is used as a server side, and the port number is as follows: 10001, the collection terminal is used as the customer service terminal. After the three-way handshake protocol, the collected data is uploaded to the upper-level site through the Ethernet.
In one embodiment, the collected data is stored in a data cache unit of each collecting terminal; and uploading the complete acquired data in the data cache unit to a database. Therefore, the data cache area is opened up at the acquisition terminal, the situation that the uploaded acquisition data is incomplete due to network environment factors is avoided, and the integrity of the uploaded acquisition data is ensured.
In a fifth embodiment, as shown in fig. 6, on the basis of the above embodiments of fig. 2 to 5, the control method of the data acquisition system further includes:
step S60, when the synchronization signal sent by the first acquisition terminal is not received within a preset time, voting is performed on each second acquisition terminal, and the second acquisition terminal with the highest vote is updated to the first acquisition terminal.
In order to ensure that each acquisition terminal in the data acquisition system continuously and stably works, a voting mechanism can be added to the acquisition terminals when the distributed data acquisition system is constructed, when each second acquisition terminal does not receive a synchronization signal sent by the first acquisition terminal within a preset time, voting can be initiated, the second acquisition terminal with the highest voting number is voted, the second acquisition terminal with the highest voting number is updated to be the first acquisition terminal, and the new first acquisition terminal can send the synchronization signal to the second acquisition terminals in the data acquisition system again at regular time.
It should be noted that the preset time is greater than the time for sending the synchronization signal at regular time, and may be set according to actual requirements, such as 1 hour, 3 hours, and the like.
In an embodiment, when the synchronization signal sent by the first acquisition terminal is not received within a preset time, voting is performed on each second acquisition terminal, and the second acquisition terminal with the highest vote is updated to the first acquisition terminal. Therefore, when the first acquisition terminal originally used for sending the synchronous signal breaks down in the distributed data acquisition system, other second acquisition terminals can be updated to be new first acquisition terminals, so that the data acquisition system can operate continuously and stably, and the stability of the data acquisition system is improved.
In addition, the invention also provides a data acquisition system, which comprises a first acquisition terminal and a second acquisition terminal, wherein: the first acquisition terminal is used for sending a synchronization signal for controlling data synchronous acquisition and acquiring data of an acquisition object according to the synchronization signal; the second acquisition terminal is used for acquiring the data of the acquisition object according to the synchronous signal; the data acquisition system includes:
the data acquisition system comprises a memory, a processor and a control program of the data acquisition system, wherein the control program of the data acquisition system is stored on the memory and can run on the processor, and when being executed by the processor, the control program of the data acquisition system realizes the steps of the control method of the data acquisition system.
Furthermore, the present invention also provides a computer-readable storage medium, which is characterized in that the computer-readable storage medium includes a control program of a data acquisition system, and the control program of the data acquisition system implements the steps of the control method of the data acquisition system according to the above embodiment when executed by a processor.
The above-mentioned serial numbers of the embodiments of the present invention are merely 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 television, 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 (7)

1. A control method of a data acquisition system is characterized by comprising the following steps:
when receiving a synchronous signal sent by a first acquisition terminal, a second acquisition terminal determines an acquisition time point according to the synchronous signal, wherein the first acquisition terminal sends the synchronous signal to each second acquisition terminal in a data acquisition system at regular time, each acquisition terminal in the data acquisition system is connected in a distributed manner, and each acquisition terminal is connected with a plurality of sensors;
when the acquisition time point arrives, controlling a sensor connected with each acquisition terminal to acquire data of an acquisition object at a preset sampling frequency, wherein the acquisition terminals comprise the first acquisition terminal and the second acquisition terminal;
generating time data according to sampling time corresponding to the data acquired by the sensor and the preset sampling frequency;
and generating collected data according to the time data and the data collected by the sensors, wherein the collected data are section data, the capacity of each section data is set to be 48 bytes, the first 6 bytes correspond to the time data, the last 42 bytes correspond to the data collected by different sensors respectively, and the century second time of 4 bytes and the synchronous serial number of 2 bytes are included in the time data of the first 6 bytes.
2. The method of controlling a data acquisition system according to claim 1, wherein the time of the order of seconds of the time data is expressed in centuries of seconds, and wherein the time of the order of seconds in the time data is divided into representations according to the preset sampling frequency.
3. The method for controlling a data acquisition system according to claim 2, wherein the acquisition terminal includes a plurality of the sensors, and the sensors are connected to the acquisition terminal through a preset acquisition channel.
4. The method of controlling a data acquisition system according to claim 1, wherein the step of performing data acquisition upon arrival of the acquisition time point is followed by:
storing the acquired data in a data cache unit of each acquisition terminal;
and uploading the complete acquired data in the data cache unit to a database.
5. The method of controlling a data acquisition system as set forth in claim 1, further comprising:
and when the synchronous signal sent by the first acquisition terminal is not received within a preset time, voting is carried out on each second acquisition terminal, and the second acquisition terminal with the highest vote is updated to be the first acquisition terminal.
6. The utility model provides a data acquisition system which characterized in that, data acquisition system includes first acquisition terminal and second acquisition terminal, wherein:
the first acquisition terminal is used for sending a synchronization signal for controlling data synchronous acquisition and acquiring data of an acquisition object according to the synchronization signal;
the second acquisition terminal is used for acquiring the data of the acquisition object according to the synchronous signal;
the data acquisition system comprises a memory, a processor and a control program of the data acquisition system stored on the memory and executable on the processor, the control program of the data acquisition system implementing the steps of the control method of the data acquisition system according to any one of claims 1 to 5 when executed by the processor.
7. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a control program of a data acquisition system, which when executed by a processor implements the steps of the control method of a data acquisition system according to any one of claims 1 to 5.
CN201811429686.0A 2018-11-26 2018-11-26 Control method of data acquisition system, data acquisition system and storage medium Active CN109412737B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811429686.0A CN109412737B (en) 2018-11-26 2018-11-26 Control method of data acquisition system, data acquisition system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811429686.0A CN109412737B (en) 2018-11-26 2018-11-26 Control method of data acquisition system, data acquisition system and storage medium

Publications (2)

Publication Number Publication Date
CN109412737A CN109412737A (en) 2019-03-01
CN109412737B true CN109412737B (en) 2020-11-17

Family

ID=65455797

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811429686.0A Active CN109412737B (en) 2018-11-26 2018-11-26 Control method of data acquisition system, data acquisition system and storage medium

Country Status (1)

Country Link
CN (1) CN109412737B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101267291A (en) * 2008-02-26 2008-09-17 北京必创科技有限公司 Method, wireless sensor network system and synchronization device for realizing synchronization collection
CN103326802A (en) * 2013-05-31 2013-09-25 燕山大学 Wireless network system for achieving synchronous acquisition, synchronous acquisition device and method
CN104933132A (en) * 2015-06-12 2015-09-23 广州巨杉软件开发有限公司 Distributed database weighted voting method based on operating sequence number
CN107423251A (en) * 2017-07-28 2017-12-01 北京印刷学院 A kind of distributed data acquisition synchronous method and system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104331432A (en) * 2014-10-22 2015-02-04 江苏瑞中数据股份有限公司 Power grid mass time series data access method applicable to section access mode
CN107797898B (en) * 2017-09-28 2020-11-27 东软集团股份有限公司 Data acquisition method and device thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101267291A (en) * 2008-02-26 2008-09-17 北京必创科技有限公司 Method, wireless sensor network system and synchronization device for realizing synchronization collection
CN103326802A (en) * 2013-05-31 2013-09-25 燕山大学 Wireless network system for achieving synchronous acquisition, synchronous acquisition device and method
CN104933132A (en) * 2015-06-12 2015-09-23 广州巨杉软件开发有限公司 Distributed database weighted voting method based on operating sequence number
CN107423251A (en) * 2017-07-28 2017-12-01 北京印刷学院 A kind of distributed data acquisition synchronous method and system

Also Published As

Publication number Publication date
CN109412737A (en) 2019-03-01

Similar Documents

Publication Publication Date Title
CN111010351A (en) Internet of things data transmission method and system
CN109947020B (en) User-configurable vehicle acceleration data acquisition method
CN106341466A (en) Distributed data collection system and data collection method based on same
CN111026808A (en) Heterogeneous database synchronization system and synchronization method based on domestic environment
CN103078401B (en) The system and method for transformer station's time synchronized and sample-synchronous
CN109412737B (en) Control method of data acquisition system, data acquisition system and storage medium
CN104102751A (en) Intelligent data collection system for early warnings of meteorological disasters
CN117472682A (en) FTP (File transfer protocol) persistent data processing method and system
CN109274763B (en) Information synchronization method and dual-computer hot standby equipment
CN104656604B (en) A kind of utilization MODBUS communication protocols realize the safety and stability control device of electric network and its method of man-machine interaction
CN104077910A (en) Data collection and control method and device
CN114461012A (en) Method and device for acquiring running time stamps of different clock domains of embedded system
JP6930448B2 (en) Data sampling device and data sampling method
CN102736549A (en) 24-Bit acquisition module
CN107566197A (en) Environmental sanitation terminal sensing data is uniformly accessed into platform
CN109741592B (en) Automatic data acquisition implementation method for station electric energy acquisition terminal
CN112883110A (en) Terminal big data distribution method, storage medium and system based on NIFI
CN107171440B (en) System for collecting electrical data of switch cabinet by intelligent transformer terminal and collecting method thereof
CN106027192B (en) A kind of parallel data synchronous acquisition device
EP3521956B1 (en) Input unit for acquiring sensor signals from a plurality of sensors
CN216356723U (en) DTU system of multi-functional wisdom power consumption
RU2688097C1 (en) Method of functioning geographically distributed control system
CN116980494A (en) Gateway and protocol conversion method and system
CN106647628A (en) Real time collection method for G code execution state data during numerical control processing procedures
CN205229734U (en) Arrester data synchronous sampling transmission device of transformer substation

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