CN112671848A - Method and device for acquiring data of fire fighting equipment and fire fighting management system - Google Patents

Method and device for acquiring data of fire fighting equipment and fire fighting management system Download PDF

Info

Publication number
CN112671848A
CN112671848A CN202011461535.0A CN202011461535A CN112671848A CN 112671848 A CN112671848 A CN 112671848A CN 202011461535 A CN202011461535 A CN 202011461535A CN 112671848 A CN112671848 A CN 112671848A
Authority
CN
China
Prior art keywords
data
data information
message queue
information
fire fighting
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.)
Pending
Application number
CN202011461535.0A
Other languages
Chinese (zh)
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.)
Guangdong Yuean Technology Co ltd
Original Assignee
Guangdong Yuean 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 Guangdong Yuean Technology Co ltd filed Critical Guangdong Yuean Technology Co ltd
Priority to CN202011461535.0A priority Critical patent/CN112671848A/en
Publication of CN112671848A publication Critical patent/CN112671848A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a method for acquiring data of fire fighting equipment, which comprises the steps of reading first data information from a host of the fire fighting equipment; converting the first data information to generate second data information; and transmitting the second data information to the server side for storage through a message queue mechanism. According to the scheme for data acquisition of the fire fighting equipment, the acquired messages are persistently stored by adopting a message queue middleware mode at the fire fighting acquisition equipment end, so that the decoupling of the messages between the fire fighting host end and the cloud platform can be realized, the timeliness and the correctness of the data are ensured, and the defect that the server end is easy to crash in a high-concurrency scene is avoided. In addition, the method provided by the embodiment of the invention has the advantages that the acquired fire fighting data, namely the first data information, is converted at the data acquisition equipment end, and the pressure of the data processing at the service end is reduced.

Description

Method and device for acquiring data of fire fighting equipment and fire fighting management system
Technical Field
The invention relates to the field of data processing, in particular to a method and a device for acquiring data of fire-fighting equipment and a fire-fighting management system.
Background
In recent years, with the development of economy and science and technology, the traditional fire fighting mode can not meet the requirement of people on fire safety, and the intelligent fire fighting which can meet the requirement of real-time and rapid monitoring begins to appear in the visual field of people.
At present, in order to realize wisdom fire control, one of the most important links is can in time gather fire control data to the fire control data transmission who will gather carries out data processing to the high in the clouds. And accurate judgment of cloud data processing results, such as fire early warning and the like, depends on the timeliness and accuracy of the acquired data to a great extent. However, in the existing intelligent fire-fighting solution, the collected fire-fighting data is generally transmitted to the cloud platform for persistent storage through a real-time transparent transmission mode, although the real-time transparent transmission mode can ensure that the cloud can timely acquire the collected data, the transmission mode based on the port to the port easily causes problems of data transmission interruption, packet loss, repeated transmission and the like, the error rate of the data transmission process is high, and the accuracy of subsequent processing of the collected data by the cloud platform is affected. In addition, in this way, when the equipment network fails, the transparent transmission fails, and the alarm data is lost. In addition, in this way, the server is required to process a large amount of raw data in parallel, which increases the pressure of the server on processing the raw data, and leads to the blocking of the server or the loss of data easily under the condition of high concurrency.
Disclosure of Invention
In order to overcome the defects in the fire fighting data acquisition based on the real-time transparent transmission mode, according to one aspect of the invention, a method for acquiring data of fire fighting equipment is provided, which comprises the following steps
Reading first data information from a host of the fire fighting equipment;
converting the first data information to generate second data information;
and transmitting the second data information to the server side for storage through a message queue mechanism.
According to a second aspect of the present invention, there is also provided an apparatus for data acquisition of a fire fighting device, the apparatus comprising
The first acquisition module is used for reading first data information from a host of the fire fighting equipment; and
and the second acquisition module is used for converting the first data information, generating second data information and transmitting the second data information to the server side for storage through a message queue mechanism.
According to a third aspect of the present invention, there is also provided a fire management system, comprising
The data acquisition device is used for acquiring data of the fire fighting equipment and transmitting the data to the server side for storage;
the server side is used for storing the fire-fighting data information uploaded by the data acquisition; and
and the cloud service platform is used for acquiring the stored fire protection data information from the server side and carrying out fire protection management according to the acquired fire protection data information.
According to a fourth aspect of the present invention, there is also provided an electronic apparatus, comprising: the system comprises at least one processor and a memory communicatively connected with the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method.
According to a fifth aspect of the present invention, there is also provided a storage medium having stored thereon a computer program which, when executed by a processor, implements the method described above.
According to the scheme for data acquisition of the fire fighting equipment, the acquired messages are persistently stored by adopting a message queue middleware mode at the fire fighting acquisition equipment end, so that the decoupling of the messages between the fire fighting host end and the cloud platform can be realized, the timeliness and the correctness of the data are ensured, and the defect that the server end is easy to crash in a high-concurrency scene is avoided. In addition, the method provided by the embodiment of the invention has the advantages that the acquired fire fighting data, namely the first data information, is converted at the data acquisition equipment end, and the pressure of the data processing at the service end is reduced.
Drawings
Fig. 1 is a flowchart of a method for acquiring data of a fire fighting device according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a method for converting first data information into second data information according to an embodiment of the present invention;
FIG. 3 is a flow chart of a method for collecting data of a fire fighting device according to another embodiment of the present invention;
FIG. 4 is a flow chart of a method for collecting data of a fire fighting device according to another embodiment of the present invention;
FIG. 5 is a schematic diagram of a data acquisition device for fire fighting equipment according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of the communication relationship between the modules of the data collection device according to one embodiment of the present invention;
FIG. 7 is a schematic diagram of the communication relationship between modules in a data acquisition device according to another embodiment of the present invention;
fig. 8 is a schematic diagram of a system for fire protection management according to an embodiment of the present invention, which uses data collected by the data collecting devices shown in fig. 5 to 7.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
The invention may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
As used in this disclosure, "module," "device," "system," and the like are intended to refer to a computer-related entity, either hardware, a combination of hardware and software, or software in execution. In particular, for example, a component can be, but is not limited to being, a process running on a processor, an object, an executable, a thread of execution, a program, and/or a computer. Also, an application or script running on a server, or a server, can be a component. One or more components can reside within a process and/or thread of execution and a component can be localized on one computer and/or distributed between two or more computers and can be run by various computer-readable media. The components may also communicate by way of local and/or remote processes in accordance with a signal having one or more data packets, e.g., signals from data interacting with another component in a local system, distributed system, and/or across a network of the internet with other systems by way of the signal.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus 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 apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
According to the scheme for data acquisition of the fire fighting equipment, which is disclosed by the embodiment of the invention, the communication interaction between the fire fighting acquisition equipment end and the cloud platform is carried out in a message queue middleware manner, so that the decoupling of messages between the fire fighting host end and the cloud platform can be realized, and the timeliness and the correctness of data are ensured. The method provided by the embodiment of the invention can be applied to other application scenes needing data transmission, so that message decoupling can be realized between a data production end such as an equipment acquisition end and a data consumption end such as a cloud end platform, and timely and correct data transmission is ensured.
The present invention will be described in further detail with reference to the accompanying drawings.
Fig. 1 schematically shows a flow of a method for acquiring data of a fire fighting device according to an embodiment of the present invention, and as shown in fig. 1, the method of this embodiment includes the following steps:
step S101: the first data information is read from a host of the fire fighting device. The industrial router reads the information from the fire fighting host based on the MODBUS protocol, and the first data information is obtained by issuing a query request to the fire fighting host and reading the equipment information stored in a corresponding communication register of the fire fighting host according to the response of the fire fighting host to the query request. Illustratively, the read first data information may include device alarm information, device failure information, device operating state, linkage relationship, device list, reset information, mute information, screen-on information, and the like.
During the engineering construction of the fire protection system, the fire protection host and the fire protection equipment are generally arranged, so that the fire protection host and the fire protection equipment can realize linkage and remote control functions, for example, an industrial-level network is formed through the fire protection host, and the fire protection equipment, a loop and the like are coded and recorded on the fire protection host, so that the fire protection host can communicate with all the online equipment in real time, and acquire and store equipment information and equipment state information of all the online equipment, such as equipment numbers, physical addresses, bus loops, starting information, fault information and the like. The construction and the arrangement of the fire fighting system engineering can be realized by referring to the prior art, the embodiment of the invention is not limited to this, and the arranged fire fighting system only needs to enable the fire fighting host to acquire the equipment information and the equipment state information of each fire fighting equipment on the line in real time for storage. This information can then be read from the fire host through the industrial router. The industrial router employed may illustratively be the lubantong R3000 series industrial routing product.
Step S103: and performing conversion processing on the first data information to generate second data information. Because the fire control data that industrial router directly gathered from the communication register of fire control host computer all is the raw data that the communication protocol based on fire control host computer formed, if directly transmit this raw data to the high in the clouds server through industrial router and carry out the persistence storage, not only can cause data transmission pressure, because the communication protocol of different fire control host computers is different moreover, also very difficult data check at the server end, lead to the problem such as packet loss easily. In addition, when data are used in the cloud, original data need to be converted, and data processing pressure of the server end can be further caused, so that the performance and the data processing speed of the server end are inevitably influenced in a high concurrency scene, the problems of data loss and the like are further caused, and the quality and the reliability of the acquired data are seriously influenced. In order to avoid this problem, the embodiment of the present invention performs edge calculation on the acquired first data information locally in the data acquisition device, so as to implement conversion processing on the first data information, so as to obtain the converted second data information. The edge calculation of the first data information directly collected from the fire-fighting host computer can be realized locally on the data collection device by arranging a microcomputer connected with an industrial router, such as a raspberry development board, in the data collection device and performing embedded programming on the raspberry development board. Therefore, the industrial router can be called through the program setting on the raspberry group development board to read the first data information from the fire fighting host, and then the data protocol processing is carried out on the first data information to convert the first data information into the second data information.
Since different fire-fighting hosts have their own communication protocols according to different manufacturers, in order to enable the data acquisition device and the data acquisition scheme of the embodiment of the present invention to have wider applicability, as shown in fig. 2, the implementation of the conversion processing on the first data information in the raspberry dispatching program may specifically be implemented as including the following steps:
step S201: and judging the type of the first data information, and acquiring first service data corresponding to the first data information according to the judgment result. After the first data information is acquired, the original data type of the first data information is firstly judged (for example, the judgment is carried out by calling a corresponding function for judging the data type), and according to the judgment result, when the first data information is binary data or hexadecimal data, the first data information is firstly translated so as to convert the binary or hexadecimal first data information into first service data in a character data format. If the first data information itself is the first service data in the character data format according to the judgment result, the translation process is not performed, and the process of step S202 is directly performed.
Step S202: and interpreting the first service data to acquire second service data. After the first service data in the character format is obtained, the first data information can be converted into second service data which accords with the meaning of the specific data by interpreting the first service data. The first service data is interpreted based on a data protocol adopted by the fire-fighting host. The meaning of the data content in the first data information can be determined by parsing the first service data, and, for example, the device code and the fault code in the first data information can be determined. The equipment code is used for identifying the type of the equipment, is a unique identification symbol of the fire fighting equipment, can be an equipment sequence code, is used for identifying the fault type, and is defined according to a data communication protocol of a fire fighting host. The second service data thus obtained are the service data which have a specific data meaning and can be understood by the user, i.e. they include fields and contents which can be understood and applied by the user, such as device type and fault type. In other embodiments, the second service data obtained by analyzing according to the requirement may further include fields and contents such as alarm information and alarm time, which are not limited in the embodiments of the present invention.
Step S203: and adding a time identifier to the second service data to form second data information. After the first data information is received, the data acquisition device can acquire the time of receiving the first data information through a raspberry dispatching program, and the time is used as a time identification label and added as a field of the interpreted second business data, so that second data information is formed, and the formed second data information comprises the second business data and acquisition time of the second business data acquired from the fire-fighting host. By adding the time identification, a collected fire fighting data record can be uniquely determined through the equipment code and the collection time.
Step S105: and transmitting the second data information to the server side for storage through a message queue mechanism. Before data uploading, firstly, the data information to be uploaded needs to be determined according to the second data information. In practical application, after the first data information is converted into the second data information, the data content and the type of the second data information can be selected from the second data information based on the content and the type of the second data information and user requirements, and the data content and the type are used as the data information to be uploaded and uploaded to the server side for storage. For example, in an application for fire safety supervision, a device type (determined by a device code), a fire alarm and/or fault type (a fault code is correspondingly determined), alarm information, alarm time, building ID, and acquisition time may be used as data information to be uploaded. In other applications, all the second data information may also be used as the data information to be uploaded, which is not limited in the embodiment of the present invention. The message queue is a container for storing messages in the message transmission process, and the message queue technology can separate a message production stage from a message processing stage, so that the effects of application decoupling, asynchronous processing, traffic peak clipping and the like are achieved. In order to avoid the problems of data loss, server crash and the like caused by serious dependence on network conditions and data processing capacity of a server side, namely a consumer in a real-time transparent transmission mode, the embodiment of the invention thinks of adopting a message queue technology to realize transmission and persistent storage of second data information. As a preferred implementation, the embodiment of the present invention implements a message queue mechanism through kafka message middleware, and implements a message queue technology by configuring a kafka environment in a raspberry pi development board. Specifically, for example, kafka message middleware may be installed in the Linux environment of the raspberry pi development board; then, configuring the server address and port of the kafka by calling the corresponding interface of the kafka message middleware (calling interface provided by the kafka middleware) in the embedded program of the raspberry pi development board, and establishing connection with the configured kafka server; and then, uploading the data information to be uploaded to a corresponding kafka server for persistent storage in a message queue mode by calling a message writing and uploading interface of the kafka message middleware (a calling interface provided by the kafka middleware).
Preferably, in order to ensure communication security and reduce packet loss, the embodiment of the present invention further configures a function of establishing a communication data pool on the raspberry group development board, and writes data information to be uploaded into the data pool first by establishing the communication data pool. And when the message writing and uploading interface of the kafka message middleware is called for data uploading, the data information to be uploaded is acquired from the data pool and written into the kafka message queue for uploading. Through a data pool and message queue dual mechanism, the local mapping function of the kafka uploading list is realized, the asynchronous communication effect can be achieved, and the communication stability is ensured. Illustratively, the established communication data pool may be implemented as a file data pool, such as by creating a log file for recording and storing information to be uploaded to implement the function of the communication data pool. The created log file can be configured to have read-write and delete authority, and data records are stored in a first-in first-out mode. In a specific implementation, the log file may be created based on a building in which the fire fighting equipment is located, or a fire fighting host, or the fire fighting equipment as a unit, that is, each building ID may correspond to one file, one fire fighting host may correspond to one file, or one fire fighting equipment may correspond to one file, so as to form a file data pool. Therefore, when data acquisition and conversion are carried out, a corresponding log file can be created according to the device code or building ID or host code analyzed from the acquired first data information (newly created when the corresponding log file is not found, only the newly acquired data information to be uploaded needs to be written when the corresponding log file is found), and after the data information to be uploaded is determined, the data information to be uploaded is written into the corresponding log file of the file data pool according to the device code or building ID or host code corresponding to the data record. In the communication process with the kafka server, the data information to be uploaded is sequentially read (for example, in a first-in first-out mode) from the corresponding log files of the file data pool, and then the read data information to be uploaded is uploaded to the kafka server through the kafka message queue for storage. Preferably, in order to avoid repeated transmission of data and guarantee missed transmission of data, the method may be further configured to delete the corresponding data information to be uploaded from the file data pool (i.e., delete the corresponding log file) after receiving the upload success signal fed back by the kafka server, otherwise, continuously read the data information to be uploaded from the file data pool according to a preset reading sequence for uploading, thereby ensuring that the data in the data pool can be received by the server. In order to reduce the memory redundancy, it is preferable that a log file is also deleted from the file data pool when the data information to be uploaded stored in the log file is empty.
Preferably, in order to ensure the stability of communication, after the data pool is established, the information uploading road condition of the data pool is continuously detected, a transmission channel between the data pool and the kafka server is established according to the information uploading road condition, and the data information to be uploaded is stored in the kafka server. The detection of the information uploading road condition of the data pool can be realized by detecting the networking state between the data pool and the kafka server, for example, the detection of the networking state is performed by sending a ping packet to the kafka server, when the networking fails, the failure information is written into a road condition log file, when the networking succeeds, a service for reading the data information to be uploaded from the data pool to upload is executed, and according to a feedback signal of the uploading service, when the feedback signal is that the uploading succeeds, the corresponding data information to be uploaded or the corresponding log file is deleted from the data pool.
Preferably, the first data information further includes device state information such as device start, reset, and the like, and the data information to be uploaded determined according to the second data information is not necessarily all collected data, so in a specific implementation, while the data information to be uploaded is uploaded to the kafka server for storage, other service data (i.e., the service data from which the data information to be uploaded is removed from the second data information) may be written into the local log content for storage according to a requirement.
Fig. 3 schematically shows a flow of a method for acquiring data of a fire fighting equipment according to another embodiment of the present invention, as shown in fig. 3, the method of this embodiment is substantially the same as the method shown in fig. 1, except that the embodiment of the present invention further includes the following steps before step S103 shown in fig. 1:
step S102: and carrying out data verification processing on the first data information. The data verification processing refers to verifying a data packet of the first data information acquired from the fire-fighting host based on an MODBUS communication protocol to determine whether an error communication data packet exists. The specific implementation manner of data verification processing may be implemented by referring to a verification manner of a MODBUS communication protocol for a communication data packet, for example, a MARK verification manner or a SPACE verification manner is adopted to verify communication contents, which are all the prior art, and therefore details are not described herein again.
Fig. 4 schematically shows a flow of a method for acquiring data of a fire fighting device according to another embodiment of the present invention, and as shown in fig. 4, the method of this embodiment is substantially the same as the method shown in fig. 3, except that the embodiment of the present invention further includes, before step S105 shown in fig. 3:
step S104: and screening the generated second data information to remove abnormal data. The screening processing refers to processing of detecting abnormal data to be removed and deleting or discarding the abnormal data. The abnormal data needing to be removed can exemplarily comprise: in step S102, data that fails to be verified (e.g., an erroneous communication packet), multiple times of repeated alarm data from the same device in the same preset period (e.g., within 10S), alarm information of the test device performed during the daily maintenance of fire protection (by comparing the device number of the alarm device with the device number of the maintenance device corresponding to the maintenance task established by the cloud platform, the alarm information of the test device can be detected), and the like. In specific implementation, based on the definition rule of the abnormal data to be eliminated, the abnormal data in the second data information can be detected and deleted or discarded, so as to realize the screening processing of the second data information. In this embodiment, the data information to be uploaded is determined according to the screened fire fighting data, i.e., the second data information. By eliminating abnormal data, the noise of the collected data can be reduced, the data redundancy in the transmission process can be reduced, and the data transmission efficiency and the data utilization rate are improved.
In specific practice, manufacturers of the fire-fighting host computers and the communication protocols adopted by the manufacturers are different, and when products of the fire-fighting host computers are updated or parts of the fire-fighting host computers are replaced and maintained, the communication protocols are possibly changed. In a traditional mode, because the identification and analysis of the collected data are carried out at the server, different server programs need to be adapted according to manufacturers of fire-fighting hosts or the server programs need to be frequently modified, and the program maintenance cost is very high. In the embodiment of the invention, the data acquisition device completes the identification and analysis of the acquired data locally, so that if the data acquisition device needs to be upgraded synchronously to adapt to the communication mode of the fire-fighting host, compared with the identification and analysis mode of the server, the difficulty is higher and the maintenance cost is higher. In order to solve the problem that the data acquisition device cannot be upgraded or is difficult to upgrade, the embodiment of the invention adopts a remote control mode to maintain the data processing program of the data acquisition device, and the data processing program comprises an embedded program on a raspberry group development board of the data acquisition device, and particularly performs program backup, deletion and upgrade (upgrade can be realized in an updating mode) operations on a program part for realizing conversion of first data information into second data information. As an implementation example, the maintenance of the data processing program of the data acquisition device by using a remote control mode may be implemented as: by installing remote access client software such as Xshell software on a user terminal such as a computer for remote control and remotely operating the raspberry group development board by using the SSH port of the raspberry group through the remote access client software, the operations of backing up, updating (for example, updating can be realized by replacing a program file), deleting and the like of the program file of the corresponding program on the raspberry group development board are realized. As another implementation example, the maintenance of the data processing program of the data acquisition device by using a remote control mode may also be implemented as: configuring a program module for realizing an upgrading maintenance function on a raspberry group development board of a data acquisition device, wherein the program module is realized by providing an external interface (such as a user visual interface) to receive an operation instruction of a user, judging the type of the instruction when the operation instruction is received, for example, receiving operation instructions such as 'update', 'delete', 'backup' and the like, and performing corresponding processing according to the type of the operation instruction, taking the received 'updated' operation instruction as an example, the corresponding processing can be realized by acquiring a corresponding program file from a specified target path and performing replacement processing on the corresponding program file on the raspberry group development board to finish upgrading the corresponding program on the raspberry group development board; taking the received operation instruction of "backup" as an example, the corresponding processing can be realized by backing up the corresponding program file on the raspberry group development board to a specified target path; taking the example of receiving the "delete" operation instruction, the corresponding processing may be implemented as deleting the corresponding program file on the raspberry pi development board. Therefore, the problem that the data acquisition device cannot work due to the change of the communication protocol can be repaired through remote control, and the normal execution of the fire-fighting data acquisition task is ensured.
Fig. 5 and 6 schematically show a data acquisition apparatus for acquiring data of a fire fighting device, as shown in fig. 5 and 6, the data acquisition apparatus including
The first acquisition module 20 is used for reading first data information from a host of the fire fighting equipment; and
the second acquisition module 30 is configured to perform conversion processing on the first data information, generate second data information, and transmit the second data information to the server through the message queue mechanism for storage. The first acquisition module and the second acquisition module are both arranged in the shell 1, and a power module 40 can be arranged in the shell 1 to supply power to the first acquisition module and the second acquisition module.
As shown in FIG. 6, the second acquisition module 30 includes
The data interpretation unit 30A is configured to perform conversion processing on the first data information to generate second data information, and is specifically implemented as: judging the data type of the first data information, acquiring first service data according to the data type of the first data information, interpreting the first service data to generate second service data, and generating second data information according to the second service data and the acquisition time of the first data information;
the message queue middleware 30B is configured to transmit the data message to the target server for storage through a message queue mechanism, and may be implemented as kafka message queue middleware; and
and the transmission unit 30C is configured to upload the second data information to the server for storage by invoking the message queue middleware.
As a preferred implementation example, the second acquisition module 30 further includes a data pool unit 30D for storing the generated second data information, the data interpretation unit determines the data information to be uploaded according to the second data information after generating the second data information, and stores the data information to be uploaded to the data pool unit, and the transmission unit acquires the data information to be uploaded through the data pool unit, and transmits the data information to be uploaded acquired from the data pool unit to the server for storage by calling the message queue middleware. The transmission unit is further used for receiving an uploading success signal fed back by the server side, and deleting the corresponding data information record from the data pool unit after receiving the uploading success signal.
As another preferred embodiment, the second collecting module 30 further includes a traffic condition detecting unit, configured to detect an information uploading traffic condition of the data pool unit, establish a transmission channel according to the information uploading traffic condition, and upload the second data information to the server through the transmission channel for storage. The detection of the information uploading road condition of the data pool unit can be realized by detecting the networking state between the second acquisition module 30 and the server side in a way of sending a ping packet, and when the networking state is successful, the second data information is uploaded to the server side for storage based on the message queue mechanism through the network connection. And when the networking state is networking failure, writing the networking failure message into a road condition log file.
Specifically, the first collection module 20 is responsible for communicating with the fire-fighting host to acquire data such as alarm information, fault information, operating state, reset signal, silencing signal, shielding signal from the fire-fighting host and store the data as first data information. Preferably, the first collection module 20 may be implemented by using an industrial router, and illustratively, may use an R3000 series industrial router of lubantong, or an H8860 series industrial router of shenzhen macro, or an R9865FA series industrial router of tangling. The industrial router comprises an MCU module and an interface module (such as an RS485 interface and an RS232 interface) connected with the MCU module, a GPRS network module and the like, wherein the MCU module can be connected to a fire-fighting host computer and collects data of the fire-fighting host computer, such as alarm information, fault information, running state, reset signals, silencing signals, shielding signals and the like through the corresponding interface module, and the collected data is stored as first data information.
The second acquisition module 30 is connected to and communicates with the first acquisition module 20 through a corresponding interface module, such as an RS232 interface, so that the second acquisition module 30 can acquire the first data information from the first acquisition module 20 through the corresponding interface module, process the first data information, for example, including conversion and analysis, then use the processed data as the second data information, and determine, based on the second data, that the data information to be uploaded is transmitted to the server side for storage. Since the first data information read from the fire-fighting host by the industrial router, that is, the first acquisition module 20, is a data type based on the fire-fighting host communication protocol, after the first data information is acquired, the second acquisition module 30 first judges the data type of the first data information, converts the first data information into first service data according to the data type, analyzes the data according to the fire-fighting host data communication protocol, can acquire second service data such as fire-fighting equipment codes, alarm types, alarm time and the like, and finally can acquire the second data information by adding acquisition time to the second service data. In a specific implementation, the second collection module 30 may be implemented as a microcomputer, for example, a raspberry development board, a orange development board, or a NanoPi development board may be selected as the microcomputer, and embedded program configuration is performed thereon, so that the microcomputer can implement processing and transferring functions of the first data information, where the microcomputer may be configured to include a MICRO _ SD memory card, and the second data information obtained through processing may be stored in the MICRO _ SD memory card and written into a data pool unit, so that the transmission unit can asynchronously obtain the data information to be uploaded in the data pool unit. In this way, the server only needs to acquire the data information to be uploaded from the data pool unit and the message queue according to the requirement for storage, and does not need to passively receive the acquired fire-fighting data based on real-time transparent transmission, and the high concurrency requirement can be met through a mechanism of asynchronously reading the message queue. The specific implementation manners of the first acquisition module and the second acquisition module, the related functional units thereof, and the implementation manners of data acquisition and transmission can be referred to the corresponding description of the foregoing method portion, and are not described herein again.
As a preferred implementation example, as shown in fig. 5, the data acquisition device in the embodiment of the present invention further includes a first data communication interface 13 disposed on the housing 1 and used for connecting a display unit, where the first data communication interface 13 is connected to the second acquisition module 30. Illustratively, the display unit is implemented as a display screen, and the first data communication interface 13 may be implemented as an HDMI communication interface, so that the data monitoring can be performed intuitively in real time through the data acquisition device by connecting the display screen to the second acquisition module 30, i.e., the microcomputer host. Illustratively, since the first collection module 20 includes a GPRS network module, and the second collection module 30 is connected to and communicates with the first collection module 30, the second collection module 30 can communicate with the server side by using the network service provided by the network module of the first collection module 20, so that the firefighter can access the corresponding website or domain name of the server side through the display unit connected to the data collection device, for example, access the platform of the fire-fighting supervision service system, thereby realizing supervision and viewing of fire-fighting data, and being very convenient.
As a preferred implementation example, the data acquisition apparatus of the present embodiment further includes a second data communication interface 12 disposed on the housing for connecting the fire fighting equipment, wherein the second data communication interface 12 is connected to the interface module of the first acquisition module 20 for communicating with the fire fighting equipment. Illustratively, the second data communication interface 12 is implemented as a network port for communicating with the RS485 interface and the RS232 interface of the first acquisition module 20 based on the MODBUS communication protocol. The number of the second data communication interfaces may be one, or two or more, and exemplarily, two second data communication interfaces 12 are disposed on the housing 1.
FIG. 7 schematically shows a schematic block diagram of another data acquisition device for acquiring data of a fire fighting equipment, and as shown in FIG. 7, in this embodiment, the second acquisition module 30 further includes
And a program upgrading unit 30E, configured to receive an operation instruction, and perform a maintenance operation on a corresponding program file according to the operation instruction, where the operation instruction and the corresponding maintenance operation include updating, deleting, and backing up the program file. The specific implementation manner of the program upgrading unit can be described in the foregoing method section, and is not described herein again.
FIG. 8 schematically illustrates a fire management system, as shown in FIG. 8, including
The data acquisition device 1 is used for acquiring data of the fire-fighting host and transmitting the acquired fire-fighting data to the server side 2 for storage on the basis of a message queue mechanism;
the server end 2 is used for storing the uploaded fire-fighting data information; and
and the cloud service platform 3 is used for acquiring the stored fire protection data information from the server 2 and performing fire protection management according to the fire protection data information. The fire management can include but is not limited to analyzing and processing fire data information, performing early warning according to requirements, and notifying corresponding people to perform equipment maintenance or routing inspection or executing fire fighting tasks when early warning conditions are met. The fire control management can also be used for summarizing and counting fire control data information and storing or outputting a summarizing and counting result. The fire fighting management can also be equipment management and the like for corresponding fire fighting equipment based on fire fighting data information.
The server 2 is a kafka message queue server, the data acquisition device 1 is a device for acquiring data of fire fighting equipment according to the embodiments shown in fig. 5 and 6 or fig. 7, and the cloud service platform may be any cloud service system platform with a fire fighting management function.
The method for acquiring the fire fighting data in the embodiment can ensure the timeliness and correctness of data transmission, avoid the problems of packet loss, interruption and the like easily caused by data in a transparent transmission mode, provide powerful fire fighting data support for fire fighting supervision and improve the reliability of intelligent fire fighting.
The specific implementation of each module in the above device embodiment of the present invention may be described with reference to the method portion, and other implementations mentioned in the method portion may also be applied to the device embodiment, so that details are not described here.
In some embodiments, the present invention provides a non-transitory computer-readable storage medium, in which one or more programs including executable instructions are stored, and the executable instructions can be read and executed by an electronic device (including but not limited to a computer, a server, or a network device, etc.) to perform the above-described method for data collection of a fire fighting device according to the present invention.
In some embodiments, the present invention further provides a computer program product, the computer program product comprising a computer program stored on a non-volatile computer-readable storage medium, the computer program comprising program instructions that, when executed by a computer, cause the computer to perform the above-mentioned method for data acquisition of a fire fighting device.
In some embodiments, an embodiment of the present invention further provides an electronic device, which includes: at least one processor, and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method for acquiring data of the fire fighting equipment.
In some embodiments, the present invention further provides a storage medium, on which a computer program is stored, which when executed by a processor is capable of executing the above method for data acquisition of a fire fighting device.
The device for acquiring data of fire fighting equipment in the embodiment of the invention can be used for executing the method for acquiring data of fire fighting equipment in the embodiment of the invention, and correspondingly achieves the technical effects achieved by the method for acquiring data of fire fighting equipment in the embodiment of the invention, and the detailed description is omitted here. In the embodiment of the present invention, the relevant functional module may be implemented by a hardware processor (hardware processor).
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a general hardware platform, and certainly can also be implemented by hardware. Based on such understanding, the above technical solutions substantially or otherwise contributing to the related art may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (10)

1. Method for data acquisition of fire fighting equipment, characterized in that the method comprises
Reading first data information from a host of the fire fighting equipment;
converting the first data information to generate second data information;
and transmitting the second data information to the server side for storage through a message queue mechanism.
2. The method of claim 1, wherein transmitting the second data message to the server for storage via the message queue mechanism comprises transmitting the second data message to the server via the message queue mechanism
Configuring message queue middleware;
determining data information to be uploaded according to the second data information;
and uploading the data information to be uploaded to a server side for storage by using the message queue middleware based on a message queue mechanism.
3. The method of claim 1, wherein transmitting the second data message to the server for storage via the message queue mechanism comprises transmitting the second data message to the server via the message queue mechanism
Configuring message queue middleware and a communication data pool;
determining data information to be uploaded according to the second data information, and storing the determined data information to be uploaded to the communication data pool;
and acquiring the data information to be uploaded from the communication data pool by using the message queue middleware, and uploading the data information to be uploaded acquired from the communication data pool to a server side for storage based on a message queue mechanism.
4. The method of any of claims 1 to 3, wherein performing the conversion process on the first data information and generating the second data information comprises
Judging the data type of the first data information, and acquiring first service data according to the data type of the first data information;
interpreting the first service data to obtain second service data;
and adding a time tag to the second service data to generate second data information.
5. The method of claim 4, further comprising, before transmitting the second data message to the server via the message queue mechanism, transmitting the second data message to the server
And screening the generated second data information to remove abnormal data.
6. The method of claim 2, wherein the message queue middleware is implemented as kafka message middleware.
7. The method of claim 4, further comprising
And upgrading a program on the data acquisition device for realizing the data acquisition method of the fire fighting equipment in a remote control mode.
8. Device for data acquisition of fire-fighting equipment, characterized in that the device comprises
The first acquisition module is used for reading first data information from a host of the fire fighting equipment; and
and the second acquisition module is used for converting the first data information, generating second data information and transmitting the second data information to the server side for storage through a message queue mechanism.
9. The apparatus of claim 8, wherein the second acquisition module comprises
The data interpretation unit is used for carrying out conversion processing on the first data information to generate second data information;
the message queue middleware is used for transmitting the data message to a target server end for storage through a message queue mechanism; and
and the transmission unit is used for uploading the second data information to a server side for storage by calling the message queue middleware.
10. The apparatus of claim 9, wherein the second acquisition module further comprises
A data pool unit for storing the generated data information;
the data interpretation unit is also used for determining the data information to be uploaded according to the second data information after the second data information is generated, and storing the data information to be uploaded to the data pool unit;
the transmission unit is also used for acquiring the data information to be uploaded through the data pool unit and transmitting the data information to be uploaded acquired from the data pool unit to the server side for storage through calling the message queue middleware.
CN202011461535.0A 2020-12-07 2020-12-07 Method and device for acquiring data of fire fighting equipment and fire fighting management system Pending CN112671848A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011461535.0A CN112671848A (en) 2020-12-07 2020-12-07 Method and device for acquiring data of fire fighting equipment and fire fighting management system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011461535.0A CN112671848A (en) 2020-12-07 2020-12-07 Method and device for acquiring data of fire fighting equipment and fire fighting management system

Publications (1)

Publication Number Publication Date
CN112671848A true CN112671848A (en) 2021-04-16

Family

ID=75405351

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011461535.0A Pending CN112671848A (en) 2020-12-07 2020-12-07 Method and device for acquiring data of fire fighting equipment and fire fighting management system

Country Status (1)

Country Link
CN (1) CN112671848A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115061878A (en) * 2022-06-29 2022-09-16 万霖消防技术有限公司 Data transmission method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103616866A (en) * 2013-11-27 2014-03-05 中山大学深圳研究院 Integration control method of digital household equipment on basis of embedded middleware
CN110784419A (en) * 2019-10-22 2020-02-11 中国铁道科学研究院集团有限公司电子计算技术研究所 Method and system for visualizing professional data of railway electric affairs
CN111723144A (en) * 2020-07-13 2020-09-29 万桥信息技术有限公司 WebGL and GIS system-based intelligent building comprehensive management and control platform

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103616866A (en) * 2013-11-27 2014-03-05 中山大学深圳研究院 Integration control method of digital household equipment on basis of embedded middleware
CN110784419A (en) * 2019-10-22 2020-02-11 中国铁道科学研究院集团有限公司电子计算技术研究所 Method and system for visualizing professional data of railway electric affairs
CN111723144A (en) * 2020-07-13 2020-09-29 万桥信息技术有限公司 WebGL and GIS system-based intelligent building comprehensive management and control platform

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115061878A (en) * 2022-06-29 2022-09-16 万霖消防技术有限公司 Data transmission method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN108768730B (en) Method and device for operating intelligent network card
CN104104707A (en) Webpage data update method, terminal, cache server and system
CN111918230B (en) Data acquisition method, data transmission method, gateway, equipment and storage medium
CN115186158B (en) Abnormal data determination method, electronic device and storage medium
CN109117341A (en) A kind of monitoring method of virtual machine, device, equipment and medium
CN111522703A (en) Method, apparatus and computer program product for monitoring access requests
CN112306802A (en) Data acquisition method, device, medium and electronic equipment of system
CN114553672B (en) Method, device, equipment and medium for determining performance bottleneck of application system
CN108959031B (en) NVME backboard lighting control method, system, medium and equipment
CN112671848A (en) Method and device for acquiring data of fire fighting equipment and fire fighting management system
CN111913445A (en) Data acquisition method, data acquisition equipment, storage medium, data transmission method and gateway
CN102986151A (en) Monitoring system and data transfer device and method thereof
CN109189652A (en) A kind of acquisition method and system of close network terminal behavior data
KR20120071175A (en) Mobile phone loading web-platform, method for offering log information using the same mobile phone, verification system and method for web-platform
CN112051816A (en) Data acquisition system and method
CN111324516A (en) Method and device for automatically recording abnormal event, storage medium and electronic equipment
US20230025081A1 (en) Model training method, failure determining method, electronic device, and program product
CN113849328A (en) Management method and device of disaster recovery system
CN103164236A (en) Method and system of online update of remote server
CN105915596A (en) Optical network unit information acquiring method and optical network unit information acquiring system
CN113612721A (en) Intelligent message analysis method based on power line carrier communication
CN110928814A (en) Method and device for detecting transmission abnormality of serial hard disk and electronic equipment
CN111241044A (en) Method, device and equipment for building heterogeneous database and readable storage medium
CN113900890B (en) Method, device, equipment and medium for collecting server component information
CN116719663B (en) Data processing method, device, equipment and readable storage medium

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210416