CN115514791B - Method for cross-network data transmission in emergency management of explosive and powder industry - Google Patents

Method for cross-network data transmission in emergency management of explosive and powder industry Download PDF

Info

Publication number
CN115514791B
CN115514791B CN202211439159.4A CN202211439159A CN115514791B CN 115514791 B CN115514791 B CN 115514791B CN 202211439159 A CN202211439159 A CN 202211439159A CN 115514791 B CN115514791 B CN 115514791B
Authority
CN
China
Prior art keywords
data
explosive
transmitted
industry
intranet
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
CN202211439159.4A
Other languages
Chinese (zh)
Other versions
CN115514791A (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.)
Chengdu Flame Technology Co ltd
China Wuzhou Engineering Group Co ltd
Original Assignee
Chengdu Flame Technology Co ltd
China Wuzhou Engineering 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 Chengdu Flame Technology Co ltd, China Wuzhou Engineering Group Co ltd filed Critical Chengdu Flame Technology Co ltd
Priority to CN202211439159.4A priority Critical patent/CN115514791B/en
Publication of CN115514791A publication Critical patent/CN115514791A/en
Application granted granted Critical
Publication of CN115514791B publication Critical patent/CN115514791B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/1408Methods for optical code recognition the method being specifically adapted for the type of code
    • G06K7/14172D bar codes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/28Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2425Traffic characterised by specific attributes, e.g. priority or QoS for supporting services specification, e.g. SLA
    • H04L47/2433Allocation of priorities to traffic types
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/34Flow control; Congestion control ensuring sequence integrity, e.g. using sequence numbers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/02Network architectures or network communication protocols for network security for separating internal from external traffic, e.g. firewalls
    • H04L63/0209Architectural arrangements, e.g. perimeter networks or demilitarized zones
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/02Network architectures or network communication protocols for network security for separating internal from external traffic, e.g. firewalls
    • H04L63/0227Filtering policies
    • H04L63/0263Rule management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0442Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1441Countermeasures against malicious traffic
    • H04L63/1458Denial of Service

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Computer Hardware Design (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Medical Informatics (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Electromagnetism (AREA)
  • Toxicology (AREA)
  • Databases & Information Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Multimedia (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Computer And Data Communications (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a method for transmitting data across networks for emergency management in the explosive and fire industry. The transmission data is transmitted between the internal network and the external network in the form of two-dimensional codes, a plurality of two-dimensional codes are simultaneously generated according to the information carrying amount, and the two-dimensional code images are simultaneously identified by the camera, so that the data transmission efficiency is improved. The method introduces a message queue mechanism, sets two sets of timers of an internal network transmission system and an external network transmission system, ensures that data transmission on two sides of the internal network and the external network can be carried out asynchronously, does not need to wait for a new state given by the external network transmission system to switch the two-dimensional code, does not influence each other among asynchronous data transmission, application and application, and improves the stability of application or service; and meanwhile, a timer is set to reduce the data request frequency so as to prevent DDoS network attack and the like of the external network.

Description

Method for cross-network data transmission in emergency management of explosive and powder industry
Technical Field
The invention relates to the field of network data transmission, in particular to a method for cross-network data transmission in emergency management in the explosive and fire industry.
Background
Various information in the gunpowder industry has high safety management requirements, related systems related to information such as process production and the like are managed in a closed mode, and data information communication with the outside is generally not carried out. When an emergency accident occurs, information is generally manually transmitted one-to-one, so that emergency management emergency notification cannot be timely and efficiently notified, and a transmission mode which is low in cost and meets the requirement of information safety and confidentiality is difficult to find out when an informatization means is used for performing rapid information transmission.
On the basis of the defect, a method for performing cross-network information transmission by using a two-dimension code and a camera as an intermediary appears, but the existing cross-network two-dimension code transmission scheme belongs to a real-time transmission scheme, the cost of system resources is high, the two-dimension code needs to be switched by waiting for a new state given by an external network transmission system, the data interaction efficiency is still not high, and the Ddos network attack of the external network is difficult to prevent.
Disclosure of Invention
Aiming at the defects in the prior art, the invention provides a high-safety cross-network transmission method applied to the method for carrying out cross-network data transmission in the emergency management of the explosive and fire industry.
In order to achieve the purpose of the invention, the invention adopts the technical scheme that:
the method for performing cross-network data transmission in emergency management in the explosive and fire industry comprises the following steps:
s1, acquiring internal network data of a gunpowder and explosive industry through a message subscription interface;
s2, sensitive data filtering is carried out on intranet data in the explosive and fire industry to obtain transmittable data, and corresponding weights are set according to the types of the transmittable data;
s3, unpacking the transmittable data to obtain the content to be transmitted, and generating a unique code for the content to be transmitted;
s4, judging whether the content to be transmitted exceeds the transmission limit length of a single two-dimensional code, and if so, entering a step S5; otherwise, entering step S6;
s5, decomposing the current content to be transmitted into a plurality of contents to be transmitted, and generating a corresponding serial number and a total number for each content to be transmitted obtained through decomposition;
s6, splicing and encrypting the content to be transmitted, the unique code corresponding to the content to be transmitted, the total number corresponding to the content to be transmitted and the serial number corresponding to the content to be transmitted;
s7, splicing the encrypted data and the unique code corresponding to the synchronized content to obtain data to be transmitted, putting the data to be transmitted into intranet cache in the explosive industry, and modifying the state of the data to be unsynchronized;
s8, data to be transmitted are taken from an intranet cache in the explosive industry according to the set time interval, weight and synchronization state, an intranet two-dimensional code is generated for each data to be transmitted taken from the intranet cache in the explosive industry, and all the intranet two-dimensional codes generated at the same time are spliced into one image to be displayed;
s9, acquiring a displayed intranet two-dimensional code image through an extranet camera in the explosive and fire industry;
s10, analyzing and checking the acquired intranet two-dimensional code image at an extranet in the explosive industry, deleting corresponding data in extranet cache in the explosive industry according to the unique code corresponding to the synchronized content obtained by analysis, and caching currently received encrypted data; internal network data in the explosive industry are transmitted to an external network and the external network is subjected to cache cleaning;
s11, generating an outer net two-dimensional code for each unique code of content to be transmitted, which is obtained by outer net analysis in the explosive and explosive industry, generating an outer net two-dimensional code for outer net data in the explosive and explosive industry, and splicing all outer net two-dimensional codes into an image to be displayed;
s12, acquiring a displayed two-dimensional code image of the outer net through an inner net camera in the explosive industry;
s13, analyzing the content of the two-dimensional code image of the outer network in the inner network of the explosive and fire industry, modifying the state of corresponding data to be transmitted in the inner network cache into synchronization according to the analyzed unique code, and transmitting the outer network data of the explosive and fire industry to the inner network.
Further, the specific method of step S1 is:
and when receiving data asynchronously issued to the MQ message queue by the production application system, acquiring the data asynchronously through a message subscription interface by adopting the internal network transmission system in the explosive industry.
Further, the specific method for filtering the sensitive data of the intranet data in the explosive industry in the step S2 is as follows:
establishing a keyword library and a data upper and lower threshold rule, splitting phrases of the intranet data in the explosive industry based on the Lucene segmentation principle, and comparing a splitting result with the keyword library; finding a corresponding data threshold rule for the splitting result, and verifying the rule with the set upper and lower thresholds; when the intranet data in the explosive industry contains keywords or the data threshold exceeds the limit, recording logs and informing related personnel in the form of mails, and not performing subsequent processing on the current data; otherwise, the transmittable data is obtained.
Further, the specific method of step S3 is:
unpacking the transmittable data to acquire the content to be transmitted, and generating a unique code for the time stamp and the content to be transmitted in an MD5 mode.
Further, the specific method of step S6 is:
generating an encrypted character string by splicing the content to be transmitted, the unique code corresponding to the content to be transmitted, the total number corresponding to the content to be transmitted and the serial number corresponding to the content to be transmitted in an 'I' number splicing mode, and generating a ciphertext by adding an external network public key to the encrypted character string by using an RSA method to obtain encrypted data.
Further, setting sliding expiration time for the data to be transmitted which is put into an intranet cache in the explosive industry, namely updating the expiration time of the data to be transmitted with the state of non-synchronization to the current time plus default expiration time when the two-dimensional code is generated once; and when the state of the data to be transmitted in the intranet cache in the explosive industry is synchronous, the cache is overdue.
Further, the specific method of step S8 includes the following substeps:
s8-1, judging whether data to be transmitted exist in an intranet cache in the explosive industry, and if so, entering the step S8-3; otherwise, entering step S8-2;
s8-2, generating a two-dimensional code for indicating that the external network of the explosive industry is emptied of cache data by using the ALLSYNC identifier through ZXing _ SKD, and entering the step S9;
s8-3, sequencing data to be transmitted in the internal network cache of the explosive industry according to a mode that the weight is from high to low, sequentially taking at least one piece of data to be transmitted which is not synchronous in state from the internal network cache sequence of the explosive industry according to a set time interval, and generating an internal network two-dimensional code for each piece of data to be transmitted which is taken from the internal network cache of the explosive industry;
and S8-4, drawing a canvas with a pure white background according to the set distinguishing size, calculating the tiled position and the width and the height of a single intranet two-dimensional code, adding a black frame with 5 pixels to each intranet two-dimensional code, and drawing the intranet two-dimensional codes and the positions with the black frames generated at the same time into the canvas to realize that all intranet two-dimensional codes are tiled into one image to be displayed.
Further, the specific method of step S10 includes the following sub-steps:
s10-1, taking the brightness of three components in the intranet two-dimensional code image as the gray values of three gray level images at an extranet in the explosive industry;
s10-2, rapidly converting the gray image into a binary image only with black and white distribution through a Kittler algorithm;
s10-3, acquiring a black frame of each intranet two-dimensional code according to the image subjected to binarization processing, and calculating the width, height, X-axis and Y-axis point positions of a single intranet two-dimensional code according to the black frame;
s10-4, cutting a plurality of two-dimension codes of the intranet two-dimension code image through the point positions of the width axis, the height axis, the X axis and the Y axis of a single two-dimension code to obtain a cut two-dimension code;
s10-5, acquiring the data of the cut two-dimensional code by a ZXing _ SKD two-dimensional code identification technology to obtain the encrypted data and the unique code corresponding to the synchronized content;
s10-6, decrypting the encrypted data to obtain the content to be transmitted, the unique code, the total number and the serial number which are obtained through decryption;
s10-7, judging whether the total number and the serial number are null, and if so, entering the step S10-9; otherwise, entering step S10-8;
s10-8, sequentially placing the data obtained by decryption into an external network cache of the explosive industry according to the sequence number for storage, and when the sequence number is equal to the total number, performing data packaging to obtain complete contents to be transmitted;
s10-9, judging whether the unique code obtained by decryption exists in an external network cache in the explosive industry, and if so, not processing; otherwise, data forwarding is carried out on the content to be transmitted obtained through decryption, and intranet data transmission to an extranet in the explosive industry is completed;
and S10-10, deleting corresponding data in the external network cache of the explosive industry according to the unique code corresponding to the synchronized content obtained in the step S10-5, and realizing external network cache cleaning.
Further, the specific method for generating an extranet two-dimensional code for the unique code of each content to be transmitted, which is obtained by extranet analysis in the explosive and explosive industry in step S11, is as follows:
starting a timer to take out the unique code of each content to be transmitted obtained by analysis from the external network cache in the explosive and fire industry at regular time, and generating a two-dimensional code image for the taken-out unique code by using ZXing _ SKD to obtain an external network two-dimensional code; when the external network cache in the explosive and explosive industry has no available unique code, setting a timer to sleep for 60 seconds; the time interval for taking the unique code from the external network cache in the explosive and explosive industry is not less than 3 seconds.
The invention has the beneficial effects that:
1. the production application system is independent of the intranet environment in the explosive industry, and is not in the current application system or service, so that the method can be applied to the access of any explosive industry system or service. When the application or service in the explosive and powder industry needs cross-network transmission, only the provided SDK package needs to be introduced to realize the message publishing interface and the message subscribing interface in the SDK package, and the communication methods of three message queues of RabbitMQ, kafka and redis are supported to realize the quick access of the third-party application or service.
2. A message queue mechanism is introduced, two sets of timers of an internal network transmission system and an external network transmission system are set, data transmission on two sides of the internal network and the external network can be carried out asynchronously, a new state given by the external network transmission system is not required to be waited for to switch the two-dimensional code, asynchronous data transmission, application and application are not affected mutually, and stability of application or service is improved; and meanwhile, a timer is set to reduce the data request frequency so as to prevent DDoS network attack and the like of the external network.
3. The resolution of the display is automatically adapted to generate 1-4 two-dimensional codes, cutting identification is automatically carried out according to the serial number, and the efficiency of data transmission is improved by using a plurality of two-dimensional codes.
4. The weight setting can be carried out on the data generated by the production application system, and the effect that the higher the weight is, the data is transmitted preferentially is achieved by adjusting the weight of the data.
5. The method can filter sensitive data and support maintenance of sensitive data filtering rules, wherein the filtering rules mainly comprise keyword library filtering and data upper and lower threshold filtering, when the sensitive data rules are triggered, the system records logs, notifies relevant personnel by mails and does not perform subsequent processing on the data.
Drawings
FIG. 1 is a schematic flow diagram of the process;
fig. 2 is a schematic diagram of splicing multiple two-dimensional codes.
Detailed Description
The following description of the embodiments of the present invention is provided to facilitate the understanding of the present invention by those skilled in the art, but it should be understood that the present invention is not limited to the scope of the embodiments, and it will be apparent to those skilled in the art that various changes may be made without departing from the spirit and scope of the invention as defined and defined by the appended claims, and all changes that can be made by the invention using the inventive concept are intended to be protected.
As shown in fig. 1, the method for transmitting data across networks for emergency management in the explosive and fire industry includes the following steps:
s1, acquiring intranet data in the explosive industry through a message subscription interface;
s2, sensitive data filtering is carried out on intranet data in the explosive industry to obtain transmittable data, and corresponding weights are set according to types of the transmittable data;
s3, unpacking the transmittable data to obtain the content to be transmitted, and generating a unique code for the content to be transmitted;
s4, judging whether the content to be transmitted exceeds the transmission limit length of a single two-dimensional code, and if so, entering the step S5; otherwise, entering step S6;
s5, decomposing the current content to be transmitted into a plurality of contents to be transmitted, and generating a corresponding serial number and a total number for each content to be transmitted obtained through decomposition;
s6, splicing and encrypting the contents to be transmitted, the unique codes corresponding to the contents to be transmitted, the total number corresponding to the contents to be transmitted and the serial numbers corresponding to the contents to be transmitted;
s7, splicing the encrypted data and the unique code corresponding to the synchronized content to obtain data to be transmitted, putting the data to be transmitted into intranet cache in the explosive industry, and modifying the state of the data to be unsynchronized;
s8, data to be transmitted are taken from an intranet cache in the explosive industry according to the set time interval, weight and synchronization state, an intranet two-dimensional code is generated for each data to be transmitted taken from the intranet cache in the explosive industry, and all the intranet two-dimensional codes generated at the same time are spliced into one image to be displayed;
s9, acquiring a displayed intranet two-dimensional code image through an extranet camera in the explosive and fire industry;
s10, analyzing and checking the acquired intranet two-dimensional code image at an extranet in the explosive industry, deleting corresponding data in extranet cache in the explosive industry according to the unique code corresponding to the synchronized content obtained by analysis, and caching currently received encrypted data; internal network data in the explosive industry are transmitted to an external network and the external network is subjected to cache cleaning;
s11, generating an outer net two-dimensional code for each unique code of content to be transmitted, which is obtained by outer net analysis in the explosive and explosive industry, generating outer net two-dimensional codes for outer net data in the explosive and explosive industry, and splicing all the outer net two-dimensional codes into an image to be displayed;
s12, acquiring a displayed two-dimensional code image of the outer net through an inner net camera in the explosive industry;
s13, analyzing the content of the two-dimensional code image of the outer network in the inner network of the explosive and fire industry, modifying the state of corresponding data to be transmitted in the inner network cache into synchronization according to the analyzed unique code, and transmitting the outer network data of the explosive and fire industry to the inner network.
The specific method of the step S1 is as follows: and the subscription is realized by quoting the SDK through the internal network transmission system in the explosive industry, and when data asynchronously issued to the MQ message queue by the production application system is received, the data is asynchronously acquired through the message subscription interface by adopting the internal network transmission system in the explosive industry.
The specific method for filtering the sensitive data of the intranet data in the explosive industry in the step S2 is as follows: establishing a keyword library and a data upper and lower threshold rule, splitting phrases of the intranet data in the explosive industry based on the Lucene segmentation principle, and comparing a splitting result with the keyword library; finding a corresponding data threshold rule for the splitting result, and verifying the rule with the set upper and lower thresholds; when the intranet data in the explosive and powder industry contains key words or the data threshold value exceeds the limit, logs are recorded and related personnel are informed in the form of mails, and the current data are not subjected to subsequent processing; otherwise, the transmittable data is obtained.
The specific method of the step S3 is as follows: unpacking the transmittable data to obtain the content to be transmitted, and generating a unique code for the time stamp + the content to be transmitted in an MD5 mode.
The specific method of the step S6 is as follows: generating an encrypted character string by splicing the content to be transmitted, the unique code corresponding to the content to be transmitted, the total number corresponding to the content to be transmitted and the serial number corresponding to the content to be transmitted in an 'I' number splicing mode, and generating a ciphertext by adding the encrypted character string and an external network public key by using an RSA method to obtain encrypted data.
The specific method of step S8 includes the following substeps:
s8-1, judging whether data to be transmitted exist in an intranet cache in the explosive industry, and if so, entering a step S8-3; otherwise, entering the step S8-2;
s8-2, using ZXing _ SKD to generate a two-dimensional code for indicating that the external network of the explosive and fire industry is emptied of cache data by the ALLSYNC identifier, and entering the step S9;
s8-3, sequencing to-be-transmitted data in an intranet cache in the explosive and fire industry according to a mode that weight is from high to low, sequentially taking at least one to-be-transmitted data with an unsynchronized state from the intranet cache sequence in the explosive and fire industry according to a set time interval, and generating an intranet two-dimensional code for each to-be-transmitted data taken from the intranet cache in the explosive and fire industry;
s8-4, drawing a canvas with a pure white background according to the set distinguishing size, calculating the tiling position and the width and the height of a single intranet two-dimensional code, adding a black frame with 5 pixels to each intranet two-dimensional code, and drawing the intranet two-dimensional codes and the positions with the black frames generated at the same time into the canvas to realize that all the intranet two-dimensional codes are spliced into one image to be displayed.
The specific method of step S10 includes the following substeps:
s10-1, taking the brightness of three components in an intranet two-dimensional code image as gray values of three gray images at an extranet in the explosive and fire industry;
s10-2, rapidly converting the gray image into a binary image only with black and white distribution through a Kittler algorithm;
s10-3, acquiring a black frame of each intranet two-dimensional code according to the image subjected to binarization processing, and calculating the width, height, X-axis and Y-axis point positions of a single intranet two-dimensional code according to the black frame;
s10-4, cutting a plurality of two-dimension codes of the intranet two-dimension code image through the point positions of the width axis, the height axis, the X axis and the Y axis of a single two-dimension code to obtain a cut two-dimension code;
s10-5, acquiring the data of the cut two-dimensional code by a ZXing _ SKD two-dimensional code identification technology to obtain the encrypted data and the unique code corresponding to the synchronized content;
s10-6, decrypting the encrypted data to obtain the content to be transmitted, the unique code, the total number and the serial number which are obtained through decryption;
s10-7, judging whether the total number and the serial number are null, and if so, entering the step S10-9; otherwise, entering step S10-8;
s10-8, sequentially placing the data obtained by decryption into an external network cache of the explosive and fire explosive industry according to the serial number for storage, and packaging the data when the serial number is equal to the total number to obtain complete contents to be transmitted;
s10-9, judging whether the unique code obtained by decryption exists in an external network cache in the explosive industry, and if so, not processing; otherwise, data forwarding is carried out on the content to be transmitted obtained through decryption, and intranet data transmission to an extranet in the explosive industry is completed;
and S10-10, deleting corresponding data in the external network cache of the explosive industry according to the unique code corresponding to the synchronized content obtained in the step S10-5, and realizing external network cache cleaning.
The specific method for generating the outer network two-dimensional code for the unique code of each content to be transmitted, which is obtained by analyzing in the outer network of the explosive and explosive industry in the step S11, comprises the following steps: starting a timer to take out the unique code of each content to be transmitted obtained by analysis from the external network cache in the explosive and fire industry at regular time, and generating a two-dimensional code image for the taken unique code by using ZXing _ SKD to obtain an external network two-dimensional code; when the external network cache in the explosive and explosive industry has no available unique code, setting a timer to sleep for 60 seconds; the time interval for taking the unique code from the external network cache in the explosive and explosive industry is not less than 3 seconds. If the content to be transmitted does not exceed the transmission limit length of a single two-dimensional code, the serial number and the total number corresponding to the content to be transmitted can be set to be 1.
In the specific implementation process, setting sliding expiration time for data to be transmitted which is put into intranet cache in the explosive industry, namely updating the expiration time of the data to be transmitted with the state of non-synchronization to the current time plus default expiration time when a two-dimensional code is generated once; and when the state of the data to be transmitted in the intranet cache in the explosive industry is synchronous, the cache is overdue. The default expiration time may be set to 60 minutes. The time interval for generating the two-dimensional code by taking data from the internal network of the explosive industry is not less than 3 seconds. In order to guarantee the identification accuracy, the upper limit of the two-dimensional code data generated at a single time can be set to 4.
In one embodiment of the present invention, for the explosive industry, the data generated may be first type-coded, such as: the code '01' represents the equipment abnormity alarm, the code '02' represents the propellant powder explosion, the code '03' represents the leakage of the fire hazard source, and the type code is preset with a weighted value by a client. If the code of a certain piece of transmittable data is "01", the content to be transmitted is "bearing temperature value 39 of the gelling machine", and the corresponding weight is 5, the corresponding data format is as follows:
“typeCode”:01,
"data" bearing temperature value 39 of the gelling machine,
“weight”:5。
if the time point of the piece of data is 2022080815301012, the corresponding unique code "6581CF6B8084AAB3" is obtained according to the formula 6581CF6B8084AAB3 = MD5 (2022080815301012 gelled machine bearing temperature value 39). If the content to be transmitted does not exceed the transmission limit length of a single two-dimensional code, the corresponding data format may be:
{
“typeCode”:01,
the data comprises a bearing temperature value 39 of the colloider,
“weight”:5,
“uniqueCode”: “6581CF6B8084AAB3”
}。
if the transmission content exceeds the transmission limit length of a single two-dimensional code, the transmission content can be disassembled in an equipartition mode, if the disassembly is that 2 transmission content which needs to be transmitted conforms to the transmission limit length, the total number after the disassembly is 2, the sequence numbers are 1 and 2 respectively, and the corresponding data format can be as follows:
{
“typeCode”:01,
the data comprises a colloidizer bearing,
“weight”:5,
“uniqueCode”: “6581CF6B8084AAB3”,
“totalCount”:2,
“index”:1
}
{
“typeCode”:01,
"data" temperature value 39",
“weight”:5,
“uniqueCode”: “6581CF6B8084AAB3”,
“totalCount”:2,
“index”:2
}。
because the weight values of different contents to be transmitted obtained by disassembling are the same, the contents are also in adjacent positions in the process of transmission through the two-dimensional code. Taking the "temperature value 39" as an example, the specific form of splicing is as follows: providing a pressure value of 50 not less than 6581CF6B8084AAB3 not less than 2 cells. The specific form of encryption is as follows: encryption (temperature value 39 no 6581cf6b8084aab3 no 1, publickey) = AF282C96243D8883E555A9CA80D2E661, as does not circuitry 2. The corresponding format of the encrypted data may be:
{
“data”:“AF282C96243D8883E555A9CA80D2E661”,
“weight”:5,
"isSend":0 (0 = unsynchronized 1= synchronized)
}。
The format of the corresponding data to be transmitted is as follows: 6581CF6B8084AAB 3. Sub.AF 282C96243D8883E555A9CA80D2E661.
The number of the two-dimensional codes generated at a time needs to be preset with the resolution size of a display, so that a plurality of images can be supported, and the minimum resolution size (1204: 768) is required when a plurality of two-dimensional codes are generated because the image size influences the recognition accuracy of the outer network transmission program on the two-dimensional codes. The multiple two-dimensional code generation rules may be as follows: if the resolution size is larger than or equal to 1204 x 768, generating a plurality of sheets (default is 4 sheets); if the resolution size is <1204 × 768, the image is presented as a single image without performing the multiple-sheet generation processing. A schematic diagram of splicing multiple two-dimensional codes is shown in fig. 2.
The camera carries out focusing processing on the intranet display by calling the related interface of the camera, and a plurality of two-dimensional code images presented by the intranet display are captured according to the set N second interval, so that an intranet two-dimensional code image is obtained. Example of decryption of encrypted data: decryption (AF 282C96243D8883E555A9CA80D2E661, privateKey) = temperature value 39 ventilated wine 6581cf6b8084aab3 ventilated wine 2 nd 1.
According to the separator "|", the first part of the decrypted data is determined to be the content to be transmitted (temperature value 39), the second part is determined to be the unique code (6581 CF6B8084AAB 3), the third part is determined to be the total number (2), and the fourth part is determined to be the serial number (1).
The specific method for generating the outer network two-dimensional code for the unique code '6581 CF6B8084AAB 3' in the outer network comprises the following steps: and generating an encrypted character string 6581CF6B8084AAB3 non-conducting Ok ' by splicing the obtained result data (OK) and the transmitted unique code in a ' number ' splicing mode, acquiring an intranet transmission program public key, and adding the encrypted character string and the public key into a ciphertext by using RSA (rivest-Shamir-Adleman) to obtain ciphertext transmission data. Example of encryption: encryption (6581cf6b8084aab3 aerosol ok, publickey) = AF282C96243D8883E555A9CA80D2E661. The corresponding data format is:
{
“data”:”AF282C96243D8883E555A9CA80D2E661”,
“uniqueCode”:”6581CF6B8084AAB3”
}。
in the above embodiment, reids is mainly used as a data storage service in the cache, the data after data processing is placed in the cache, the time is set for the cache, and the expiration time is defaulted to 60 minutes. The expiration time is sliding expiration time, when the generated two-dimensional code is expired once, the current time is set to be 60 minutes, and after the synchronous state is achieved, the cache is automatically expired.
When the outer network transmission system feeds back a data processing result, a timer is started to take out data from the cache at regular time, the system starts a default interval of 5 seconds, one piece of data is obtained from the Reids cache every 5 seconds, and a two-dimensional code image is generated and presented by using ZXing _ SKD for the obtained data, so that the inner network transmission system can conveniently perform image identification. If no data exists in the cache, setting a timer to sleep for 60 seconds, and reducing the overhead of a system memory; the client can self-define the configuration interval time according to the requirement, and the default interval of the system is not less than 3 seconds.
The process of data analysis by the intranet is the reverse process of data encryption by the extranet, and is not described herein again.

Claims (8)

1. A method for cross-network data transmission applied to emergency management in the explosive and fire industry is characterized by comprising the following steps:
s1, acquiring intranet data in the explosive industry through a message subscription interface;
s2, sensitive data filtering is carried out on intranet data in the explosive and fire industry to obtain transmittable data, and corresponding weights are set according to the types of the transmittable data;
s3, unpacking the transmittable data to obtain the content to be transmitted, and generating a unique code for the content to be transmitted;
s4, judging whether the content to be transmitted exceeds the transmission limit length of a single two-dimensional code, and if so, entering a step S5; otherwise, entering step S6;
s5, decomposing the current content to be transmitted into a plurality of contents to be transmitted, and generating a corresponding serial number and a total number for each content to be transmitted obtained through decomposition;
s6, splicing and encrypting the contents to be transmitted, the unique codes corresponding to the contents to be transmitted, the total number corresponding to the contents to be transmitted and the serial numbers corresponding to the contents to be transmitted;
s7, splicing the encrypted data and the unique code corresponding to the synchronized content to obtain data to be transmitted, putting the data to be transmitted into intranet cache in the explosive and fire industry, and modifying the state of the data to be unsynchronized;
s8, data to be transmitted are taken from an intranet cache in the explosive industry according to the set time interval, weight and synchronization state, an intranet two-dimensional code is generated for each data to be transmitted taken from the intranet cache in the explosive industry, and all the intranet two-dimensional codes generated at the same time are spliced into one image to be displayed;
s9, acquiring a displayed intranet two-dimensional code image through an extranet camera in the explosive industry;
s10, analyzing and verifying the acquired intranet two-dimensional code image at an extranet in the explosive industry, deleting corresponding data in extranet cache in the explosive industry according to the unique code corresponding to the synchronized content obtained by analysis, and caching currently received encrypted data; internal network data in the explosive industry are transmitted to an external network and the external network is subjected to cache cleaning;
s11, generating an outer net two-dimensional code for each unique code of content to be transmitted, which is obtained by outer net analysis in the explosive and explosive industry, generating an outer net two-dimensional code for outer net data in the explosive and explosive industry, and splicing all outer net two-dimensional codes into an image to be displayed;
s12, acquiring a displayed two-dimensional code image of the outer net through an inner net camera in the explosive industry;
s13, analyzing the content of the two-dimensional code image of the outer network in the inner network of the explosive and fire industry, modifying the state of corresponding data to be transmitted in the inner network cache into synchronization according to the analyzed unique code, and transmitting the outer network data of the explosive and fire industry to the inner network;
the specific method of step S8 includes the following substeps:
s8-1, judging whether data to be transmitted exist in an intranet cache in the explosive industry, and if so, entering the step S8-3; otherwise, entering step S8-2;
s8-2, generating a two-dimensional code for indicating that the external network of the explosive industry is emptied of cache data by using the ALLSYNC identifier through ZXing _ SDK, and entering the step S9;
s8-3, sequencing data to be transmitted in the internal network cache of the explosive industry according to a mode that the weight is from high to low, sequentially taking at least one piece of data to be transmitted which is not synchronous in state from the internal network cache sequence of the explosive industry according to a set time interval, and generating an internal network two-dimensional code for each piece of data to be transmitted which is taken from the internal network cache of the explosive industry;
and S8-4, drawing a canvas with a pure white background according to the set distinguishing size, calculating the tiled position and the width and the height of a single intranet two-dimensional code, adding a black frame with 5 pixels to each intranet two-dimensional code, and drawing the intranet two-dimensional codes and the positions with the black frames generated at the same time into the canvas to realize that all intranet two-dimensional codes are tiled into one image to be displayed.
2. The method for transmitting data across networks for emergency management in the explosive and fire industry according to claim 1, wherein the specific method in the step S1 is as follows:
and the subscription is realized by quoting the SDK through the internal network transmission system in the explosive industry, and when data asynchronously issued to the MQ message queue by the production application system is received, the data is asynchronously acquired through the message subscription interface by adopting the internal network transmission system in the explosive industry.
3. The method for transmitting data across networks for emergency management in the explosive and fire industry according to claim 1, wherein the specific method for filtering sensitive data of intranet data in the explosive and fire industry in the step S2 is as follows:
establishing a keyword library and a data upper and lower threshold rule, splitting phrases of the intranet data in the explosive industry based on the Lucene segmentation principle, and comparing a splitting result with the keyword library; finding a corresponding data threshold rule for the splitting result, and verifying the rule with the set upper and lower thresholds; when the intranet data in the explosive and powder industry contains key words or the data threshold value exceeds the limit, logs are recorded and related personnel are informed in the form of mails, and the current data are not subjected to subsequent processing; otherwise, the transmittable data is obtained.
4. The method for transmitting data across networks for emergency management in the explosive and fire industry according to claim 1, wherein the specific method in the step S3 is as follows:
unpacking the transmittable data to acquire the content to be transmitted, and generating a unique code for the time stamp and the content to be transmitted in an MD5 mode.
5. The method for transmitting data across networks for emergency management in the explosive and fire industry according to claim 1, wherein the specific method in the step S6 is as follows:
generating an encrypted character string by splicing the content to be transmitted, the unique code corresponding to the content to be transmitted, the total number corresponding to the content to be transmitted and the serial number corresponding to the content to be transmitted in an 'I' number splicing mode, and generating a ciphertext by adding an external network public key to the encrypted character string by using an RSA method to obtain encrypted data.
6. The method for transmitting data across networks for emergency management in the explosive and fire industry according to claim 1, wherein a sliding expiration time is set for the data to be transmitted which is put into an intranet cache in the explosive and fire industry, namely, the expiration time of the data to be transmitted in the state of being unsynchronized is updated to be the current time plus a default expiration time every time a two-dimensional code is generated; and when the state of the data to be transmitted in the intranet cache in the explosive industry is synchronous, the cache is overdue.
7. The method for transmitting data across networks for emergency management in the explosive and fire industry according to claim 1, wherein the specific method in the step S10 comprises the following sub-steps:
s10-1, taking the brightness of three components in the intranet two-dimensional code image as the gray values of three gray level images at an extranet in the explosive industry;
s10-2, rapidly converting the gray image into a binary image only with black and white distribution through a Kittler algorithm;
s10-3, acquiring a black frame of each intranet two-dimensional code according to the image subjected to binarization processing, and calculating the width, height, X-axis and Y-axis point positions of a single intranet two-dimensional code according to the black frame;
s10-4, cutting a plurality of two-dimension codes of the intranet two-dimension code image through the point positions of the width axis, the height axis, the X axis and the Y axis of a single two-dimension code to obtain a cut two-dimension code;
s10-5, acquiring the data of the cut two-dimensional code by a ZXing _ SDK two-dimensional code identification technology to obtain the encrypted data and the unique code corresponding to the synchronized content;
s10-6, decrypting the encrypted data to obtain the content to be transmitted, the unique code, the total number and the serial number which are obtained through decryption;
s10-7, judging whether the total number and the serial number are null, and if so, entering the step S10-9; otherwise, entering step S10-8;
s10-8, sequentially placing the data obtained by decryption into an external network cache of the explosive industry according to the sequence number for storage, and when the sequence number is equal to the total number, performing data packaging to obtain complete contents to be transmitted;
s10-9, judging whether the unique code obtained by decryption exists in an external network cache in the explosive industry, and if so, not processing; otherwise, data forwarding is carried out on the content to be transmitted obtained through decryption, and intranet data transmission to an extranet in the explosive industry is completed;
and S10-10, deleting corresponding data in the external network cache of the explosive industry according to the unique code corresponding to the synchronized content obtained in the step S10-5, and realizing external network cache cleaning.
8. The method for transmitting data across networks for emergency management in the explosive and explosive industry according to claim 1, wherein the specific method for generating an extranet two-dimensional code for each unique code of the content to be transmitted, which is obtained by analyzing the extranet in the explosive and explosive industry in step S11, comprises the following steps:
starting a timer to take out the unique code of each content to be transmitted obtained by analysis from the external network cache in the explosive and fire industry at regular time, and generating a two-dimensional code image for the taken unique code by using ZXing _ SDK to obtain an external network two-dimensional code; when no unique code is available in the external network cache in the explosive and explosive industry, setting a timer to sleep for 60 seconds; the time interval for taking the unique code from the external network cache in the explosive and explosive industry is not less than 3 seconds.
CN202211439159.4A 2022-11-17 2022-11-17 Method for cross-network data transmission in emergency management of explosive and powder industry Active CN115514791B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211439159.4A CN115514791B (en) 2022-11-17 2022-11-17 Method for cross-network data transmission in emergency management of explosive and powder industry

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211439159.4A CN115514791B (en) 2022-11-17 2022-11-17 Method for cross-network data transmission in emergency management of explosive and powder industry

Publications (2)

Publication Number Publication Date
CN115514791A CN115514791A (en) 2022-12-23
CN115514791B true CN115514791B (en) 2023-02-17

Family

ID=84513913

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211439159.4A Active CN115514791B (en) 2022-11-17 2022-11-17 Method for cross-network data transmission in emergency management of explosive and powder industry

Country Status (1)

Country Link
CN (1) CN115514791B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2150017A1 (en) * 2008-07-31 2010-02-03 Research In Motion Limited Systems and methods for selecting a certificate for use with secure messages
CN103268461A (en) * 2013-04-25 2013-08-28 浙江成功软件开发有限公司 Intranet-extranet physical isolation data exchange method based on QR (quick response) code
CN108270792A (en) * 2018-01-30 2018-07-10 江苏意源科技有限公司 A kind of inside and outside network physical isolation high security method for interchanging data based on Quick Response Code
CN111860730A (en) * 2020-08-27 2020-10-30 南京轩宁信息技术有限公司 Different network information transmission system based on image processing
CN113094438A (en) * 2021-04-19 2021-07-09 沈阳展威电力科技有限公司 Internal and external network data isolation and transmission method based on two-dimensional code image recognition technology

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2150017A1 (en) * 2008-07-31 2010-02-03 Research In Motion Limited Systems and methods for selecting a certificate for use with secure messages
CN103268461A (en) * 2013-04-25 2013-08-28 浙江成功软件开发有限公司 Intranet-extranet physical isolation data exchange method based on QR (quick response) code
CN108270792A (en) * 2018-01-30 2018-07-10 江苏意源科技有限公司 A kind of inside and outside network physical isolation high security method for interchanging data based on Quick Response Code
CN111860730A (en) * 2020-08-27 2020-10-30 南京轩宁信息技术有限公司 Different network information transmission system based on image processing
CN113094438A (en) * 2021-04-19 2021-07-09 沈阳展威电力科技有限公司 Internal and external network data isolation and transmission method based on two-dimensional code image recognition technology

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
一种在物理隔离的网络间实现数据安全交换的方法;汪松等;《电脑编程技巧与维护》;20150403(第07期);全文 *

Also Published As

Publication number Publication date
CN115514791A (en) 2022-12-23

Similar Documents

Publication Publication Date Title
JPH0946330A (en) Electronic mail ciphering device and electronic mail transferring device
CN102281141B (en) Document permission management method, apparatus and system
US10574658B2 (en) Information security apparatus and methods for credential dump authenticity verification
CN108900910B (en) Method and system for monitoring validity of IPTV service content
CN113194081A (en) One-way message transmission system and method suitable for physical isolation environment
CN110337107A (en) A kind of fraud text message intelligent monitoring alarm device
CN115514791B (en) Method for cross-network data transmission in emergency management of explosive and powder industry
CN113034161B (en) Commodity logistics tracing information acquisition system based on block chain
CN105430623A (en) Monitoring method, device and system for RCS junk message
CN112183139A (en) Two-dimensional code-based data bidirectional transmission equipment and method
CN101729675B (en) Adaptive device and adaptor device based on multimedia message
CN115967537A (en) Block chain-based power grid service data storage method and system
CN115277690A (en) Industrial data supervisory systems based on block chain
CN111935316B (en) Method and device for acquiring front-end equipment catalog
CN106302491A (en) Linux-based mail monitoring method
CN113991870A (en) System and method for pushing internal and external network alarm information of power enterprise
CN108075932B (en) Data monitoring method and device
CN1997019B (en) A message monitoring and receiving method based on FTP transfer
JP2965534B2 (en) Data communication method
CN111181996B (en) Code detection image implementation method and system based on distributed multi-connection architecture
CN117544613A (en) Method for transmitting file from private network to comprehensive inspection private network and circular inspection private network through two-dimension code for motor vehicle safety technology inspection
CN112822156B (en) Confidential information monitoring system and method
CN116843043B (en) Intelligent data processing method and system based on intelligent gateway
CN115632879B (en) Log management method, system, electronic device and storage medium
CN109889590B (en) Message processing method, device, client and computer readable 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
GR01 Patent grant
GR01 Patent grant