Intranet and extranet synchronous transmission method and system based on TCP protocol

By using file type and header detection based on the TCP protocol, segmented transmission, and breakpoint resumption, the problems of data leakage and transmission interruption in file transmission between internal and external networks are solved, achieving a balance of high security, controllability, and efficiency.

CN120956725APending Publication Date: 2025-11-14GUANGZHOU BAOLUN ELECTRONICS CO LTD

Patent Information

Application Number
CN202511190953.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-25
Publication Date
2025-11-14

AI Technical Summary

Technical Problem

Existing methods for transferring files between internal and external networks lack file type and title detection, resulting in a high risk of data leakage, low efficiency when transmission is interrupted, and a lack of integration with enterprise permission systems, making it impossible to guarantee the compliance and controllability of the transmission process.

Method used

The system employs a TCP-based approach for file type and title detection, segments the data for transmission, implements breakpoint resumption, maintains the connection status using a heartbeat mechanism, and only allows external downloads after approval, thus ensuring file compliance and security.

Benefits of technology

It enables compliance screening of files before transmission, improves the stability and efficiency of large file transmission, reduces network resource consumption, and ensures the security and controllability of file transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120956725A_ABST
    Figure CN120956725A_ABST
Patent Text Reader

Abstract

According to the internal network and external network synchronous transmission method and system based on the TCP provided by the invention, file type detection and file title detection are realized at a server side, compliance screening is carried out on file contents before a transmission link, and sensitive files are prevented from entering a transmission link; after the detection is passed, segmented transmission is carried out by adopting a preset fragmentation rule, and breakpoint resume is executed by utilizing a fragmentation index when the transmission is interrupted, so that the stability and the efficiency of large file transmission are remarkably improved; furthermore, the server pushes the downloading notice to the extranet client through the TCP after receiving the auditing result of the intranet client with the auditing authority, so that the file is ensured to be subjected to the auditing link before being transmitted to the extranet, and the unification of high safety, controllability and high efficiency is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of file transfer technology, and in particular to a method and system for synchronous transmission between intranet and extranet based on the TCP protocol. Background Technology

[0002] With the development of enterprise informatization, more and more enterprises are adopting cloud desktops, virtualization, and centralized storage to manage internal files. Business files created and processed by employees in the intranet environment often need to be transferred to the external network under certain conditions for sharing or submission. However, existing intranet / extranet transmission methods generally suffer from the following problems: Traditional file transfer protocols such as FTP, SFTP, or HTTP only implement file transfer functionality, lacking the ability to inspect the files themselves before transmission. Once a file is uploaded, the system cannot identify whether the file type complies with regulations, nor can it check whether the file title contains sensitive words. This can easily lead to non-compliant files or files containing sensitive information being transmitted outside the internal network, posing a significant risk of data leakage.

[0003] In existing solutions, large files often require lengthy transmission times. If the transmission is interrupted, the entire file must be re-uploaded, consuming network bandwidth and significantly increasing transmission latency. While some systems offer chunked transmission, they lack a mechanism for resuming interrupted transmissions, making it impossible to efficiently recover from interrupted tasks.

[0004] Some existing HTTP or short-connection mechanisms require clients to constantly send requests to the server to maintain the connection, which brings additional computing and communication burdens to the server; while some long-connection-based systems lack heartbeat detection mechanisms, so the server cannot detect when the client goes offline in time, resulting in messages not being synchronized in real time.

[0005] In real-world enterprise business scenarios, file transfers from the intranet to the internet typically require approval from higher management. However, most existing transfer methods lack integration with the enterprise's internal access control system. Once a file is uploaded to the server, it may be directly downloaded from the internet, compromising compliance and controllability during the transfer process.

[0006] In summary, the problems existing in the current technology urgently need to be solved. Summary of the Invention

[0007] This invention provides a method and system for synchronous transmission between intranet and extranet based on the TCP protocol, in order to overcome the shortcomings of the prior art and achieve a balance between high security, controllability and efficiency.

[0008] This invention provides a method for synchronous transmission between intranet and extranet based on the TCP protocol, applied to a server, characterized by comprising: Receive file transfer requests from the first intranet client; The file type and file title of the target file included in the file transfer request are detected. If the file type and file title are detected, the target file is received in segments via TCP according to the preset segmentation rules, and the target file is stored in the server database. Receive the review result of the target file from the second intranet client, wherein the second intranet client is an intranet client with review authority; If the review is successful, a notification is pushed to the external client via the TCP protocol, so that the external client can download the target file.

[0009] According to the TCP protocol-based method for synchronous transmission between intranet and extranet provided by the present invention, the step of receiving the target file in segments via the TCP protocol further includes: If segmented transmission is interrupted, the transmission will resume from the point of interruption based on the received segment index.

[0010] According to the present invention, a method for synchronous transmission between an intranet and an extranet based on the TCP protocol, the step of receiving the target file in segments according to a preset fragmentation rule via the TCP protocol specifically includes: When the size of the target file exceeds a preset threshold, the target file is split into multiple fragments and received concurrently.

[0011] According to the present invention, a method for synchronous transmission between intranet and extranet based on TCP protocol is provided, the method further includes: The intranet client and the extranet client send heartbeat messages to the server at preset intervals; The server maintains the TCP connection state based on the heartbeat message.

[0012] According to the present invention, a method for synchronous transmission between intranet and extranet based on TCP protocol is provided, wherein the file type detection includes: The actual type of the target file is identified based on its header information or file extension. If the actual type does not match the preset allowed type, the upload will be rejected and an error message will be returned.

[0013] According to the present invention, a method for synchronous transmission between intranet and extranet based on TCP protocol includes file header detection comprising: The title string of the target file is parsed, and the title is matched with sensitive words stored in the database; If the title contains sensitive words, the upload will be rejected and an error message will be returned.

[0014] This invention also provides a method for synchronous transmission between intranet and extranet based on the TCP protocol, applied to a server, characterized by comprising: Receive file transfer requests from external network clients; The file type and file title of the target file included in the file transfer request are detected. If the file type and file title are detected, the target file is received in segments via TCP according to the preset segmentation rules, and the target file is stored in the server database. The notification is pushed to the internal network client via the TCP protocol so that the internal network client can obtain the target file.

[0015] According to the TCP protocol-based method for synchronous transmission between intranet and extranet provided by the present invention, the step of receiving the target file in segments via the TCP protocol further includes: If segmented transmission is interrupted, the transmission will resume from the point of interruption based on the received segment index.

[0016] The present invention also provides a TCP-based intranet and extranet synchronous transmission device, comprising: an intranet client, an extranet client, and a server; The intranet client is used to initiate file transfer requests, perform file type detection and file title detection on the target file, and when the detection is successful, split the target file according to the preset fragmentation rules and transmit it to the server via TCP protocol; The external network client is used to receive download notifications pushed by the server and download the approved target file from the server based on the secure file transfer protocol, or to initiate a file transfer request to the server. The server includes: a receiving module, an auditing module, a notification module, and a breakpoint resume module; The receiving module is used to receive target files from the intranet client or the extranet client via the TCP protocol, and store the target files in the database; The auditing module is used to provide the target file to intranet clients with auditing permissions and receive their auditing results; The notification module is used to push a download notification to the external client when the review result is approved; The interrupted transmission module is used to continue transmission based on the received fragment index when transmission is interrupted.

[0017] According to the present invention, an intranet and extranet synchronous transmission system based on TCP protocol is provided, wherein the server further includes a status synchronization module; The status synchronization module is used to push status update messages to intranet clients and extranet clients when the review is completed or the file is updated.

[0018] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements a TCP-based method for synchronous transmission between an intranet and an extranet as described above.

[0019] This invention provides a method and system for synchronous transmission between intranet and extranet based on the TCP protocol. By implementing file type detection and file title detection on the server side, compliance screening of file content is performed before transmission to prevent sensitive files from entering the transmission link. After passing the detection, segmented transmission is performed using preset fragmentation rules, and breakpoint resumption is performed using the fragmentation index when transmission is interrupted, significantly improving the stability and efficiency of large file transmission. At the same time, a heartbeat mechanism is used to maintain a long TCP connection to ensure reliable communication between intranet and extranet clients and the server. Furthermore, the server only pushes a download notification to the extranet client via TCP after receiving the review result from an intranet client with review authority, ensuring that the file must undergo an approval process before being transmitted to the extranet, thus achieving a balance of high security, controllability, and efficiency. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0021] Figure 1 This is one of the flowcharts of a method for synchronous transmission between intranet and extranet based on TCP protocol provided by the present invention; Figure 2 This is the second flowchart of a method for synchronous transmission between intranet and extranet based on TCP protocol provided by the present invention; Figure 3 This is a schematic diagram of the structure of a TCP-based intranet and extranet synchronous transmission device provided by the present invention. Detailed Implementation

[0022] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0023] To address the problems in existing technologies, this invention proposes a TCP-based method for synchronous transmission between intranet and extranet, achieving a balance between high security, controllability, and efficiency. The following describes this TCP-based method for synchronous transmission between intranet and extranet. Figure 1 As shown, including but not limited to the following steps: Step 110: Receive the file transfer request from the first intranet client.

[0024] In step 110, the server pre-establishes long-lived connections based on the TCP protocol with multiple intranet clients. These long-lived connections are maintained through periodic heartbeat packets to ensure that the server can monitor the online status of the clients in real time.

[0025] When an intranet user needs to transfer a file to the external network, the first intranet client it operates initiates a file transfer request to the server. This request includes at least the target file's name, file size, file type, file title, and the uploader's user identifier. After receiving the request, the server enters the file inspection phase.

[0026] Step 120: Perform file type detection and file title detection on the target file included in the file transfer request.

[0027] In step 120, the server first checks the legality of the target file, specifically including: File type detection: The server extracts the header information or extension of the target file and compares it with a preset file type whitelist. For example, allowed types include document types (doc, pdf), image types (jpg, png), etc., while executable files (exe) or files of unknown type are not allowed. When the detection finds that the actual file type does not match the extension, or is not in the whitelist, the server rejects the request and returns an error message.

[0028] File title detection: The server parses the title string of the target file and matches it against sensitive words stored in the database. If the file title contains sensitive words, such as those involving company secrets or specific prohibited keywords, the system determines that the file is not allowed to be distributed, rejects the request, and prompts the uploader to modify the file title or go through a special approval process.

[0029] By taking the above detection steps, non-compliant files can be effectively blocked from entering the transmission process before they are transferred.

[0030] Step 130: If the file type detection and file title detection are passed, the target file is received in segments via TCP protocol according to the preset segmentation rules, and the target file is stored in the server database.

[0031] In step 130, when the file detection passes, the server enters the file receiving phase. Considering the file may be large, the server has preset fragmentation rules: When the file size is less than the first threshold (e.g., 10MB), it can be received in its entirety at once; When the file size exceeds the threshold, the server splits the file into multiple fragments and receives them one fragment at a time via a long TCP connection.

[0032] During fragmented transmission, the server assigns a unique index number to each fragment and records the completed fragments. When transmission is interrupted or a network anomaly occurs, the server instructs the client to retransmit only the missing fragments based on the index of the received fragments, thus enabling resume transmission from where it left off.

[0033] After all files have been received, the server reassembles the fragments to generate a complete target file, and stores the file and its metadata in the server database for subsequent review.

[0034] Step 140: Receive the review result of the target file from the second intranet client, where the second intranet client is an intranet client with review permissions.

[0035] In step 140, after the file is stored, the server automatically identifies the reviewer corresponding to the organization to which the uploader belongs, based on the preset permission system, and pushes the relevant information of the file to be reviewed to a second intranet client with review permissions.

[0036] Reviewers can view file titles, file types, file summaries, and other information on their client devices, and download files to a secure area for review as needed. After review, the second intranet client sends the review result (pass / reject) back to the server via a persistent TCP connection.

[0037] After receiving the review result, the server records it in the database and updates the file status. If the review is rejected, the file will not be transmitted over the external network, and the server can notify the uploader of the result and reason.

[0038] Step 150: If the review is approved, a notification is pushed to the external client via TCP protocol so that the external client can download the target file.

[0039] In step 150, when the review result is "passed", the server triggers an external network notification mechanism: The server pushes a notification message containing file identifier, storage location, and download instructions through a long TCP connection with the external client; Upon receiving the notification, the external client automatically invokes a built-in secure file transfer protocol (such as SFTP) to initiate a download request to the server; The server allows external clients to download the corresponding target files based on their authentication results.

[0040] In this way, only files that have passed inspection and review can be accessed by external clients, thus ensuring the compliance and security of file transmission.

[0041] As a further optional embodiment, the step of receiving the target file in segments via the TCP protocol further includes: If segmented transmission is interrupted, the transmission will resume from the point of interruption based on the received segment index.

[0042] Specifically, when a server receives a target file in segments via the TCP protocol, it creates an index record for each received segment in a database or cache. This index includes the segment sequence number, segment size, and reception status. When there is a network anomaly, client disconnection, or transmission interruption, the server can accurately identify which segments have been successfully received and which have not yet been received using the index record.

[0043] After the client re-initiates the transmission connection, the server returns the incomplete fragment information to the client. The client only needs to re-transmit the missing fragment data, without having to re-upload the completed fragments, thus achieving breakpoint resumption.

[0044] By using the above methods, the overhead of repeated transmissions in the event of file transfer interruption can be significantly reduced, the efficiency and reliability of large file transfers can be improved, and the consumption of network bandwidth resources can be reduced.

[0045] As a further optional embodiment, the step of receiving the target file in segments via TCP protocol according to preset fragmentation rules specifically includes: When the size of the target file exceeds a preset threshold, the target file is split into multiple fragments and received concurrently.

[0046] Specifically, before receiving the target file, the server first determines whether the file size exceeds a preset threshold, such as 10MB or 50MB. When the target file size exceeds this threshold, the server no longer uses the method of receiving the entire file sequentially, but instead divides the target file into multiple logical fragments, each fragment having a unique fragment number and verification information.

[0047] During transmission, intranet clients can send multiple fragments simultaneously, and the server receives them concurrently using multi-threading. After reception, the file is reassembled according to the fragment number. This concurrent reception method can fully utilize bandwidth resources and reduce the overall time consumption for large file transmissions.

[0048] Through the above-mentioned fragmentation concurrency mechanism, the present invention can effectively improve the efficiency and stability of large files in the TCP transmission process, and is particularly suitable for large-volume data such as multimedia files and database backup files that need to be frequently transferred within enterprises.

[0049] As a further optional embodiment, the method further includes: The intranet client and the extranet client send heartbeat messages to the server at preset intervals; The server maintains the TCP connection state based on the heartbeat message.

[0050] Specifically, after establishing a TCP long connection, both the internal network client and the external network client will send heartbeat messages to the server at preset time intervals (e.g., every 5 or 10 seconds). These heartbeat messages contain the client's unique identifier, current status information, and connection session number. Upon receiving the heartbeat message, the server updates the client's online status record and determines whether the connection is functioning normally.

[0051] When the server does not receive a heartbeat message from a client for several consecutive periods, it determines that the client is offline and cleans up the corresponding connection resources. When the client comes back online, the TCP long connection is re-established and the message subscription relationship is restored, thereby ensuring the continuity and real-time performance of message transmission.

[0052] By introducing a heartbeat keep-alive mechanism, the "false connection" problem caused by network fluctuations or device disconnection can be avoided, ensuring that the internal network client and the external network client maintain a reliable communication link throughout the entire file transfer and review process, thereby improving the system's stability and fault tolerance.

[0053] As a further optional embodiment, the file type detection includes: The actual type of the target file is identified based on its header information or file extension. If the actual type does not match the preset allowed type, the upload will be rejected and an error message will be returned.

[0054] Specifically, after receiving a file transfer request from an intranet client, the server extracts the target file's metadata. The file header information reflects the file's actual format, while the file extension identifies the file at the naming level. By comparing the file header information and the extension, the server can identify the file's actual type.

[0055] After identifying the actual file type, the server compares it with a pre-defined list of allowed types. For example, allowed file types may include common document files (such as .doc, .pdf) and image files (such as .jpg, .png); while executable files (such as .exe), script files (such as .bat, .sh), or other types not on the whitelist are considered not to be allowed to be transmitted.

[0056] When the detection result indicates that the actual file type does not match the file extension, or that the type is not included in the allowed type range, the server immediately rejects the file upload request and returns an error message to the user through the intranet client, indicating that the file does not meet the upload requirements.

[0057] This detection step effectively prevents malicious code or non-compliant files from entering the transmission channel due to file type spoofing, thereby improving the security and compliance of file transmission.

[0058] As a further optional embodiment, the document title detection includes: The title string of the target file is parsed, and the title is matched with sensitive words stored in the database; If the title contains sensitive words, the upload will be rejected and an error message will be returned.

[0059] Specifically, after receiving a file transfer request from an intranet client, the server extracts a title string from the file metadata. This title typically corresponds to the filename or its internal attribute fields and is used to identify the subject of the file content.

[0060] After extracting the title, the server matches it against a pre-built sensitive word database. This sensitive word database is configured by the enterprise according to its information security requirements and may include terms related to company secrets, code names for classified projects, and prohibited information. Matching methods can include keyword comparison, string pattern matching, or intelligent matching based on regular expressions.

[0061] When the detection results indicate that the title of the target file contains sensitive words, the server immediately stops the file upload process and returns an error message to the internal network client, informing the user that the file title contains sensitive information and is not allowed to be transmitted over the external network.

[0062] By adding a header detection step before transmission, data security can be further controlled at the file naming level, preventing the indirect leakage of sensitive information due to improper file naming. This, combined with file type detection, forms a more comprehensive pre-upload security protection mechanism.

[0063] The following describes a TCP-based method for synchronous file transfer between intranet and extranet, applicable to scenarios involving file transfer over an extranet. Figure 2 As shown, including but not limited to the following steps: Step 210: Receive file transfer requests from external network clients.

[0064] In step 210, the server pre-establishes long-term connections with multiple external clients based on the TCP protocol and maintains them through periodic heartbeat packets to ensure that the server can perceive the online status of the clients in real time.

[0065] When an external user needs to upload a file to the internal network, their external client sends a file transfer request to the server. This request must include at least the target file's name, size, type, title, and the uploader's identity information. Upon receiving the request, the server enters the file inspection phase.

[0066] Step 220: Perform file type detection and file title detection on the target file included in the file transfer request.

[0067] In step 220, the server first performs a validity check on the target file, including the following: File type detection: The server extracts the header information or extension of the target file and compares it with a preset file type whitelist. For example, allowed types include document types (doc, pdf), image types (jpg, png), etc.; while executable files (exe) or files of unknown type are not allowed. When the detection finds that the actual file type does not match the extension, or is not in the whitelist, the server rejects the request and returns an error message.

[0068] File title detection: The server parses the title string of the target file and matches it against sensitive words stored in the database. If the file title contains sensitive words, such as those involving company secrets or specific prohibited keywords, the system determines that the file is not allowed to be accessed on the internal network, rejects the request, and prompts the uploader to modify the file title or go through a special approval process.

[0069] By implementing the above detection steps, non-compliant files can be effectively blocked from entering the transmission process before file transfer, thereby improving the system's security and compliance.

[0070] Step 230: If the file type detection and file title detection are passed, the target file is received in segments via TCP protocol according to the preset segmentation rules, and the target file is stored in the server database.

[0071] In step 230, when the file detection passes, the server enters the file receiving phase. Considering the file may be large, the server presets a fragmentation rule: When the file size is less than the first threshold (e.g., 10MB), it can be received in its entirety at once; When the file size exceeds a preset threshold, the server splits the file into multiple fragments and receives them one by one via a long TCP connection.

[0072] During fragmented transmission, the server assigns a unique index number to each fragment and records the status of completed fragments. When transmission is interrupted or a network anomaly occurs, the server instructs the client, based on the received fragment indexes, to retransmit only the missing fragments, thus enabling resume transmission from where it left off.

[0073] After all files have been received, the server reassembles the fragments to generate a complete target file, and stores the file and its metadata in the server database so that intranet clients can retrieve or process them further.

[0074] Step 240: Push a notification to the intranet client via the TCP protocol so that the intranet client can obtain the target file.

[0075] In step 240, the server pushes a notification message containing a file identifier, storage location, and download instructions through a long TCP connection with the intranet client. Upon receiving the notification, the intranet client can download the corresponding target file from the server using a secure file transfer protocol (such as SFTP).

[0076] During the notification process, the server can simultaneously verify the identity information of the internal network client to ensure the security and controllability of file transfer. This notification mechanism enables efficient linkage between external network file uploads and internal network client file retrieval, ensuring that files undergo complete checks and compliance controls before being uploaded to the internal network.

[0077] As a further optional embodiment, the step of receiving the target file in segments via the TCP protocol further includes: If segmented transmission is interrupted, the transmission will resume from the point of interruption based on the received segment index.

[0078] Specifically, during segmented transmission, if an interruption occurs, such as due to a network failure on the external client or temporary server unavailability, the server can instruct the client, based on the received segment index information, to retransmit only the incomplete segments, thus enabling resume transmission from where it left off. This mechanism ensures the reliability of large file transmissions and improves network resource utilization.

[0079] After all file fragments are received, the server reassembles the fragments to generate a complete target file and stores the file and its metadata in the server database so that intranet clients can obtain or further process it.

[0080] The following describes a TCP-based intranet and extranet synchronous transmission device provided by the present invention, such as... Figure 3 As shown, the TCP-based intranet and extranet synchronous transmission device described below and the TCP-based intranet and extranet synchronous transmission method described above can be referred to in correspondence.

[0081] An intranet and extranet synchronization transmission device based on TCP protocol includes: an intranet client 310, an extranet client 320, and a server 330; The intranet client 310 is used to initiate a file transfer request, perform file type detection and file title detection on the target file, and when the detection is successful, split the target file according to a preset fragmentation rule and transmit it to the server via TCP protocol; The external network client 320 is used to receive download notifications pushed by the server and download the approved target file from the server based on the secure file transfer protocol, or to initiate a file transfer request to the server. The server 330 includes: a receiving module, an auditing module, a notification module, and a breakpoint resume module; The receiving module is used to receive target files from the intranet client or the extranet client via the TCP protocol, and store the target files in the database; The auditing module is used to provide the target file to intranet clients with auditing permissions and receive their auditing results; The notification module is used to push a download notification to the external client when the review result is approved; The interrupted transmission module is used to continue transmission based on the received fragment index when transmission is interrupted.

[0082] Specifically, the intranet client 310 initiates file transfer requests and performs file type and title checks on the target file. Once the target file passes the checks, the intranet client splits the file according to preset fragmentation rules and transmits it to the server 330 via TCP. The preset fragmentation rules can be dynamically adjusted based on file size or network conditions to ensure file transfer efficiency and reliability.

[0083] External client 320 is used to receive download notifications pushed by server 330. Upon receiving the download notification, the external client can download the approved target file from the server via a secure file transfer protocol (such as a TLS / SSL encrypted TCP connection). Alternatively, the external client can also proactively initiate a file transfer request to the server to upload the target file.

[0084] Server 330 is used to coordinate file transfer and synchronization between intranet clients and extranet clients, and it mainly includes the following modules: Receiving module: Receives target files from internal or external network clients via TCP protocol and stores the received files in the database. For large files, the receiving module supports segmented reception and records the indexes of completed segments.

[0085] The review module provides target files to intranet clients with review privileges and receives their review results. Review can include checks on file type, title, content, and other dimensions.

[0086] Notification module: When the review result is approved, a download notification is pushed to the external client via TCP protocol, reminding the external client that the approved target file can be obtained.

[0087] Resume interrupted file transfer module: If an interruption occurs during file transfer, the resume interrupted file transfer module will continue the transfer based on the received fragment index information to ensure complete file reception, improve transmission reliability and network resource utilization.

[0088] Through the design of the above-described device, file transfer between intranet and extranet clients can achieve secure, efficient, and controllable synchronization, while also ensuring stability and resume capability for large file transfers. The operation flow of the intranet client and the extranet client corresponds to steps 210-240 of the method embodiment, achieving functional consistency.

[0089] As a further optional embodiment, the server also includes a state synchronization module; The status synchronization module is used to push status update messages to intranet clients and extranet clients when the review is completed or the file is updated.

[0090] In this embodiment, the server 330 also includes a status synchronization module, which has the following functions: Status synchronization module: Used to push status update messages to intranet client 310 and external network client 320 when the target file review is completed or the file content is updated. The status update message may include file review results, latest file version information, transmission progress or other custom status information, so that each client can obtain the latest file status in a timely manner, realizing visualization and collaboration in file management.

[0091] By introducing a status synchronization module, the server can not only complete file fragment transmission, review, and breakpoint resumption, but also actively notify the client when the file status changes, realizing real-time synchronization between internal and external network clients and improving the efficiency and reliability of file management.

[0092] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0093] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0094] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for synchronous transmission between intranet and extranet based on TCP protocol, applied to a server, characterized in that, include: Receive file transfer requests from the first intranet client; The file type and file title of the target file included in the file transfer request are detected. If the file type and file title are detected, the target file is received in segments via TCP according to the preset segmentation rules, and the target file is stored in the server database. Receive the review result of the target file from the second intranet client, wherein the second intranet client is an intranet client with review authority; If the review is successful, a notification is pushed to the external client via the TCP protocol so that the external client can download the target file.

2. The method for synchronous transmission between intranet and extranet based on TCP protocol according to claim 1, characterized in that, The process of receiving the target file in segments via the TCP protocol also includes: If segmented transmission is interrupted, the transmission will resume from the point of interruption based on the received segment index.

3. The method for synchronous transmission between intranet and extranet based on TCP protocol according to claim 1, characterized in that, The step of receiving the target file in segments via TCP according to preset fragmentation rules specifically includes: When the size of the target file exceeds a preset threshold, the target file is split into multiple fragments and received concurrently.

4. The method for synchronous transmission between intranet and extranet based on TCP protocol according to claim 1, characterized in that, The method further includes: The intranet client and the extranet client send heartbeat messages to the server at preset intervals; The server maintains the TCP connection state based on the heartbeat message.

5. The method for synchronous transmission between intranet and extranet based on TCP protocol according to claim 1, characterized in that, The file type detection includes: The actual type of the target file is identified based on its header information or file extension. If the actual type does not match the preset allowed type, the upload will be rejected and an error message will be returned.

6. The method for synchronous transmission between intranet and extranet based on TCP protocol according to claim 1, characterized in that, The document title detection includes: The title string of the target file is parsed, and the title is matched with sensitive words stored in the database; If the title contains sensitive words, the upload will be rejected and an error message will be returned.

7. A method for synchronous transmission between intranet and extranet based on TCP protocol, applied to a server, characterized in that, include: Receive file transfer requests from external network clients; The file type and file title of the target file included in the file transfer request are detected. If the file type and file title are detected, the target file is received in segments via TCP according to the preset segmentation rules, and the target file is stored in the server database. The notification is pushed to the internal network client via the TCP protocol so that the internal network client can obtain the target file.

8. The method for synchronous transmission between intranet and extranet based on TCP protocol according to claim 7, characterized in that, The process of receiving the target file in segments via the TCP protocol also includes: If segmented transmission is interrupted, the transmission will resume from the point of interruption based on the received segment index.

9. A synchronous transmission system for intranet and extranet based on the TCP protocol, characterized in that, include: Internal network clients, external network clients, and servers; The intranet client is used to initiate file transfer requests, perform file type detection and file title detection on the target file, and when the detection is successful, split the target file according to the preset fragmentation rules and transmit it to the server via TCP protocol; The external network client is used to receive download notifications pushed by the server and download the approved target file from the server based on the secure file transfer protocol, or to initiate a file transfer request to the server. The server includes: a receiving module, an auditing module, a notification module, and a breakpoint resume module; The receiving module is used to receive target files from the intranet client or the extranet client via the TCP protocol, and store the target files in the database; The auditing module is used to provide the target file to intranet clients with auditing permissions and receive their auditing results; The notification module is used to push a download notification to the external client when the review result is approved; The interrupted transmission module is used to continue transmission based on the received fragment index when transmission is interrupted.

10. The system according to claim 9, characterized in that, The server also includes a status synchronization module; The status synchronization module is used to push status update messages to intranet clients and extranet clients when the review is completed or the file is updated.

Citation Information

Patent Citations

  • File transmission method for use in database isolation device environment

    CN105007308A

  • A cross-network breakpoint resuming method and system

    CN109714330A

  • File transmission method, device, system and equipment and readable storage medium

    CN111049907A

  • Method and system for achieving zero data loss in network failure scenarios

    WO2025017703A1

Cited By

  • Multi-terminal cooperative office method and system based on unidirectional isolation transmission equipment

    CN121567692A

  • Data transmission method, cloud desktop system, equipment, storage medium and program product

    CN121691315A