CN110661891B - Cross-network file instant transmission method and system based on unidirectional network - Google Patents

Cross-network file instant transmission method and system based on unidirectional network Download PDF

Info

Publication number
CN110661891B
CN110661891B CN201911209913.3A CN201911209913A CN110661891B CN 110661891 B CN110661891 B CN 110661891B CN 201911209913 A CN201911209913 A CN 201911209913A CN 110661891 B CN110661891 B CN 110661891B
Authority
CN
China
Prior art keywords
file
task
fts
network
module
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
CN201911209913.3A
Other languages
Chinese (zh)
Other versions
CN110661891A (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.)
Wuhan Zhongke Tongda High New Technology Co Ltd
Original Assignee
Wuhan Zhongke Tongda High New Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Zhongke Tongda High New Technology Co Ltd filed Critical Wuhan Zhongke Tongda High New Technology Co Ltd
Priority to CN201911209913.3A priority Critical patent/CN110661891B/en
Publication of CN110661891A publication Critical patent/CN110661891A/en
Application granted granted Critical
Publication of CN110661891B publication Critical patent/CN110661891B/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/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • 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/55Push-based network services
    • 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
    • H04L2212/00Encapsulation of packets

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a cross-network file instant transmission system and a method based on a unidirectional network, wherein a file transmission initiating side module and a file transmission receiving side module are deployed in the unidirectional network; a task request module is deployed at a file transmission initiating side module, and a task management module is deployed at a file transmission receiving side module; according to the system and the method, the file requirements can be acquired according to the requirement side, and the task information is generated; converting the task information into a file address which can be identified by the task request module through an address conversion rule; when a task request module initiates a connection request to a task management module, task information and a file address corresponding to the task information are obtained from the task management module; searching in the current network based on the file address, and pushing the acquired required file to a task management module; the task management module calls the cache module to write the file into the cache area of the receiving side and calls the file release module to feed back the required file to the demand side.

Description

Cross-network file instant transmission method and system based on unidirectional network
Technical Field
The invention relates to the field of information transmission, in particular to a method and a system for further realizing instant transmission of a unidirectional network by respectively deploying related programs on an initiating side and a receiving side under the service requirement of massive files.
Background
The development of information technology has greatly promoted computer networks and information systems, which are widely applied to governments and public institutions and provide solid guarantee for electronization, automation and informatization of office and production construction.
In a limited network (such as a public security network) environment, cross-network communication can only initiate connection from one side, and monitor a connection request from the other side, but cannot establish connection reversely. Existing file transfer software is essentially unusable when there is a reverse request. In this case, the initiator side usually sends the file to the receiver side indiscriminately, and then saves another file (which may be called pre-transmission) on the receiver side, which has the disadvantage that two sets of storage systems need to be deployed in two networks, resulting in an increase in project cost.
However, under the service of massive files, the traditional solution obviously cannot meet the actual requirement of increasing service volume, and the solution of cross-network file transmission of the unidirectional network becomes especially important.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a cross-network instant file transmission method and system based on a unidirectional network, aiming at solving the defect of instant file transmission in a single network.
The technical scheme adopted by the invention for solving the technical problems is as follows: a cross-network instant file transmission system based on a unidirectional network is constructed, the system comprises a file transmission initiating side module-FTC which is respectively deployed under an initiating side network, a file transmission receiving side module-FTS which is deployed under a receiving side network, a task request module-TRM which is deployed at the FTC, and a task management module-TMM which is deployed at the FTS, in a unidirectional network environment, wherein:
the TMM is used for receiving the file pushed by the TRM on one hand and calling a file cache module FCM for caching; on the other hand, according to the requirement of the file acquisition by the file publishing module FPM, the file caching module FCM is called to perform file matching in the task caching area, the required file is further fed back to the requirement side under the condition that the file matching is successful, and the generated task information comprising the request file address is stored in the task caching area under other conditions, wherein the task information is converted into an identification file address which can be identified by the TRM through an address conversion rule;
the TRM is used for initiating a connection request to the TMM and acquiring an identification file address from the task cache region; and searching in the network at the initiating side based on the identified file address, further pushing the acquired required file to the TMM, and storing the required file in a task cache region while feeding the required file back to the required side by the TMM.
Further, the FTC further comprises a file processing module-FHM and a file pushing module-FSM, wherein:
the FHM is used for acquiring an identification file address from the task cache region when the TRM initiates connection to the TMM, so as to perform adaptation processing of a file system and acquire file information and file content;
the FSM is used for acquiring file information and file contents from the FHM, encapsulating network data packets according to a protocol between the FTC and the FTS, and pushing the encapsulated data packets to the TMM.
Further, the FTS further includes a file caching module-FCM and a file publishing module-FPM, where:
the FCM is used for inquiring and writing the task information which is created by the TMM and comprises the request file address, storing the file data pushed by the FSM and reading the file which is requested by the demand side to the FPM;
the FPM is used for interfacing with the demand side, providing file request data to the TMM, acquiring file information and content from the FCM and responding to the demand side.
Furthermore, a periodic cleaning mechanism is arranged in the file cache module FCM, and a time threshold is set after further classification statistics is performed on the stored file data, so that the corresponding cache file with the cache time higher than the threshold is deleted.
Further, a file transmission client program is deployed at the FTC, and a file transmission server program is deployed at the FTS.
Further, a distributed deployment mechanism is adopted, in the current network, the FTC and the FTS are deployed into a multipoint-to-single point connection relationship, and the application request program set on the demand side and the FTS are deployed into a multipoint-to-multipoint connection relationship; wherein each FTC, FTS and application requesting program is treated as a connecting node.
Further, a load balancing component is set and connected between the application request program set on the demand side and the FTS, and the load balancing component is used for distributing the request task to different FTS nodes based on a balancing algorithm so as to balance the workload among the nodes.
The invention provides a method for realizing cross-network file instant transmission of a unidirectional network by any one of the above cross-network file instant transmission systems, which comprises the following steps:
the application of the demand side establishes communication connection with the file receiving side through a communication protocol and requests the file receiving side to acquire a required file;
after receiving the request, a File Publishing Module (FPM) at the file receiving side calls a File Caching Module (FCM), matches required file information included in the request information with cached data, and further feeds the matched data back to the demand side; when the matching fails, executing the next step;
creating a new file transmission task through a Task Management Module (TMM) arranged in the FTS, and waiting for a Task Request Module (TRM) to initiate a request task; after the TRM sends a task request to the TMM, the TMM acquires a task to be transmitted through the FCM, converts task information into a file address which can be identified by a file initiating side based on an address conversion rule, and then responds to the TRM;
after a file initiating side and a file receiving side are connected, the TRM calls a file processing module FHM of the FTC to process a required file under a network of the initiating side from a task management module TMM of the FTS to acquire a task to be transmitted;
and the FSM encapsulates the processed file information and file contents according to an FTC/FTS communication protocol to obtain a network data packet, and the encapsulated data packet is sent to a TMM of the FTS.
Further, under the condition of a distributed deployment mechanism, deploying the application request program set by a demand side and the FTS as a multipoint-to-multipoint connection relationship at a file receiving side; and at the file initiating side, deploying the FTC and the FTS into a multipoint-to-single point connection relation.
Further, the file request is distributed to different FTS nodes based on a balance algorithm between the application request program set on the demand side and the FTS, so as to balance the workload among the nodes.
In the method and the system for instantly transmitting the cross-network files based on the unidirectional network, the file is copied from one network to another network through a file ferry tool (such as FTP) unlike the prior art; the invention provides a method and a system for instant transmission of unidirectional network files, wherein a file address mapping mechanism and a file cache mechanism are provided on a receiving side network, when the receiving side network requests a file of an initiating side network, on one hand, direct feedback is carried out based on the cached file in a cache region, on the other hand, after a task to be processed is obtained by a program deployed on the initiating side network, the required file is downloaded on the network and the like, and is pushed to a module deployed on the receiving side network and then fed back to a demand side; the method and the system provide reverse connection establishment and cross-network file transmission under the limited network, and two sets of storage systems are not required to be deployed under the two networks, so that the project cost is greatly reduced.
Drawings
The invention will be further described with reference to the accompanying drawings and examples, in which:
FIG. 1 is a structural diagram of a cross-network instant file transmission system based on a unidirectional network, which is disclosed by the invention;
FIG. 2 is a topological structure diagram of a cross-network file instant transmission system constructed in an actual development process;
FIG. 3 is a schematic diagram of the initial transmission of data streams during actual development;
FIG. 4 is a diagram illustrating actual transmission of data streams during actual development;
FIG. 5 is a schematic diagram of data interaction on the initiator side in an actual development process;
FIG. 6 is a schematic diagram of data interaction at a receiving side in an actual development process;
FIG. 7 is a schematic diagram of a system architecture of a cluster and lateral expansion scheme;
FIG. 8 is a flow chart of FTC acquisition tasks;
FIG. 9 is a flow chart of FTC file processing;
FIG. 10 is a flow chart of FTC file transmission;
FIG. 11 is a flow chart of FTS task management;
FIG. 12 is a flow chart of FTS cache management;
FIG. 13 is a flow chart of FTS file publication;
FIG. 14 is a schematic diagram of a dependency on storage across a network platform in the prior art;
FIG. 15 is a schematic diagram of the improved dependence on storage of the cross-network platform provided by the present invention.
Detailed Description
For a more clear understanding of the technical features, objects and effects of the present invention, embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
Please refer to fig. 14, which is a schematic diagram illustrating a dependence of a cross-network platform on storage in the prior art, taking a traffic police service as an example, a private video network and a public security network are generally distinguished in a network environment of a traffic police, and other applications (1-n) in the public security network cannot actively request files from the private video network, and all files required to be used in the public security network are generally copied from the private video network to the public security network by a file ferry tool (such as an FTP application) and stored in a storage system of the public security network.
For a small amount of files, the traditional method has no problem in processing, however, in a service scene of a large amount of files, the proportion of the cost of a complete set of storage system in the whole project accounts for half or more, so the traditional solution obviously cannot meet the requirement of the real situation of increasing service volume, and the solution of cross-network file transmission of a unidirectional network becomes especially important.
Please refer to fig. 15, which is a schematic diagram illustrating the dependency of the improved cross-network platform on storage according to the present invention, and the present invention aims to provide a solution to the problem of instant file transmission in a unidirectional network; that is, the receiving side may also initiate a file transfer request to the initiating side, and after the initiating side receives the request instruction, the application program set by the initiating side sends the file to the receiving side to complete the file transfer. Thus, the problem of instant file transmission in the unidirectional network is solved.
In order to achieve the above objects and other related objects, the specific operation process is as follows: initiating a long connection request by an initiating side network, responding the connection request of the initiating side network and the file request of the receiving side network by an application program set at the receiving side under the receiving side network, and respectively providing a file address mapping mechanism and a file cache mechanism under the receiving side network;
when a receiving side network needs to request a required file from an initiating side network, firstly, whether the cached file exists in a cache is checked, if so, the file content is directly returned to complete the file request process, otherwise, the file request process is put into a queue to be processed; the program of the initiating side network can continuously check whether the queue to be processed has tasks to be processed, if so, the file address is taken away, the file address is converted into the file address of the initiating side network through an address conversion rule, then the file processing of the network is completed, and then the file is pushed to the receiving side network, and then the file is written into the cache by the receiving side and returned to the requesting program.
The following takes traffic police service as an example: the method comprises the steps that two modules are respectively deployed in a private video network and a public security network, an application in the public security network sends a file request to the public security network module, the public security network module firstly searches whether a cache caches a file, if so, the file is taken out and fed back to the application, and if not, a file transmission task is created and a module waiting for the private video network obtains the file transmission task; after the private video network module is started, firstly establishing connection with the public security network module, and continuously requesting tasks to the public security network in sequence, when the public security network module returns the tasks, processing the files in the private video network according to the task information (namely invoking http and ftp downloading, acquiring the files through a special SDK of a storage system and the like), then packaging network data packets of the files according to protocol agreement between the two modules, and then sending the files to the public security network module; and finally, the public security network module writes the cache and feeds the cache back to the application of the public security network.
The present invention will be described in further detail with reference to two examples.
Example 1:
referring to fig. 1, the present invention discloses a cross-network file instant transmission system structure diagram based on a unidirectional network, the system includes a file transmission initiating side module FTC deployed under the initiating side network, a file transmission receiving side module FTS deployed under the receiving side network, a task request module TRM, a file processing module FHM, a file push module FSM deployed at the file transmission initiating side module FTC, a task management module TMM, a file cache module FCM, and a file publishing module FPM deployed at the file transmission receiving side module in a unidirectional network environment; wherein:
the task request module TRM is responsible for requesting tasks from the task management module TMM and writing the tasks into an internal queue of the FTC;
the file processing module FHM gets the file processing task from the FTC internal queue, and then executes corresponding processing, including: obtaining file information and content in a http downloading mode, an ftp downloading mode, a local file opening mode, a file access mode by using a special SDK of a storage system and the like;
the file push module FSM waits for the call of FHM, encapsulates the network data packet on the file information and the file content according to the protocol agreement of FTC and FTS, and sends the encapsulated data packet to the TMM module of FTS;
the task management module TMM is responsible for managing file transmission, waits for calling of the FPM and is connected with the TRM; when the FPM calls the TMM, after the TMM creates a new file transmission task, the TMM writes the created new file transmission task into a distributed cache by calling the FCM and waits for the FTC to acquire the file transmission task, when the FTC initiates a request task, the TMM acquires the file transmission task from the distributed cache through the FCM and returns the file transmission task to the TRM, after the FTC completes processing, the obtained file information and file content are sent to the TMM through the FSM, and the current TMM further calls the FCM and writes the file information and the file content into the distributed cache;
the file cache module FCM is responsible for handling the interaction between TMM and distributed cache, including: writing the task into a cache, reading the task from the cache, writing the file into the cache and reading the file from the cache;
the FPM is responsible for interaction with the application on the demand side; when an application program set by a demand side initiates a request file to the FPM, the FPM calls the FCM to check whether the current file to be transmitted has a cache region; if the file exists, reading the file in the cache region through the FCM, and further feeding back the file to the application; if the corresponding file transmission task does not exist and is not created, the TMM is called to create a new file transmission task, then the FCM is continuously called to check whether the file to be requested exists in the cache region, the operation is repeated until the file exists or is overtime, the file content is returned when the file exists, and otherwise, the information that the file cannot be found is returned to the application.
In this embodiment, the FTC is mainly configured to initiate a connection request to the FTS, and obtain an identification file address from the distributed cache area; and searching in the initiating side network based on the identified file address, further pushing the acquired file data to the FTS, and storing the file data in a distributed cache region while feeding the file data back to the application by the FTS.
In order to reduce the pressure of the cache in the FTS on system resources, a periodic cleaning mechanism is arranged in the file cache module FCM, a time threshold is set after the stored file data is further classified and counted, and files with overtime file cache time are deleted periodically.
Please refer to fig. 2, which is a structure diagram of an instant transmission system for cross-network files constructed in an actual development process, wherein in the actual development process, a launch side network is abbreviated as c (client), and a receive side network is abbreviated as s (server); the program deployed on the C side is called ftc (file Transfer client), and the program deployed on the S side is called fts (file Transfer server); the current process for realizing unidirectional network file transmission based on the system is as follows:
initiating a connection request to the FTS by the FTC, after establishing connection, inquiring whether a task needing to transmit files exists in the FTS by the FTC, if so, under the C network, carrying out processing operations such as searching, downloading and the like on the files to be transmitted, after the files are properly processed, pushing the files to the FTS in the S network by the FTC, if not, waiting and initiating an inquiry to the FTS by the FTC again in the next period, and repeating the steps until the FTC or the FTS exits.
Referring to fig. 3, which is a schematic diagram of initial transmission of a data flow, in the current embodiment, an application initiates a request to a network C to acquire a file, if a unidirectional network immediate transmission system FTC/FTS can search a to-be-acquired file from a cache region, the to-be-acquired file is directly transmitted to a corresponding request application program, otherwise, the request is further stored as task information, after the FTC and the FTS establish a connection, the FTC acquires the task information, searches and processes a to-be-acquired file on the network C based on the task information, and further transmits the searched to-be-acquired file to the corresponding request application program through the FTS.
Referring to fig. 4, which is a schematic diagram of actual transmission of data streams, in the present embodiment, a further detailed decomposition is performed on the unidirectional network instant transmission system shown in fig. 3, where a file address mapping mechanism and a file cache mechanism are respectively set in the FTS, a processing program set in the network on the current initiator side continuously checks whether a queue to be processed has a task to be processed, if so, the stored task information is first converted into an identifiable file address of the network on the initiator side based on the file address mapping mechanism, and after the file address is further transmitted to the FTC, the FTC completes file processing in the network on the C side, and further pushes the processed file to the FTS, and then the processed file is written into the cache and returned to the corresponding request application program by the FTS.
Please refer to fig. 5, which is a schematic diagram of data interaction at an initiator during actual development, where the data interaction at the current initiator mainly includes the following steps:
1. inquiring whether a file list to be transmitted exists from the FTC to the FTS;
2. the FTS inquires whether a file list to be transmitted exists in a task cache region;
3. after inquiring the file list to be transmitted, returning the file list to the FTC through the FTS; if the file list is not inquired, in the next period, returning to the step 1, and re-acquiring the file list to be transmitted;
4. and acquiring the file information and the file data under the C network, further sending the file information and the file data to the FTS, and writing the acquired file information and the acquired file data into a task cache area by the FTS.
Please refer to fig. 6, which is a schematic diagram of data interaction at a receiving side in an actual development process, where the data interaction at the receiving side mainly includes the following steps:
1. the S network application requests the file of the C network from the FTS through protocols such as HTTP, FTP and the like;
2. FTS searches and inquires whether the file exists in the buffer area, if so, the FTS directly returns file information and file content to the application in the S network, and if not, a new file transmission task is created, and a list to be transmitted is written into the buffer area;
3. when the FTC is idle, requesting to obtain a task to be transmitted from the FTS; after receiving the request, the FTS looks up whether a request task exists in the list to be transmitted, and if so, returns the request task to the FTC; if not, repeating the current step in the next period until the list to be transmitted is obtained;
4. after receiving the list to be transmitted, the FTC starts a downloading and transmitting task under the C network, and immediately pushes the file information and the file content to the FTS, and the FTS writes the file information and the file content into a task cache region and returns the file information and the file content to the S network application.
In this embodiment, an interactive instruction between the FTC and the FTS is set as a control instruction and a data transmission instruction, where the FTC sends the control instruction to the FTS to obtain whether there is data information of a file push task, and if so, the FTS returns task information to be pushed to the FTC, the FTC completes analysis of the task information, and completes a file push task by transmitting the data transmission instruction to the FTS after completing preparation of the file push task; after receiving the corresponding data transmission instruction, the FTS writes the data transmission instruction into the cache region through the control instruction and returns the data transmission instruction to the requested S-network application. In the implementation process, the inquiry of the FTC and the response of the FTS belong to the control instruction, and the FTC pushes the file to the FTS to belong to the data instruction; the composition of the instructions refers to table 1:
TABLE 1
Serial number Name (R) Length of Means of
1 SIGN 8 Marking: fixed value of 0x7E46215440532324
2 LENGTH 4 Length: including SIGN + LENGTH
3 TYPE 1 Type (2): 0 control instruction, 1 data instruction
4 VERSION 1 Version: the upper 4 bits represent the major version and the lower 4 bits represent the minor version
5 COMMAND 1 Instructions for: 1 request, 2 response
6 PARAMTERS 1 Parameter, retention
7 DATA N Data of
Wherein the unit of length is BYTEs (BYTE); COMMAND and PARAMTERS make sense when the COMMAND of the current interaction is a control COMMAND, otherwise make no sense; when a control command is present, DATA is empty, otherwise DATA is composed of the following parts (see table 2):
TABLE 2
Serial number Name (R) Length of Means of
1 LENGTH 2 URL length
2 URL N URL content
3 FILE N Document content
The following further explains a part of the data transmission process by combining with related instructions with two examples:
(1) when the application of the S network requests the C network file from the FTS, the request sent by the S network application to the FTS consists of two parts: http:// fts address port/c net url; wherein, the c-network url is made into url lens code.
Examples are:
setting: FTS IP is 192.168.1.10, port is 8000;
setting 1: the c-network file address is http://192.168.100.100:8080/data/test
After address translation, the file address requested by the application of the current S network to the FTS is:
http://192.168.1.10:8000/http%3A%2F%2F192.168.100.100%3A8080%2Fdata%2Ftest.jpg
setting 2: the c-network file address is:
ftp://root:123456@192.168.100.100:21/data/test.jpg;
the address of the request is:
http://192.168.1.10:8000/ftp%3A%2F%2Froot%3A123456%40192.168.100.100%3A21%2Fdata%2Ftest.jpg。
please refer to fig. 8-13, which are flow charts of a cross-network file instant transmission method based on a unidirectional network according to the present invention, wherein the cross-network file instant transmission method includes the following steps:
an application program APP set by a demand side establishes communication connection with a file receiving side FTS through a communication protocol, and requests the FTS to acquire a required file;
after receiving the request, the FTS matches required file information included in the request information with cache data in a File Cache Module (FCM), and feeds back the matched data to the APP; when the matching fails, executing the next step;
writing task information adaptive to the required file information into a Task Management Module (TMM); based on an address conversion rule of a url-encoding character code, converting task information into a file address which can be identified by a file initiating side FTC, and further storing the file address;
after the FTC at the file initiating side establishes connection with the FTS at the file receiving side, searching and processing the required files under the network at the initiating side based on the identification file address obtained from the TMM;
the FTC transmits the obtained required file to a Task Management Module (TMM) of the file receiving side FTS, and the TMM stores the required file based on a File Cache Module (FCM); and the FPM acquires the file content based on the FCM and feeds the file content back to the application program.
Specifically, please refer to fig. 8, which is a flowchart of a task acquired by the TRM of the FTC, after the TRM establishes a connection with the FTS, the TRM acquires a file transfer task from the TMM of the FTS, and if there is a task, the task is analyzed according to the FTC/FTS protocol, and the analyzed task information is placed in a task waiting processing queue inside the FTC; judging whether to end the current execution task or not after no task or the execution of the task analysis flow is finished, and disconnecting the TRM and the FTS under the condition that the current execution task needs to be ended; and under other conditions, returning to the task analysis step, re-acquiring the task data, and entering the next task acquisition stage.
Please refer to fig. 9, which is a flow chart of FHM file processing of FTC, according to the task processing flow described in fig. 8, where an output of TRM is an input of FHM, and the FHM fetches a task from a queue to be processed, and in the case of a task, the FHM selects a file processing adapter according to description of a file type in the task, further processes a file (including http download, ftp download, local file open, file access by using a dedicated SDK of a storage system, and the like, to obtain file information and content), and invokes a file sending module FSM, and further transmits the processed file data to FTS.
Please refer to fig. 10, which is a flowchart of FSM file sending of the FTC, the FSM connects to the TMM of the FTS after starting, waits for the invocation of the FHM, and encapsulates the file information and the file content according to the network transmission protocol between the FTC and the FTS after the FHM is invoked, and further pushes the encapsulated data to the FTS.
Referring to fig. 11, which is a flowchart of TMM task management of the FTS, when an application on a demand side requests, if the request is a file that is not cached, the TMM is called by the FPM, so as to create a new file transfer task and call the FCM to write into a queue to be processed; meanwhile, the TMM is connected by the TRM of the FTC and is used for inquiring the task to be processed, and when the request of the TRM comes, the TMM acquires a new task through the FCM and returns the new task to the TRM; meanwhile, the TMM is connected by the FSM of the FTC, waits for the FSM to push the file to the TMM, and calls the FCM to write the file into the cache.
Please refer to fig. 12, which is a flowchart of FCM cache management of the FTS, and it first establishes a connection with the distributed cache, and then waits for reading and writing of tasks and reading and writing operations of files, the FPM will call an operation of reading files of the FCM, and the TMM will call an operation of reading and writing tasks and writing files of the FCM.
Referring to fig. 13, which is a flowchart of the FPM file publishing in the FTS, the FPM first establishes monitoring, then waits for an application to obtain a file request instruction, and when a request is determined, calls the cache module FCM to query whether a query file exists in the task cache area, and calls the FCM to read the file and further feed back the file content to a user if the query file exists; under the condition that the query file does not exist, judging whether the same file transmission task is created previously, under the condition that the query file is created, detecting whether the request time is overtime, and under the condition that the request time is overtime, feeding back information of the file content which cannot be found to a user; in case there is no timeout, the task management module TMM is invoked to create a new task.
Example 2:
in order to improve response speed, pressure resistance and disaster tolerance of the FTS, the FTS uses a technical scheme of distributed cache, the scheme is realized by using products mature in the existing market, and the type selection is based on the following steps:
the response speed is high and is far higher than the disk IO;
high concurrency, support multiple requests;
the distributed deployment is supported, and the multi-node disaster recovery capability is realized;
the used resources can be flexibly adjusted according to hardware conditions and service pressure;
data persistence is supported, and data are not lost when the computer is shut down;
the method can be used in a decoupling mode with the FTS, and does not affect increase and decrease of FTS nodes and lose data when the FTS stops.
The data interaction between the FTS and the cache is shown in fig. 3-6.
In a unidirectional network, a plurality of nodes of FTC/FTS can be deployed simultaneously according to the service pressure, and the respective transversely-expanded clusters are realized.
As shown in fig. 7, in the current network, a distributed deployment mechanism is currently adopted, and in the current network, the FTS and the FTC are deployed as a single-point-to-multipoint connection relationship, and the application request program and the FTS are deployed as a multipoint-to-multipoint connection relationship; wherein, FTS, FTC and application request program are regarded as a connection node; the load balancing component is used for distributing the request tasks to different task request module nodes based on a balancing algorithm so as to balance the work load among the nodes.
Currently, in a distributed deployment system, the method for implementing instant transmission of cross-network files is different from the method obtained in embodiment 1 in that:
under the condition of a distributed deployment mechanism, deploying the application request program and the FTS as a multipoint-to-multipoint connection relation at a file receiving side; at a file initiating side, the FTC and the FTS are deployed into a multipoint-to-single point connection relationship, so that the whole system is further ensured to have matched working capacity under the condition of large traffic volume, and the problem that the whole system fails due to node failure when a single node is avoided.
And distributing the request tasks to different task request module nodes based on a balancing algorithm between the application request program and the FTS so as to balance the workload among the nodes.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (10)

1. A cross-network instant file transmission system based on a unidirectional network comprises a file transmission initiating side module-FTC deployed under an initiating side network and a file transmission receiving side module-FTS deployed under a receiving side network respectively in a unidirectional network environment, and is characterized by further comprising a task request module-TRM deployed at the FTC and a task management module-TMM deployed at the FTS, wherein:
the TMM is used for receiving the file pushed by the TRM on one hand and calling a file cache module FCM for caching; on the other hand, according to the requirement of the file acquisition by the file publishing module FPM, the file caching module FCM is called to perform file matching in the task caching area, the required file is further fed back to the requirement side under the condition that the file matching is successful, and the generated task information comprising the request file address is stored in the task caching area under other conditions, wherein the task information is converted into an identification file address which can be identified by the TRM through an address conversion rule;
the TRM is used for initiating a connection request to the TMM and acquiring an identification file address from the task cache region; the method comprises the steps that a TRM under an initiating side network continuously and actively inquires whether task information to be processed exists in a task cache region, when the task information to be processed exists, an identification file address is obtained from the task cache region, the TRM searches in the initiating side network based on the identification file address, obtained needed files are further pushed to a TMM, and the TMM feeds the needed files back to a needing side and stores the needed files in the task cache region.
2. The system of claim 1, wherein the FTC further comprises a file processing module-FHM and a file push module-FSM, wherein:
the FHM is used for acquiring an identification file address from the task cache region when the TRM initiates connection to the TMM, so as to perform adaptation processing of a file system and acquire file information and file content;
the FSM is used for acquiring file information and file contents from the FHM, encapsulating network data packets according to a protocol between the FTC and the FTS, and pushing the encapsulated data packets to the TMM.
3. The system according to claim 2, wherein the FTS further comprises a file caching module-FCM and a file publishing module-FPM, and wherein:
the FCM is used for inquiring and writing the task information which is created by the TMM and comprises the request file address, storing the file data pushed by the FSM and reading the file which is requested by the demand side to the FPM;
the FPM is used for interfacing with the demand side, providing file request data to the TMM, acquiring file information and content from the FCM and responding to the demand side.
4. The system according to claim 3, wherein a periodic cleaning mechanism is provided in the file caching module FCM, and a time threshold is set after further classification statistics is performed on the stored file data, so as to delete the corresponding cached file whose caching time is higher than the threshold.
5. The system according to claim 1, wherein the file transfer client program is deployed in FTC, and the file transfer server program is deployed in FTS.
6. The system according to claim 1, wherein a distributed deployment mechanism is employed, and in a current network, a multipoint-to-single point connection relationship is deployed between the FTC and the FTS, and a multipoint-to-multipoint connection relationship is deployed between an application request program set on a demand side and the FTS; wherein each FTC, FTS and application requesting program is treated as a connecting node.
7. The system according to claim 6, wherein a load balancing component is further configured and connected between the application request program configured on the demand side and the FTS, and the load balancing component is configured and configured to distribute the request task to different FTS nodes based on a balancing algorithm to balance the workload between the nodes.
8. A method for realizing cross-network instant file transmission of a unidirectional network by using the cross-network instant file transmission system as claimed in any one of claims 1-7, which comprises the following steps:
the application of the demand side establishes communication connection with the file receiving side through a communication protocol and requests the file receiving side to acquire a required file;
after receiving the request, the file receiving side calls a file cache module FCM in a task management module TMM, matches required file information included in the request information with cache data, and further feeds the matched data back to the demand side; when the matching fails, executing the next step;
creating a new file transmission task through a Task Management Module (TMM) arranged in the FTS, writing task information corresponding to the required file information, and waiting for a Task Request Module (TRM) to initiate a request task; after the TRM sends a task request to the TMM, the TMM acquires a task to be transmitted through the FCM, wherein the task information to be transmitted is converted into a file address which can be identified by a file initiating side based on an address conversion rule, and the file address is responded to the TRM after the file address is further stored;
after a file initiating side and a file receiving side are connected, the TRM calls a file processing module FHM of the FTC to process a required file under a network of the initiating side from a task management module TMM of the FTS to acquire a task to be transmitted;
and the FSM encapsulates the processed file information and file contents according to an FTC/FTS communication protocol to obtain a network data packet, and the encapsulated data packet is sent to a TMM of the FTS.
9. The method according to claim 8, wherein, based on a distributed deployment mechanism, an application request program set by a demand side and an FTS are deployed as a multipoint-to-multipoint connection relationship at a file receiving side; and at the file initiating side, deploying the FTC and the FTS into a multipoint-to-single point connection relation.
10. The method according to claim 9, wherein a request task is distributed to different FTS nodes based on a balancing algorithm between the FTS and the application request program set on the demand side, so as to balance the workload between the nodes.
CN201911209913.3A 2019-12-02 2019-12-02 Cross-network file instant transmission method and system based on unidirectional network Active CN110661891B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911209913.3A CN110661891B (en) 2019-12-02 2019-12-02 Cross-network file instant transmission method and system based on unidirectional network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911209913.3A CN110661891B (en) 2019-12-02 2019-12-02 Cross-network file instant transmission method and system based on unidirectional network

Publications (2)

Publication Number Publication Date
CN110661891A CN110661891A (en) 2020-01-07
CN110661891B true CN110661891B (en) 2020-04-14

Family

ID=69043784

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911209913.3A Active CN110661891B (en) 2019-12-02 2019-12-02 Cross-network file instant transmission method and system based on unidirectional network

Country Status (1)

Country Link
CN (1) CN110661891B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111798664B (en) * 2020-09-08 2020-11-24 武汉中科通达高新技术股份有限公司 Illegal data identification method and device and electronic equipment
CN112202786B (en) * 2020-09-30 2022-05-20 武汉中科通达高新技术股份有限公司 Illegal data identification method and device and electronic equipment
CN112201046B (en) * 2020-09-30 2021-07-20 武汉中科通达高新技术股份有限公司 Illegal data identification method and device and electronic equipment
CN115834584B (en) * 2022-11-23 2024-05-24 重庆紫光华山智安科技有限公司 Cross-network data transmission method, device, equipment and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105391698A (en) * 2015-10-22 2016-03-09 江苏省电力公司扬州供电公司 Method based on isolating device for achieving SOCKET transparent transmission between internal and external power networks
JP6356186B2 (en) * 2016-01-27 2018-07-11 韓國電子通信研究院Electronics and Telecommunications Research Institute Unidirectional file transmission system and method
CN110278181A (en) * 2019-01-29 2019-09-24 广州金越软件技术有限公司 A kind of instant protocol conversion technology about inter-network data exchange

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100367716C (en) * 2004-12-17 2008-02-06 北邮英科(北京)信息技术研究所有限公司 Isolation method and isolation switch apparatus between multiple different safety class networks
WO2007131063A2 (en) * 2006-05-02 2007-11-15 Kathy Mcewen System and method of providing bandwidth on demand
CN105812387A (en) * 2016-05-09 2016-07-27 北京航天数控系统有限公司 Unidirectional safe data exchange device
CN109714438A (en) * 2019-02-13 2019-05-03 上海期安智能科技有限公司 A kind of subway comprehensive monitoring system real time data inter-network ferry device and method
CN110474681A (en) * 2019-07-15 2019-11-19 安徽继远软件有限公司 A kind of across a network security isolation transmission and management system and its transmission method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105391698A (en) * 2015-10-22 2016-03-09 江苏省电力公司扬州供电公司 Method based on isolating device for achieving SOCKET transparent transmission between internal and external power networks
JP6356186B2 (en) * 2016-01-27 2018-07-11 韓國電子通信研究院Electronics and Telecommunications Research Institute Unidirectional file transmission system and method
CN110278181A (en) * 2019-01-29 2019-09-24 广州金越软件技术有限公司 A kind of instant protocol conversion technology about inter-network data exchange

Also Published As

Publication number Publication date
CN110661891A (en) 2020-01-07

Similar Documents

Publication Publication Date Title
CN110661891B (en) Cross-network file instant transmission method and system based on unidirectional network
WO2021203623A1 (en) Internet-of-things resource access system and resource access method
CN111600936B (en) Asymmetric processing system based on multiple containers and suitable for ubiquitous electric power internet of things edge terminal
CN109756559B (en) Construction and use method for distributed data distribution service of embedded airborne system
US10609125B2 (en) Method and system for transmitting communication data
CN112631788B (en) Data transmission method and data transmission server
WO2011150645A1 (en) Method for scheduling web hosting service, method for processing application access, apparatus and system thereof
CN101147380A (en) Method and apparatus for efficiently expanding a P2P network
CN113010333B (en) Multi-scene inter-process communication method suitable for Linux server cluster
CN109327511B (en) Data request method and server based on HTTP (hyper text transport protocol)
CN111491037B (en) Communication method with object storage server through SFTP data stream
CN113326155A (en) Information processing method, device, system and storage medium
WO2017128789A1 (en) Communication method and system
EP1570369A2 (en) An apparatus and method for receive transport protocol termination
CN114710571B (en) Data packet processing system
US20140156809A1 (en) Data downloading method, terminal, server, and system
CN113986811B (en) High-performance kernel mode network data packet acceleration method
JP2006235831A (en) Condition management device, method, and program
CN108259605B (en) Data calling system and method based on multiple data centers
US9137331B2 (en) Adaptive replication
CN114490100B (en) Message queue telemetry transmission load balancing method, device and server
CN110602143B (en) Method, system and readable storage medium for realizing communication between PC (personal computer) end and remote equipment
KR101949761B1 (en) Integrated replication system
CN111125493B (en) High-speed data query system and method based on protocol non-perception forwarding
CN113938296A (en) Network data access system and method

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