Data encryption transmission method, device and equipment based on dynamic grouping serial number and storage medium
By allocating independent packet sequence number spaces for services of different priorities and establishing a dynamic overflow early warning mechanism, the problem of high replay attack failure rate in wireless LAN security technology is solved, and data transmission security and integrity are achieved in high-concurrency scenarios.
Patent Information
- Application Number
- CN202511548697.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-28
- Publication Date
- 2026-01-06
AI Technical Summary
Existing wireless LAN security technologies are prone to high replay attack miss rates in high-concurrency service scenarios due to overflow of the globally unified packet sequence number counter.
A data encryption transmission method based on dynamic packet sequence numbers is adopted. By allocating independent packet sequence number spaces for services of different priorities and establishing a dynamic overflow warning mechanism, it is ensured that each priority service has an independent packet sequence number counter, which is updated when the threshold is reached.
It significantly reduces the false negative rate of replay attacks in high-concurrency scenarios, ensuring the security and integrity of data transmission.
Smart Images

Figure CN121284548A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of wireless communication security technology, and in particular to a data encryption transmission method, apparatus, device, and storage medium based on dynamic packet sequence numbers. Background Technology
[0002] In the field of wireless LAN security, WPI (Wireless LAN Security Infrastructure) uses a packet sequence number (PN) mechanism to prevent replay attacks and ensure the uniqueness of data frames. Currently, existing wireless LAN security technologies use a globally unified packet sequence number counter, which is prone to overflow and missed replay attacks in high-concurrency scenarios. Therefore, reducing the missed detection rate of replay attacks remains a problem that needs to be solved.
[0003] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention
[0004] The main objective of this application is to provide a data encryption transmission method, apparatus, device, and storage medium based on dynamic block sequence numbers, aiming to solve the technical problem of how to reduce the false negative rate of replay attacks.
[0005] To achieve the above objectives, this application proposes a data encryption transmission method based on dynamic block sequence numbers, the method comprising: Obtain business data, classify the business data according to the service quality level, and obtain business priorities; The grouping sequence number of the business data is determined according to the business priority. The service data is encrypted and transmitted based on the group sequence number value and the service priority.
[0006] In one embodiment, the step of classifying the business data according to its service quality level to obtain the business priority includes: Identify the type and attributes of business data; Based on the type attribute, the business data is mapped to a predefined service quality level category; Business priorities are determined based on the service quality level category.
[0007] In one embodiment, the step of determining the group sequence number value of the service data according to the service priority includes: Determine the corresponding group sequence number counter based on the aforementioned service priority; Obtain the group sequence number value from the group sequence number counter; After obtaining the group sequence number value, increment the group sequence number counter.
[0008] In one embodiment, after incrementing the group sequence number counter, the method further includes: Monitor the current value of the counter for each group number; When the current value is detected to have reached a preset threshold, the group sequence number counter is updated to obtain the updated group counter; Associate the updated group counter with the group sequence number counter.
[0009] In one embodiment, the step of associating the updated group counter with the group sequence number counter includes: Obtain the serial number and generate an associated identifier based on the serial number; The updated group counter is associated with the group sequence number counter based on the association identifier.
[0010] In one embodiment, the step of encrypting and transmitting the service data based on the packet sequence number value and the service priority includes: Input the group sequence number and the service priority as additional parameters into the preset encryption algorithm; The business data is encrypted using the preset encryption algorithm to generate an encrypted data frame; The encrypted data frame is transmitted.
[0011] In one embodiment, after encrypting and transmitting the service data based on the packet sequence number value and the service priority, the method further includes: Receive encrypted transmission frames from other devices; Parse the service priority and external packet sequence number in the encrypted transmission frame; Obtain the corresponding replay counter based on the service priority; Verify whether the external group sequence number is greater than the replay counter; If the value is greater than the specified value, the replay counter is updated; otherwise, the encrypted transmission frame is discarded.
[0012] Furthermore, to achieve the above objectives, this application also proposes a data encryption transmission device based on dynamic block sequence numbers, the data encryption transmission device based on dynamic block sequence numbers comprising: The acquisition module is used to acquire business data, classify the business data according to the service quality level, and obtain the business priority. The determination module is used to determine the grouping sequence number value of the service data according to the service priority; An encryption module is used to encrypt and transmit the service data based on the group sequence number value and the service priority.
[0013] Furthermore, to achieve the above objectives, this application also proposes a data encryption transmission device based on dynamic block sequence numbers. The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. The computer program is configured to implement the steps of the data encryption transmission method based on dynamic block sequence numbers as described above.
[0014] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the data encryption transmission method based on dynamic block sequence numbers as described above.
[0015] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the data encryption transmission method based on dynamic block sequence numbers as described above.
[0016] This application provides a data encryption transmission method based on dynamic packet sequence numbers. The method involves acquiring service data, classifying it according to its quality of service (QoS) level to obtain service priorities, determining packet sequence number values for the service data based on the service priorities, and encrypting and transmitting the service data based on the packet sequence number values and the service priorities. By allocating independent packet sequence number spaces for services of different priorities and establishing a dynamic overflow warning mechanism, this application significantly reduces the false negative rate of replay attacks in high-concurrency scenarios. Attached Figure Description
[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a flowchart illustrating an embodiment of the data encryption transmission method based on dynamic block sequence numbers provided in this application. Figure 2 This is a schematic diagram of data reception provided in Embodiment 1 of the data encryption transmission method based on dynamic block sequence numbers in this application; Figure 3 This is a flowchart illustrating Embodiment 2 of the data encryption transmission method based on dynamic block sequence numbers provided in this application; Figure 4 A simplified flowchart illustrating the data encryption transmission method based on dynamic block sequence numbers provided in Embodiment 1 of this application; Figure 5 This is a schematic diagram of the module structure of the data encryption transmission device based on dynamic block sequence numbers according to an embodiment of this application; Figure 6 This is a schematic diagram of the device structure of the hardware operating environment involved in the data encryption transmission method based on dynamic group sequence number in the embodiments of this application.
[0020] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0021] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0022] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0023] This application acquires business data, classifies the business data according to the service quality level, and obtains business priorities; determines the group sequence number value of the business data according to the business priorities; and encrypts and transmits the business data based on the group sequence number value and the business priorities.
[0024] Current wireless LAN security technologies use a globally unified packet sequence counter, which is prone to overflow and missed replay attacks in high-concurrency scenarios. Therefore, reducing the missed detection rate of replay attacks remains a problem that needs to be solved.
[0025] This application significantly reduces the false negative rate of replay attacks in high-concurrency scenarios by allocating independent group sequence number spaces for services of different priorities and establishing a dynamic overflow warning mechanism.
[0026] Based on this, embodiments of this application provide a data encryption transmission method based on dynamic block sequence numbers, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the data encryption transmission method based on dynamic group sequence numbers in this application.
[0027] In this embodiment, the data encryption transmission method based on dynamic block sequence numbers includes steps S10~S40: Step S10: Obtain business data, classify the business data according to the service quality level, and obtain business priorities; It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device capable of performing the above functions, a data encryption transmission device based on dynamic block sequence numbers, etc. The following description uses a data encryption transmission device based on dynamic block sequence numbers as an example to illustrate this embodiment and the subsequent embodiments.
[0028] It should be noted that when services of different Quality of Service (QoS) levels (such as voice, video, and data) share the same Packet Number (PN) space, the PN increment logic across priority services will interfere with each other, making it impossible to accurately identify the uniqueness of each service flow. Therefore, it is advisable to first classify the service data, obtain the service priority, and set their respective PN counters.
[0029] In one feasible approach, the step of classifying the business data according to its service quality level to obtain a business priority includes: identifying the type attribute of the business data; mapping the business data to a predefined service quality level category according to the type attribute; and determining the business priority according to the service quality level category.
[0030] It should be noted that after receiving the raw data packets to be sent from upper-layer applications (such as voice calls, video streams, and file downloads), specific fields in the Layer 2 or Layer 3 header of the data packets can be inspected. Based on preset mapping rules, the data packets can be divided into different service flow categories and assigned a service priority value. Specifically, the service data is classified into three priority categories according to service quality level: voice (tags 0-3), video (tags 4-7), and data (tags 8-15).
[0031] Step S20: Determine the grouping sequence number value of the service data according to the service priority; It should be noted that this application will create separate PN spaces for services of different priorities. When using PN, services of different priorities will not interfere with each other.
[0032] Step S30: Encrypt and transmit the service data based on the group sequence number value and the service priority.
[0033] It should be noted that the encrypted transmission process takes the acquired PN value, service priority, and the service data itself as input and feeds them into an encryption algorithm (such as a symmetric block cipher algorithm) for processing. The encryption process encrypts the PN and priority information along with the data, generating a complete, confidential, and intact encrypted data frame. Finally, the system transmits this encrypted data frame via a wireless radio frequency unit.
[0034] In one feasible approach, the step of encrypting and transmitting the service data based on the packet sequence number value and the service priority includes: inputting the packet sequence number value and the service priority as additional parameters into a preset encryption algorithm; using the preset encryption algorithm to encrypt the service data to generate an encrypted data frame; and transmitting the encrypted data frame.
[0035] It should be noted that when invoking an encryption algorithm (such as SM4-GCM-128), the system not only inputs the plaintext data but also the packet sequence number and service priority to ensure that the ciphertext carries anti-replay information. The encryption algorithm performs calculations and outputs two parts: the encrypted ciphertext data and a Message Authentication Code (MAC) used to verify the integrity and authenticity of the data. The system encapsulates the ciphertext, MAC, and other necessary frame headers together to form the final encrypted data frame. The assembled encrypted data frame is submitted to the underlying data link layer and physical layer, where it is modulated and broadcast via an antenna.
[0036] In one feasible approach, after encrypting and transmitting the service data based on the packet sequence number value and the service priority, the method further includes: receiving encrypted transmission frames from other devices; parsing the service priority and external packet sequence number in the encrypted transmission frame; obtaining the corresponding replay counter according to the service priority; verifying whether the external packet sequence number is greater than the replay counter; if it is greater, updating the replay counter; otherwise, discarding the encrypted transmission frame.
[0037] It should be noted that this can be used as a reference. Figure 2 , Figure 2 This diagram illustrates data reception. Upon receiving an encrypted transmission frame from another device, the frame header is parsed to extract the plaintext service priority field and external packet sequence number (i.e., the PN value assigned by the sender). During reception, a replay counter is maintained locally for each service priority, recording the largest valid PN value received from that priority. The corresponding replay counter can be found based on the parsed service priority. The external packet sequence number in the frame is compared with the value of the locally stored replay counter. If the external packet sequence number is greater than the replay counter value, it indicates a new, non-replay, valid frame. The system updates the local replay counter with this new, larger PN value and continues subsequent decryption and other processing. If the external packet sequence number is less than or equal to the replay counter, the frame is determined to be a replay attack frame or an out-of-order frame, and the system immediately discards it without further processing.
[0038] This embodiment acquires business data, classifies it according to its service quality level to obtain business priorities, determines the group sequence number value of the business data based on the business priorities, and encrypts and transmits the business data based on the group sequence number value and the business priorities. This embodiment significantly reduces the false negative rate of replay attacks in high-concurrency scenarios by allocating independent group sequence number spaces for services of different priorities and establishing a dynamic overflow warning mechanism.
[0039] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 3 Step S20 also includes steps S201 to S203: Step S201: Determine the corresponding group sequence number counter according to the service priority; It should be noted that an independent 16-byte PN counter (128 bits in total) is created for each priority level. Each counter increments independently and does not interfere with others. For example, when voice service data is generated, the voice priority PN counter automatically increments by 1, generating a unique PN value. The system maintains an independent packet sequence number (PN) counter for each service priority (or priority range). When it is necessary to assign a PN to a data packet, the system finds the corresponding PN counter based on the service priority determined in the previous step.
[0040] Step S202: Obtain the group sequence number value from the group sequence number counter; It should be noted that the current value is read from the PN counter as the PN value of this data packet. The current count value is read from the selected counter register and used as the PN value of this transmitted data packet.
[0041] Step S203: After obtaining the group sequence number value, increment the group sequence number counter.
[0042] It should be noted that after successfully reading the PN value, the system will immediately issue an "increment" instruction to the counter register, causing its value to increase automatically, ensuring that the next data packet of the same priority can obtain a brand new and larger PN value.
[0043] In one feasible approach, after incrementing the group sequence number counter, the method further includes: monitoring the current value of each group sequence number counter; when the current value reaches a preset threshold, updating the group sequence number counter to obtain an updated group counter; and associating the updated group counter with the group sequence number counter. The step of associating the updated group counter with the group sequence number counter includes: obtaining a sequence number and generating an association identifier based on the sequence number; and associating the updated group counter with the group sequence number counter based on the association identifier.
[0044] It's important to note that the current values of all packet sequence number counters need to be continuously and periodically checked. Each counter has a preset overflow warning threshold (e.g., 80% of the maximum value). When the monitoring module detects that a counter's value has reached this threshold, it triggers an update process. This process generates a new counter context for that service priority, which can either reset the original counter to zero or migrate it to a completely new, independent counting space. This newly generated counter state is the "updated packet counter." To ensure uninterrupted communication, the system needs to establish an association mechanism so that the receiving end can identify and process data frames from both the old and new counters. This is typically achieved by including a unique sequence number or timestamp in the key announcement message during the next key update. This identifier binds the old and new counter contexts together. When a counter update is triggered, the system obtains the current sequence number value and uses it directly as the association identifier, or generates a short identifier based on it using a simple calculation (such as a hash). The updated packet counter (new PN space) is then bound to this association identifier. During the establishment or reorganization of the security association, this association identifier is sent to the communication peer (receiving end). Using this association identifier, the receiving end can correctly index and switch to the new PN counter context locally, thereby achieving a seamless association and smooth transition between the old and new counters.
[0045] This embodiment determines the corresponding group sequence number counter based on the service priority; obtains the group sequence number value from the group sequence number counter; and increments the group sequence number counter after obtaining the group sequence number value. By determining and using different group sequence number counters based on service priority, this embodiment enables the PN of various services to be independent of each other, and updates it immediately when the PN value reaches a threshold, reducing the false negative rate of replay attacks in high-concurrency scenarios.
[0046] For example, to help understand the implementation process of the data encryption transmission method based on dynamic block sequence numbers obtained by combining this embodiment with the above embodiment one, please refer to... Figure 4 , Figure 4A simplified flowchart of a data encryption transmission method based on dynamic packet sequence numbers is provided. Specifically: After business data is generated, it is classified, and the classification result can be one of voice, video, or data. Based on the classification result, the corresponding packet sequence number (PN) counter is incremented, and it is checked whether the PN upper limit threshold has been reached. If it reaches 80% of the upper limit, the PN space needs to be updated before data encryption; otherwise, encryption is performed directly. After encryption, an encrypted data frame containing the PN and a priority tag is sent.
[0047] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the data encryption transmission method based on dynamic block sequence numbers in this application. Any simple modifications based on this technical concept are within the protection scope of this application.
[0048] This application also provides a data encryption transmission device based on dynamic block sequence numbers. Please refer to... Figure 5 The data encryption transmission device based on dynamic block sequence numbers includes: The acquisition module 10 is used to acquire business data, classify the business data according to the service quality level, and obtain the business priority. The determining module 20 is used to determine the grouping sequence number value of the service data according to the service priority; The encryption module 30 is used to encrypt and transmit the service data based on the group sequence number value and the service priority.
[0049] This application acquires business data, classifies it according to its service quality level to obtain business priorities, determines the group sequence number value of the business data based on the business priorities, and encrypts and transmits the business data based on the group sequence number value and the business priorities. This application significantly reduces the false negative rate of replay attacks in high-concurrency scenarios by allocating independent group sequence number spaces for services of different priorities and establishing a dynamic overflow warning mechanism.
[0050] In one embodiment, the acquisition module 10 is further configured to identify the type attribute of the business data; map the business data to a predefined service quality level category according to the type attribute; and determine the business priority according to the service quality level category.
[0051] In one embodiment, the determining module 20 is further configured to determine the corresponding group sequence number counter according to the service priority; obtain the group sequence number value from the group sequence number counter; and increment the group sequence number counter after obtaining the group sequence number value.
[0052] In one embodiment, the determining module 20 is further configured to monitor the current value of each group sequence number counter; when the current value is detected to reach a preset threshold, the group sequence number counter is updated to obtain an updated group counter; and the updated group counter is associated with the group sequence number counter.
[0053] In one embodiment, the determining module 20 is further configured to obtain a sequence number and generate an association identifier based on the sequence number; and associate the updated group counter with the group sequence number counter based on the association identifier.
[0054] In one embodiment, the encryption module 30 is further configured to input the group sequence number value and the service priority as additional parameters into a preset encryption algorithm; use the preset encryption algorithm to encrypt the service data to generate an encrypted data frame; and transmit the encrypted data frame.
[0055] In one embodiment, the encryption module 30 is further configured to receive encrypted transmission frames from other devices; parse the service priority and external packet sequence number in the encrypted transmission frame; obtain the corresponding replay counter according to the service priority; verify whether the external packet sequence number is greater than the replay counter; if it is greater, update the replay counter; otherwise, discard the encrypted transmission frame.
[0056] The data encryption transmission device based on dynamic block sequence numbers provided in this application, employing the data encryption transmission method based on dynamic block sequence numbers in the above embodiments, can solve the technical problem of how to reduce the false negative rate of replay attacks. Compared with the prior art, the beneficial effects of the data encryption transmission device based on dynamic block sequence numbers provided in this application are the same as those of the data encryption transmission method based on dynamic block sequence numbers provided in the above embodiments, and other technical features in the data encryption transmission device based on dynamic block sequence numbers are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0057] This application provides a data encryption transmission device based on dynamic block sequence numbers. The data encryption transmission device based on dynamic block sequence numbers includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the data encryption transmission method based on dynamic block sequence numbers in the above embodiment 1.
[0058] The following is for reference. Figure 6This document illustrates a structural diagram of a data encryption transmission device based on dynamic block sequence numbers suitable for implementing embodiments of this application. The data encryption transmission device based on dynamic block sequence numbers in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 6 The data encryption transmission device based on dynamic packet sequence number shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0059] like Figure 6 As shown, the data encryption transmission device based on dynamic block sequence numbers may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in ROM (Read Only Memory) 1002 or a program loaded from storage device 1003 into RAM (Random Access Memory) 1004. RAM 1004 also stores various programs and data required for the operation of the data encryption transmission device based on dynamic block sequence numbers. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via bus 1005. Input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the data encryption transmission device based on dynamic packet sequence numbers to exchange data wirelessly or via wired communication with other devices. Although the figure shows a data encryption transmission device based on dynamic packet sequence numbers with various systems, it should be understood that it is not required to implement or possess all the systems shown. More or fewer systems can be implemented alternatively.
[0060] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0061] The data encryption transmission device based on dynamic block sequence numbers provided in this application, employing the data encryption transmission method based on dynamic block sequence numbers in the above embodiments, can solve the technical problem of how to reduce the false negative rate of replay attacks. Compared with the prior art, the beneficial effects of the data encryption transmission device based on dynamic block sequence numbers provided in this application are the same as the beneficial effects of the data encryption transmission method based on dynamic block sequence numbers provided in the above embodiments, and other technical features in this data encryption transmission device based on dynamic block sequence numbers are the same as those disclosed in the method of the previous embodiment, and will not be repeated here.
[0062] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0063] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0064] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, which are used to execute the data encryption transmission method based on dynamic block sequence numbers in the above embodiments.
[0065] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0066] The aforementioned computer-readable storage medium may be included in a data encryption transmission device based on dynamic block sequence numbers; or it may exist independently and not be assembled into a data encryption transmission device based on dynamic block sequence numbers.
[0067] The aforementioned computer-readable storage medium carries one or more programs. When the aforementioned one or more programs are executed by a data encryption transmission device based on dynamic packet sequence numbers, the data encryption transmission device based on dynamic packet sequence numbers causes the device to: acquire service data; classify the service data according to the quality of service level to obtain a service priority; determine the packet sequence number value of the service data according to the service priority; and encrypt and transmit the service data based on the packet sequence number value and the service priority.
[0068] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0069] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0070] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0071] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described data encryption transmission method based on dynamic block sequence numbers, thereby solving the technical problem of how to reduce the false negative rate of replay attacks. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the data encryption transmission method based on dynamic block sequence numbers provided in the above embodiments, and will not be repeated here.
[0072] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the data encryption transmission method based on dynamic block sequence numbers as described above.
[0073] The computer program product provided in this application can solve the technical problem of how to reduce the false negative rate of replay attacks. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the data encryption transmission method based on dynamic block sequence numbers provided in the above embodiments, and will not be repeated here.
[0074] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A method for data encryption transmission based on dynamic packet sequence number, characterized in that, The method comprises: obtaining service data, classifying according to the service quality level of the service data to obtain service priority; determining the packet sequence number value of the service data according to the service priority; encrypting and transmitting the service data based on the packet sequence number value and the service priority.
2. The method of claim 1, wherein, The step of classifying according to the service quality level of the service data to obtain service priority comprises: identifying the type attribute of the service data; mapping the service data to a predefined service quality level category according to the type attribute; determining the service priority according to the service quality level category.
3. The method of claim 1, wherein, The step of determining the packet sequence number value of the service data according to the service priority comprises: determining the corresponding packet sequence number counter according to the service priority; obtaining the packet sequence number value from the packet sequence number counter; after obtaining the packet sequence number value, incrementing the packet sequence number counter.
4. The method of claim 3, wherein, After incrementing the packet sequence number counter, it further comprises: monitoring the current value of each packet sequence number counter; when monitoring that the current value reaches a preset threshold, updating the packet sequence number counter to obtain an updated packet counter; associating the updated packet counter with the packet sequence number counter.
5. The method of claim 4, wherein, The step of associating the updated packet counter with the packet sequence number counter comprises: obtaining a sequence number and generating an association identifier according to the sequence number; associating the updated packet counter with the packet sequence number counter based on the association identifier.
6. The method of claim 1, wherein, The step of encrypting and transmitting the service data based on the packet sequence number value and the service priority comprises: inputting the packet sequence number value and the service priority as additional parameters into a preset encryption algorithm; using the preset encryption algorithm to encrypt the service data to generate an encrypted data frame; transmitting the encrypted data frame.
7. The method of claim 1, wherein, After encrypting and transmitting the service data based on the packet sequence number value and the service priority, it further comprises: receiving an encrypted transmission frame of another device; parsing the service priority and the outer packet sequence number in the encrypted transmission frame; obtaining the corresponding replay counter according to the service priority; checking whether the outer packet sequence number is greater than the replay counter; if yes, updating the replay counter, otherwise discarding the encrypted transmission frame.
8. An apparatus for data encryption transmission based on dynamic packet number in a wireless local area network, the apparatus comprising: a packet number generator for generating a dynamic packet number; a data encryption unit for encrypting data using the dynamic packet number; and a transmitter for transmitting the encrypted data. The device comprises: an obtaining module for obtaining service data, classifying according to the service quality level of the service data to obtain service priority; a determining module for determining the packet sequence number value of the service data according to the service priority; an encryption module for encrypting and transmitting the service data based on the packet sequence number value and the service priority.
9. A device for data encryption transmission based on dynamic packet number in a wireless local area network, characterized by, The device comprises a memory, a processor and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the steps of the data encryption transmission method based on dynamic packet sequence numbers in a wireless local area network as claimed in any one of claims 1 to 7.
10. A storage medium, characterized by The storage medium is a computer readable storage medium, and the storage medium stores a computer program. The computer program is executed by the processor to implement the data encryption transmission method based on dynamic grouping sequence numbers in a wireless local area network according to any one of claims 1 to 7.