Replay attack prevention method, receiver, target device and system

By sending random serial numbers to target devices in 2.4G private communication protocol and using incremental policy verification instruction messages, the problem of playback attacks in signal transmission is solved, information security and effectiveness is ensured, and it is suitable for wireless devices with high latency requirements. .

CN119031373APending Publication Date: 2024-11-26BEIJING BANGCLE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310613613.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-26
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

The 2.4G private communication protocol lacks unified standards and compatibility, and poses interference and security risks, especially in signal replay attacks, which may lead to reduced response sensitivity and security issues of wireless devices.

Method used

By sending a randomly generated sequence number to the target device and determining the verification identification code of the operation command information based on the preset incremental strategy, we ensure that the instruction message is executed when the instruction identification code matches the verification identification code, and avoid repeated recurrence during signal transmission Release attack.

Benefits of technology

It effectively prevents playback attacks during signal transmission, ensures information security and effectiveness, and is suitable for wireless mice, gaming headsets and other devices. It has simple logic and less computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119031373A_ABST
    Figure CN119031373A_ABST
Patent Text Reader

Abstract

The invention discloses an anti-replay attack method, a receiver, a target device and a system, and belongs to the technical field of data communication. The method comprises the following steps: sending a randomly generated first sequence number to target equipment; receiving operation instruction information sent by the target equipment, wherein the operation instruction information comprises an instruction message and an instruction identification code; based on the first serial number and a preset increment strategy, determining a verification identification code corresponding to the operation instruction information; and under the condition that the instruction identification code is matched with the verification identification code, executing an operation corresponding to the instruction message. Thus, the first serial number is sent to the target device, and the verification identification code corresponding to the operation instruction information is determined according to the first serial number and the increment strategy, so that replay attacks in the signal transmission process can be avoided, and the security and effectiveness of the information are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of data communication technology, and in particular to an anti-replay attack method, a receiver, a target device, and a system. Background Art

[0002] The 2.4G private communication protocol is a wireless communication protocol that uses the 2.4GHz frequency band. It does not follow the standard WiFi or Bluetooth protocol, but is defined and implemented by the manufacturer. The advantage of the 2.4G private communication protocol is that the transmission layer and application layer can be customized according to different application scenarios and requirements, providing signal transmission with characteristics such as low latency, high speed, long distance, and low power consumption. Compared with Bluetooth's delay of more than 100ms, the 2.4G private protocol can achieve a delay of less than 10ms. This protocol shines on some products with high delay requirements, such as wireless mice, gaming headsets, wireless microphones, etc.

[0003] However, the 2.4G private communication protocol lacks unified standards and compatibility, and may have interference and security issues. For example, after replaying the signal of a randomly purchased wireless mouse, the following is obtained: Figure 1 As shown in the figure, the signal sent by the wireless mouse is almost the same every time. When wireless devices such as wireless headphones and wireless keyboards send the same information to the receiver, the corresponding signals are also roughly the same. If the attacker records the signal and sends it repeatedly, it will interfere with the communication between the wireless device and the receiver, causing the response sensitivity of the wireless device input signal to decrease, and there are certain security risks. Summary of the invention

[0004] The embodiments of the present application provide an anti-replay attack method, a receiver, a target device, and a system for preventing replay attacks during signal transmission and ensuring the security and validity of information.

[0005] In order to solve the above technical problems, this application is implemented as follows:

[0006] In a first aspect, an embodiment of the present application provides an anti-replay attack method for a receiver, comprising:

[0007] Sending a randomly generated first serial number to the target device;

[0008] Receiving operation instruction information sent by the target device, the operation instruction information includes an instruction message and an instruction identification code;

[0009] Based on the first serial number and a preset incremental strategy, a verification identification code corresponding to the operation instruction information is determined; when the instruction identification code matches the verification identification code, the operation corresponding to the instruction message is executed.

[0010] In a possible implementation, it further includes:

[0011] In the event that the instruction identification code does not match the verification identification code, a randomly generated second serial number is sent to the target device.

[0012] In a possible implementation, determining the verification identification code corresponding to the operation instruction information based on the first sequence number and a preset increment strategy includes:

[0013] Get the preset first increment value;

[0014] When the operation instruction information sent by the target device is received, the sum of the first serial number and the first increment value is determined as the verification identification code corresponding to the operation instruction information, and the first serial number is updated based on the verification identification code.

[0015] In a second aspect, an embodiment of the present application provides an anti-replay attack method for a target device, including:

[0016] Receiving a target sequence number sent by a receiver, wherein the target sequence number includes a first sequence number or a second sequence number;

[0017] In response to an input operation of a user, generating an instruction message corresponding to the input operation;

[0018] Determine the instruction identification code corresponding to the instruction message based on the target sequence number and a preset increment strategy;

[0019] The instruction message and the instruction identification code are sent to the receiver.

[0020] In a possible implementation, determining the instruction identification code corresponding to the instruction message based on the target sequence number and a preset increment strategy includes:

[0021] Get the preset second increment value;

[0022] In the case of obtaining the user's input operation, the sum of the target serial number and the second increment value is determined as the instruction identification code corresponding to the operation instruction information, and the target serial number is updated based on the instruction identification code.

[0023] In a third aspect, an embodiment of the present application provides a receiver, including:

[0024] A sequence number sending module, used for sending a randomly generated first sequence number to a target device;

[0025] An information receiving module, used to receive the operation instruction information sent by the target device, wherein the operation instruction information includes an instruction message and an instruction identification code;

[0026] An operation execution module is used to determine the verification identification code corresponding to the operation instruction information based on the first serial number and a preset incremental strategy; when the instruction identification code matches the verification identification code, execute the operation corresponding to the instruction message.

[0027] In a fourth aspect, an embodiment of the present application provides a target device, including:

[0028] A sequence number receiving module, used for receiving a target sequence number sent by a receiver, wherein the target sequence number includes a first sequence number or a second sequence number;

[0029] A message generating module, used for generating a command message corresponding to the input operation in response to the user's input operation;

[0030] An identification code determination module, used to determine the instruction identification code corresponding to the instruction message based on the target sequence number and a preset increment strategy;

[0031] The information sending module is used to send the instruction message and the instruction identification code to the receiver.

[0032] In a fifth aspect, an embodiment of the present application provides an anti-replay attack system, comprising the receiver described in the third aspect and the target device described in the fourth aspect, wherein the receiver and the target device are communicatively connected with each other.

[0033] In a sixth aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the above method.

[0034] In a seventh aspect, an embodiment of the present application provides a readable storage medium, wherein the readable storage medium stores at least one computer program, and the computer program is loaded and executed by a processor to implement the above method.

[0035] The anti-replay attack method provided in the embodiment of the present application sends a randomly generated first serial number to the target device; receives the operation instruction information sent by the target device, the operation instruction information includes an instruction message and an instruction identification code; based on the first serial number and a preset incremental strategy, determines the verification identification code corresponding to the operation instruction information; when the instruction identification code matches the verification identification code, executes the operation corresponding to the instruction message. In this way, by sending the first serial number to the target device and determining the verification identification code corresponding to the operation instruction information according to the first serial number and the incremental strategy, replay attacks during signal transmission can be avoided to ensure information security. In addition, the method has simple logic and occupies less computing resources, and can be widely used in the signal transmission process between various target devices such as wireless mice, gaming headsets, wireless microphones, and receivers.

[0036] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0038] Figure 1 The signal waveform diagram of the wireless mouse signal after replay is shown;

[0039] Figure 2 A schematic diagram of a process for preventing a replay attack provided by an embodiment of the present application is shown;

[0040] Figure 3 A schematic diagram of another anti-replay attack method provided in an embodiment of the present application is shown;

[0041] Figure 4 A schematic diagram of the structure of a receiver provided in an embodiment of the present application is shown;

[0042] Figure 5 A schematic diagram of the structure of a target device provided in an embodiment of the present application is shown;

[0043] Figure 6 A schematic diagram of the communication process of the anti-replay attack system provided in an embodiment of the present application is shown;

[0044] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0045] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0046] For products with high latency requirements such as wireless mice, gaming headsets, and wireless microphones, the 2.4G private communication protocol is usually used, which has the characteristics of low latency, high speed, long distance, and low power consumption. However, the 2.4G private communication protocol lacks unified standards and compatibility, and may have interference and security issues, requiring specialized chip and software support.

[0047] 2.4G communication chips usually have functions such as CRC check, preamble, and signal encoding. These functions only ensure the accuracy of wireless communication, but cannot prevent replay attacks. For example, the signal of the letter A sent by the wireless keyboard is exactly the same every time. This means that the attacker can record the signal of sending the letter A and repeatedly send the letter A, thus interfering with the signal transmission between the wireless keyboard and the receiver.

[0048] Based on this, an embodiment of the present application provides an anti-replay attack method for a receiver. As shown in the figure, the anti-replay attack method 200 specifically includes the following steps:

[0049] S201: Send a randomly generated first serial number to a target device.

[0050] In a specific implementation, the target device includes but is not limited to a wireless mouse, a wireless keyboard, a gaming headset, and a wireless microphone. The target device generates a random number R1, determines the random number R1 as a first serial number, and sends it to the target device.

[0051] S202: Receive operation instruction information sent by the target device, where the operation instruction information includes an instruction message and an instruction identification code.

[0052] In a specific implementation, for a wireless mouse, the command message may be a left-move command, a right-move command, a wheel command, etc.; for a wireless keyboard, the command information may be command information corresponding to different keys. The target device may determine the command identification code based on the first sequence number and a preset increment strategy to verify the validity of the command message through the command identification code.

[0053] S203: Based on the first serial number and a preset incremental strategy, determine the verification identification code corresponding to the operation instruction information; when the instruction identification code matches the verification identification code, execute the operation corresponding to the instruction message.

[0054] In a specific implementation, the receiver receives the operation instruction information sent by the target device, verifies the validity of the instruction message through the instruction identification code carried in the operation instruction information, and specifically, determines the verification identification code corresponding to the operation instruction information based on the first sequence number and the preset increment strategy; and executes the operation corresponding to the instruction message when the instruction identification code matches the verification identification code. The increment strategy is to increase the preset increment on the basis of the first sequence number when the operation instruction information is received, and obtain the verification identification code corresponding to the operation instruction information.

[0055] In this way, by sending the first serial number to the target device and determining the verification identification code corresponding to the operation instruction information according to the first serial number and the incremental strategy, replay attacks during signal transmission can be avoided and information security can be ensured.

[0056] In a possible implementation manner, the anti-replay attack method 200 further includes:

[0057] In the event that the instruction identification code does not match the verification identification code, a randomly generated second serial number is sent to the target device.

[0058] In a specific implementation, when the instruction identification code does not match the verification identification code, it is determined that a repeated attack has occurred. At this time, a randomly generated second serial number R2 is sent to the target device. When receiving the operation instruction information sent by the target device, the second serial number determines the verification identification code corresponding to the operation instruction information, and the verification identification code is updated in time to ensure the validity of the input instruction message.

[0059] Among them, in S203, the determining, based on the first sequence number and a preset increment strategy, a verification identification code corresponding to the operation instruction information includes:

[0060] Get the preset first increment value;

[0061] When the operation instruction information sent by the target device is received, the sum of the first serial number and the first increment value is determined as the verification identification code corresponding to the operation instruction information, and the first serial number is updated based on the verification identification code.

[0062] In a specific implementation, the first increment value may be a preset constant, such as 1. When the operation instruction information sent by the target device is received, the first sequence number R1+1 is determined as the verification identification code corresponding to the operation instruction information. The preset increment strategy may be to add 1 in sequence, that is, when the operation instruction information sent by the target device is received again, the verification identification code corresponding to the operation instruction information is R1+1+1.

[0063] Figure 3 A flow chart of another anti-replay attack method provided by an embodiment of the present application is shown. As shown in the figure, the anti-replay attack method 300 is used for a target device and specifically includes the following steps:

[0064] S301: Receive a target sequence number sent by a receiver, where the target sequence number includes a first sequence number or a second sequence number.

[0065] In a specific implementation, the target device receives a target sequence number sent by the receiver, and the target sequence number can be the first sequence number or the second sequence number.

[0066] S302: In response to an input operation of the user, generate an instruction message corresponding to the input operation.

[0067] Among them, for a wireless mouse, the user's input operations may include left move operations, right move operations, click operations, scroll wheel operations, etc., and the corresponding generated command messages may be left move commands, right move commands, click commands, scroll wheel commands, etc.; for a wireless keyboard, the user's input operations may include clicking different keys, and the corresponding generated command information may be command information corresponding to different keys, such as command information corresponding to key "A".

[0068] S303: Determine the instruction identification code corresponding to the instruction message based on the target sequence number and a preset increment strategy.

[0069] Among them, in S302, the determining the instruction identification code corresponding to the instruction message based on the target sequence number and the preset increment strategy includes:

[0070] Get the preset second increment value;

[0071] In the case of obtaining the user's input operation, the sum of the target serial number and the second increment value is determined as the instruction identification code corresponding to the operation instruction information, and the target serial number is updated based on the instruction identification code.

[0072] In a specific implementation, in order to ensure the synchronization of information between the target device and the receiver, the target device side adopts the same incremental strategy as the receiver side to determine the instruction identification code corresponding to the operation instruction information. Specifically, before the target device and the receiver transmit signals, the second incremental value of the target device can be configured so that the second incremental value is equal to the first incremental value.

[0073] S304: Send the instruction message and the instruction identification code to the receiver.

[0074] The embodiment of the present application receives the target sequence sent by the receiver, determines the instruction identification code corresponding to the operation instruction information according to the first sequence number and the incremental strategy, and can avoid replay attacks during signal transmission and ensure the security and validity of the information.

[0075] Figure 4 The structure diagram of the receiver provided in the embodiment of the present application is shown. As shown in the figure, the receiver 400 includes:

[0076] A sequence number sending module 410, configured to send a randomly generated first sequence number to a target device;

[0077] The information receiving module 420 is used to receive the operation instruction information sent by the target device, and the operation instruction information includes an instruction message and an instruction identification code;

[0078] The operation execution module 430 is used to determine the verification identification code corresponding to the operation instruction information based on the first serial number and the preset incremental strategy; when the instruction identification code matches the verification identification code, execute the operation corresponding to the instruction message.

[0079] In a possible implementation manner, the receiver 400 further includes:

[0080] The sending module is used to send a randomly generated second serial number to the target device when the instruction identification code does not match the verification identification code.

[0081] In a possible implementation manner, when the operation execution module 430 is used to determine the verification identification code corresponding to the operation instruction information based on the first sequence number and a preset increment strategy, it is specifically used to:

[0082] Get the preset first increment value;

[0083] When the operation instruction information sent by the target device is received, the sum of the first serial number and the first increment value is determined as the verification identification code corresponding to the operation instruction information, and the first serial number is updated based on the verification identification code.

[0084] Figure 5 The schematic diagram of the structure of the target device provided by the embodiment of the present application is shown. As shown in the figure, the target device 500 includes:

[0085] A sequence number receiving module 510 is used to receive a target sequence number sent by a receiver, where the target sequence number includes a first sequence number or a second sequence number;

[0086] The message generation module 520 is used to generate a command message corresponding to the input operation in response to the user's input operation;

[0087] An identification code determination module 530, configured to determine the instruction identification code corresponding to the instruction message based on the target sequence number and a preset increment strategy;

[0088] The information sending module 540 is used to send the instruction message and the instruction identification code to the receiver.

[0089] In a possible implementation manner, when the identification code determination module 530 is used to determine the instruction identification code corresponding to the instruction message based on the target sequence number and the preset increment strategy, it is specifically used to:

[0090] Get the preset second increment value;

[0091] In the case of obtaining the user's input operation, the sum of the target serial number and the second increment value is determined as the instruction identification code corresponding to the operation instruction information, and the target serial number is updated based on the instruction identification code.

[0092] The present application also provides an anti-replay attack system, comprising the above Figure 4 The receiver and Figure 5 The target device shown, the receiver and the target device are communicatively connected to each other.

[0093] Take the target device as a mouse as an example, Figure 6 As shown in the figure, the communication process of the anti-replay attack system is as follows:

[0094] Synchronization stage: The receiver generates a random number R1 and sends it to the mouse. After receiving R, the mouse generates a command message corresponding to the user's input operation and uses R1+1 as the command identification code corresponding to the command message.

[0095] Communication phase: Each time the mouse sends information, R1 is incremented by one and sent to the receiver together with the command message. The receiver verifies that the R1 value is incremented by one continuously each time, which indicates that it is correct.

[0096] Error correction stage: If the R1 value jumps or is discontinuous, it is judged as an error, and the receiver generates a new random number R2 again and sends R2 to the mouse. In the following communications, the mouse increases R2 by one each time it sends a message.

[0097] An embodiment of the present application provides an anti-replay attack system, which can avoid replay attacks during signal transmission and ensure information security by sending a first serial number to a target device and determining a verification identification code corresponding to the operation instruction information based on the first serial number and an incremental strategy.

[0098] Figure 7 A schematic diagram of the hardware structure of an electronic device that implements the embodiments of the present application is shown. Referring to the figure, at the hardware level, the electronic device includes a processor, and optionally, an internal bus, a network interface, and a memory. Among them, the memory may include a memory, such as a high-speed random access memory (Random-Access Memory, RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage, etc. Of course, the computer device may also include hardware required for other services.

[0099] The processor, the network interface and the memory may be interconnected through an internal bus, which may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one bidirectional arrow is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0100] The memory stores the program. Specifically, the program may include a program code, and the program code includes a computer operation instruction. The memory may include a memory and a non-volatile memory, and provides instructions and data to the processor.

[0101] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming a device for locating the target user at the logical level. The processor executes the program stored in the memory and specifically performs: Figure 2 and Figure 3 The method disclosed in the illustrated embodiment realizes the functions and beneficial effects of each method described in the foregoing method embodiments, which will not be described in detail here.

[0102] The above application Figure 2 and Figure 3The method disclosed in the illustrated embodiment may be implemented in a processor or by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method may be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application may be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present application may be directly embodied as being executed by a hardware decoding processor, or may be executed by a combination of hardware and software modules in a decoding processor. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0103] The computer device can also execute the methods described in the foregoing method embodiments, and realize the functions and beneficial effects of the methods described in the foregoing method embodiments, which will not be repeated here.

[0104] Of course, in addition to software implementation methods, the electronic device of the present application does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0105] The embodiment of the present application also provides a computer-readable storage medium, wherein the computer-readable medium stores one or more programs, and when the one or more programs are executed by an electronic device including a plurality of application programs, the electronic device executes Figure 2 and Figure 3 The method disclosed in the illustrated embodiment realizes the functions and beneficial effects of each method described in the foregoing method embodiments, which will not be described in detail here.

[0106] The computer-readable storage medium includes a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0107] Furthermore, an embodiment of the present application also provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, and when the program instructions are executed by a computer, the following process is implemented: Figure 2 and Figure 3 The method disclosed in the illustrated embodiment realizes the functions and beneficial effects of each method described in the foregoing method embodiments, which will not be described in detail here.

[0108] In short, the above is only a preferred embodiment of the present application and does not limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

[0109] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0110] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0111] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0112] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

Claims

1. A method for preventing replay attacks, for use in a receiver, characterized in that: include: Sending a randomly generated first serial number to the target device; Receiving operation instruction information sent by the target device, the operation instruction information includes an instruction message and an instruction identification code; Based on the first serial number and a preset incremental strategy, a verification identification code corresponding to the operation instruction information is determined; when the instruction identification code matches the verification identification code, the operation corresponding to the instruction message is executed.

2. The method according to claim 1, characterized in that: Also includes: In the event that the instruction identification code does not match the verification identification code, a randomly generated second serial number is sent to the target device.

3. The method according to claim 1, characterized in that The determining, based on the first sequence number and a preset increment strategy, a verification identification code corresponding to the operation instruction information includes: Get the preset first increment value; When the operation instruction information sent by the target device is received, the sum of the first serial number and the first increment value is determined as the verification identification code corresponding to the operation instruction information, and the first serial number is updated based on the verification identification code.

4. A method for preventing replay attacks, used for a target device, characterized in that: include: Receiving a target sequence number sent by a receiver, wherein the target sequence number includes a first sequence number or a second sequence number; In response to an input operation of a user, generating an instruction message corresponding to the input operation; Determine the instruction identification code corresponding to the instruction message based on the target sequence number and a preset increment strategy; The instruction message and the instruction identification code are sent to the receiver.

5. The method according to claim 4, characterized in that The determining, based on the target sequence number and a preset incremental strategy, the instruction identification code corresponding to the instruction message includes: Get the preset second increment value; In the case of obtaining the user's input operation, the sum of the target serial number and the second increment value is determined as the instruction identification code corresponding to the operation instruction information, and the target serial number is updated based on the instruction identification code.

6. A receiver, characterized in that: include: A sequence number sending module, used for sending a randomly generated first sequence number to a target device; An information receiving module, used to receive the operation instruction information sent by the target device, wherein the operation instruction information includes an instruction message and an instruction identification code; An operation execution module is used to determine the verification identification code corresponding to the operation instruction information based on the first serial number and a preset incremental strategy; when the instruction identification code matches the verification identification code, execute the operation corresponding to the instruction message.

7. A target device, characterized in that: include: A sequence number receiving module, used for receiving a target sequence number sent by a receiver, wherein the target sequence number includes a first sequence number or a second sequence number; A message generating module, used for generating a command message corresponding to the input operation in response to the user's input operation; An identification code determination module, used to determine the instruction identification code corresponding to the instruction message based on the target sequence number and a preset increment strategy; The information sending module is used to send the instruction message and the instruction identification code to the receiver.

8. A replay attack prevention system, characterized in that: The invention comprises the receiver according to claim 6 and the target device according to claim 7, wherein the receiver and the target device are communicatively connected with each other.

9. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.