Synchronization time methods, systems, equipment, and media based on unidirectional import devices.

CN117639996BActive Publication Date: 2026-08-14南京中孚信息技术有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-06
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

[0004]针对现有技术的上述不足,本申请提供一种基于单向导入设备的同步时间方法、系统、设备及介质,以解决当前网络安全隔离的前置服务器与后置服务器的时间同步方法存在误差的问题

Benefits of technology

(1)本申请在第一时间误差不超过预设误差阈值和第二时间误差不超过预设误差阈值才进行下一步操作,减少单向隔离卡中文件队列造成的时间误差,发送T1前会先发送T1_BEFORE,两者间隔时间为预设等待时间毫秒。如果单向隔离卡当前任务过多,形成文件队列,那么接收端收到这两个文件的时间间隔会变化,与预设等待时间的差值较大。由此可以起到过滤的作用,在单向隔离卡负载较高时,不进行时间同步,提高时间精度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117639996B_ABST
    Figure CN117639996B_ABST
Patent Text Reader

Abstract

This application discloses a time synchronization method, system, device, and medium based on a one-way import device, mainly relating to the field of network security isolation time synchronization technology, to solve the problem of errors in the current time synchronization methods between front-end and back-end servers in network security isolation. It includes: sending files F1 and F2 to a request receiving server; calculating a first time error based on the time the request receiving server receives files F1 and F2; if the error does not exceed a preset error threshold, sending files F3 and F4 to a request initiating server, and then calculating a second time error; if the second time error does not exceed the preset error threshold, calculating the transmission time error between the request initiating server and the request receiving server, and updating the local time of the request receiving server.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of network security isolation time synchronization technology, and in particular to a time synchronization method, system, device and medium based on a one-way import device. Background Technology

[0002] The hardware of the network security isolation and one-way information import / export system adopts a "front-end + dual one-way" mode, which consists of a front-end server, a back-end server, and two sets of one-way isolation transmission units. One set of one-way isolation transmission units serves as the import unit, and the other set serves as the export unit. The one-way isolation transmission units realize the one-way data transmission function, so that the two sides of the data transmission are physically isolated, providing one-way loop-free security for data transmission.

[0003] The existing time synchronization method for network security isolation works as follows: The front-end server acts as the time source, acquiring the local time and recording it in a file. This file is then sent to import unit A. The time file flows through import unit A, the one-way isolation card, and import unit B before finally reaching the back-end server. The back-end server updates its local time based on the time in the time file. It is known that existing network security isolation and one-way information import / export systems can only transmit information based on file exchange. Therefore, front-end servers and back-end servers cannot synchronize time using common methods such as NTP. The traditional method is to record the time in a file and transmit it to the other side through a one-way isolated transmission unit. The other side then updates its local time based on the time in the file. During this process, disk write time and transmission delay can cause significant errors in the accuracy of time synchronization. Summary of the Invention

[0004] To address the aforementioned shortcomings of existing technologies, this application provides a time synchronization method, system, device, and medium based on a one-way import device, in order to solve the problem of errors in the current time synchronization methods between front-end servers and back-end servers with network security isolation.

[0005] Firstly, this application provides a time synchronization method based on a one-way import device. The method includes: sending a file F1 containing the current time T1_BEFORE to a request receiving server via a request initiating server; sending a file F2 containing the current time T1 and T1_BEFORE to the request receiving server based on a preset waiting time; calculating a first time error based on the time when the request receiving server receives file F1 (F1_RECEIVE), the time when it receives file F2 (T2), T1, and T1_BEFORE; and when the first time error does not exceed a preset error threshold, sending a file F1 containing the current time T1_BEFORE to the request initiating server via the request receiving server. File F3 containing the current time T3_BEFORE; File F4 containing the current time T3, T3_BEFORE, T2, and T1 is sent to the request initiating server based on a preset waiting time; A second time error is calculated based on the time when the request initiating server receives file F3 (F3_RECEIVE) and the times when it receives file F4 (T4, T3, and T3_BEFORE); When the second time error does not exceed a preset error threshold, the transmission time error between the request initiating server and the request receiving server is calculated using T1, T2, T3, and T4; The local time of the request receiving server is updated based on the transmission time error.

[0006] Furthermore, the request initiating server is divided into a front-end server and a back-end server; the request receiving server is also divided into a front-end server and a back-end server; when the synchronization time is requested from the internal network to the external network, the request initiating server is the back-end server and the request receiving server is the front-end server; when the synchronization time is requested from the external network to the internal network, the request initiating server is the front-end server and the request receiving server is the back-end server.

[0007] Furthermore, the back-end server sends out files, which are then transferred to the front-end server in the order of export unit A, one-way isolation card, and export unit B; the front-end server sends out files, which are then transferred to the back-end server in the order of import unit A, one-way isolation card, and import unit B.

[0008] Furthermore, after calculating the first time error, the method further includes: ending the time synchronization process when the first time error exceeds a preset error threshold; after calculating the second time error, the method further includes: ending the time synchronization process when the second time error exceeds a preset error threshold.

[0009] Furthermore, based on the time when the request receiving server receives file F1 (F1_RECEIVE), and the times when it receives file F2 (T2, T1, and T1_BEFORE), a first time error is calculated, specifically including: calculating the first time error CHECK1 using the formula: CHECK1=(T2-F1_RECEIVE)-(T1-T1_BEFORE); and based on the time when the request initiating server receives file F3 (F3_RECEIVE), and the times when it receives file F4 (T4, T3, and T3_BEFORE), a second time error is calculated, specifically including: calculating the second time error CHECK2 using the formula: CHECK2=(T4-F3_RECEIVE)-(T3-T3_BEFORE).

[0010] Furthermore, the transmission time error between the request initiating server and the request receiving server is calculated using T1, T2, T3, and T4. Specifically, the transmission time error Delta between the request initiating server and the request receiving server is calculated using the formula: Delta=((T2-T1)+(T3-T4)) / 2.

[0011] Furthermore, based on the transmission time error, the local time of the request receiving server is updated, specifically by adding the transmission time error to the current time of the request receiving server to obtain the updated local time of the request receiving server.

[0012] Secondly, this application provides a time synchronization system based on a one-way import device. The system includes: a first time error acquisition module, used to send a file F1 containing the current time T1_BEFORE to a request receiving server through a request initiating server; send a file F2 containing the current time T1 and T1_BEFORE to the request receiving server based on a preset waiting time; calculate a first time error based on the time when the request receiving server receives file F1 (F1_RECEIVE), the time when it receives file F2 (T2), T1, and T1_BEFORE; and a second time error acquisition module, used to, when the first time error does not exceed a preset error threshold, send a file F1 containing the current time T1 and T1_BEFORE to the request receiving server through the request receiving server. The initiating server sends file F3 containing the current time T3_BEFORE; based on a preset waiting time, it sends file F4 containing the current time T3, T3_BEFORE, T2, and T1 to the request initiating server; based on the time when the request initiating server receives file F3 (F3_RECEIVE) and the times when it receives file F4 (T4, T3, and T3_BEFORE), it calculates a second time error; the local time update module is used to calculate the transmission time error between the request initiating server and the request receiving server using T1, T2, T3, and T4 when the second time error does not exceed a preset error threshold; based on the transmission time error, it updates the local time of the request receiving server.

[0013] Thirdly, this application provides a time synchronization device based on a one-way import device, the device including: a processor; and a memory storing executable code thereon, which, when executed, causes the processor to execute a time synchronization method based on a one-way import device as described above.

[0014] Fourthly, this application provides a non-volatile computer storage medium, characterized in that it stores computer instructions thereon, which, when executed, implement a synchronization time method based on a one-way import device as described above.

[0015] Those skilled in the art will understand that this application has at least the following beneficial effects: (1) This application proceeds to the next operation only when the first time error does not exceed the preset error threshold and the second time error does not exceed the preset error threshold, thereby reducing the time error caused by the file queue in the one-way isolation card. Before sending T1, T1_BEFORE is sent first, and the interval between the two is the preset waiting time in milliseconds. If there are too many tasks on the one-way isolation card, forming a file queue, the time interval between the receiving end receiving these two files will change, and the difference from the preset waiting time will be large. This can play a filtering role, and time synchronization will not be performed when the one-way isolation card is under high load, thus improving time accuracy.

[0016] (2) This application can reduce the error caused by the time it takes to write files to disk. Specifically, time data needs to be written to disk as a file before it can pass through the one-way isolation card, so the time spent writing and reading from the disk will affect the time accuracy. The number of disk reads and writes and the size of reads and writes are roughly the same in the import process (the front-end server sends the file, and the file is transferred to the back-end server in the order of import unit A, one-way isolation card, and import unit B) and the export process (the back-end server sends the file, and the file is transferred to the front-end server in the order of export unit A, one-way isolation card, and export unit B), so the time spent in both directions is roughly the same. The calculation formula of this patent utilizes this feature to effectively reduce the error. Attached Figure Description

[0017] The following description refers to some embodiments of this disclosure, in which: Figure 1 This is a flowchart of a time synchronization method based on a one-way import device provided in an embodiment of this application.

[0018] Figure 2 This is a schematic diagram of the internal structure of a synchronization time system based on a one-way import device provided in an embodiment of this application.

[0019] Figure 3 This is a schematic diagram of the internal structure of a synchronization time device based on a one-way import device, provided in an embodiment of this application. Detailed Implementation

[0020] Those skilled in the art should understand that the embodiments described below are merely preferred embodiments of this disclosure and do not imply that this disclosure can only be implemented through these preferred embodiments. These preferred embodiments are merely used to explain the technical principles of this disclosure and are not intended to limit the scope of protection of this disclosure. Based on the preferred embodiments provided by this disclosure, all other embodiments obtained by those skilled in the art without creative effort should still fall within the scope of protection of this disclosure.

[0021] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0022] The technical solutions proposed in the embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0023] This application provides a time synchronization method based on a one-way import device, such as... Figure 1 As shown in the embodiments of this application, the method mainly includes the following steps: Step 110: Send file F1 containing the current time T1_BEFORE to request receiving server through request initiating server; send file F2 containing the current time T1 and T1_BEFORE to request receiving server based on preset waiting time; calculate the first time error based on the time when request receiving server receives file F1 F1_RECEIVE, the time when file F2 is received T2, T1, and T1_BEFORE.

[0024] It should be noted that request initiating servers are divided into front-end servers and back-end servers; request receiving servers are also divided into front-end servers and back-end servers.

[0025] As an example, when the synchronization time is requested from the internal network to the external network, the server that initiates the request is the back-end server, and the server that receives the request is the front-end server.

[0026] As an example, when the synchronization time is requested from the external network to the internal network, the server that initiates the request is the front-end server, and the server that receives the request is the back-end server.

[0027] The method of sending a file from the request initiating server to the request receiving server can be categorized based on the type of request initiating server: When the request initiating server is a back-end server, the back-end server sends out the file and transfers the file to the front-end server in the order of export unit A, one-way isolation card, and export unit B. When the request initiating server is a front-end server, the front-end server sends out files and transfers the files to the back-end server in the order of import unit A, one-way isolation card, and import unit B.

[0028] It should be further noted that export unit A and export unit B are any feasible devices capable of unidirectional data export. The unidirectional isolation card is a unidirectional isolation card. Import unit A and import unit B are any feasible devices capable of unidirectional data import.

[0029] Specifically, the first time error is calculated based on the time when the request receiving server receives file F1 (F1_RECEIVE), the time when it receives file F2 (T2), T1, and T1_BEFORE. This can be done by using the formula: CHECK1=(T2-F1_RECEIVE)-(T1-T1_BEFORE).

[0030] It should be noted that if the request initiating server has too many current tasks on the unidirectional isolation card in the request receiving server, forming a file queue, the time interval between the receiving end receiving the two files will change, and the difference from the preset error threshold will be large (when the first time error exceeds the preset error threshold). When the unidirectional isolation card is under high load (when the first time error exceeds the preset error threshold), this application can terminate the time synchronization process, stop time synchronization, and improve time accuracy.

[0031] Step 120: When the first time error does not exceed the preset error threshold, send file F3 containing the current time T3_BEFORE to the request initiating server through the request receiving server; based on the preset waiting time, send file F4 containing the current time T3, T3_BEFORE, T2, and T1 to the request initiating server; calculate the second time error based on the time when the request initiating server receives file F3 (F3_RECEIVE) and the times when it receives file F4 (T4, T3, and T3_BEFORE).

[0032] It should be noted that the method of sending a file "from the request receiving server to the request initiating server" is divided into the following categories depending on the request receiving server: When the requesting receiving server is a back-end server, the back-end server sends out the file and transfers the file to the front-end server in the order of export unit A, one-way isolation card, and export unit B. When the requesting receiving server is the front-end server, the front-end server sends out the file and transfers the file to the back-end server in the order of import unit A, one-way isolation card, and import unit B.

[0033] The second time error is calculated based on the time (F3_RECEIVE) when the request-initiating server receives file F3, and the times (T4, T3, T3_BEFORE) when it receives file F4. Specifically, this can be done as follows: The second time error CHECK2 is calculated using the formula: CHECK2=(T4-F3_RECEIVE)-(T3-T3_BEFORE).

[0034] It should be noted that if the receiving server transmits too many current tasks of the unidirectional isolation card to the request initiating server, forming a file queue, the time interval between the receiving end receiving the two files will change, resulting in a larger difference from the preset error threshold (when the second time error exceeds the preset error threshold). When the unidirectional isolation card is under high load (when the second time error exceeds the preset error threshold), this application can terminate the time synchronization process, stop time synchronization, and improve time accuracy.

[0035] Step 130: When the second time error does not exceed the preset error threshold, calculate the transmission time error between the request initiating server and the request receiving server using T1, T2, T3, and T4; update the local time of the request receiving server based on the transmission time error.

[0036] Specifically, the transmission time error between the request initiating server and the request receiving server is calculated using T1, T2, T3, and T4, which can be described as follows: The transmission time error Delta between the request initiating server and the request receiving server is calculated using the formula: Delta=((T2-T1)+(T3-T4)) / 2.

[0037] Specifically, updating the local time of the request receiving server based on the transmission time error can be done as follows: Add the transmission time error to the current time of the request receiving server to obtain the updated local time of the request receiving server.

[0038] besides, Figure 2 This application provides a time synchronization system based on a one-way import device. For example... Figure 2 As shown in the embodiments of this application, the system mainly includes: The first time error acquisition module 210 is used to send a file F1 containing the current time T1_BEFORE to the request receiving server through the request initiating server; send a file F2 containing the current time T1 and T1_BEFORE to the request receiving server based on a preset waiting time; and calculate the first time error based on the time when the request receiving server receives the file F1 (F1_RECEIVE), the time when it receives the file F2 (T2), T1, and T1_BEFORE.

[0039] It should be noted that the first time error acquisition module 210 can be any feasible device or apparatus capable of calculating the first time error based on time data.

[0040] The second time error acquisition module 220 is used to send a file F3 containing the current time T3_BEFORE to the request initiating server through the request receiving server when the first time error does not exceed a preset error threshold; send a file F4 containing the current time T3, T3_BEFORE, T2, and T1 to the request initiating server based on a preset waiting time; and calculate the second time error based on the time when the request initiating server receives the file F3 (F3_RECEIVE) and the times when it receives the file F4 (T4, T3, and T3_BEFORE).

[0041] It should be noted that the second time error acquisition module 220 can be any feasible device or apparatus capable of calculating the second time error based on time data.

[0042] The local time update module 230 is used to calculate the transmission time error between the request initiating server and the request receiving server through T1, T2, T3, and T4 when the second time error does not exceed a preset error threshold; and update the local time of the request receiving server based on the transmission time error.

[0043] It should be noted that the local time update module 230 can be any feasible device or apparatus that can calculate the transmission time error based on time data and update the local time of the request receiving server.

[0044] The above are method embodiments of this application. Based on the same inventive concept, this application also provides a synchronization time device based on a one-way import device. Figure 3 As shown, the device includes: a processor; and a memory storing executable code thereon, which, when executed, causes the processor to perform a synchronization time method based on a one-way import device as described in the above embodiments.

[0045] Specifically, the server sends file F1 containing the current time T1_BEFORE to the request receiving server through the request initiating server; based on a preset waiting time, it sends file F2 containing the current time T1 and T1_BEFORE to the request receiving server; based on the time when the request receiving server receives file F1 (F1_RECEIVE), the time when it receives file F2 (T2, T1, and T1_BEFORE), it calculates a first time error; when the first time error does not exceed a preset error threshold, the server sends file F3 containing the current time T3_BEFORE to the request initiating server through the request receiving server; based on a preset waiting time, it sends file F4 containing the current time T3, T3_BEFORE, T2, and T1 to the request initiating server; based on the time when the request initiating server receives file F3 (F3_RECEIVE), the time when it receives file F4 (T4, T3, and T3_BEFORE), it calculates a second time error; when the second time error does not exceed the preset error threshold, it calculates the transmission time error between the request initiating server and the request receiving server using T1, T2, T3, and T4; and based on the transmission time error, it updates the local time of the request receiving server.

[0046] In addition, embodiments of this application also provide a non-volatile computer storage medium storing executable instructions, which, when executed, implement a synchronization time method based on a one-way import device as described above.

[0047] The technical solutions of this disclosure have been described in conjunction with the preceding embodiments. However, it will be readily understood by those skilled in the art that the scope of protection of this disclosure is not limited to these specific embodiments. Without departing from the technical principles of this disclosure, those skilled in the art can disassemble and combine the technical solutions in the above embodiments, and can also make equivalent changes or substitutions to the relevant technical features. Any changes, equivalent substitutions, improvements, etc., made within the technical concept and / or technical principles of this disclosure will fall within the scope of protection of this disclosure.

Claims

1. A time synchronization method based on a one-way import device, characterized in that, The method includes: The request initiating server sends file F1 containing the current time T1_BEFORE to the request receiving server; based on a preset waiting time, file F2 containing the current time T1 and T1_BEFORE is sent to the request receiving server; the first time error is calculated based on the time when the request receiving server receives file F1 (F1_RECEIVE), the time when it receives file F2 (T2), T1, and T1_BEFORE. When the first time error does not exceed a preset error threshold, the request receiving server sends file F3 containing the current time T3_BEFORE to the request initiating server; based on a preset waiting time, file F4 containing the current time T3, T3_BEFORE, T2, and T1 is sent to the request initiating server; the second time error is calculated based on the time when the request initiating server receives file F3 (F3_RECEIVE) and the times when it receives file F4 (T4, T3, and T3_BEFORE). When the second time error does not exceed the preset error threshold, the transmission time error between the request initiating server and the request receiving server is calculated using T1, T2, T3, and T4; based on the transmission time error, the local time of the request receiving server is updated. Specifically, the first time error is calculated based on the time when the request receiving server receives file F1 (F1_RECEIVE), the time when it receives file F2 (T2), T1, and T1_BEFORE, including: The first time error CHECK1 is calculated using the formula: CHECK1=(T2-F1_RECEIVE)-(T1-T1_BEFORE); The second time error is calculated based on the time when the request-initiating server receives file F3 (F3_RECEIVE), and the times when it receives file F4 (T4, T3, T3_BEFORE). Specifically, this includes: The second time error CHECK2 is calculated using the formula: CHECK2=(T4-F3_RECEIVE)-(T3-T3_BEFORE).

2. The synchronization time method based on a unidirectional import device according to claim 1, characterized in that, The request initiating server is divided into front-end server and back-end server; The request receiving server is divided into front-end server and back-end server; When the synchronization time is requested from the internal network to the external network, the server that initiates the request is the back server, and the server that receives the request is the front server. When the external network requests time synchronization from the internal network, the server that initiates the request is the front-end server, and the server that receives the request is the back-end server.

3. The synchronization time method based on a unidirectional import device according to claim 2, characterized in that, The back-end server sends out files, which are then transferred to the front-end server in the order of export unit A, unidirectional isolation card, and export unit B. The front-end server sends out files, which are then transferred to the back-end server in the order of import unit A, unidirectional isolation card, and import unit B.

4. The synchronization time method based on a unidirectional import device according to claim 1, characterized in that, After calculating the first time error, the method further includes: The synchronization time process ends when the first time error exceeds the preset error threshold. After calculating the second time error, the method further includes: When the second time error exceeds the preset error threshold, the time synchronization process ends.

5. The synchronization time method based on a unidirectional import device according to claim 1, characterized in that, Using T1, T2, T3, and T4, the transmission time error between the request initiating server and the request receiving server is calculated, specifically including: The transmission time error Delta between the request initiating server and the request receiving server is calculated using the formula: Delta=((T2-T1)+(T3-T4)) / 2.

6. The synchronization time method based on a unidirectional import device according to claim 1, characterized in that, Based on transmission time errors, update the local time of the request receiving server, specifically including: Add the transmission time error to the current time of the request receiving server to obtain the updated local time of the request receiving server.

7. A synchronization time system based on a unidirectional import device, characterized in that, The system includes: The first time error acquisition module is used to send a file F1 containing the current time T1_BEFORE to the request receiving server through the request initiating server; send a file F2 containing the current time T1 and T1_BEFORE to the request receiving server based on a preset waiting time; and calculate the first time error based on the time when the request receiving server receives file F1 (F1_RECEIVE), the time when it receives file F2 (T2), T1, and T1_BEFORE. The second time error acquisition module is used to, when the first time error does not exceed a preset error threshold, send a file F3 containing the current time T3_BEFORE to the request initiating server through the request receiving server; send a file F4 containing the current time T3, T3_BEFORE, T2, and T1 to the request initiating server based on a preset waiting time; and calculate the second time error based on the time when the request initiating server receives file F3 (F3_RECEIVE) and the times when it receives file F4 (T4, T3, and T3_BEFORE). The local time update module is used to calculate the transmission time error between the request initiating server and the request receiving server using T1, T2, T3, and T4 when the second time error does not exceed a preset error threshold; and update the local time of the request receiving server based on the transmission time error. Specifically, the first time error is calculated based on the time when the request receiving server receives file F1 (F1_RECEIVE), the time when it receives file F2 (T2), T1, and T1_BEFORE, including: The first time error CHECK1 is calculated using the formula: CHECK1=(T2-F1_RECEIVE)-(T1-T1_BEFORE); The second time error is calculated based on the time when the request-initiating server receives file F3 (F3_RECEIVE), and the times when it receives file F4 (T4, T3, T3_BEFORE). Specifically, this includes: The second time error CHECK2 is calculated using the formula: CHECK2=(T4-F3_RECEIVE)-(T3-T3_BEFORE).

8. A synchronization time device based on a unidirectional import device, characterized in that, The device includes: processor; And a memory having executable code stored thereon, which, when executed, causes the processor to perform a synchronization time method based on a unidirectional import device as described in any one of claims 1-6.

9. A non-volatile computer storage medium, characterized in that, It stores computer instructions, which, when executed, implement a synchronization time method based on a unidirectional import device as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Method and device for time synchronization

    CN109495202A

  • Vehicle time synchronization method, device, equipment, medium and program product

    CN116916433A