Message transmission method, apparatus, electronic device and storage medium based on limited feedback
By using a limited feedback mechanism and a hash table random number mechanism to judge and control message transmission during communication between the internal and external terminals, the data security problem caused by the limited message data feedback from the isolation card is solved, and the secure transmission and leakage prevention of application data are achieved.
Patent Information
- Application Number
- CN202311458850.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-03
- Publication Date
- 2026-11-10
- Estimated Expiration
- 2043-11-03
AI Technical Summary
In existing technologies, the method of feeding back limited message data through isolation cards has the problem of low data security, especially when internal machines transmit application data to external machines, which may lead to information leakage.
During communication between the internal and external terminals, the sequence number, data length, and message field values of the protocol header are extracted from the message generated based on the limited feedback mechanism. The message is sent only if the sequence number field is 0, the message field is 0, and the data length field meets the conditions. Otherwise, the message is blocked from being sent. At the same time, a hash table and a random number are used to detect and retransmit lost data packets to avoid carrying information that can be used to predict application data.
It effectively prevents application data leakage, improves data security, ensures that no information that can be used to speculate on application data is carried during message transmission, and realizes one-way transmission and enhanced security of application data.
Smart Images

Figure CN117459612B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of network security, and more specifically, to a message transmission method, apparatus, electronic device, and storage medium based on limited feedback. Background Technology
[0002] Bidirectional optical gateways are deployed between networks with different security levels, enabling cross-network data transmission through bidirectional isolation of the physical environment. The hardware architecture typically adopts a 2+1 structure, consisting of an external unit, an internal unit, and a bidirectional isolation component (bidirectional isolation card). The bidirectional isolation component comprises two bidirectional isolation cards connected by two optical fibers. The software architecture consists of network proxy programs and a security engine running on the external and internal units. These hardware and software architectures together form a secure host, which ultimately provides time-division bidirectional data transmission services.
[0003] Furthermore, the two isolation cards each have sending and receiving functions, and only one-way transmission in one direction is allowed per unit time. After initial negotiation between the isolation cards, the external isolation card controls sending and receiving in a time-division manner, and the internal isolation card controls receiving and sending in a time-division manner, ultimately achieving the isolation transmission function of time-division bidirectional transmission.
[0004] Furthermore, internal machines typically reply to external machines with messages based on limited feedback. In this limited feedback, the internal machine can transmit information that can be used to infer application data to the external machine through specified fields in the message, which can lead to application data leakage and ultimately reduce data security. Summary of the Invention
[0005] The purpose of this application is to provide a message transmission method, apparatus, electronic device, and storage medium based on limited feedback, so as to solve the problem of low data security in the method of feeding back limited message data through isolation cards.
[0006] In a first aspect, the present invention provides a message transmission method based on limited feedback, the method being applied to an internal terminal, the internal terminal communicating with an external terminal based on a limited feedback mechanism, wherein the limited feedback mechanism refers to the fact that the data carried in the message sent by the internal terminal is less than or equal to one byte, and the method includes:
[0007] When a target message is generated based on a private message protocol, the protocol header of the target message is obtained, and the field values of the target fields are extracted based on the protocol header. The target fields include a sequence number field, a data length field, and a message field.
[0008] The system sequentially determines whether the value of the sequence number field is 0, whether the value of the data length field meets a preset condition, and whether the value of the message field is 0. The preset condition is that the value of the data length field is less than or equal to 1 when the target message returns the application layer protocol status, and 0 when the target message does not return the application layer protocol status.
[0009] When the value of the sequence number field is 0, the value of the message field is 0, and the value of the data length field meets the preset condition, the target message is returned to the external terminal; otherwise, the sending of the target message to the external terminal is prevented.
[0010] The method of this application can obtain the protocol header of the target message when generating the target message based on the private message protocol, and extract the field values of the target fields based on the protocol header. The target fields include a sequence number field, a data length field, and a message field. Then, it sequentially determines whether the value of the sequence number field is 0, whether the value of the data length field meets a preset condition, and whether the value of the message field is 0. The preset condition is that when the target message returns the application layer protocol status, the value of the data length field is less than or equal to 1, and when the target message does not return the application layer protocol status, the value of the data length field is 0. Finally, when the sequence number field is 0, the value of the message field is 0, and the value of the data length field meets the preset condition, the target message is returned to the external machine; otherwise, the target message is prevented from being sent to the external machine. In this way, it can ensure that the target message sent from the internal machine to the external machine does not carry information that can be used to infer application data, avoid application data leakage, and improve data security.
[0011] In an optional implementation, when the target message is a response acknowledgment message generated in response to a request message, the target message carries a first random number extracted based on the request message, wherein the request message is sent by the external terminal, and the external terminal determines the lost data packet of the request message based on a hash table and the first random number and retransmits the lost data packet, wherein the hash table stores the mapping relationship between sequence number and random number.
[0012] This optional implementation sends a message carrying a random number to the internal terminal when the internal terminal cannot send the sequence number used to determine whether a data packet is lost to the external terminal. This ensures compatibility with data packet loss detection and retransmission functions. Furthermore, since the random number is randomly generated, it cannot be used to infer application data, thereby further preventing application data leakage.
[0013] In an optional implementation, the method further includes:
[0014] When the target message is a connection establishment message sent to the external terminal, the transmission of the target message to the external terminal is blocked.
[0015] This optional implementation can block the transmission of the target message to the external terminal when the target message is a connection establishment message sent to the external terminal. In this way, the internal terminal can avoid actively establishing a connection with the external terminal, thereby realizing one-way transmission of application data and ultimately further improving the security of application data.
[0016] In an optional implementation, the method further includes:
[0017] Receive alarm information sent by the external terminal and display the alarm information, wherein the alarm information is generated by the external terminal when the first random number is not found in the hash table;
[0018] Terminate the transmission of the target message.
[0019] This optional implementation can receive and display alarm information sent by the external terminal when the external terminal does not find the first random number based on the hash table, and can also terminate the transmission of the target message in a timely manner, thereby reducing the risk of application data leakage.
[0020] Secondly, the present invention provides a message transmission device based on limited feedback, the device being applied to an internal terminal, the internal terminal communicating with an external terminal based on a limited feedback mechanism, wherein the limited feedback mechanism refers to the fact that the data carried in the message sent by the internal terminal is less than or equal to one byte, and the device includes:
[0021] The message parsing module is used to obtain the protocol header of the target message when the target message is generated based on the private message protocol, and extract the field values of the target fields based on the protocol header, wherein the target fields include a sequence number field, a data length field, and a message field;
[0022] The judgment module is used to sequentially judge whether the field value of the sequence number field is 0, whether the field value of the data length field meets a preset condition, and whether the field value of the message field is 0. The field value of the data length field meets the preset condition, which means that when the target message returns the application layer protocol status, the field value of the data length field is less than or equal to 1, and when the target message does not return the application layer protocol status, the field value of the data length field is 0.
[0023] The blocking module is used to return the target message to the external terminal when the sequence number field is 0, the message field is 0, and the data length field meets the preset conditions; otherwise, it blocks the sending of the target message to the external terminal.
[0024] The device of this application can obtain the protocol header of the target message when generating the target message based on the private message protocol, and extract the field values of the target fields based on the protocol header. The target fields include a sequence number field, a data length field, and a message field. Then, it sequentially determines whether the value of the sequence number field is 0, whether the value of the data length field meets a preset condition, and whether the value of the message field is 0. The preset condition for the data length field to meet the preset condition means that when the target message returns the application layer protocol status, the value of the data length field is less than or equal to 1, and when the target message does not return the application layer protocol status, the value of the data length field is 0. Finally, when the sequence number field is 0, the value of the message field is 0, and the value of the data length field meets the preset condition, the target message is returned to the external machine; otherwise, the sending of the target message to the external machine is prevented. In this way, it can ensure that the target message sent from the internal machine to the external machine does not carry information that can be used to infer application data, avoid application data leakage, and improve data security.
[0025] In an optional implementation, when the target message is a response acknowledgment message generated in response to a request message, the target message carries a first random number extracted based on the request message, wherein the request message is sent by the external terminal, and the external terminal determines the lost data packet of the request message based on a hash table and the first random number and retransmits the lost data packet, wherein the hash table stores the mapping relationship between sequence number and random number.
[0026] This optional implementation sends a message carrying a random number to the internal terminal when the internal terminal cannot send the sequence number used to determine whether a data packet is lost to the external terminal. This ensures compatibility with data packet loss detection and retransmission functions. Furthermore, since the random number is randomly generated, it cannot be used to infer application data, thereby further preventing application data leakage.
[0027] In an optional embodiment, the apparatus further includes:
[0028] The blocking module is used to block the transmission of the target message to the external terminal when the target message is a connection establishment message sent to the external terminal.
[0029] This optional implementation can block the transmission of the target message to the external terminal when the target message is a connection establishment message sent to the external terminal. In this way, the internal terminal can avoid actively establishing a connection with the external terminal, thereby realizing one-way transmission of application data and ultimately further improving the security of application data.
[0030] In an optional embodiment, the apparatus further includes:
[0031] A receiving module is used to receive alarm information sent by the external terminal and display the alarm information, wherein the alarm information is generated by the external terminal when the first random number is not found in the hash table;
[0032] The termination module is used to terminate the transmission of the target message.
[0033] This optional implementation can receive and display alarm information sent by the external terminal when the external terminal does not find the first random number based on the hash table, and can also terminate the transmission of the target message in a timely manner, thereby reducing the risk of application data leakage.
[0034] Thirdly, the present invention provides an electronic device, comprising:
[0035] Processor; and
[0036] The memory is configured to store machine-readable instructions that, when executed by the processor, perform the message transmission method based on limited feedback as described in any of the foregoing embodiments.
[0037] The electronic device of this application, by executing a message transmission method based on limited feedback, can obtain the protocol header of the target message when generating a target message based on a private message protocol, and extract the field values of target fields based on the protocol header. The target fields include a sequence number field, a data length field, and a message field. Then, it sequentially determines whether the value of the sequence number field is 0, whether the value of the data length field meets a preset condition, and whether the value of the message field is 0. The preset condition is met when the value of the data length field meets the application layer protocol feedback. When the target message does not return the application layer protocol status, the value of the data length field is less than or equal to 1. When the target message does not return the application layer protocol status, the value of the data length field is 0. Finally, when the sequence number field is 0, the message field is 0, and the value of the data length field meets the preset conditions, the target message is returned to the external terminal. Otherwise, the target message is prevented from being sent to the external terminal. In this way, it can be ensured that the target message sent from the internal terminal to the external terminal does not carry information that can be used to infer application data, avoid application data leakage, and improve data security.
[0038] Fourthly, the present invention provides a storage medium storing a computer program, the computer program being executed by a processor as described in any of the foregoing embodiments, a message transmission method based on limited feedback.
[0039] The storage medium of this application, by executing a message transmission method based on limited feedback, can obtain the protocol header of the target message when generating a target message based on a private message protocol, and extract the field values of target fields based on the protocol header. The target fields include a sequence number field, a data length field, and a message field. Then, it sequentially determines whether the value of the sequence number field is 0, whether the value of the data length field meets a preset condition, and whether the value of the message field is 0. The preset condition is met when the value of the data length field meets the application layer protocol feedback. When the target message does not return the application layer protocol status, the value of the data length field is less than or equal to 1. When the target message does not return the application layer protocol status, the value of the data length field is 0. Finally, when the sequence number field is 0, the message field is 0, and the value of the data length field meets the preset conditions, the target message is returned to the external terminal. Otherwise, the target message is prevented from being sent to the external terminal. In this way, it can be ensured that the target message sent from the internal terminal to the external terminal does not carry information that can be used to infer application data, avoid application data leakage, and improve data security. Attached Figure Description
[0040] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0041] Figure 1 This is a flowchart illustrating a message transmission method based on limited feedback disclosed in an embodiment of this application;
[0042] Figure 2 This is a schematic diagram of the framework of a limited feedback network disclosed in an embodiment of this application;
[0043] Figure 3 This is a schematic diagram of the structure of a message transmission device based on limited feedback disclosed in an embodiment of this application;
[0044] Figure 4 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of this application. Detailed Implementation
[0045] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.
[0046] Example 1
[0047] Please see Figure 1 , Figure 1 This is a flowchart illustrating a message transmission method based on limited feedback disclosed in an embodiment of this application. The method is applied to an internal terminal, which communicates with an external terminal based on a limited feedback mechanism. The limited feedback mechanism refers to the fact that the data carried in the message sent by the internal terminal is less than or equal to one byte. Figure 1 As shown, the method in this application embodiment includes the following steps:
[0048] 101. When generating a target message based on a private message protocol, obtain the protocol header of the target message and extract the field values of the target fields based on the protocol header. The target fields include the sequence number field, the data length field, and the message field.
[0049] 102. Sequentially determine whether the value of the sequence number field is 0, whether the value of the data length field meets the preset conditions, and whether the value of the message field is 0. The preset conditions for the data length field to meet the preset conditions are that when the target message returns the application layer protocol status, the value of the data length field is less than or equal to 1, and when the target message does not return the application layer protocol status, the value of the data length field is 0.
[0050] 103. When the sequence number field is 0, the message field is 0, and the data length field meets the preset conditions, return the target message to the external terminal; otherwise, prevent the target message from being sent to the external terminal.
[0051] The method in this application embodiment can obtain the protocol header of the target message when generating the target message based on the private message protocol, and extract the field values of the target fields based on the protocol header. The target fields include a sequence number field, a data length field, and a message field. Then, it sequentially judges whether the field value of the sequence number field is 0, whether the field value of the data length field meets a preset condition, and whether the field value of the message field is 0. The field value of the data length field meets the preset condition when the target message returns the application layer protocol status, the field value of the data length field is less than or equal to 1, and when the target message does not return the application layer protocol status, the field value of the data length field is 0. Finally, when the field value of the sequence number field is 0, the field value of the message field is 0, and the field value of the data length field meets the preset condition, the target message is returned to the external terminal. Otherwise, the target message is prevented from being sent to the external terminal. In this way, it can ensure that the target message sent from the internal terminal to the external terminal does not carry information that can be used to infer application data, avoid application data leakage, and improve data security.
[0052] In this embodiment of the application, as an example, in some scenarios, the value of the message field in the target message sent by the internal terminal is the application name. In this case, the external terminal can also obtain the application name after receiving the target message. In this way, the application name can be leaked through the external terminal. However, in this embodiment of the application, the target message sent by the internal terminal is limited to not carrying messages, that is, the value of the message field is 0, so the application data will not be leaked.
[0053] In this embodiment, for step 101, the private message protocol is determined based on the communication requirements of the external and internal terminals. For example, the private message protocol specifies the fields that the message should carry. In this embodiment, the private message protocol specifies that the message carries fields such as message ID, message field, random number field, and sequence number field. It should be noted that the private message protocol also specifies the specific methods for establishing, closing, and updating the connection status between the external and internal terminals. These specific methods can be found in existing technologies, and will not be elaborated upon in this embodiment.
[0054] In this embodiment of the application, for step 101, the target message can be an acknowledgment message replied to by the internal terminal after receiving the request message sent by the external terminal.
[0055] In this embodiment, determining whether the value of the sequence number field is 0, whether the value of the data length field meets the preset condition, and whether the value of the message field is 0 in sequence means first determining whether the value of the sequence number field is 0, then determining whether the value of the data length field meets the preset condition, and finally determining whether the value of the message field is 0. Alternatively, it can mean first determining whether the value of the data length field meets the preset condition, then determining whether the value of the sequence number field is 0, and finally determining whether the value of the message field is 0. The emphasis is on the need to perform these three condition checks.
[0056] In this embodiment of the application, regarding step 102, for how to determine whether the message needs application layer protocol state, please refer to the prior art; this embodiment of the application will not elaborate on this.
[0057] In this embodiment of the application, regarding step 103, when the sequence number field is 0, the message field is 0, and the data length field meets the preset conditions, the target message is returned to the external terminal; otherwise, the target message is prevented from being sent to the external terminal. This means that when the sequence number field is 0, the message field is 0, and the data length field meets the preset conditions simultaneously, the target message is sent to the external terminal. If any one of these conditions is not met, the target message is prevented from being sent to the external terminal.
[0058] In this application embodiment, for external and internal terminals, please refer to [link / reference needed]. Figure 2 , Figure 2 This is a schematic diagram of the framework of a limited feedback network disclosed in an embodiment of this application. Figure 2 As shown, the internal terminal is equipped with an isolation card driver, which can drive isolation card B. Furthermore, isolation card B is equipped with message checking logic, which implements the method of this embodiment. It should be noted that, as... Figure 2 As shown, the external terminal is equipped with an isolation card A, which also has message checking logic. This message checking logic is used to check whether the request message sent to the internal terminal meets the private message protocol.
[0059] In this embodiment of the application, as an optional implementation, when the target message is a response confirmation message generated in response to the request message, the target message carries a first random number extracted from the request message. The request message is sent by the external terminal, which determines the lost data packet of the request message based on the hash table and the first random number and retransmits the lost data packet. The hash table stores the mapping relationship between the sequence number and the random number.
[0060] This optional implementation sends a message carrying a random number to the internal terminal when the internal terminal cannot send the sequence number used to determine whether a data packet is lost to the external terminal. This ensures compatibility with data packet loss detection and retransmission functions. Furthermore, since the random number is randomly generated, it cannot be used to infer application data, thereby further preventing application data leakage.
[0061] In the above optional implementation method, a message corresponds to a sequence number and a random number. The sequence number and the random number are generated when the external machine generates the request message and are stored using a hash table. Furthermore, a hash table is a singly linked list. In a hash table, a sequence number is stored by multiple nodes in the linked list. For example, the sequence number "01236" is stored by 5 nodes, namely "0", "1", "2", "3", and "6". Correspondingly, the random number is split and stored in 5 nodes. For example, for the random number "888888888", the 5 nodes store "88", "88", "88", "88", and "8" respectively. Furthermore, the sequence number stored in each node corresponds to the random number stored in each node. Thus, suppose an external machine sends a target message to an internal machine carrying the random number "886688888". This target message includes 5 data packets, each carrying "88", "66", "88", "88", and "8" respectively. Normally, after receiving the target message, the internal machine can extract the random number "888888888" from the 5 data packets. However, in the event of data packet loss... The random number extracted by the internal terminal is missing. For example, when the second data packet is lost during transmission, the internal terminal extracts the random number "8888888". In this case, the internal terminal sends the extracted random number "8888888" back to the external terminal. The external terminal compares "8888888" with "886688888". The comparison process is as follows: starting from the first node, which is "88", the first two digits "88" are extracted from "8888888". The two are compared and found to be consistent. Next, the second node is "66". The third and fourth digits of "8888888" are extracted, which is "88". It is found that it is inconsistent with "66". Then the third node "88" is extracted and compared with the third and fourth digits of "8888888". The comparison result is consistent. At this time, based on the comparison process, it can be determined that the random number of the second node is lost. Therefore, the sequence number corresponding to the second node is determined to be "1", and the data packet corresponding to the sequence number "1" is resent to the internal machine.
[0062] In an optional implementation of this application, the method further includes the following steps:
[0063] If the target message is a connection establishment message sent to the external terminal, then the transmission of the target message to the external terminal will be blocked.
[0064] This optional implementation can block the transmission of the target message to the external terminal when the target message is a connection establishment message sent to the external terminal. In this way, the internal terminal can avoid actively establishing a connection with the external terminal, thereby realizing one-way transmission of application data and ultimately further improving the security of application data.
[0065] In an optional implementation of this application, the method further includes the following steps:
[0066] Receive and display alarm information sent by the external terminal. The alarm information is generated by the external terminal when the first random number is not found in the hash table.
[0067] Terminate the transmission of the target message.
[0068] This optional implementation can receive and display alarm information sent by the external terminal when the external terminal does not find the first random number based on the hash table, and can also terminate the transmission of the target message in a timely manner, thereby reducing the risk of application data leakage.
[0069] Example 2
[0070] Please see Figure 3 , Figure 3 This is a schematic diagram of a message transmission device based on limited feedback disclosed in an embodiment of this application. The device is applied to an internal terminal, which communicates with an external terminal based on a limited feedback mechanism. The limited feedback mechanism refers to the fact that the data carried in the message sent by the internal terminal is less than or equal to one byte. Figure 3 As shown, the apparatus in this embodiment includes the following functional modules:
[0071] The message parsing module 201 is used to obtain the protocol header of the target message when the target message is generated based on the private message protocol, and extract the field values of the target fields based on the protocol header. The target fields include the sequence number field, the data length field, and the message field.
[0072] The judgment module 202 is used to sequentially judge whether the field value of the sequence number field is 0, whether the field value of the data length field meets the preset conditions, and whether the field value of the message field is 0. The field value of the data length field meets the preset conditions, which means that when the target message returns the application layer protocol status, the field value of the data length field is less than or equal to 1, and when the target message does not return the application layer protocol status, the field value of the data length field is 0.
[0073] The blocking module 203 is used to return the target message to the external terminal when the sequence number field is 0, the message field is 0, and the data length field meets the preset conditions; otherwise, it blocks the target message from being sent to the external terminal.
[0074] The apparatus in this embodiment can obtain the protocol header of the target message when generating the target message based on the private message protocol, and extract the field values of the target fields based on the protocol header. The target fields include a sequence number field, a data length field, and a message field. Then, it sequentially determines whether the value of the sequence number field is 0, whether the value of the data length field meets a preset condition, and whether the value of the message field is 0. The preset condition for the data length field to meet the preset condition means that when the target message returns the application layer protocol status, the value of the data length field is less than or equal to 1, and when the target message does not return the application layer protocol status, the value of the data length field is 0. Finally, when the value of the sequence number field is 0, the value of the message field is 0, and the value of the data length field meets the preset condition, the target message is returned to the external terminal. Otherwise, the sending of the target message to the external terminal is prevented. In this way, it can ensure that the target message sent from the internal terminal to the external terminal does not carry information that can be used to infer application data, avoid application data leakage, and improve data security.
[0075] In an optional implementation, when the target message is a response acknowledgment message generated in response to a request message, the target message carries a first random number extracted from the request message. The request message is sent by the external terminal, which determines the lost data packet of the request message based on a hash table and the first random number and retransmits the lost data packet. The hash table stores the mapping relationship between sequence number and random number.
[0076] This optional implementation sends a message carrying a random number to the internal terminal when the internal terminal cannot send the sequence number used to determine whether a data packet is lost to the external terminal. This ensures compatibility with data packet loss detection and retransmission functions. Furthermore, since the random number is randomly generated, it cannot be used to infer application data, thereby further preventing application data leakage.
[0077] In an optional embodiment, the apparatus further includes:
[0078] The blocking module is used to block the transmission of a target message to an external terminal when the target message is a connection establishment message sent to the external terminal.
[0079] This optional implementation can block the transmission of the target message to the external terminal when the target message is a connection establishment message sent to the external terminal. In this way, the internal terminal can avoid actively establishing a connection with the external terminal, thereby realizing one-way transmission of application data and ultimately further improving the security of application data.
[0080] In an optional embodiment, the apparatus further includes:
[0081] The receiving module is used to receive and display alarm information sent by the external terminal. The alarm information is generated by the external terminal when no first random number is found in the hash table.
[0082] The termination module is used to terminate the transmission of the target message.
[0083] This optional implementation can receive and display alarm information sent by the external terminal when the external terminal does not find the first random number based on the hash table, and can also terminate the transmission of the target message in a timely manner, thereby reducing the risk of application data leakage.
[0084] It should be noted that for other detailed descriptions of the apparatus in the embodiments of this application, please refer to the relevant description in Embodiment 1 of this application, which will not be repeated in the embodiments of this application.
[0085] Example 3
[0086] Please see Figure 4 , Figure 4 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of this application, such as... Figure 4 As shown, the electronic device in this application embodiment includes:
[0087] Processor 301; and
[0088] The memory 302 is configured to store machine-readable instructions that, when executed by the processor 301, perform a message transmission method based on limited feedback as described in any of the foregoing embodiments.
[0089] The electronic device in this application embodiment, by executing a message transmission method based on limited feedback, can obtain the protocol header of the target message when generating the target message based on a private message protocol, and extract the field values of the target fields based on the protocol header. The target fields include a sequence number field, a data length field, and a message field. Then, it sequentially judges whether the value of the sequence number field is 0, whether the value of the data length field meets a preset condition, and whether the value of the message field is 0. The preset condition for the data length field to meet the preset condition means that when the target message provides feedback on the application layer protocol status, the value of the data length field is less than or equal to 1, and when the target message does not provide feedback on the application layer protocol status, the value of the data length field is 0. Finally, when the sequence number field is 0, the value of the message field is 0, and the value of the data length field meets the preset condition, the target message is returned to the external terminal; otherwise, the sending of the target message to the external terminal is prevented. In this way, it can ensure that the target message sent from the internal terminal to the external terminal does not carry information that can be used to infer application data, avoid application data leakage, and improve data security.
[0090] Example 4
[0091] This application provides a storage medium storing a computer program, which is executed by a processor as a message transmission method based on limited feedback as described in any of the foregoing embodiments.
[0092] The storage medium in this embodiment of the application executes a message transmission method based on limited feedback. When generating a target message based on a private message protocol, it can obtain the protocol header of the target message and extract the field values of the target fields based on the protocol header. The target fields include a sequence number field, a data length field, and a message field. Then, it sequentially judges whether the value of the sequence number field is 0, whether the value of the data length field meets a preset condition, and whether the value of the message field is 0. The preset condition for the data length field to meet the preset condition means that when the target message provides feedback on the application layer protocol status, the value of the data length field is less than or equal to 1, and when the target message does not provide feedback on the application layer protocol status, the value of the data length field is 0. Finally, when the sequence number field is 0, the value of the message field is 0, and the value of the data length field meets the preset condition, the target message is returned to the external terminal. Otherwise, the target message is prevented from being sent to the external terminal. In this way, it can ensure that the target message sent from the internal terminal to the external terminal does not carry information that can be used to infer application data, avoid application data leakage, and improve data security.
[0093] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and there may be other division methods in actual implementation. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the coupling or direct coupling or communication connection shown or discussed may be through some communication interface; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0094] Furthermore, the units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0095] Furthermore, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0096] It should be noted that if a function is implemented as a software module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0097] In this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, without necessarily requiring or implying any such actual relationship or order between these entities or operations.
[0098] The above are merely embodiments of this application and are not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A message transmission method based on limited feedback, characterized in that, The method is applied to an internal terminal, which communicates with an external terminal based on a limited feedback mechanism. The limited feedback mechanism refers to the fact that the data size of the message sent by the internal terminal is less than or equal to one byte. The method includes: When a target message is generated based on a private message protocol, the protocol header of the target message is obtained, and the field values of the target fields are extracted based on the protocol header. The target fields include a sequence number field, a data length field, and a message field. The system sequentially determines whether the value of the sequence number field is 0, whether the value of the data length field meets a preset condition, and whether the value of the message field is 0. The preset condition is that the value of the data length field is less than or equal to 1 when the target message returns the application layer protocol status, and 0 when the target message does not return the application layer protocol status. When the value of the sequence number field is 0, the value of the message field is 0, and the value of the data length field meets the preset condition, the target message is returned to the external terminal; otherwise, the sending of the target message to the external terminal is prevented.
2. The method as described in claim 1, characterized in that, When the target message is a response acknowledgment message generated in response to a request message, the target message carries a first random number extracted from the request message. The request message is sent by the external terminal, and the external terminal determines the lost data packet of the request message based on a hash table and the first random number and retransmits the lost data packet. The hash table stores the mapping relationship between sequence number and random number.
3. The method as described in claim 1, characterized in that, The method further includes: When the target message is a connection establishment message sent to the external terminal, the transmission of the target message to the external terminal is blocked.
4. The method as described in claim 2, characterized in that, The method further includes: Receive alarm information sent by the external terminal and display the alarm information, wherein the alarm information is generated by the external terminal when the first random number is not found in the hash table; Terminate the transmission of the target message.
5. A message transmission device based on limited feedback, characterized in that, The device is applied to an internal terminal, which communicates with an external terminal based on a limited feedback mechanism. The limited feedback mechanism refers to the fact that the data size of the message sent by the internal terminal is less than or equal to one byte. The device includes: The message parsing module is used to obtain the protocol header of the target message when the target message is generated based on the private message protocol, and extract the field values of the target fields based on the protocol header, wherein the target fields include a sequence number field, a data length field, and a message field; The judgment module is used to sequentially judge whether the field value of the sequence number field is 0, whether the field value of the data length field meets a preset condition, and whether the field value of the message field is 0. The field value of the data length field meets the preset condition, which means that when the target message returns the application layer protocol status, the field value of the data length field is less than or equal to 1, and when the target message does not return the application layer protocol status, the field value of the data length field is 0. The blocking module is used to return the target message to the external terminal when the sequence number field is 0, the message field is 0, and the data length field meets the preset conditions; otherwise, it blocks the sending of the target message to the external terminal.
6. The apparatus as claimed in claim 5, characterized in that, When the target message is a response acknowledgment message generated in response to a request message, the target message carries a first random number extracted from the request message. The request message is sent by the external terminal, and the external terminal determines the lost data packet of the request message based on a hash table and the first random number and retransmits the lost data packet. The hash table stores the mapping relationship between sequence number and random number.
7. The apparatus as claimed in claim 5, characterized in that, The device further includes: The blocking module is used to block the transmission of the target message to the external terminal when the target message is a connection establishment message sent to the external terminal.
8. The apparatus as claimed in claim 6, characterized in that, The device further includes: A receiving module is used to receive alarm information sent by the external terminal and display the alarm information, wherein the alarm information is generated by the external terminal when the first random number is not found in the hash table; The termination module is used to terminate the transmission of the target message.
9. An electronic device, characterized in that, include: processor; as well as A memory configured to store machine-readable instructions that, when executed by the processor, perform the message transmission method based on limited feedback as described in any one of claims 1-4.
10. A storage medium, characterized in that, The storage medium stores a computer program, which is executed by a processor using the message transmission method based on limited feedback as described in any one of claims 1-4.
Citation Information
Patent Citations
Data unidirectional lead-in method and system
CN103338112A
Data transmission method, device and equipment based on double unidirectional optical shutter system, and medium
CN116073959A
