CN113783939A - File transmission method and device, electronic equipment and storage medium - Google Patents

File transmission method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113783939A
CN113783939A CN202110961592.3A CN202110961592A CN113783939A CN 113783939 A CN113783939 A CN 113783939A CN 202110961592 A CN202110961592 A CN 202110961592A CN 113783939 A CN113783939 A CN 113783939A
Authority
CN
China
Prior art keywords
file
event
platform
sending
receiving
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110961592.3A
Other languages
Chinese (zh)
Inventor
刘锦锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qax Technology Group Inc
Secworld Information Technology Beijing Co Ltd
Original Assignee
Qax Technology Group Inc
Secworld Information Technology Beijing 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 Qax Technology Group Inc, Secworld Information Technology Beijing Co Ltd filed Critical Qax Technology Group Inc
Priority to CN202110961592.3A priority Critical patent/CN113783939A/en
Publication of CN113783939A publication Critical patent/CN113783939A/en
Pending legal-status Critical Current

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
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention provides a file transmission method and device, electronic equipment and a storage medium. The file transmission method comprises the following steps: when a new file arrives in a front platform, generating a file event, and loading the file event to a sending cache region based on a preset water level control mode; and when judging that the file can be sent, sending the file event to a receiving cache region of a rear platform through an optical gate, so that the rear platform can realize the landing of the file based on the file event in the receiving cache region. The embodiment of the invention can effectively reduce the data transmission delay.

Description

File transmission method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of information technologies, and in particular, to a file transmission method and apparatus, an electronic device, and a storage medium.
Background
The file import function of the single import platform aims to provide a function of importing file data from a front direction to a rear direction. In a traditional scheme, a document file (<1MB) is transmitted, after a front-end server front-end processor file falls to the ground, software senses transmission, a rear-end server starts to receive the file, time delay is usually about 1-10 seconds, and transmission delay is large.
Disclosure of Invention
To solve the problems in the prior art, embodiments of the present invention provide a file transmission method, an apparatus, an electronic device, and a storage medium.
Specifically, the embodiment of the invention provides the following technical scheme:
in a first aspect, an embodiment of the present invention provides a file transmission method, including:
when a new file arrives in a front platform, generating a file event, and loading the file event to a sending cache region based on a preset water level control mode;
and when judging that the file can be sent, sending the file event to a receiving cache region of a rear platform through an optical gate, so that the rear platform can realize the landing of the file based on the file event in the receiving cache region.
Further, when a new file arrives in the current platform, generating a file event, and before loading the file event to the sending buffer based on a preset water level control mode, the method further includes:
and monitoring the file change condition in the preposed platform to determine whether a new file arrives in the preposed platform.
Further, when a new file arrives in the current platform, a file event is generated, and the file event is loaded to a sending cache area based on a preset water level control mode, including:
and when the water level control mode is a high water level, suspending reading of the file event, refreshing the state of the file event and receiving a confirmation message fed back by the post-platform.
Further, when it is determined that the file can be sent, the file event is sent to a receiving cache area of a backend platform through an optical gate, so that the backend platform can realize file landing based on the file event in the receiving cache area, including:
and based on the file event, sending the file to a receiving cache region of a rear platform in a message form through an optical gate, so that the rear platform restores the file based on the file event in the receiving cache region and then falls to the ground.
Further, the file event in the event queue includes a priority, and the reading the file event from the preset event queue includes: and reading the file events with high priority from the event queue based on the priority of the file events.
Further, the modes of sending the file event to the receiving buffer of the rear platform through the optical gate include a coding sending mode in a single message queue mode and a coding sending mode in a double message queue mode.
In a second aspect, an embodiment of the present invention further provides a file transmission apparatus, including:
the generating module is used for generating a file event when a new file arrives in the front-mounted platform and loading the file event to a sending cache area based on a preset water level control mode;
and the sending module is used for sending the file event to a receiving cache region of the rear platform through an optical gate when judging that the file can be sent, so that the rear platform can realize the falling of the file based on the file event in the receiving cache region.
In a third aspect, an embodiment of the present invention further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the file transmission method according to the first aspect when executing the program.
In a fourth aspect, the present invention further provides a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the file transfer method according to the first aspect.
In a fifth aspect, an embodiment of the present invention further provides a computer program product, where the computer program product includes a computer program, and when the computer program is executed by a processor, the computer program implements the steps of the file transmission method according to the first aspect.
According to the technical scheme, the file transmission method, the file transmission device, the electronic equipment and the storage medium provided by the embodiment of the invention have the advantages that the files need to be stored on the ground in the file receiving process, and most of I/O processing is occupied by the conventional disk reading and writing. The embodiment of the invention reduces the read-write expense of the disk by the way of landing the file block to the virtual disk, and quickly lands the file to the virtual disk for processing and sending, namely 'fast path' processing, for the tasks with small processing scale and fast throughput; for the tasks with slow processing and low throughput, the tasks are switched to the hard disk to perform slow path processing. Thereby effectively reducing the data transmission delay.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
Fig. 1 is a flowchart of a file transmission method according to an embodiment of the present invention;
fig. 2 is an architecture diagram of a front platform and a rear platform in a file transfer method according to an embodiment of the present invention;
fig. 3 is a schematic diagram illustrating a file interaction flow of a file transmission method according to an embodiment of the present invention;
FIG. 4 is a schematic diagram illustrating a water level control of a file transfer method according to an embodiment of the present invention;
fig. 5 is a schematic diagram illustrating event sorting of a file transmission method according to an embodiment of the present invention;
fig. 6 is a schematic diagram illustrating encoding and sending of a single message queue in a file transmission method according to an embodiment of the present invention;
fig. 7 is a schematic diagram illustrating encoded transmission of a dual message queue in a file transmission method according to an embodiment of the present invention;
fig. 8 is a schematic diagram illustrating task sorting of a file transmission method according to an embodiment of the present invention;
fig. 9 is a block diagram of a file transfer apparatus according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 shows a flowchart of a file transfer method according to an embodiment of the present invention. As shown in fig. 1, the file transmission method provided in the embodiment of the present invention includes the following steps:
step 101: when a new file arrives in the front platform, a file event is generated, and the file event is loaded to a sending cache area based on a preset water level control mode.
In a specific example, when a new file arrives in the pre-installed platform, generating a file event, and before loading the file event to the sending buffer based on a preset water level control mode, the method further includes: and monitoring the file change condition in the preposed platform to determine whether a new file arrives in the preposed platform.
When a new file arrives in the front platform, generating a file event, and loading the file event to a sending cache area based on a preset water level control mode, wherein the file event comprises the following steps: and when the water level control mode is a high water level, suspending reading of the file event, refreshing the state of the file event and receiving a confirmation message fed back by the post-platform.
Step 102: and when judging that the file can be sent, sending the file event to a receiving cache region of a rear platform through an optical gate, so that the rear platform can realize the landing of the file based on the file event in the receiving cache region.
In a specific example, when it is determined that file transmission is available, the file event is transmitted to a receiving buffer of a backend platform through an optical gate, so that the backend platform can implement file landing based on the file event in the receiving buffer, including: and based on the file event, sending the file to a receiving cache region of a rear platform in a message form through an optical gate, so that the rear platform restores the file based on the file event in the receiving cache region and then falls to the ground.
Further, the file event in the event queue includes a priority, and reading the file event from the preset event queue includes: and reading the file events with high priority from the event queue based on the priority of the file events.
In the above description, the modes of sending the file event to the receiving buffer of the back platform through the optical gate include a coding sending mode in a single message queue mode and a coding sending mode in a double message queue mode.
As shown in fig. 2, the front platform includes a front server, a single-lead front-end processor, and the back platform includes a single-lead back-end processor and a back server. The front platform and the rear platform communicate through the optical gate.
Specifically, the front server and the back server have file client software installed therein.
The file client software uses a private file transfer protocol and is matched with a single-lead platform to carry out file transfer work. The configurable transmission direction is transmission, reception, bidirectional. And the application side (service call HTTP, mail access and file service) of the butt joint falls the file into the specified working directory, and the software carries out file import operation. And then uniformly expressing the service as file import. The front-end server is configured with a Linux or a Windows system, is a source end of the file data, and is used for deploying the file sending software application. The back server is configured with a Linux or a Windows system, is a destination of the file data, and is used for deploying the file receiving software application. The single-lead platform front-end processor (namely, the single-lead front-end processor) is deployed at one side of a user front-end network, transmitted file data is centrally cached on the single-lead platform front-end processor, unified data inspection is carried out, and then optical gate data transmission of the next step is carried out. The optical shutter is used for the import service of unidirectional data. The single-lead platform post-machine (namely, the single-lead post-machine) is deployed at the side of the user post-network, and transmitted file data is cached on the machine and then distributed to each post-server by a distribution program.
The data interaction process of the front platform and the back platform is shown in fig. 3:
and a file monitoring stage: monitoring a working directory on the front server to determine whether a new file arrives;
file pre-import stage: when a new file arrives, the file is sent to a single guide front platform through file private protocol streaming transmission;
file cross-domain transmission stage: the single-lead front-end platform splits the file data into data messages, sends the data messages to the single-lead rear-end platform through the optical gate, and assembles the data messages by the rear-end platform;
file post-import stage: and the file is restored and checked, and is finally distributed to the corresponding post-positioned server in a file protocol stream form through a file private protocol after the file is successfully restored and checked.
The method comprises a one-way message queue mode and a two-way message queue mode on data interaction. Wherein, a service driving model based on a state machine is adopted. Namely: controlling the high and low water level: the Windows and Linux platforms are universal, and the separation of the network and the service is finished by using a water level control mode, so that efficient asynchronous transmission is realized. Low water level triggering: reading the event queue, encapsulating file header information and file contents into a private protocol, loading the private protocol to a sending cache area, and sending the contents of the sending cache area under the condition that a network can send the contents; triggering of a high water level: and suspending reading of the file, refreshing the event state and trying to receive a confirmation message of the opposite terminal. In the invention, the water level state in the water level control mode is used as the state in a finite state machine, and the received file is used as a trigger event, so that a service driving model based on the state machine is realized. As shown in fig. 4, further, a "file service driven" model is implemented by using an evolution based on an "event driven" model, in combination with a "finite state machine", and the final goal is to implement a "request-acknowledge" mechanism for files. The content domain is a data domain with an indefinite length, so the request protocol is divided into a header of a sending file and content of the sending file; for the acknowledgement protocol, the method is divided into a receiving acknowledgement header and a receiving extension field. Through the idea of a 'state machine', the final realized result is self-adaptive protocol processing: for the large file case, one-to-one "request-acknowledge" processing is used, while the small files are adapted to batch "request-acknowledge" processing.
In the invention, the file fragmentation technology is adopted in the file pre-import stage and the file post-import stage: as shown in fig. 5, when receiving a client file, file header information is received, and the file content is written to the disk. When receiving small files, according to the whole file, integrating the file head information into an event message, and sending the event message into a message queue with a priority mark according to task priority; when a large file is received, the file is cut to a fixed size (e.g., 100MB), and a single event message is sent to the message queue for each slice. Therefore, the starting time of the large file is reduced, and the whole file can be transmitted without falling to the ground.
Sorting according to priority: the priority is divided into three types of high, medium and low, and the sorter reads the event messages of the high-priority queue according to the priority until the high-priority queue is empty and then acquires the event messages of the medium-priority queue and the low-priority queue. The message queue is realized based on a linked list structure of Redis, and the effect of instant sending and processing of time messages is achieved through a blocking consumption interface. And after the sorting is finished, starting to read the file content for coding and sending.
As shown in fig. 6, the encoding sends (single message queue): and a one-way optical gate is arranged between the front and the back of the single message queue, and data sent by the front-end processor has no feedback. Therefore, in the working mode, redundancy coding needs to be performed on the data packet during coding transmission, and flow control limitation is performed on the outlet, so as to prevent packet loss to the maximum extent. In the ultra-low delay scheme of the invention, the streaming data transmission among multiple processes is carried out in a socket mode, the file content is input, and the file content is encoded into a data message to be sent in a simplex mode. As shown in fig. 7, the encoding sends (dual message queue): two unidirectional optical gates are arranged between the front and the rear of the double message queue, data sent by the front-end processor is sent through one optical gate, and confirmation data are fed back through the other optical gate. In the working mode, the file content needs to be split into data messages, information such as message serial numbers and timestamps is input, and the effect of reliable transmission is achieved through a request-confirmation mechanism. In the front and back single-guide modules, through the double-message queue: under the condition of a large file, requesting to send file slice contents (according to 100MB slices) in the queue, and confirming the completion condition of sending the file slices (performing next retransmission after failure); under the condition of small files, a batch of small file requests in the request queue splicing set are together (with 10MB as an upper limit), a batch of confirmation information is replied after the processing is finished, and retransmission is carried out if overtime fails. The whole processing flow is designed based on the cross-domain file transmission characteristic, and is different from a transmission layer protocol with a data packet, the application protocol is based on the application layer and transmits the meta-file information as a unit (file information with the size of 10MB-100 MB), and the whole processing flow is equivalent to conversion into reliable data duplex transceiving processing.
As shown in fig. 8, receive decode (dual message queue): corresponding to the above-mentioned double message mode coding transmission, the data is firstly received into the buffer area, after the serial number is checked to be correct, the data coding head is cut off, the acknowledgement packet is fed back, and then the upper layer is informed to process the data content. The method is realized in a three-thread mode, one thread receives original data packets, the other thread replies and confirms, the other thread lands files, the memory elastic queue is used for informing, the burst flow is leveled, the CPU is utilized to the maximum extent, and the effect of low delay of the whole is achieved. And finally, the processing thread saves the file to a disk and delivers the file to the next-level sorting process for processing.
Receive decode (single message queue): corresponding to the single message mode coding sending, the single message queue uses a double-thread buffer mode, and a receiving thread receives data first, performs decoding processing and restores data content. In order to ensure timeliness, the multithreading semaphore mechanism is used for notifying the processing thread of the action of processing completion, and the file is written into a disk.
And (4) task sorting: after receiving and decoding, the task number to which the file belongs is determined according to the file header information, the task is divided according to an event message queue of each task, and the event is notified to the file process. The realization method is realized by a queue structure of Redis, and achieves the effect of immediately processing files as soon as an event message arrives in a blocking type interface calling mode.
According to the file transmission method provided by the embodiment of the invention, the file needs to be stored on the ground in the file receiving process, and the traditional disk reading and writing occupies most of I/O processing. The embodiment of the invention reduces the read-write expense of the disk by the way of landing the file block to the virtual disk, and quickly lands the file to the virtual disk for processing and sending, namely 'fast path' processing, for the tasks with small processing scale and fast throughput; for the tasks with slow processing and low throughput, the tasks are switched to the hard disk to perform slow path processing. Thereby effectively reducing the data transmission delay.
Fig. 9 is a schematic structural diagram of a file transfer device according to an embodiment of the present invention. As shown in fig. 9, the file transfer apparatus provided in this embodiment includes: a generating module 910 and a sending module 920, wherein:
a generating module 910, configured to generate a file event when a new file arrives in a current platform, and load the file event to a sending cache area based on a preset water level control mode;
and a sending module 920, configured to send the file event to a receiving buffer of a backend platform through an optical gate when it is determined that the file can be sent, so that the backend platform can implement file landing based on the file event in the receiving buffer.
Based on the content of the foregoing embodiments, in this embodiment, when a new file arrives in the front-located platform, generating a file event, and before loading the file event to the sending cache area based on a preset water level control mode, the method further includes:
and monitoring the file change condition in the preposed platform to determine whether a new file arrives in the preposed platform.
Based on the content of the foregoing embodiments, in this embodiment, when a new file arrives in the front-located platform, a file event is generated, and the file event is loaded to the sending cache area based on a preset water level control mode, including:
and when the water level control mode is a high water level, suspending reading of the file event, refreshing the state of the file event and receiving a confirmation message fed back by the post-platform.
Based on the content of each embodiment described above, in this embodiment, when it is determined that file transmission is possible, the file event is transmitted to a receiving cache area of a backend platform through an optical gate, so that the backend platform can implement file landing based on the file event in the receiving cache area, including:
and based on the file event, sending the file to a receiving cache region of a rear platform in a message form through an optical gate, so that the rear platform restores the file based on the file event in the receiving cache region and then falls to the ground.
Based on the content of each of the above embodiments, in this embodiment, the file event in the event queue includes a priority, and the reading the file event from the preset event queue includes: and reading the file events with high priority from the event queue based on the priority of the file events.
Based on the content of the foregoing embodiments, in this embodiment, the manner of sending the file event to the receiving buffer of the backend platform through the optical gate includes a coding sending manner in a single message queue mode and a coding sending manner in a double message queue mode.
According to the file transmission device provided by the embodiment of the invention, the file needs to be stored on the ground in the file receiving process, and the traditional disk reading and writing occupies most of I/O processing. The embodiment of the invention reduces the read-write expense of the disk by the way of landing the file block to the virtual disk, and quickly lands the file to the virtual disk for processing and sending, namely 'fast path' processing, for the tasks with small processing scale and fast throughput; for the tasks with slow processing and low throughput, the tasks are switched to the hard disk to perform slow path processing. Thereby effectively reducing the data transmission delay.
Since the file transmission device provided by the embodiment of the present invention can be used for executing the file transmission method described in the above embodiment, the working principle and the beneficial effect are similar, so detailed descriptions are omitted here, and specific contents can be referred to the description of the above embodiment.
In this embodiment, it should be noted that each module in the apparatus according to the embodiment of the present invention may be integrated into a whole or may be separately disposed. The modules can be combined into one module, and can also be further split into a plurality of sub-modules.
Based on the same inventive concept, another embodiment of the present invention provides an electronic device, which specifically includes the following components, with reference to fig. 10: a processor 301, a memory 302, a communication interface 303, and a communication bus 304;
the processor 301, the memory 302 and the communication interface 303 complete mutual communication through the communication bus 304;
the processor 301 is configured to call a computer program in the memory 302, and the processor implements all the steps of the file transfer method when executing the computer program, for example, the processor implements the following processes when executing the computer program: when a new file arrives in a front platform, generating a file event, and loading the file event to a sending cache region based on a preset water level control mode; and when judging that the file can be sent, sending the file event to a receiving cache region of a rear platform through an optical gate, so that the rear platform can realize the landing of the file based on the file event in the receiving cache region.
It will be appreciated that the detailed functions and extended functions that the computer program may perform may be as described with reference to the above embodiments.
Based on the same inventive concept, yet another embodiment of the present invention provides a non-transitory computer-readable storage medium having a computer program stored thereon, which when executed by a processor implements all the steps of the above-mentioned file transfer method, for example, the processor implements the following processes when executing the computer program: when a new file arrives in a front platform, generating a file event, and loading the file event to a sending cache region based on a preset water level control mode; and when judging that the file can be sent, sending the file event to a receiving cache region of a rear platform through an optical gate, so that the rear platform can realize the landing of the file based on the file event in the receiving cache region.
It will be appreciated that the detailed functions and extended functions that the computer program may perform may be as described with reference to the above embodiments.
Based on the same inventive concept, another embodiment of the present invention provides a computer program product, which includes a computer program, when being executed by a processor, the computer program implements all the steps of the above file transmission method, for example, when the processor executes the computer program, the processor implements the following processes: when a new file arrives in a front platform, generating a file event, and loading the file event to a sending cache region based on a preset water level control mode; and when judging that the file can be sent, sending the file event to a receiving cache region of a rear platform through an optical gate, so that the rear platform can realize the landing of the file based on the file event in the receiving cache region.
It will be appreciated that the detailed functions and extended functions that the computer program may perform may be as described with reference to the above embodiments.
In addition, the logic instructions in the memory may be implemented in the form of software functional units and may be stored in a computer readable storage medium when sold or used as a stand-alone product. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present invention. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. Based on such understanding, the above technical solutions may be essentially or partially implemented in the form of software products, which may be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and include instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the traffic auditing method according to various embodiments or some parts of embodiments.
Moreover, in the present invention, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Furthermore, in the present disclosure, reference to the description of the terms "one embodiment," "some embodiments," "an example," "a specific example," or "some examples" or the like means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present disclosure. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for file transfer, comprising:
when a new file arrives in a front platform, generating a file event, and loading the file event to a sending cache region based on a preset water level control mode;
and when judging that the file can be sent, sending the file event to a receiving cache region of a rear platform through an optical gate, so that the rear platform can realize the landing of the file based on the file event in the receiving cache region.
2. The file transfer method according to claim 1, wherein when a new file arrives in the pre-installed platform, a file event is generated and loaded to the sending buffer based on a preset water level control mode, and further comprising:
and monitoring the file change condition in the preposed platform to determine whether a new file arrives in the preposed platform.
3. The file transmission method according to claim 1, wherein generating a file event when a new file arrives in the front platform, and loading the file event to a sending buffer based on a preset water level control mode comprises:
and when the water level control mode is a high water level, suspending reading of the file event, refreshing the state of the file event and receiving a confirmation message fed back by the post-platform.
4. The method for file transmission according to claim 1, wherein the determining that the file transmission is possible sends the file event to a receiving buffer of a backend platform through an optical shutter, so that the backend platform can land the file based on the file event in the receiving buffer, includes:
and based on the file event, sending the file to a receiving cache region of a rear platform in a message form through an optical gate, so that the rear platform restores the file based on the file event in the receiving cache region and then falls to the ground.
5. The file transmission method according to claim 3, wherein the file events in the event queue include priorities, and the reading of the file events from the preset event queue includes: and reading the file events with high priority from the event queue based on the priority of the file events.
6. The file transmission method according to any one of claims 1 to 5, wherein the mode of sending the file event to the receiving buffer of the rear platform through the optical shutter comprises a coded sending mode in a single message queue mode and a coded sending mode in a double message queue mode.
7. A file transfer apparatus, comprising:
the generating module is used for generating a file event when a new file arrives in the front-mounted platform and loading the file event to a sending cache area based on a preset water level control mode;
and the sending module is used for sending the file event to a receiving cache region of the rear platform through an optical gate when judging that the file can be sent, so that the rear platform can realize the falling of the file based on the file event in the receiving cache region.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the file transfer method according to any one of claims 1 to 6 when executing the program.
9. A non-transitory computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the file transfer method according to any one of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, carries out the steps of the file transfer method according to any one of claims 1 to 6.
CN202110961592.3A 2021-08-20 2021-08-20 File transmission method and device, electronic equipment and storage medium Pending CN113783939A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110961592.3A CN113783939A (en) 2021-08-20 2021-08-20 File transmission method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110961592.3A CN113783939A (en) 2021-08-20 2021-08-20 File transmission method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113783939A true CN113783939A (en) 2021-12-10

Family

ID=78838374

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110961592.3A Pending CN113783939A (en) 2021-08-20 2021-08-20 File transmission method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113783939A (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105656902A (en) * 2016-01-15 2016-06-08 深圳市利谱信息技术有限公司 One-way reliable transmission and control system based on light transmission
CN107870928A (en) * 2016-09-26 2018-04-03 上海泓智信息科技有限公司 File reading and device
CN110233851A (en) * 2019-06-21 2019-09-13 北京神州绿盟信息安全科技股份有限公司 A kind of data transmission method and device
CN111104233A (en) * 2019-11-21 2020-05-05 深圳前海环融联易信息科技服务有限公司 Data acquisition method and device, computer equipment and computer readable storage medium
CN111314480A (en) * 2020-02-26 2020-06-19 烟台海颐软件股份有限公司 Load self-adaptive cross-platform file transfer protocol and distributed service implementation method thereof
CN111880947A (en) * 2020-07-20 2020-11-03 ***股份有限公司 Data transmission method and device
CN111913917A (en) * 2020-07-24 2020-11-10 北京锐安科技有限公司 File processing method, device, equipment and medium
CN111949417A (en) * 2020-07-03 2020-11-17 福建天泉教育科技有限公司 Message transmission method and storage medium
CN112291350A (en) * 2020-10-29 2021-01-29 苏州浪潮智能科技有限公司 File transmission method, system, device and medium
KR102211606B1 (en) * 2019-12-26 2021-02-04 한양대학교 에리카산학협력단 Proxy Server, Data Transmission Method And System Using Thereof

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105656902A (en) * 2016-01-15 2016-06-08 深圳市利谱信息技术有限公司 One-way reliable transmission and control system based on light transmission
CN107870928A (en) * 2016-09-26 2018-04-03 上海泓智信息科技有限公司 File reading and device
CN110233851A (en) * 2019-06-21 2019-09-13 北京神州绿盟信息安全科技股份有限公司 A kind of data transmission method and device
CN111104233A (en) * 2019-11-21 2020-05-05 深圳前海环融联易信息科技服务有限公司 Data acquisition method and device, computer equipment and computer readable storage medium
KR102211606B1 (en) * 2019-12-26 2021-02-04 한양대학교 에리카산학협력단 Proxy Server, Data Transmission Method And System Using Thereof
CN111314480A (en) * 2020-02-26 2020-06-19 烟台海颐软件股份有限公司 Load self-adaptive cross-platform file transfer protocol and distributed service implementation method thereof
CN111949417A (en) * 2020-07-03 2020-11-17 福建天泉教育科技有限公司 Message transmission method and storage medium
CN111880947A (en) * 2020-07-20 2020-11-03 ***股份有限公司 Data transmission method and device
CN111913917A (en) * 2020-07-24 2020-11-10 北京锐安科技有限公司 File processing method, device, equipment and medium
CN112291350A (en) * 2020-10-29 2021-01-29 苏州浪潮智能科技有限公司 File transmission method, system, device and medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
毛健彪;卞洪飞;韩彪;李韬;孙志刚;: "PiBuffer:面向数据中心的OpenFlow流缓存管理模型", 计算机学报, no. 06, 22 July 2015 (2015-07-22) *

Similar Documents

Publication Publication Date Title
CN110297801B (en) System and method for just-in-one transaction semantics of transaction system based on fault-tolerant FPGA
JP5246332B2 (en) Enhanced messaging platform
CN1881945B (en) Improved distributed kernel operating system
CN1881944B (en) Improved distributed kernel operating system
US20110016190A1 (en) Method and apparatus for realizing message service
WO2013078689A1 (en) Method and device for realizing message transfer in cloud message service
CN103514173A (en) Data processing method and node equipment
CN103516580A (en) Method of realizing message receiving and forwarding based on message queue and system thereof
US9456325B2 (en) Transmission of a multimedia message doubled with the transmission of a text message
CN104348874B (en) The method and apparatus that message is transmitted between cloud platform component
KR20170125252A (en) Message Fragmentation Method using a MQTT Protocol in M2M/IoT Platforms
CN113783939A (en) File transmission method and device, electronic equipment and storage medium
CN111064768B (en) Printer data transmission control method, device, equipment and storage medium
CN109905459B (en) Data transmission method and device
CN116319828A (en) Remote disaster recovery backup data transmission method, system, device and medium
CN111049730A (en) RabbitMQ message retransmission and power of consumption idempotent solution method
CN114866395B (en) Method and device for communication of heartbeat of multi-group distributed consistency protocol cluster
CN105912477B (en) A kind of method, apparatus and system that catalogue is read
CN111385069A (en) Data transmission method and computer equipment
CN113098978B (en) Data transmission method, device and medium
CN101494569B (en) Method and apparatus for processing message
CN1980131A (en) Mail interception method and module for realizing said method
CN114422626A (en) Protocol transmission method, device and system
CN114640385B (en) Data transmission method based on Beidou communication system and electronic equipment
CN114328317B (en) Method, device and medium for improving communication performance of storage system

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