One-way data transmission method and system, external network client
By setting up a local data stack on the external client and utilizing the HTTP protocol, secure data transmission in a one-way isolated network environment is achieved, solving the security risks of intranet penetration technology and realizing secure and reliable one-way data transmission.
Patent Information
- Application Number
- CN202211536470.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-02
- Publication Date
- 2026-03-20
- Estimated Expiration
- 2042-12-02
AI Technical Summary
In existing technologies, intranet penetration technology has security risks, requires the purchase of third-party services and is complex to deploy, and cannot effectively guarantee the security of intranet data.
By setting up a local data stack in the external client to store request event data, and using the HTTP protocol to enable the internal server to unidirectionally obtain this data, execute the target event, and return the response result, a closed-loop message processing flow is formed.
In a one-way isolated network environment, external clients can notify internal servers of data as if they were communicating normally, avoiding information leakage, reducing security risks, and requiring no complex deployment or additional maintenance.
Smart Images

Figure CN115913742B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of network data transmission, in particular to a one-way data transmission method. The present application also relates to an external network client, a one-way data transmission system, a computing device, and a computer readable storage medium. BACKGROUND
[0002] With the deep development of computer technology and Internet technology, in some key fields and special environments, in order to ensure network security and data security, the network environment usually has a one-way access network isolation requirement. In a one-way access network environment, an access request can only be initiated in one direction.
[0003] In the prior art, a third-party internal network penetration technology can be purchased, so that the specific source IP address and source port number data of one party can be correctly routed to the host in the isolated shielding environment. However, the internal network penetration technology not only needs to purchase a third-party service, but also exposes the internal network IP address, port and internal network data, which has the risk of being intercepted by the third-party service, thus having certain security risks and complex deployment requiring additional maintenance. SUMMARY
[0004] Therefore, the embodiments of the present application provide a one-way data transmission method to solve the technical defects in the prior art. The embodiments of the present application also provide an external network client, a one-way data transmission system, a computing device, and a computer readable storage medium.
[0005] According to a first aspect of the embodiments of the present application, a one-way data transmission method is provided, applied to an external network client, comprising:
[0006] receiving a request event initiated for a target event;
[0007] obtaining request event data corresponding to the request event, and writing the request event data into a local data stack, wherein the request event data stored in the local data stack is used by an internal network server to obtain, so as to execute the target event;
[0008] receiving an event response result fed back by the internal network server after executing the target event, and returning event result data to a request event party of the target event according to the event response result.
[0009] According to a second aspect of the embodiments of the present application, an external network client is provided, comprising:
[0010] a receiving module configured to receive a request event initiated for a target event;
[0011] The writing module is configured to obtain request event data corresponding to a request event, and write the request event data into a local data stack, wherein the request event data stored in the local data stack is used by the intranet server to obtain, so as to execute a target event;
[0012] The returning module is configured to receive an event response result fed back by the intranet server after executing the target event, and return event result data to a request event party of the target event according to the event response result.
[0013] According to a third aspect of the embodiments of the present application, a one-way data transmission system is provided, comprising an intranet server and an extranet client;
[0014] The extranet client is configured to receive a request event initiated for a target event, obtain request event data corresponding to the request event, and write the request event data into a local data stack;
[0015] The intranet server is configured to obtain the request event data from the local data stack, execute the target event according to the request event data, and return an event response result of the target event to the extranet client;
[0016] The extranet client is further configured to receive the event response result fed back by the intranet server, and return event result data to a request event party of the target event according to the event response result.
[0017] According to a fourth aspect of the embodiments of the present application, a computing device is provided, comprising:
[0018] a memory and a processor;
[0019] The memory is used to store computer executable instructions, and the processor executes the computer executable instructions to realize the steps of the one-way data transmission method.
[0020] According to a fifth aspect of the embodiments of the present application, a computer readable storage medium is provided, which stores computer executable instructions, and the instructions are executed by a processor to realize the steps of the one-way data transmission method.
[0021] According to a sixth aspect of the embodiments of the present application, a chip is provided, which stores a computer program, and the computer program is executed by the chip to realize the steps of the one-way data transmission method.
[0022] The one-way data transmission method provided in the application includes the following steps: an external network client receives a request event initiated for a target event; request event data corresponding to the request event is acquired, and the request event data is written into a local data stack; the request event data stored in the local data stack is used for acquisition by an internal network server to execute the target event; an event response result fed back by the internal network server in executing the target event is received, and event result data is returned to a request event party of the target event according to the event response result.
[0023] In this case, in order to exchange data in a one-way isolated network environment, the external network client can write the generated request event data into the local data stack, the internal network server can acquire and process the request event data in the external network client that cannot be transmitted back to the internal network environment based on the stack technology, execute the corresponding event, and feed back the event response result of executing the event to the external network client, so as to form a message closed loop processing flow in the one-way isolated network environment, so that the external network client can notify the internal network server of data as in normal communication in the environment in which the external network and the internal network can only communicate in one way, information leakage is avoided, security risks are reduced, and complex deployment and additional maintenance are not required. BRIEF DESCRIPTION OF DRAWINGS
[0024] Figure 1 is a structural schematic diagram of one-way data transmission provided by an embodiment of the application;
[0025] Figure 2 is a flowchart of a one-way data transmission method provided by an embodiment of the application;
[0026] Figure 3a is a schematic diagram of an application program interface provided by an embodiment of the application;
[0027] Figure 3b is a list schematic diagram of a local data stack provided by an embodiment of the application;
[0028] Figure 3c is an operation flowchart of an external network client provided by an embodiment of the application;
[0029] Figure 4 is a structural schematic diagram of an external network client provided by an embodiment of the application;
[0030] Figure 5a is a structural schematic diagram of a one-way data transmission system provided by an embodiment of the application;
[0031] Figure 5b is a whole processing flowchart of a one-way data transmission method provided by an embodiment of the application;
[0032] Figure 6is a structural block diagram of a computing device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0033] In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. However, the present application can be practiced without the specific details, and it is understood that the present application is not limited to the embodiments described herein. In other instances, well-known methods, procedures, components, and circuits have not been described in detail as not to unnecessarily obscure aspects of the present application.
[0034] The terminology used in this disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of one or more embodiments of the present application. As used in this disclosure and the appended claims, the singular forms "a," "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
[0035] It will be understood that, although the terms first, second, etc. can be used herein to describe various information, these terms are not intended to denote a temporal or chronological order. Rather, these terms are used solely to distinguish one from another only. For example, a first item could be termed a second item, and, similarly, a second item could be termed a first item without departing from the scope of one or more embodiments of the present application.
[0036] First, the noun terms related to one or more embodiments of the present application are explained.
[0037] External network client: a host that cannot return data to the isolated internal network is called an external network client.
[0038] Internal network server: a server that can freely send and receive data in an isolated environment is called an internal network server.
[0039] Data stack: a data structure that stores request event data is a data stack, which is a list of key-value pairs with one key corresponding to one value.
[0040] HTTP (HyperText Transfer Protocol): It is an application layer protocol for distributed, collaborative and hypermedia information systems, and is the basis for data communication of the World Wide Web, and is also the most widely used network transmission protocol for Internet applications.
[0041] In the present application, a one-way data transmission method is provided. The present application also relates to an external network client, a one-way data transmission system, a computing device, and a computer readable storage medium, which are described in detail in the following embodiments.
[0042] Figure 1 A structural diagram of one-way data transmission provided by an embodiment of the present application is shown in FIG. 1. Figure 1 As shown in FIG. 1, the external network client writes various request event data into the local data stack according to the regulations after generating the request event data, that is, the external network client can write the request event data into the local data stack, the internal network server continuously obtains the request event data in the local data stack from the external network client by using the HTTP protocol in a one-way manner and takes it back to the internal network environment for consumption, and the internal network server pushes the event response result of the execution event to the external network client, forming a message closed-loop processing flow. In this way, in the environment where the external network and the internal network can only communicate in one way, the external network client can notify the internal network server of data as normal communication, avoiding information leakage and reducing security risks, and without complex deployment and additional maintenance.
[0043] Figure 2 A flowchart of a one-way data transmission method provided by an embodiment of the present application is shown in FIG. 2, which is applied to an external network client and specifically includes the following steps.
[0044] Step 202: receiving a request event initiated for a target event.
[0045] The target event is an event that needs to be executed on the internal network server.
[0046] In actual application, the external network client can show a user a variety of event processing pages, and the event processing page includes a variety of event initiation controls. The request event party can trigger the corresponding event initiation control based on the demand, and at this time, the external network client can receive the request event initiated for the target event. The target event is the event selected by the request party, and the event needs to be executed on the internal network server.
[0047] It should be noted that the request event party can initiate a processing request for an event through the external network client, and at this time, the external network client can receive the request event initiated for the event, and the event can be processed through the internal network server subsequently.
[0048] Step 204: obtaining request event data corresponding to the request event, and writing the request event data into a local data stack, wherein the request event data stored in the local data stack is used for the internal network server to obtain, so as to execute the target event.
[0049] Specifically, the request event data is related data required for executing a target event, such as an event identifier of the target event, a detailed request data packet, and the like. The detailed request data packet can include detailed request data such as whether to print a log, a user name, a channel, and the like.
[0050] In addition, in the computer field, a stack is a concept that cannot be ignored. The stack is a data structure in which data items are arranged in sequence. The stack is a special storage area, and the main function is to temporarily store data and addresses.
[0051] In the embodiment of the present application, the local data stack is stored in a medium capable of storing data in the external client, such as a database. In addition, since the request event data written into the local data stack first is the data corresponding to the event triggered first, it should be processed first. Therefore, the local data stack can use a first-in first-out manner, so that the subsequent internal server can obtain the request event data from the local data stack of the external client based on the triggering order of the events, thereby executing each event based on the triggering order of the events.
[0052] Furthermore, the internal server can batch obtain event request data from the local data stack of the external client. After obtaining multiple event request data, the corresponding events can be executed according to the time of obtaining the event request data. Alternatively, if the events corresponding to the multiple event request data have priority identifiers, each event can be executed from high to low based on the priority indicated by the priority identifier. Of course, in addition to sequentially executing multiple events, the multiple events can also be executed in parallel.
[0053] It should be noted that the local data stack refers to a data stack locally set by the external client, used to store the request event data corresponding to the request event initiated in the external client. The subsequent internal server can obtain the corresponding request event data from the local data stack to execute the target event, so that in the environment where the external network and the internal network can only communicate in one direction, the external client can notify the internal server of data as normal communication.
[0054] In an optional embodiment of the present embodiment, writing the request event data into the local data stack includes:
[0055] Determining a target write interface corresponding to the new event from at least one application program interface set by the external client;
[0056] Calling the target write interface to write the request event data into the local data stack.
[0057] It should be noted that the external network client is provided with various function interface APIs (application program interfaces) for transaction operation on the local data stack, and the application program interfaces can be multiple, each of which is responsible for different transaction operations.
[0058] An example, Figure 3a is a schematic diagram of an application program interface provided by an embodiment of the present application, as Figure 3a shown, the application program interface includes an add request event data interface (Add_RequestData), a get request event data interface (Get_RequestData), a get all request ID interface (Get_AllRequestKeys), a get request event status interface (Get_RequestStatus), a get request event server response data interface (Get_ResponseData), a set request event response data interface (Set_ResponseData), and a set stack operation state lock interface (GetLock) to ensure that each operation on the data storage medium is a single operation.
[0059] In the embodiment of the present application, after the external network client receives a request event, it can determine a target write interface corresponding to the added request event data from at least one application program interface provided by the external network client, and then call the target write interface to write the request event data to the local data stack. The data writing of the local data stack can be realized through the application program interface, which is simple and convenient to operate.
[0060] In the above example, when the external network client initiates a target event that needs to be executed by the internal network server, it inserts the detailed data (i.e. request event data) of the request event in the local data stack through the API interface Add_RequestData (add request event data interface).
[0061] In an optional implementation of the embodiment, the local data stack is divided into an event identifier management stack and an event session parameter stack, and the request event data includes an event identifier of the target event and a request data packet; calling the target write interface to write the request event data to the local data stack includes:
[0062] Calling the target write interface to write the event identifier of the target event to the event identifier management stack and write the request data packet to the event session parameter stack.
[0063] In practical applications, the local data stack is divided into an event identifier management stack and an event session parameter stack, the event identifier management stack is used to manage the event identifiers of various events, and the event identifier is used to uniquely identify an event, such as the unique identifier key of the event; the event session parameter stack is used to store detailed event data.
[0064] It should be noted that the request event data can include an event identifier of the target event, which can be a unique identifier key of the target event, and a request data packet, which can be detailed data related to the target event. The external client can call the target write interface to write the event identifier of the target event to the event identifier management stack and write the request data packet to the event session parameter stack. In this way, the unique identifiers of different events are managed by the event identifier management stack, and the detailed information of the events is managed by the event session parameter stack, thereby improving the data storage and query efficiency.
[0065] In an optional embodiment of the present embodiment, the request data packet is stored in the form of a key-value pair; writing the request data packet to the event session parameter stack includes:
[0066] The target write interface is called to pass the event identifier of the target event, the request data packet, and the current state of the target event to the event session parameter stack;
[0067] The session request parameter is generated according to the event identifier and the request data packet, and the session state parameter is generated according to the event identifier and the current state of the event;
[0068] The request data key-value pair is generated according to the session state parameter and the session request parameter, and is stored in the event session parameter stack.
[0069] It should be noted that the event identifier management stack stores the unique identifier Key of each initiated event; and the request data packet of each initiated event is inserted into the data stack in the form of a key-value pair.
[0070] In addition, the request data packet is stored in the form of a key-value pair, the Key (key) is the event identifier, the Session_Status_key (session state parameter) and the Session_Request_Key (session request parameter) can be used as the value corresponding to the Key (key) to form a key-value pair, and the key-value pair is stored in the event session parameter stack. The Session_Status_key indicates the session state parameter and is used to indicate the current state of the target event; the Session_Request_Key indicates the session request parameter, and the session_Request_key points to the request data packet of the request event (such as whether to print a log, a user name, a channel, and other specific detailed information).
[0071] In the embodiment of the present application, the external network client can call the target write interface, input the event identifier of the target event, the request data packet and the current event state of the target event into the event session parameter stack, then generate the session request parameter according to the event identifier and the request data packet, and generate the session state parameter according to the event identifier and the current event state; then, according to the session state parameter and the session request parameter, the request data key-value pair is generated and stored in the event session parameter stack. In this way, the detailed request event data corresponding to the request event is written into the event session parameter stack, which is convenient for the subsequent internal network server to obtain and process the corresponding event, and the stack technology is used to enable the external network client to notify the internal network server of the data as normal communication in the environment where the external network and the internal network can only communicate in one direction.
[0072] For example, when the external network client needs to initiate an event request, the Add_RequestData interface (new request event data interface) can be called and the globally unique event identifier Sessionkey generated by the external network client local data stack for the event is input, in the Add_RequestData interface, the Sessionkey is directly used to splice the string "Request" to generate Session_Request_Key (session request parameter), the string "Request" is the string of detailed information of the request data packet, and Session_Request_Key is the session request parameter generated based on the event identifier and the request data packet; and the Sessionkey can also be directly used to splice "Status" to generate Session_Status_key, the "Status" represents the current event state, and Session_Status_key is the session state parameter generated based on the event identifier and the current event state, then Session_Request_Key and Session_Status_Key can be used as value (value) to construct a key-value pair with the event identifier Key, and written into the event session parameter stack of the external network client.
[0073] In an optional implementation of the embodiment, after generating the session request parameter according to the event identifier and the request data packet, and generating the session state parameter according to the event identifier and the current event state, the method further comprises:
[0074] In the case of waiting for the internal network server to feed back the event response result, generating a session response parameter according to the event identifier and the historical response data;
[0075] Correspondingly, generating a request data key-value pair according to the session request parameter and the session state parameter comprises:
[0076] According to the session state parameter, the session response parameter and the session request parameter, a request data key-value pair is generated.
[0077] It should be noted that the intranet server can obtain the request event data from the local data stack of the extranet client, and then the intranet server can execute the target event according to the request event data, and return the event response result of the target event to the extranet client. The event response result can include the execution state of the target event, and inform the extranet client whether to continue to wait.
[0078] In actual application, if the execution state in the event response result received by the extranet client is executing, the extranet client needs to continue to wait for the event response result fed back by the intranet server, and thus the extranet client can generate the session response parameter according to the event identifier and the historical response data in the case of determining that the intranet server needs to continue to wait for the event response result. The historical response data is the response data fed back by the intranet server to the extranet client before the current time, so as to determine whether the intranet server needs to continue to wait for the event response result at present.
[0079] That is, the extranet client locally waits for the data returned by the intranet server, and then generates the Session_Response_key according to the Session key, and combines the Session_Status_key and the Session_Request_Key to construct the key-value pair, which is used to mark that the existing result response data exists. That is, at this time, the Session_Status_key, the Session_Request_Key and the Session_Response_key can be used as the value corresponding to the key, to form the key-value pair, and stored to the event session parameter stack. The Session_Response_key can record the state enumeration of the target event, such as linking (executing), timeout, exception, end, etc., and the Session_Response_key can be used to point to the result data packet after the end of the event in the local data stack of the extranet client.
[0080] An example of the local data stack is shown in the following table. Figure 3b is a list of a local data stack provided by an embodiment of the present application, as shown in the following table. Figure 3bAs shown, the local data stack includes an event identification management stack and an event session parameter stack, the event identification management stack stores Session01_Key, Session02_Key, Session03_Key, …, and the event session parameter stack stores Session01_Status_Key, Session01_Response_Key, Session01_Request_Key, Session02_Status_Key, Session02_Response_Key, Session02_Request_Key, ….
[0081] Step 206: receiving the event response result of the target event feedback executed by the intranet server, and returning the event result data to the requesting event party of the target event according to the event response result.
[0082] It should be noted that the intranet server can obtain the requesting event data from the local data stack of the extranet client, then the intranet server can execute the target event according to the requesting event data, and return the event response result of the target event to the extranet client, and the extranet client can return the event result data to the requesting event party of the target event according to the event response result, thereby closing the loop to complete the message synchronization in an event processing process.
[0083] In an optional embodiment of the present embodiment, returning the event result data to the requesting event party of the target event according to the event response result comprises:
[0084] Determining whether the event response result fed back by the intranet server is obtained every interval of a set time length;
[0085] In the case of obtaining the event response result, analyzing the event response result to obtain the execution status of the target event;
[0086] Returning the event result data to the requesting event party of the target event according to the execution status.
[0087] It should be noted that the extranet client can start a loop, and can determine whether the event response result fed back by the intranet server is obtained once every interval of a set time length, if the event response result fed back by the intranet server is obtained before the set time threshold, it means that the intranet server successfully obtains the requesting event data from the local data stack of the extranet client, executes the target event based on the requesting event data, and feeds back the response data to the extranet client, at this time, the extranet client can analyze the obtained event response result to obtain the execution status of the target event, and then return the event result data to the requesting event party of the target event according to the execution status.
[0088] The execution state can refer to a corresponding link state.
[0089] In the embodiment, the external network client receives the event response result returned by the internal network server, the event response result includes the execution state of the target event, and the external network client can continuously determine whether the target event needs to continue waiting or can be closed based on the execution state, so that the event result data is returned to the request event party of the target event according to the execution state, and the message synchronization in the event processing process is closed.
[0090] In an optional embodiment of the embodiment, the event result data is returned to the request event party of the target event according to the execution state, including:
[0091] In the case of the execution state being in execution, the internal network server continues to wait for the feedback of the event response result;
[0092] In the case of the execution state being abnormal, the request event data related to the target event in the local data stack is cleaned up, and an abnormal default value is returned to the request event party of the target event;
[0093] In the case of the execution state being execution complete, the request event data related to the target event in the local data stack is cleaned up, and the execution result is returned to the request event party of the target event.
[0094] It should be noted that if the execution state of the target event is the connection state, that is, the execution state, it means that the message of the target event has been taken away by the internal network server and further executed, and the external network client needs to continuously wait for the message push in the specific execution process of the internal network server, that is, continue to wait for the feedback of the event response result of the internal network server. If the execution state of the target event is the completion state, that is, the execution is complete, it means that the internal network server has ended the execution of the target event, that is, the target event is executed, and at this time, the execution result can be returned to the request event party of the target event, and the execution result is the return value or data packet generated after the target event is executed. If the execution state of the target event is the abnormal state, it means that the internal network server has an unexpected interruption and error in the execution process, and an abnormal default value is returned to the request event party of the target event.
[0095] In addition, in actual application, the target event related request event data in the local data stack of the external network client needs to be cleaned up after the event ends, so as to save storage space, including normal execution end and abnormal end. In addition, the external network client can obtain the result data of the target event from the local data stack after determining that the event ends, and return the result data to the initial event request party. The result data includes the return value or data packet after normal end, or the default value returned when the abnormal end.
[0096] In an optional implementation of the embodiment, after determining whether the event response result fed back by the intranet server is acquired, the method further includes:
[0097] In a case where the set time threshold is reached and the event response result is not acquired, the request event data related to the target event in the local data stack is cleaned, and an abnormal default value is returned to the request event party of the target event.
[0098] It should be noted that if the loop time has exceeded the longest time set locally by the extranet client, i.e., the set time threshold is reached, and the event response result is still not acquired, it is indicated that the execution is timed out, the loop detection is stopped, and the local data stack is directly ended abnormally, the target event related request event data in the local data stack is cleaned, and an abnormal default value, such as a null value, is returned. The abnormal default value returned in the timeout end and the abnormal default value returned in the abnormal state can be the same or different. That is, for the abnormal and timeout end cases, the extranet client can acquire the abnormal report information and return the abnormal default value.
[0099] The one-way data transmission method provided in the application is for the data exchange needs of the one-way isolated network environment. The extranet client can write the generated request event data into the local data stack, the intranet server can acquire and process the request event data in the extranet client that cannot be transmitted back to the intranet environment based on the stack technology, execute the corresponding event, and feed back the event response result of executing the event to the extranet client, so as to form a message closed loop processing flow in the one-way isolated network environment. In the environment where the extranet and the intranet can only communicate in one way, the extranet client can notify the data to the intranet server like normal communication, avoid information leakage, reduce security risks, and does not need complex deployment and additional maintenance.
[0100] Figure 3c An operation flowchart of an extranet client is shown according to an embodiment of the application, as shown in FIG. 1. Figure 3c When the extranet client initiates a target event that needs to be executed by the intranet server, the event request detailed data of the target event is inserted into the local data stack of the extranet client through the API interface Add_RequestData (add request event data interface), that is, the request event data is inserted into the local data stack by the extranet client. Then, the extranet client starts a loop, and acquires the event response result data from the intranet server every interval waiting time.
[0101] If the loop time has exceeded the longest time set locally by the extranet client, the response result data is still not acquired, the loop detection is stopped, the current event related stack data is directly ended abnormally, and a null value is returned.
[0102] If the response result data of the current event is obtained from the intranet server, the response data can be parsed to obtain the latest link state data of the event. If the event is a connection state, it means that the event message has been taken away by the intranet server and further executed, and the intranet server needs to continuously wait for the message push in the specific execution process; if it is a return completion state, it means that the intranet server has ended the execution of the demand of the current event and returned the execution result; if it is a return exception state, it means that unexpected interruption and error occur in the execution process.
[0103] For the case of exception and timeout end, the external network client can obtain the exception report information and prepare to return the exception default value. For the case of successful execution end, the external network client can obtain the response data result returned by the intranet server.
[0104] After the event ends (including normal end and abnormal end), the external network client needs to clean up the data related to the current event in the local data stack of the external network client, and uniformly returns the final result of the current event request to the event requester. If it is a normal end, the final result is the response data result after the successful execution end, and if it is an abnormal end, the final result is an exception default value.
[0105] The one-way data transmission method provided in the application is for the data exchange needs of the one-way isolated network environment. The external network client can write the generated request event data into the local data stack, the intranet server can obtain and process the request event data in the external network client that cannot be transmitted back to the intranet environment based on the stack technology, execute the corresponding event, and feed back the event response result of executing the event to the external network client, so as to form a message closed loop processing flow in the one-way isolated network environment. In the environment where the external network and the intranet can only communicate in one way, the external network client can notify the data to the intranet server like normal communication, avoiding information leakage and reducing security risks, and without complex deployment and additional maintenance.
[0106] Corresponding to the above method embodiments, the application also provides an external network client embodiment, Figure 4 A structure schematic diagram of an external network client provided by an embodiment of the application is shown. As shown in the figure, Figure 4 The device comprises:
[0107] The receiving module 402 is configured to receive a request event initiated for a target event;
[0108] The writing module 404 is configured to obtain request event data corresponding to the request event, and write the request event data into a local data stack, wherein the request event data stored in the local data stack is used for the intranet server to obtain, so as to execute the target event;
[0109] The returning module 406 is configured to receive an event response result of the intranet server executing the target event feedback, and return event result data to the requesting event party of the target event according to the event response result.
[0110] Optionally, the writing module 404 is further configured to:
[0111] determine the target writing interface corresponding to the new event from at least one application program interface set by the extranet client;
[0112] invoke the target writing interface to write the requesting event data into the local data stack.
[0113] Optionally, the local data stack is divided into an event identifier management stack and an event session parameter stack, and the requesting event data includes an event identifier of the target event and a requesting data packet; the writing module 404 is further configured to:
[0114] invoke the target writing interface to write the event identifier of the target event into the event identifier management stack and write the requesting data packet into the event session parameter stack.
[0115] Optionally, the requesting data packet is stored in the form of a key-value pair; the writing module 404 is further configured to:
[0116] invoke the target writing interface to input the event identifier of the target event, the requesting data packet and an event current state of the target event into the event session parameter stack;
[0117] generate a session request parameter according to the event identifier and the requesting data packet, and generate a session state parameter according to the event identifier and the event current state;
[0118] generate a requesting data key-value pair according to the session state parameter and the session request parameter, and store the requesting data key-value pair into the event session parameter stack.
[0119] Optionally, the writing module 404 is further configured to:
[0120] generate a session response parameter according to the event identifier and historical response data in the case of waiting for the intranet server to feed back the event response result;
[0121] generate a requesting data key-value pair according to the session state parameter, the session response parameter and the session request parameter.
[0122] Optionally, the returning module 406 is further configured to:
[0123] determine whether the event response result fed back by the intranet server is obtained every interval of a set time length;
[0124] In the case of obtaining the event response result, the event response result is analyzed to obtain the execution state of the target event.
[0125] According to the execution state, the event result data is returned to the request event party of the target event.
[0126] Optionally, the returning module 406 is further configured to:
[0127] In the case of the execution state being in execution, the event response result is continuously waited for the feedback of the intranet server;
[0128] In the case of the execution state being abnormal, the request event data related to the target event in the local data stack is cleaned up, and an abnormal default value is returned to the request event party of the target event;
[0129] In the case of the execution state being execution complete, the request event data related to the target event in the local data stack is cleaned up, and the execution result is returned to the request event party of the target event.
[0130] Optionally, the returning module 406 is further configured to:
[0131] In the case of reaching the set time threshold and not obtaining the event response result, the request event data related to the target event in the local data stack is cleaned up, and an abnormal default value is returned to the request event party of the target event.
[0132] The external network client provided in the application can write the generated request event data into the local data stack for the data exchange needs of the one-way isolated network environment. The intranet server can obtain and process the request event data in the external network client that cannot be transmitted back to the intranet environment based on the stack technology, execute the corresponding event, and feed back the event response result of executing the event to the external network client, forming a message closed loop processing flow in the one-way isolated network environment. In the environment where the external network and the intranet can only communicate in one direction, the external network client can notify the data to the intranet server as normal communication, avoiding information leakage and reducing security risks, and without complex deployment and additional maintenance.
[0133] The above is a schematic solution of the external network client in the embodiment. It should be noted that the technical solution of the external network client and the technical solution of the one-way data transmission method belong to the same concept, and the details of the technical solution of the external network client that are not described in detail can be seen from the description of the technical solution of the one-way data transmission method. In addition, each component in the device embodiment should be understood as a functional module that must be established to implement each step of the program flow or each step of the method. Each functional module is not limited by actual functional division or separation. The device claim defined by such a group of functional modules should be understood as a functional module architecture for implementing the solution by the computer program mainly recorded in the specification, and should not be understood as an entity device for implementing the solution mainly by hardware.
[0134] Corresponding to the method embodiment, the application also provides a one-way data transmission system embodiment, Figure 5a The structure of a one-way data transmission system provided by an embodiment of the application is shown in a schematic diagram, as shown in Figure 5a The system includes an internal network server 502 and an external network client 504.
[0135] The external network client 504 is configured to receive a request event initiated for a target event, obtain request event data corresponding to the request event, and write the request event data into a local data stack.
[0136] The internal network server 502 is configured to obtain the request event data from the local data stack, execute the target event according to the request event data, and return an event response result of the target event to the external network client 504.
[0137] The external network client 504 is further configured to receive the event response result fed back by the internal network server, and return event result data to the request event party of the target event according to the event response result.
[0138] Optionally, the internal network server 502 is further configured to:
[0139] analyze the request event data to obtain event execution parameters;
[0140] notify the corresponding execution module to process the event according to the event execution parameters, and return the event response result to the external network client according to the event processing result.
[0141] Optionally, the external network client 504 is further configured to:
[0142] determine a target write interface corresponding to the new event from at least one application program interface set by the external network client;
[0143] call the target write interface to write the request event data into the local data stack.
[0144] Optionally, the local data stack is divided into an event identifier management stack and an event session parameter stack, the request event data comprises an event identifier of the target event and a request data packet; the external network client 504 is further configured to:
[0145] invoke the target write interface to write the event identifier of the target event to the event identifier management stack and write the request data packet to the event session parameter stack.
[0146] Optionally, the request data packet is stored in the form of a key-value pair; the external network client 504 is further configured to:
[0147] invoke the target write interface to transmit the event identifier of the target event, the request data packet and an event current state of the target event to the event session parameter stack;
[0148] generate a session request parameter according to the event identifier and the request data packet, and generate a session state parameter according to the event identifier and the event current state;
[0149] generate a request data key-value pair according to the session state parameter and the session request parameter, and store the request data key-value pair to the event session parameter stack.
[0150] Optionally, the external network client 504 is further configured to:
[0151] generate a session response parameter according to the event identifier and historical response data in a case of waiting for the internal network server to feed back an event response result;
[0152] generate a request data key-value pair according to the session state parameter, the session response parameter and the session request parameter.
[0153] Optionally, the external network client 504 is further configured to:
[0154] determine whether the event response result fed back by the internal network server is acquired every interval of a set time length;
[0155] in a case of acquiring the event response result, parse the event response result to obtain an execution state of the target event;
[0156] return event result data to a request event party of the target event according to the execution state.
[0157] Optionally, the external network client 504 is further configured to:
[0158] in a case of the execution state being in execution, continue to wait for the internal network server to feed back the event response result;
[0159] In the case of the execution state being abnormal, the request event data related to the target event in the local data stack is cleaned up, and an abnormal default value is returned to the request event party of the target event;
[0160] In the case of the execution state being execution complete, the request event data related to the target event in the local data stack is cleaned up, and an execution result is returned to the request event party of the target event.
[0161] Optionally, the external network client 504 is further configured to:
[0162] In the case of reaching the set time threshold and failing to obtain the event response result, the request event data related to the target event in the local data stack is cleaned up, and an abnormal default value is returned to the request event party of the target event.
[0163] The one-way data transmission system provided in the application is for the data exchange needs of the one-way isolated network environment. The external network client can write the generated request event data into the local data stack. The internal network server can acquire and process the request event data in the external network client that cannot be transmitted back to the internal network environment based on the stack technology, execute corresponding events, and feed back the event response result of the executed event to the external network client, so as to form a message closed loop processing flow in the one-way isolated network environment. In the environment in which the external network and the internal network can only communicate in one direction, the external network client can notify the internal network server of data as in normal communication, information leakage is avoided, security risks are reduced, and complex deployment and additional maintenance are not required.
[0164] The above is a schematic scheme of the one-way data transmission system of the embodiment. It should be noted that the technical scheme of the one-way data transmission system belongs to the same concept as the technical scheme of the one-way data transmission method described above. The details of the technical scheme of the one-way data transmission system that are not described in detail can be referred to the description of the technical scheme of the one-way data transmission method.
[0165] Figure 5b The overall processing flowchart of the one-way data transmission method provided in an embodiment of the application is shown in FIG. 1. Figure 5bAs shown, the outer network client generates various request event data and pushes the data into the local data stack according to the regulation. Then, the inner network server continuously obtains the stacked request event data by using the HTTP protocol in a one-way manner, and takes the data back to the inner network environment for consumption. After the inner network server takes the request event data back, the inner network server classifies and analyzes the data to obtain specific event execution parameters. Based on the event execution parameters, the inner network server notifies the inner network server to perform specific work processing. After that, the inner network server has new result data or state feedback in the specific work processing, which can be directly sent to the outer network client by using the HTTP request in a one-way manner. The outer network client obtains the result data or state data and feeds back to the event requester, thereby forming a message closed loop processing flow.
[0166] The one-way data transmission system provided in the application can meet the data exchange needs of the one-way isolated network environment. The outer network client can write the generated request event data into the local data stack, and the inner network server can obtain and process the request event data that cannot be transmitted back to the inner network environment based on the stack technology, so as to execute the corresponding event and feed back the event response result of the executed event to the outer network client, thereby forming a message closed loop processing flow in the one-way isolated network environment. In the environment in which the outer network and the inner network can only communicate in a one-way manner, the outer network client can notify the inner network server of the data like normal communication, thereby avoiding information leakage and reducing security risks, and without complex deployment and additional maintenance.
[0167] Figure 6 A structural block diagram of a computing device according to an embodiment of the application is shown. The components of the computing device 600 include but are not limited to a memory 610 and a processor 620. The processor 620 is connected to the memory 610 through a bus 630, and a database 650 is used to save data.
[0168] The computing device 600 also includes an access device 640 that enables the computing device 600 to communicate via one or more networks 660. Examples of such networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or combinations of such networks, such as the Internet. The access device 640 can include one or more of any type of network interface (for example, a network interface card (NIC)) such as an IEEE 802.11 wireless local area networks (WLAN) wireless interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, or the like.
[0169] In one embodiment of the present application, the above-described components of the computing device 600, as well as other components not shown in FIG. 6, can be connected to each other by a bus. It should be understood that Figure 6 Figure 6 The computing device structure diagram shown is merely for the purpose of example, and is not a limitation on the scope of the present application. Other components can be added or replaced by those skilled in the art as needed.
[0170] The computing device 600 can be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (for example, a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, and the like), a mobile phone (for example, a smartphone), a wearable computing device (for example, a smart watch, smart glasses, and the like), or other types of mobile devices, or a stationary computing device such as a desktop computer or PC. The computing device 600 can also be a mobile or stationary intranet server.
[0171] The processor 620 is configured to execute instructions for performing the steps of the one-way data transmission method.
[0172] The above is a schematic scheme of the computing device of the embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the one-way data transmission method belong to the same concept, and the details of the technical scheme of the computing device that are not described in detail can be referred to the description of the technical scheme of the one-way data transmission method.
[0173] An embodiment of the present application further provides a computer readable storage medium storing computer instructions, which are executed by a processor to implement the steps of the one-way data transmission method.
[0174] The above is a schematic scheme of the computer readable storage medium of the embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the one-way data transmission method belong to the same concept, and the details of the technical scheme of the storage medium that are not described in detail can be referred to the description of the technical scheme of the one-way data transmission method.
[0175] The computer instructions include computer program codes, which can be in the form of source code, object code, executable files or some intermediate forms. The computer readable medium can include any entity or device capable of carrying computer program codes, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content included in the computer readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.
[0176] An embodiment of the present application further provides a chip storing a computer program, which is executed by the chip to implement the steps of the one-way data transmission method.
[0177] It should be noted that, for the foregoing method embodiments, in order to facilitate description, they are all described as a combination of a series of actions, but those skilled in the art should know that the present application is not limited to the order of the actions described, because according to the present application, certain steps can be performed in other order or at the same time. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions and modules involved are not necessarily essential to the present application.
[0178] In the above embodiments, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.
[0179] The preferred embodiments of the application disclosed above are only to facilitate the explanation of the application. Alternative embodiments do not describe all the details and do not limit the application to the specific embodiments described. Obviously, many modifications and changes can be made according to the content of the application. The application selects and describes these embodiments in order to better explain the principles and practical applications of the application, so that those skilled in the art can well understand and utilize the application. The application is limited by the claims and their full scope and equivalents.
Claims
1. A one-way data transmission method, characterized in that, Applied to external network clients, the method includes: Receive request events initiated in response to the target event; The process involves: acquiring request event data corresponding to the requested event, the request event data including the event identifier of the target event and the request data packet, the request data packet being stored in key-value pairs; calling the target write interface of the external client to write the event identifier of the target event to the event identifier management stack of the local data stack, and passing the event identifier of the target event, the request data packet, and the current event state of the target event to the event session parameter stack of the local data stack; generating session request parameters based on the event identifier and the request data packet, and generating session state parameters based on the event identifier and the current event state; generating request data key-value pairs based on the session state parameters and the session request parameters, and storing the request data key-value pairs in the event session parameter stack, wherein the local data stack refers to the data stack set locally by the external client, the local data stack is stored in a medium capable of storing data in the external client, and the request event data stored in the local data stack is used by the internal server to continuously and unidirectionally acquire and retrieve the data using the HTTP protocol and consume it in the internal environment to execute the target event; Receive the event response result from the intranet server after executing the target event, and return event result data to the requesting party of the target event based on the event response result.
2. The unidirectional data transmission method according to claim 1, characterized in that, After obtaining the number of request events corresponding to the request event, the process further includes: From at least one application interface set by the external network client, determine the target write interface corresponding to the new event.
3. The unidirectional data transmission method according to claim 1, characterized in that, After generating session request parameters based on the event identifier and the request data packet, and generating session state parameters based on the event identifier and the current event state, the method further includes: While waiting for the event response result from the intranet server, session response parameters are generated based on the event identifier and historical response data; Accordingly, based on the session request parameters and the session state parameters, request data key-value pairs are generated, including: The request data key-value pair is generated based on the session state parameters, the session response parameters, and the session request parameters.
4. The unidirectional data transmission method according to any one of claims 1-3, characterized in that, The step of returning event result data to the requesting party of the target event based on the event response result includes: At set intervals, determine whether the event response result fed back by the intranet server has been obtained; If the event response result is obtained, the event response result is parsed to obtain the execution status of the target event; Based on the execution status, return event result data to the requesting party of the target event.
5. The unidirectional data transmission method according to claim 4, characterized in that, The step of returning event result data to the requester of the target event based on the execution status includes: If the execution status is "in execution", continue to wait for the intranet server to provide the event response result; If the execution status is abnormal, clean up the request event data related to the target event in the local data stack, and return the abnormal default value to the requester of the target event; If the execution status is "execution completed", the request event data related to the target event in the local data stack is cleared, and the execution result is returned to the requester of the target event.
6. The unidirectional data transmission method according to claim 4, characterized in that, After determining whether the event response result from the intranet server has been obtained, the process further includes: If a set time threshold is reached and no event response result is obtained, the request event data related to the target event in the local data stack is cleared, and an abnormal default value is returned to the requester of the target event.
7. An external network client, characterized in that, The external network client includes: The receiving module is configured to receive request events initiated in response to the target event; The writing module is configured to: acquire request event data corresponding to the request event, the request event data including the event identifier of the target event and the request data packet, the request data packet being stored in key-value pairs; call the target write interface of the external network client to write the event identifier of the target event to the event identifier management stack of the local data stack, and pass the event identifier of the target event, the request data packet, and the current event state of the target event to the event session parameter stack of the local data stack; generate session request parameters based on the event identifier and the request data packet, and generate session state parameters based on the event identifier and the current event state; generate request data key-value pairs based on the session state parameters and the session request parameters, and store the request data key-value pairs in the event session parameter stack, wherein the local data stack refers to the data stack set locally by the external network client, the local data stack is stored in a medium capable of storing data in the external network client, and the request event data stored in the local data stack is used by the internal network server to continuously and unidirectionally acquire and retrieve the data using the HTTP protocol and consume it in the internal network environment to execute the target event; The return module is configured to receive the event response result fed back by the intranet server when the target event is executed, and return event result data to the requester of the target event based on the event response result.
8. A one-way data transmission system, characterized in that, include: Internal network server and external network client; The external network client is configured to receive request events initiated in response to the target event; Obtain the request event data corresponding to the request event, wherein the request event data includes the event identifier of the target event and the request data packet, and the request data packet is stored in key-value pair format; Call the target write interface of the external network client to write the event identifier of the target event to the event identifier management stack of the local data stack, and pass the event identifier of the target event, the request data packet and the current event status of the target event to the event session parameter stack of the local data stack; Based on the event identifier and the request data packet, session request parameters are generated, and based on the event identifier and the current event state, session state parameters are generated; based on the session state parameters and the session request parameters, request data key-value pairs are generated, and the request data key-value pairs are stored in the event session parameter stack, wherein the local data stack refers to the data stack set locally by the external network client, and the local data stack is stored in the external network client in a medium capable of storing data; The intranet server is configured to continuously and unidirectionally obtain the request event data from the local data stack using the HTTP protocol, execute the target event based on the request event data, and return the event response result of the target event to the external client. The external network client is further configured to receive the event response result fed back by the internal network server, and return event result data to the requesting party of the target event based on the event response result.
9. The unidirectional data transmission system according to claim 8, characterized in that, The intranet server is further configured as follows: Parse the request event data to obtain the event execution parameters; Based on the event execution parameters, the corresponding execution module is notified to process the event, and based on the event processing result, the event response result is returned to the external client.
10. A computing device, characterized in that, include: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the steps of the one-way data transmission method according to any one of claims 1 to 6.
11. A computer-readable storage medium storing computer instructions, characterized in that, When executed by the processor, this instruction implements the steps of the unidirectional data transmission method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Physical isolation transmission method and device based on two-dimensional code
CN106961430A
Network data access system and method
CN113938296A