CN111541720B - Data ferrying method, system, terminal equipment and readable storage medium - Google Patents

Data ferrying method, system, terminal equipment and readable storage medium Download PDF

Info

Publication number
CN111541720B
CN111541720B CN202010433420.4A CN202010433420A CN111541720B CN 111541720 B CN111541720 B CN 111541720B CN 202010433420 A CN202010433420 A CN 202010433420A CN 111541720 B CN111541720 B CN 111541720B
Authority
CN
China
Prior art keywords
data
module
queue
sending
message
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
CN202010433420.4A
Other languages
Chinese (zh)
Other versions
CN111541720A (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.)
Haoyun Technologies Co Ltd
Original Assignee
Haoyun Technologies 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 Haoyun Technologies Co Ltd filed Critical Haoyun Technologies Co Ltd
Priority to CN202010433420.4A priority Critical patent/CN111541720B/en
Publication of CN111541720A publication Critical patent/CN111541720A/en
Application granted granted Critical
Publication of CN111541720B publication Critical patent/CN111541720B/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
    • 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/0281Proxies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/143Termination or inactivation of sessions, e.g. event-controlled end of session
    • H04L67/145Termination or inactivation of sessions, e.g. event-controlled end of session avoiding end of session, e.g. keep-alive, heartbeats, resumption message or wake-up for inactive or interrupted session
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/566Grouping or aggregating service requests, e.g. for unified processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/163In-band adaptation of TCP data exchange; In-band control procedures

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a data ferrying method, a data ferrying system, terminal equipment and a readable storage medium. By implementing the invention, the bank security network and the internet can be physically isolated and can be mutually communicated, thereby effectively improving the safety and reliability of the bank security network.

Description

Data ferrying method, system, terminal equipment and readable storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a data ferry method, a system, a terminal device, and a readable storage medium.
Background
The cash escorting vehicle system adopts the internet to carry out communication interaction at present, and a bank security network is connected into the cash escorting vehicle system and is subjected to security protection by arranging a firewall. However, once the bank security network is connected to the internet, even if the bank security network is protected by a firewall, the bank security network is also at risk of invading the bank security network through the internet, and the security and reliability of the bank security network are low.
Disclosure of Invention
The technical problem to be solved by the embodiments of the present invention is to provide a data ferrying method, a system, a terminal device and a readable storage medium, which can solve the problem of low security and reliability of the existing bank security network.
In order to solve the above technical problem, an embodiment of the present invention provides a data ferry method, including:
after a data ferrying device access module initializes a data ferrying device access object, a TCP connection keep-alive thread is started so that the data ferrying device access object sends/receives heartbeat packets at preset time intervals, and when the condition that sending/receiving of the heartbeat packets is abnormal is detected according to preset conditions, the TCP connection keep-alive thread is disconnected and connection is carried out again;
after the data ferry equipment access module initializes the data ferry equipment access object, starting a data packet cache processing thread so that the data ferry equipment access object caches data packets of transmitted/received data;
when the MQ queue subscription module receives the MQ message, the MQ message is added to the sending queue caching module, so that the sending queue caching module sends a prompt event to the data ferrying sending module, and then the data ferrying sending module obtains the MQ message and sends the MQ message to an opposite terminal through the data ferrying equipment access module;
when the data ferrying device access module receives an MQ message of an opposite end, a prompt event is sent to the data ferrying receiving module, so that the data ferrying receiving module adds the MQ message of the opposite end to the receiving queue cache module, and then the MQ queue publishing module publishes the MQ message of the opposite end after acquiring the MQ message of the opposite end from the receiving queue cache module.
Further, after initializing the data ferry device access object, the data ferry device access module starts a data packet cache processing thread, so that the data ferry device access object performs data packet cache on the sent/received data, specifically including:
after the data ferry equipment access module initializes the data ferry equipment access object, a data packet caching processing thread is started so that the data ferry equipment access object caches data packets of transmitted/received data;
when the data ferry device access object receives a data receiving success response of the opposite end, removing the data from the data packet cache;
and when the data ferry equipment access object sends the data to the opposite end and does not receive a response within the preset time, retransmitting the data, removing the data from the data packet cache when the retransmission times reach a preset threshold value, and sending a data overtime non-sending reminding event.
Further, when receiving the MQ message, the MQ queue subscription module adds the MQ message to the transmission queue cache module, so that the transmission queue cache module sends a prompt event to the data ferry transmission module, and then the data ferry transmission module obtains the MQ message and transmits the MQ message to the opposite end through the data ferry device access module, which specifically includes:
the data ferrying sending module subscribes a change event of the sending queue buffer module, the sending queue buffer module initializes a sending queue and stores the last modification time of the sending queue;
the MQ queue subscription module adds the MQ message to the sending queue cache module when receiving the MQ message, and modifies the last modification time into the current time;
the sending queue caching module polls and judges whether the last modification time of the sending queue is different from the time stored by the sending queue caching module, if so, the sending queue of the sending queue is judged to be changed, and then a prompt event is sent to the data ferrying sending module;
and the data ferry sending module acquires the MQ message from the sending queue buffer module and sends the MQ message to an opposite terminal through the data ferry equipment access module.
Further, when receiving an MQ message of an opposite end, the data ferrying device access module sends a prompt event to the data ferrying receiving module, so that the data ferrying receiving module adds the MQ message of the opposite end to the receive queue cache module, and then the MQ queue publishing module publishes the MQ message after acquiring the MQ message of the opposite end from the receive queue cache module, which specifically includes:
the MQ queue publishing module subscribes a change event of the receiving queue caching module, the receiving queue caching module initializes the receiving queue and stores the last modification time of the receiving queue;
when the data ferry device access module receives an MQ message of an opposite terminal, a prompt event is sent to the data ferry receiving module;
the data ferry receiving module adds the MQ message of the opposite terminal to a receiving queue buffer module and modifies the last modification time into the current time;
the receiving queue caching module polls and judges whether the last modification time of the receiving queue is different from the time stored by the receiving queue caching module, if so, the receiving queue is judged to have changed, and then a prompt event is sent to the MQ queue issuing module;
and the MQ queue publishing module publishes the MQ message of the opposite terminal after acquiring the MQ message from the receiving queue caching module.
In order to solve the same technical problem, the invention also provides a data ferrying system, which comprises a data ferrying device access module, an MQ queue subscription module, a sending queue cache module, a data ferrying sending module, a data ferrying receiving module, a receiving queue cache module and an MQ queue publishing module; wherein,
the data ferry equipment access module is used for initializing a data ferry equipment access object, starting a TCP connection keep-alive thread to enable the data ferry equipment access object to send/receive heartbeat packets at preset time intervals, and disconnecting the TCP connection keep-alive thread and reconnecting when detecting that the sending/receiving of the heartbeat packets is abnormal according to preset conditions;
the data ferry device access module is further configured to start a data packet cache processing thread after initializing the data ferry device access object, so that the data ferry device access object performs data packet cache on the sent/received data;
the MQ queue subscribing module is used for adding the MQ message to the sending queue caching module when the MQ message is received so as to enable the sending queue caching module to send a prompt event to the data ferrying sending module;
the data ferry sending module is used for acquiring the MQ message and sending the MQ message to an opposite terminal through the data ferry equipment access module;
the data ferry device access module is used for sending a prompt event to the data ferry receiving module when an MQ message of an opposite end is received, so that the data ferry receiving module adds the MQ message of the opposite end to the receiving queue cache module;
and the MQ queue publishing module is used for publishing the MQ message after the MQ message of the opposite terminal is acquired from the receiving queue caching module.
Further, the data ferry device access module is configured to start a packet cache processing thread after initializing the data ferry device access object, so that the data ferry device access object performs packet cache on data to be sent/received, and specifically includes:
after the data ferry equipment access module initializes the data ferry equipment access object, starting a data packet cache processing thread so that the data ferry equipment access object caches data packets of transmitted/received data;
when the data ferry device access object receives a data receiving success response of the opposite end, removing the data from the data packet cache;
and when the data ferry equipment access object sends the data to the opposite end and does not receive a response within the preset time, retransmitting the data, removing the data from the data packet cache when the retransmission times reach a preset threshold value, and sending a data overtime non-sending reminding event.
In order to solve the same technical problem, the invention further provides a data ferry terminal device, which comprises a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, wherein the memory is coupled with the processor, and the processor implements any one of the data ferry methods when executing the computer program.
In order to solve the same technical problem, the present invention further provides a computer-readable storage medium, which stores a computer program, wherein when the computer program runs, the apparatus where the computer-readable storage medium is located is controlled to execute any one of the data ferry methods.
Compared with the prior art, the invention has the following beneficial effects:
the embodiment of the invention provides a data ferrying method, a data ferrying system, terminal equipment and a readable storage medium. By implementing the invention, the bank security network and the internet can be physically isolated and can be mutually communicated, thereby effectively improving the safety and reliability of the bank security network.
Drawings
Fig. 1 is a schematic flow chart of a data ferry method according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a heartbeat reconnection mechanism according to an embodiment of the present invention;
FIG. 3 is a flow chart of a data arrival mechanism according to an embodiment of the present invention;
fig. 4 is a schematic diagram of MQ subscription flow provided by an embodiment of the present invention;
fig. 5 is a schematic diagram of MQ publishing flow provided by an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a data ferry system according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described clearly and completely with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. 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.
Referring to fig. 1, an embodiment of the present invention provides a data ferry method, including:
s1, after the data ferry device access module initializes the data ferry device access object, a TCP connection keep-alive thread is started, so that the data ferry device access object sends/receives heartbeat packets at preset time intervals, and when the condition that the sending/receiving of the heartbeat packets is abnormal is detected according to the preset condition, the TCP connection keep-alive thread is disconnected and connection is carried out again.
Referring to fig. 2, in the embodiment of the present invention, a heartbeat reconnection mechanism is first designed for an access module of a data ferrying device, and as a feasible design, the heartbeat reconnection mechanism specifically includes:
1. initializing a data ferry device access object, and binding an event (asynchronous return is adopted for TCP connection with the device, and the event returns connection success, connection failure and heartbeat packet timeout). Saving the information of the mode and ferry equipment, and starting a TCP connection thread; it should be noted that the heartbeat reconnection mechanism is a subset of the data ferry device access module, and the data ferry device access object is a TCP class interacting with the device;
2. and (4) a normal flow: and if the connection is successful, starting the TCP connection keep-alive thread, and sending/receiving the heartbeat packet every 5 seconds by the TCP connection keep-alive thread. The event returns that the connection is successful;
3. an abnormal reconnection process: if the heartbeat packet is not received within 15 seconds, the connection is disconnected, the TCP connection keep-alive thread is closed, and the event returns to the timeout of the heartbeat packet; and if the reconnection is successful, starting the TCP connection keep-alive thread, and sending/receiving the heartbeat packet by the TCP connection keep-alive thread every 5 seconds. The event returns that the connection is successful;
4. if the service is required to be closed, releasing the data ferrying device access object, closing the TCP connection thread, disconnecting the connection, closing the TCP connection keep-alive thread, and returning.
And S2, after the data ferry device access module initializes the data ferry device access object, starting a data packet cache processing thread to enable the data ferry device access object to perform data packet cache on the sent/received data.
Further, after initializing the data ferry device access object, the data ferry device access module starts a data packet cache processing thread, so that the data ferry device access object performs data packet cache on the sent/received data, specifically including:
after the data ferry equipment access module initializes the data ferry equipment access object, starting a data packet cache processing thread so that the data ferry equipment access object caches data packets of transmitted/received data;
when the data ferry device access object receives a data receiving success response of the opposite end, removing the data from the data packet cache;
and when the data ferry equipment access object sends the data to the opposite end and does not receive a response within the preset time, retransmitting the data, removing the data from the data packet cache when the retransmission times reach a preset threshold value, and sending a data overtime non-sending reminding event.
Referring to fig. 3, in the embodiment of the present invention, step S2 is a possible design for a data link mechanism of an access module of a data ferry device, which specifically includes:
1. initializing a data ferry device access object, binding an event, starting a data packet cache processing thread, and returning;
2. and (3) normal flow: and sending data, adding the data to a sending queue, and storing the data in a data packet buffer. The sending queue ferries the data to the opposite end, the opposite end responds after receiving the data, and the data packet cache is removed after receiving the response;
3. an abnormal retransmission process: and sending data, adding the data to a sending queue, and storing the data in a data packet buffer. The send queue ferries the data to the opposite end. And if the data packet cache processing thread does not receive the response within the designated time, the retransmission flag bit is added with 1, and the sending queue ferries the data to the opposite end. And retransmitting for 20 times and clearing the cache. Return event data is not sent on a timeout.
4. If the service is required to be closed, the data ferry device access object is released, the data packet cache processing thread is closed, and the process returns.
And S3, when the MQ queue subscription module receives the MQ message, the MQ message is added to the sending queue buffer module, so that the sending queue buffer module sends a prompt event to the data ferry sending module, and then the data ferry sending module obtains the MQ message and sends the MQ message to the opposite terminal through the data ferry equipment access module.
Further, when receiving the MQ message, the MQ queue subscription module adds the MQ message to the transmission queue cache module, so that the transmission queue cache module sends a prompt event to the data ferry transmission module, and then the data ferry transmission module obtains the MQ message and transmits the MQ message to the opposite end through the data ferry device access module, which specifically includes:
the data ferrying sending module subscribes a change event of the sending queue buffer module, the sending queue buffer module initializes a sending queue and stores the last modification time of the sending queue;
the MQ queue subscription module adds the MQ message to the sending queue cache module when receiving the MQ message, and modifies the last modification time into the current time;
the sending queue caching module polls and judges whether the last modification time of the sending queue is different from the time stored by the sending queue caching module, if so, the sending queue of the sending queue is judged to have changed, and then a prompt event is sent to the data ferrying sending module;
and the data ferry sending module acquires the MQ message from the sending queue buffer module and sends the MQ message to an opposite terminal through the data ferry equipment access module.
Referring to fig. 4, in the embodiment of the present invention, the MQ subscription process is specifically designed as follows:
1. the data ferrying sending module subscribes a change event of the sending queue buffer module, the sending queue buffer module initializes a sending queue and stores the last modification time of the sending queue;
2. the MQ queue subscription module receives the MQ message, adds the MQ message to the sending queue cache module, and modifies the last modification time into the current time;
3. the sending queue caching module polls and judges whether the last modification time of the sending queue is different from the time stored by the sending queue caching module, if the last modification time of the sending queue is different from the time stored by the sending queue caching module, the sending queue changes, sends event prompt data to ferry the sending module, and stores new last modification time;
4. the data ferry sending module acquires data from the sending queue cache module and sends the data to the opposite terminal through the data ferry equipment access module;
5. and the data ferry sending module receives the return success and deletes the MQ message from the sending queue.
S4, when receiving the MQ message of the opposite end, the data ferrying device access module sends a prompt event to the data ferrying receiving module, so that the data ferrying receiving module adds the MQ message of the opposite end to the receive queue cache module, and then the MQ queue publishing module publishes the MQ message after acquiring the MQ message of the opposite end from the receive queue cache module.
Further, when receiving an MQ message of an opposite end, the data ferrying device access module sends a prompt event to the data ferrying receiving module, so that the data ferrying receiving module adds the MQ message of the opposite end to the receive queue cache module, and then the MQ queue publishing module publishes the MQ message after acquiring the MQ message of the opposite end from the receive queue cache module, which specifically includes:
the MQ queue publishing module subscribes a change event of the receiving queue caching module, the receiving queue caching module initializes the receiving queue and stores the last modification time of the receiving queue;
when the data ferry device access module receives an MQ message of an opposite terminal, a prompt event is sent to the data ferry receiving module;
the data ferry receiving module adds the MQ message of the opposite terminal to a receiving queue buffer module and modifies the last modification time into the current time;
the receiving queue caching module polls and judges whether the last modification time of the receiving queue is different from the time stored by the receiving queue caching module, if so, the receiving queue is judged to have changed, and then a prompt event is sent to the MQ queue issuing module;
and the MQ queue publishing module publishes the MQ message of the opposite terminal after acquiring the MQ message from the receiving queue caching module.
Referring to fig. 5, in the embodiment of the present invention, the MQ publishing process is specifically designed as follows
1. The MQ queue publishing module subscribes a change event of the receiving queue caching module, the receiving queue caching module initializes the receiving queue and stores the last modification time of the receiving queue;
2. the data ferry equipment access module receives an MQ message of an opposite terminal, and an event prompts the data ferry receiving module;
3. the data ferry receiving module adds the MQ message to a receiving queue buffer module and modifies the last modification time to be the current time;
4. the receiving queue caching module polls to judge whether the last modification time of the receiving queue is different from the time stored by the receiving queue caching module, if the last modification time is different from the time stored by the receiving queue caching module, the receiving queue changes, and the event prompts the MQ queue releasing module and stores new last modification time;
5. the MQ queue issuing module acquires data from the receiving queue caching module and issues the data through the MQ according to the queue name;
6. and the MQ queue issuing module receives the return success and deletes the MQ message from the receiving queue.
Compared with the prior art, the invention can physically isolate the bank security network from the Internet and can mutually communicate with each other, thereby effectively improving the safety and reliability of the bank security network.
It should be noted that the above method or flow embodiment is described as a series of acts or combinations for simplicity, but those skilled in the art should understand that the present invention is not limited by the described acts or sequences, as some steps may be performed in other sequences or simultaneously according to the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are exemplary embodiments and that no single embodiment is necessarily required by the inventive embodiments.
Referring to fig. 6, in order to solve the same technical problem, the present invention further provides a data ferrying system, including a data ferrying device access module, an MQ queue subscription module, a sending queue buffer module, a data ferrying sending module, a data ferrying receiving module, a receiving queue buffer module, and an MQ queue publishing module; wherein,
the data ferry equipment access module is used for initializing a data ferry equipment access object, starting a TCP connection keep-alive thread to enable the data ferry equipment access object to send/receive heartbeat packets at preset time intervals, and disconnecting the TCP connection keep-alive thread and reconnecting when detecting that the sending/receiving of the heartbeat packets is abnormal according to preset conditions;
the data ferry device access module is further configured to start a data packet cache processing thread after initializing the data ferry device access object, so that the data ferry device access object performs data packet cache on the sent/received data;
the MQ queue subscribing module is used for adding the MQ message to the sending queue caching module when the MQ message is received so as to enable the sending queue caching module to send a prompt event to the data ferrying sending module;
the data ferry sending module is used for acquiring the MQ message and sending the MQ message to an opposite terminal through the data ferry equipment access module;
the data ferry device access module is used for sending a prompt event to the data ferry receiving module when an MQ message of an opposite end is received, so that the data ferry receiving module adds the MQ message of the opposite end to the receiving queue cache module;
and the MQ queue publishing module is used for publishing the MQ message after the MQ message of the opposite terminal is acquired from the receiving queue caching module.
Further, the data ferry device access module is configured to start a packet cache processing thread after initializing the data ferry device access object, so that the data ferry device access object performs packet cache on data to be sent/received, and specifically includes:
after the data ferry equipment access module initializes the data ferry equipment access object, starting a data packet cache processing thread so that the data ferry equipment access object caches data packets of transmitted/received data;
when the data ferry device access object receives a data receiving success response of the opposite end, removing the data from the data packet cache;
and when the data ferry equipment access object sends the data to the opposite end and does not receive a response within the preset time, retransmitting the data, removing the data from the data packet cache when the retransmission times reach a preset threshold value, and sending a data overtime non-sending reminding event.
It is to be understood that the foregoing system embodiments correspond to the method embodiment of the present invention, and the data ferry system provided in the embodiments of the present invention can implement the data ferry method provided in any method embodiment of the present invention.
In order to solve the same technical problem, the present invention further provides a data ferry terminal device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the memory is coupled to the processor, and when the processor executes the computer program, any one of the data ferry methods is implemented.
The data ferry terminal device can be a desktop computer, a notebook computer, a palm computer, a cloud server and other computing devices. The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like, the processor is a control center of the data ferry terminal device, and various interfaces and lines are used to connect various parts of the whole data ferry terminal device.
The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the mobile phone, and the like. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
In order to solve the same technical problem, the present invention further provides a computer-readable storage medium, which stores a computer program, wherein when the computer program runs, the apparatus where the computer-readable storage medium is located is controlled to execute any one of the data ferry methods.
The computer program may be stored in a computer readable storage medium, which when executed by a processor, may implement the steps of the various method embodiments described above. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
It should be noted that the above-described system embodiments are merely illustrative, where the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention.

Claims (8)

1. A data ferry method, comprising:
after a data ferrying device access module initializes a data ferrying device access object, a TCP connection keep-alive thread is started so that the data ferrying device access object sends/receives heartbeat packets at preset time intervals, and when the condition that sending/receiving of the heartbeat packets is abnormal is detected according to preset conditions, the TCP connection keep-alive thread is disconnected and connection is carried out again;
after the data ferry equipment access module initializes the data ferry equipment access object, starting a data packet cache processing thread so that the data ferry equipment access object caches data packets of transmitted/received data;
when the MQ queue subscription module receives the MQ message, the MQ message is added to the sending queue caching module, so that the sending queue caching module sends a prompt event to the data ferrying sending module, and then the data ferrying sending module obtains the MQ message and sends the MQ message to an opposite terminal through the data ferrying equipment access module;
when the data ferrying device access module receives an MQ message of an opposite end, a prompt event is sent to the data ferrying receiving module, so that the data ferrying receiving module adds the MQ message of the opposite end to the receiving queue cache module, and then the MQ queue publishing module publishes the MQ message of the opposite end after acquiring the MQ message of the opposite end from the receiving queue cache module.
2. The data ferry method according to claim 1, wherein after initializing the data ferry device access object, the data ferry device access module starts a packet buffer processing thread, so that the data ferry device access object performs packet buffer on the transmitted/received data, and specifically includes:
after the data ferry equipment access module initializes the data ferry equipment access object, starting a data packet cache processing thread so that the data ferry equipment access object caches data packets of transmitted/received data;
when the data ferry device access object receives a data receiving success response of the opposite end, removing the data from the data packet cache;
and when the data ferry equipment access object sends the data to the opposite end and does not receive a response within the preset time, retransmitting the data, removing the data from the data packet cache when the retransmission times reach a preset threshold value, and sending a data overtime non-sending reminding event.
3. The data ferrying method according to claim 1, wherein the MQ queue subscribing module adds the MQ message to the sending queue buffer module when receiving the MQ message, so that the sending queue buffer module sends a prompt event to the data ferrying sending module, and then the data ferrying sending module obtains the MQ message and sends the MQ message to the opposite end through the data ferrying device access module, specifically comprising:
the data ferrying sending module subscribes a change event of the sending queue buffer module, the sending queue buffer module initializes a sending queue and stores the last modification time of the sending queue;
the MQ queue subscription module adds the MQ message to the sending queue cache module when receiving the MQ message, and modifies the last modification time into the current time;
the sending queue caching module polls and judges whether the last modification time of the sending queue is different from the time stored by the sending queue caching module, if so, the sending queue of the sending queue is judged to be changed, and then a prompt event is sent to the data ferrying sending module;
and the data ferry sending module acquires the MQ message from the sending queue buffer module and sends the MQ message to an opposite terminal through the data ferry equipment access module.
4. The data ferrying method according to claim 1, wherein the data ferrying device access module, when receiving an MQ message of an opposite end, sends a prompt event to the data ferrying receiving module, so that the data ferrying receiving module adds the MQ message of the opposite end to the receive queue cache module, and then the MQ queue publishing module obtains the MQ message of the opposite end from the receive queue cache module and then publishes the MQ message, specifically comprising:
the MQ queue publishing module subscribes a change event of the receiving queue caching module, the receiving queue caching module initializes the receiving queue and stores the last modification time of the receiving queue;
when the data ferry device access module receives an MQ message of the opposite terminal, a prompt event is sent to the data ferry receiving module;
the data ferry receiving module adds the MQ message of the opposite terminal to a receiving queue buffer module and modifies the last modification time into the current time;
the receiving queue caching module polls and judges whether the last modification time of the receiving queue is different from the time stored by the receiving queue caching module, if so, the receiving queue is judged to have changed, and then a prompt event is sent to the MQ queue issuing module;
and the MQ queue publishing module publishes the MQ message of the opposite terminal after acquiring the MQ message from the receiving queue caching module.
5. A data ferry system is characterized by comprising a data ferry device access module, an MQ queue subscription module, a sending queue caching module, a data ferry sending module, a data ferry receiving module, a receiving queue caching module and an MQ queue publishing module; wherein,
the data ferry equipment access module is used for initializing a data ferry equipment access object, starting a TCP connection keep-alive thread to enable the data ferry equipment access object to send/receive heartbeat packets at preset time intervals, and disconnecting the TCP connection keep-alive thread and reconnecting when detecting that the sending/receiving of the heartbeat packets is abnormal according to preset conditions;
the data ferry device access module is further configured to start a data packet cache processing thread after initializing the data ferry device access object, so that the data ferry device access object performs data packet cache on the sent/received data;
the MQ queue subscribing module is used for adding the MQ message to the sending queue caching module when the MQ message is received so as to enable the sending queue caching module to send a prompt event to the data ferrying sending module;
the data ferry sending module is used for acquiring the MQ message and sending the MQ message to an opposite terminal through the data ferry equipment access module;
the data ferry device access module is used for sending a prompt event to the data ferry receiving module when an MQ message of an opposite end is received, so that the data ferry receiving module adds the MQ message of the opposite end to the receiving queue cache module;
and the MQ queue publishing module is used for publishing the MQ message after the MQ message of the opposite terminal is acquired from the receiving queue caching module.
6. The data ferry system of claim 5, wherein the data ferry device access module is configured to start a packet cache processing thread after initializing the data ferry device access object, so that the data ferry device access object performs packet cache on data to be sent/received, and specifically includes:
after the data ferry equipment access module initializes the data ferry equipment access object, starting a data packet cache processing thread so that the data ferry equipment access object caches data packets of transmitted/received data;
when the data ferry device access object receives a data receiving success response of the opposite end, removing the data from the data packet cache;
and when the data ferry equipment access object sends the data to the opposite end and does not receive a response within the preset time, retransmitting the data, removing the data from the data packet cache when the retransmission times reach a preset threshold value, and sending a data overtime non-sending reminding event.
7. A data ferry terminal device comprising a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, the memory being coupled to the processor and the processor, when executing the computer program, implementing the data ferry method of any of claims 1 to 4.
8. A computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and wherein when the computer program is run, the computer program controls an apparatus in which the computer-readable storage medium is located to execute the data ferry method according to any one of claims 1 to 4.
CN202010433420.4A 2020-05-20 2020-05-20 Data ferrying method, system, terminal equipment and readable storage medium Active CN111541720B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010433420.4A CN111541720B (en) 2020-05-20 2020-05-20 Data ferrying method, system, terminal equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010433420.4A CN111541720B (en) 2020-05-20 2020-05-20 Data ferrying method, system, terminal equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN111541720A CN111541720A (en) 2020-08-14
CN111541720B true CN111541720B (en) 2022-08-09

Family

ID=71977960

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010433420.4A Active CN111541720B (en) 2020-05-20 2020-05-20 Data ferrying method, system, terminal equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN111541720B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113110354B (en) * 2021-04-29 2023-03-14 中国信息通信研究院 Ferry-based industrial data security system and method
CN114095247A (en) * 2021-11-18 2022-02-25 上海云钠信息科技有限公司 Two-way ferrying method and system based on two-dimensional code and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102075458A (en) * 2010-08-25 2011-05-25 上海神计信息系统工程有限公司 Instant messaging data ferrying transmitter and transmission method between two physically isolated networks
CN103039057A (en) * 2010-03-31 2013-04-10 安全第一公司 Systems and methods for securing data in motion
CN110086673A (en) * 2019-04-30 2019-08-02 中国神华能源股份有限公司 Data capture method and device
CN110191107A (en) * 2019-05-16 2019-08-30 南瑞集团有限公司 A kind of nuclear power Special safety Net Strobe System and data processing method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170063566A1 (en) * 2011-10-04 2017-03-02 Electro Industries/Gauge Tech Internet of things (iot) intelligent electronic devices, systems and methods
CN106230896B (en) * 2016-07-18 2019-09-03 深圳国泰安教育技术有限公司 A kind of information push method, apparatus and system
US10432448B2 (en) * 2017-07-06 2019-10-01 Sap Se Systems and methods for stream-based, protocol-agnostic messaging

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103039057A (en) * 2010-03-31 2013-04-10 安全第一公司 Systems and methods for securing data in motion
CN102075458A (en) * 2010-08-25 2011-05-25 上海神计信息系统工程有限公司 Instant messaging data ferrying transmitter and transmission method between two physically isolated networks
CN110086673A (en) * 2019-04-30 2019-08-02 中国神华能源股份有限公司 Data capture method and device
CN110191107A (en) * 2019-05-16 2019-08-30 南瑞集团有限公司 A kind of nuclear power Special safety Net Strobe System and data processing method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
《基于MQ的呼叫中心传输系统的设计与实现》;余洁;《中国优秀硕士论文库全文库》;20140115;全文 *
《基于应用过滤技术的协议单向网闸系统研究》;刘以胜;《中国优秀硕士论文库信息科技辑》;20190215;全文 *

Also Published As

Publication number Publication date
CN111541720A (en) 2020-08-14

Similar Documents

Publication Publication Date Title
CN103532797A (en) Abnormity monitoring method and device for user registration
CN105991412B (en) Information push method and device
CN111541720B (en) Data ferrying method, system, terminal equipment and readable storage medium
CN112672357B (en) Method and device for processing user account in service system and computer equipment
CN105530278A (en) Message pushing method and device
US20200014758A1 (en) On-board communication device, computer program, and message determination method
CN112187903A (en) Message pushing method and device and message service system
CN108134713A (en) A kind of communication means and device
CN111162880B (en) Data transmission method, device, equipment and storage medium
CN110474976B (en) Message transfer method, device, storage medium and system applied to automatic vending equipment
CN110881224A (en) Network long connection method, device, equipment and storage medium
CN110932960A (en) Social software-based fraud prevention method, server and system
EP2814201A1 (en) Notification message sending method, system, manipulation apparatus, and terminal device
CN109766347B (en) Data updating method, device, system, computer equipment and storage medium
CN104488300B (en) Device management method and device, system
CN117459286A (en) SD-WAN-based data communication security early warning method and device
CN114257632B (en) Method and device for reconnecting broken wire, electronic equipment and readable storage medium
CN111245839A (en) Violence cracking prevention method and device
US8065738B1 (en) Systems and methods for detecting automated spam programs designed to transmit unauthorized electronic mail via endpoint machines
CN213973873U (en) A anti-disassembly device and car for vehicle mounted terminal
CN111711927B (en) Method, device, equipment and storage medium for positioning terminal
CN111510300B (en) Data processing method, device, equipment and computer readable storage medium
CN113037696B (en) Data transmission method, system server, storage medium and computer equipment
CN115437710A (en) WebIDE container management method, webIDE container management apparatus, and computer storage medium
EP2960782A1 (en) An apparatus, system and method of data collection after software removal

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