Communication processing method and device, medium and equipment

By processing the configuration information of the 5G protocol stack at the operation adaptation layer, separating and sending integrity and encryption and decryption information to the hardware system, the problem of inefficiency in the processing of the 5G protocol stack is solved, and efficient data packet processing and adaptation are achieved. .

CN118694573APending Publication Date: 2024-09-24SHANGHAI SMARTLOGIC TECHNOLOGY LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410739559.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-07
Publication Date
2024-09-24

AI Technical Summary

Technical Problem

When processing data packets, the 5G protocol stack needs to complete integrity protection and encryption and decryption operations at the same time. However, some hardware systems have insufficient processing capabilities, resulting in low communication efficiency and protocol stack adaptation efficiency.

Method used

By receiving the configuration information sent by the protocol stack at the operation adaptation layer, the context code stream is generated according to the context pointer, and the integrity-related information and encryption-decryption-related information are sent to the hardware processing system in the specified order to ensure the integrity of the hardware system. and encryption and decryption operations, returning the processing result data packet.

Benefits of technology

It improves the processing efficiency and adaptation efficiency of the protocol stack, reduces the number of configurations, and improves the efficiency of completing integrity and encryption and decryption operations at the same time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118694573A
    Figure CN118694573A
Patent Text Reader

Abstract

The invention discloses a communication processing method and device, a medium and equipment. The method comprises the following steps: receiving configuration information sent by a protocol stack; determining corresponding target context information according to the context pointer, and generating a context code stream for hardware processing system identification according to the target context information; under the condition that the configuration type information indicates that the integrity related operation and the encryption and decryption related operation are configured at the same time, the integrity related information and the encryption and decryption related information are sent to a hardware processing system according to a specified sequence; and under the condition that the number of the received processing result data packets is consistent with the operation frequency indicated by the configuration type information, sending the processing result data packets to a protocol stack, so that the protocol stack obtains a processing result. According to the technical scheme, the integrity related operation and the encryption and decryption related operation can be carried out at the same time by only configuring the protocol stack once, so that the processing efficiency of the protocol stack is improved, and the adaptation efficiency and the docking efficiency of the protocol stack are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a communication processing method, device, medium and equipment. Background Art

[0002] At present, the use of 5G technology is becoming more and more extensive and common. In actual use, the 5G protocol stack needs to perform the following two operations on data packets: integrity protection operation and encryption operation, or the following two operations on data packets: integrity protection verification operation and decryption operation. However, some hardware systems that use the 5G protocol for communication have low processing capabilities and do not support the completion of two operations at the same time. In this case, the 5G protocol stack needs to be configured twice during use to complete the two operations, which not only affects the communication efficiency, but also affects the adaptation and docking of the protocol stack. Summary of the invention

[0003] In order to solve the problems of the prior art, the embodiments of the present invention provide a communication processing method, device, medium and equipment. The technical solution is as follows:

[0004] In a first aspect, a communication processing method is provided, which is applied to an operation adaptation layer, and the method includes:

[0005] Receive configuration information sent by the protocol stack, wherein the configuration information includes a context pointer, a data packet to be processed, counting information of the data packet, a wireless sensor ID, data direction information for indicating data uplink or downlink, and configuration type information, wherein if the configuration type information indicates that integrity-related operations and encryption-decryption-related operations are configured at the same time, the data packets to be processed include integrity-related data packets and encryption-decryption-related data packets;

[0006] Determine the corresponding target context information according to the context pointer, and generate a context code stream for hardware processing system identification according to the target context information, wherein the target context information includes the data direction information, the wireless sensor ID, the encryption key, the key length, the parameter length required for encryption, the encryption algorithm, and the integrity protection algorithm;

[0007] In a case where the configuration type information indicates that the integrity-related operation and the encryption / decryption-related operation are configured simultaneously, the integrity-related information and the encryption / decryption-related information are respectively sent to the hardware processing system in a specified order, so that the hardware processing system performs the integrity-related operation and the encryption / decryption-related operation respectively, wherein the integrity-related information includes the integrity-related data packet, the context code stream, and the context pointer, and the encryption / decryption-related information includes the encryption / decryption-related data packet, the context code stream, and the context pointer;

[0008] When the number of processing result data packets received from the hardware processing system is consistent with the number of operations indicated by the configuration type information, the processing result data packets are sent to the protocol stack so that the protocol stack obtains the processing result.

[0009] Optionally, before receiving the configuration information sent by the protocol stack, the method further includes:

[0010] Receiving initialization information sent by the protocol stack, wherein the initialization information includes memory allocation information, queue depth information, the encryption algorithm, and the integrity protection algorithm;

[0011] Applying for memory according to the memory allocation information, and applying for queues according to the queue depth information;

[0012] Receiving the target context information sent by the protocol stack, and storing the target context information in the form of a queue in the applied memory, wherein the target context information is sent by the protocol stack to the operation adaptation layer after establishing wireless sensing;

[0013] generating the context pointer corresponding to the target context information;

[0014] The context pointer is sent to the protocol stack.

[0015] Optionally, the integrity-related operation includes an integrity protection operation, the encryption / decryption-related operation includes an encryption operation, the integrity-related data packet includes an integrity protection data packet, and the encryption / decryption-related data packet includes an encrypted data packet;

[0016] When the configuration type information indicates that the integrity-related operation and the encryption / decryption-related operation are configured simultaneously, the integrity-related information and the encryption / decryption-related information are sent to the hardware processing system in a specified order, respectively, including:

[0017] When the configuration type information indicates that the integrity-related operation and the encryption / decryption-related operation are configured at the same time, and the data direction information indicates that the integrity protection operation is configured as downlink, the integrity protection data packet, the context code stream, and the context pointer are sent to the hardware processing system, so that the hardware processing system performs the integrity protection operation, and returns a first processing result data packet when the integrity protection operation is completed, wherein the first processing result data packet includes a processing result of the integrity protection operation, the context pointer, and a storage address of the processing result of the integrity protection operation;

[0018] When the operation adaptation layer receives the first processing result data packet, the encrypted data packet, the context code stream, and the context pointer are sent to the hardware processing system so that the hardware processing system performs the encryption operation, and returns a second processing result data packet when the encryption operation is completed, wherein the second processing result data packet includes the encryption operation processing result, the context pointer, and the storage address of the encryption operation processing result.

[0019] Optionally, the integrity-related operation includes an integrity protection check operation, the encryption / decryption-related operation includes a decryption operation, the integrity-related data packet includes an integrity protection check data packet, and the encryption / decryption-related data packet includes a decryption data packet;

[0020] When the configuration type information indicates that the integrity-related operation and the encryption / decryption-related operation are configured simultaneously, the integrity-related information and the encryption / decryption-related information are sent to the hardware processing system in a specified order, respectively, including:

[0021] When the configuration type information indicates that the integrity-related operation and the encryption / decryption-related operation are configured at the same time, and the data direction information indicates that it is uplink, the decryption data packet, the context code stream, and the context pointer are sent to the hardware processing system, so that the hardware processing system performs the decryption operation, and returns a third processing result data packet when the decryption operation is completed, wherein the third processing result data packet includes the decryption operation processing result, the context pointer, and the storage address of the decryption operation processing result;

[0022] When the operation adaptation layer receives the third processing result data packet, the integrity protection check data packet, the context code stream, and the context pointer are sent to the hardware processing system, so that the hardware processing system performs the integrity protection check operation, and returns a fourth processing result data packet when the integrity protection check operation is completed, wherein the fourth processing result data packet includes the integrity protection check operation processing result, the context pointer, and the storage address of the integrity protection check operation processing result.

[0023] Optionally, determining corresponding target context information according to the context pointer includes:

[0024] Obtain the correspondence between context information and pointers;

[0025] The target context information corresponding to the context pointer is determined according to the context pointer and the corresponding relationship.

[0026] In a second aspect, a communication processing device is provided, which is applied to an operation adaptation layer, and the device includes:

[0027] A first receiving module is used to receive configuration information sent by a protocol stack, wherein the configuration information includes a context pointer, a data packet to be processed, counting information of the data packet, a wireless sensor ID, data direction information for indicating data uplink or downlink, and configuration type information, wherein if the configuration type information indicates that integrity-related operations and encryption-decryption-related operations are configured at the same time, the data packets to be processed include integrity-related data packets and encryption-decryption-related data packets;

[0028] A determination module, configured to determine corresponding target context information according to the context pointer, and generate a context code stream for identification by a hardware processing system according to the target context information, wherein the target context information includes the data direction information, the wireless sensor ID, an encryption key, a key length, a parameter length required for encryption, an encryption algorithm, and an integrity protection algorithm;

[0029] a first sending module, configured to send integrity-related information and encryption / decryption-related information to a hardware processing system in a specified order, respectively, when the configuration type information indicates that the integrity-related operation and the encryption / decryption-related operation are configured simultaneously, so that the hardware processing system performs the integrity-related operation and the encryption / decryption-related operation respectively, wherein the integrity-related information includes the integrity-related data packet, the context code stream, and the context pointer, and the encryption / decryption-related information includes the encryption / decryption-related data packet, the context code stream, and the context pointer;

[0030] The second sending module is used to send the processing result data packets sent by the hardware processing system to the protocol stack when the number of processing result data packets received is consistent with the number of operations indicated by the configuration type information, so that the protocol stack obtains the processing result.

[0031] Optionally, the device further comprises:

[0032] a second receiving module, configured to receive initialization information sent by the protocol stack before the first receiving module receives the configuration information sent by the protocol stack, wherein the initialization information includes memory allocation information, queue depth information, the encryption algorithm, and the integrity protection algorithm;

[0033] An application module, used to apply for memory according to the memory allocation information, and to apply for queue according to the queue depth information;

[0034] A third receiving module is used to receive the target context information sent by the protocol stack, and store the target context information in the form of a queue in the applied memory, wherein the target context information is sent by the protocol stack to the operation adaptation layer after establishing wireless sensing;

[0035] A generating module, used for generating the context pointer corresponding to the target context information;

[0036] The third sending module is used to send the context pointer to the protocol stack.

[0037] Optionally, the integrity-related operation includes an integrity protection operation, the encryption / decryption-related operation includes an encryption operation, the integrity-related data packet includes an integrity protection data packet, and the encryption / decryption-related data packet includes an encrypted data packet;

[0038] The first sending module includes:

[0039] a first sending submodule, configured to send the integrity protection data packet, the context code stream, and the context pointer to the hardware processing system when the configuration type information indicates that the integrity-related operation and the encryption / decryption-related operation are configured at the same time and the data direction information indicates that the data is downlink, so that the hardware processing system performs the integrity protection operation, and returns a first processing result data packet when the integrity protection operation is completed, wherein the first processing result data packet includes a processing result of the integrity protection operation, the context pointer, and a storage address of the processing result of the integrity protection operation;

[0040] The second sending submodule is used to send the encrypted data packet, the context code stream, and the context pointer to the hardware processing system when the operation adaptation layer receives the first processing result data packet, so that the hardware processing system performs the encryption operation, and return a second processing result data packet when the encryption operation is completed, wherein the second processing result data packet includes the encryption operation processing result, the context pointer, and the storage address of the encryption operation processing result.

[0041] Optionally, the integrity-related operation includes an integrity protection check operation, the encryption / decryption-related operation includes a decryption operation, the integrity-related data packet includes an integrity protection check data packet, and the encryption / decryption-related data packet includes a decryption data packet;

[0042] The first sending module 43 includes:

[0043] a third sending submodule, configured to send the decrypted data packet, the context code stream, and the context pointer to the hardware processing system when the configuration type information indicates that the integrity-related operation and the encryption / decryption-related operation are configured at the same time and the data direction information indicates that the data is uplink, so that the hardware processing system performs the decryption operation, and returns a third processing result data packet when the decryption operation is completed, wherein the third processing result data packet includes a decryption operation processing result, the context pointer, and a storage address of the decryption operation processing result;

[0044] a fourth sending submodule, for sending the integrity protection check data packet, the context code stream, and the context pointer to the hardware processing system when the operation adaptation layer receives the third processing result data packet, so that the hardware processing system performs the integrity protection check operation, and returns a fourth processing result data packet when the integrity protection check operation is completed, wherein the fourth processing result data packet includes the integrity protection check operation processing result, the context pointer, and the storage address of the integrity protection check operation processing result.

[0045] Optionally, the determining module 42 includes:

[0046] An acquisition submodule is used to acquire the corresponding relationship between context information and pointers;

[0047] The determination submodule is used to determine the target context information corresponding to the context pointer according to the context pointer and the corresponding relationship.

[0048] According to a third aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the steps of the communication processing method provided in the first aspect are implemented.

[0049] In a fourth aspect, an electronic device is provided, including:

[0050] a memory having a computer program stored thereon;

[0051] A processor is used to execute the computer program in the memory to implement the steps of the communication processing method provided in the first aspect.

[0052] The technical solution provided by the embodiment of the present invention has the following beneficial effects:

[0053] Through the above technical solution, if the configuration type information sent by the protocol stack indicates that integrity-related operations and encryption-decryption-related operations are configured at the same time, the operation adaptation layer can send integrity-related information and encryption-decryption-related information to the hardware processing system in a specified order. If the protocol stack configures two operations at the same time, when the operation adaptation layer simultaneously receives the integrity-related processing result data packet and the encryption-decryption-related processing result data packet returned by the hardware processing system, that is, two data packets, the number of received processing result data packets is consistent with the number of operations indicated by the configuration type information, that is, two times, and the two processing result data packets can be sent to the protocol stack at the same time. In this way, the protocol stack is configured only once, that is, the configuration information is sent to the operation adaptation layer only once, and the two processing result data packets can be obtained at the same time, which improves the processing efficiency of the protocol stack, and improves the adaptation efficiency and docking efficiency of the protocol stack. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0055] Figure 1 is a schematic diagram of an exemplary implementation environment;

[0056] Figure 2 is a flow chart showing an exemplary communication processing method;

[0057] Figure 3 is an exemplary diagram showing the interaction between a protocol stack, an operation adaptation layer, and a hardware processing system;

[0058] Figure 4 is a block diagram of an exemplary communication processing device. DETAILED DESCRIPTION

[0059] In order to make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.

[0060] Figure 1 is a schematic diagram of an exemplary implementation environment, such as Figure 1 As shown, an embodiment of the present invention may involve a protocol stack 11, an operation adaptation layer 12, and a hardware processing system 13, wherein the protocol stack 11 and the operation adaptation layer 12 may be deployed on a software processor of a base station, the protocol stack 11 and the operation adaptation layer 12 are two different software modules, i.e., two different software systems, and the hardware processing system 13 may be deployed in a hardware processor of the base station.

[0061] Figure 2 is a flowchart showing an exemplary communication processing method, which can be applied to the operation adaptation layer, such as Figure 1 The operation adaptation layer 12 shown, such as Figure 2 As shown, the method may include steps 21 to 24.

[0062] Step 21: Receive the configuration information sent by the protocol stack.

[0063] Step 22: Determine the corresponding target context information according to the context pointer, and generate a context code stream for hardware processing system recognition according to the target context information.

[0064] The configuration information includes a context pointer, a data packet to be processed, data packet counting information, a wireless sensor ID, data direction information for indicating data uplink or downlink, and configuration type information.

[0065] Among them, the context pointer can be used to index the target context information, that is, the target context information can be found through the context pointer. The target context information can be sent by the protocol stack to the operation adaptation layer. For example, the target context information may include data direction information, wireless sensor ID, encryption key, key length, encryption required parameter length, encryption algorithm, integrity protection algorithm. In order to enable the hardware processing system to accurately identify data, the operation adaptation layer can generate a context code stream for the hardware processing system to identify based on the target context information. The form of the context code stream is the form of data that can be identified by the hardware processing system.

[0066] In the present invention, the protocol stack can be configured only once from the software level, so that the hardware processing system can simultaneously complete the integrity-related operation and the encryption and decryption-related operation, that is, complete two operations. Among them, if the configuration type information indicates that the integrity-related operation and the encryption and decryption-related operation are configured at the same time, the data packets that need to be processed include the integrity-related data packets and the encryption and decryption-related data packets. If the protocol stack only requires the hardware processing system to complete one operation, for example, the configuration type information indicates that the integrity-related operation is configured, the data packets that need to be processed include the integrity-related data packets, for example, the configuration type information indicates that the encryption and decryption-related operation is configured, the data packets that need to be processed include the encryption and decryption-related data packets.

[0067] Step 23: When the configuration type information indicates that integrity-related operations and encryption / decryption-related operations are configured simultaneously, the integrity-related information and encryption / decryption-related information are sent to the hardware processing system in a specified order, so that the hardware processing system performs the integrity-related operations and encryption / decryption-related operations respectively.

[0068] Among them, the integrity-related information includes integrity-related data packets, context code streams, and context pointers, and the encryption and decryption-related information includes encryption and decryption-related data packets, context code streams, and context pointers.

[0069] Step 24: When the number of processing result data packets received from the hardware processing system is consistent with the number of operations indicated by the configuration type information, the processing result data packets are sent to the protocol stack so that the protocol stack obtains the processing result.

[0070] If the configuration type information sent by the protocol stack to the operation adaptation layer indicates that integrity-related operations and encryption-decryption-related operations are configured simultaneously, the operation adaptation layer can send integrity-related information and encryption-decryption-related information to the hardware processing system, respectively, so that the hardware processing system can perform integrity-related operations and encryption-decryption-related operations respectively. When the operation adaptation layer simultaneously receives the integrity-related processing result data packet and the encryption-decryption-related processing result data packet returned by the hardware processing system, i.e., two data packets, the number of received processing result data packets is consistent with the number of operations indicated by the configuration type information, i.e., two times, and the two processing result data packets can be sent to the protocol stack at the same time. In this way, the protocol stack only needs to be configured once, i.e., the configuration information is only sent to the operation adaptation layer once, and the two processing result data packets can be obtained at the same time, thereby improving the processing efficiency of the protocol stack, and improving the adaptation efficiency and docking efficiency of the protocol stack.

[0071] If the configuration type information sent by the protocol stack to the operation adaptation layer indicates that an operation is to be configured, for example, indicating that an integrity-related operation is to be configured, the operation adaptation layer may send integrity-related information to the hardware processing system so that the hardware processing system performs integrity-related operations. When the operation adaptation layer receives the integrity-related processing result data packet returned by the hardware processing system, the number of received processing result data packets is consistent with the number of operations indicated by the configuration type information, i.e., one time, and the processing result data packet may be sent to the protocol stack.

[0072] Through the above technical solution, if the configuration type information sent by the protocol stack indicates that integrity-related operations and encryption-decryption-related operations are configured at the same time, the operation adaptation layer can send integrity-related information and encryption-decryption-related information to the hardware processing system in a specified order. If the protocol stack configures two operations at the same time, when the operation adaptation layer simultaneously receives the integrity-related processing result data packet and the encryption-decryption-related processing result data packet returned by the hardware processing system, that is, two data packets, the number of received processing result data packets is consistent with the number of operations indicated by the configuration type information, that is, two times, and the two processing result data packets can be sent to the protocol stack at the same time. In this way, the protocol stack is configured only once, that is, the configuration information is sent to the operation adaptation layer only once, and the two processing result data packets can be obtained at the same time, which improves the processing efficiency of the protocol stack, and improves the adaptation efficiency and docking efficiency of the protocol stack.

[0073] In the present invention, before step 21 of receiving the configuration information sent by the protocol stack, the communication processing method further includes:

[0074] Receive initialization information sent by the protocol stack, where the initialization information includes memory allocation information, queue depth information, encryption algorithm, and integrity protection algorithm;

[0075] Memory is applied according to memory allocation information, and queue is applied according to queue depth information;

[0076] receiving target context information sent by the protocol stack, and storing the target context information in the requested memory in the form of a queue, wherein the target context information is sent by the protocol stack to the operation adaptation layer after establishing the wireless sensor;

[0077] Generate a context pointer corresponding to the target context information;

[0078] A context pointer is sent to the protocol stack.

[0079] Among them, if the base station has the need for data encryption and decryption and integrity protection, it can be pre-configured in the configuration file of the base station, for example, by a technician. First, the protocol stack is initialized, that is, the protocol stack allocates memory and queue depth. The memory allocation information may include information about how much memory the operation adaptation layer needs to apply for, and the queue depth information may include information about how much queue the operation adaptation layer needs to apply for, the encryption algorithm, that is, the algorithm to be used for encryption and decryption operations, and the integrity protection algorithm, that is, the algorithm to be used for integrity protection operations and integrity protection verification operations. The operation adaptation layer can apply for memory according to the memory allocation information, and apply for queues according to the queue depth information. After that, after establishing wireless sensing, the protocol stack can send the target context information to the operation adaptation layer, and the operation adaptation layer can store the target context information in the requested memory in the form of a queue, and generate a context pointer corresponding to the target context information, and the operation adaptation layer then sends the context pointer to the protocol stack. In this way, when the protocol stack sends configuration information to the operation adaptation layer, the configuration information can carry the context pointer, so that the operation adaptation layer can accurately determine the target context information according to the context pointer.

[0080] Generally, for a base station, if the data direction information is downlink, an integrity protection operation and an encryption operation are required, and if the data direction information is uplink, a decryption operation and an integrity protection check operation are required.

[0081] Wherein, the integrity-related operation includes the integrity protection operation, the encryption / decryption-related operation includes the encryption operation, the integrity-related data packet includes the integrity protection data packet, and the encryption / decryption-related data packet includes the encryption data packet;

[0082] The step of sending the integrity-related information and the encryption / decryption-related information to the hardware processing system in a specified order respectively when the configuration type information indicates that the integrity-related operation and the encryption / decryption-related operation are configured at the same time includes:

[0083] When the configuration type information indicates that the integrity-related operation and the encryption / decryption-related operation are configured at the same time, and the data direction information indicates that the integrity protection data packet, the context code stream, and the context pointer are sent to the hardware processing system, so that the hardware processing system performs the integrity protection operation, and returns the first processing result data packet when the integrity protection operation is completed;

[0084] When the operation adaptation layer receives the first processing result data packet, the encrypted data packet, the context code stream, and the context pointer are sent to the hardware processing system so that the hardware processing system performs the encryption operation, and returns the second processing result data packet when the encryption operation is completed.

[0085] Wherein, when the data direction information indicates that it is downlink, it is necessary to perform integrity protection operation before encryption operation. The operation adaptation layer first sends the integrity protection data packet, context code stream, and context pointer to the hardware processing system, so that the hardware processing system performs integrity protection operation through integrity protection algorithm, and returns the first processing result data packet to the operation adaptation layer after the processing is completed, wherein the first processing result data packet includes the integrity protection operation processing result, context pointer, and the storage address of the integrity protection operation processing result. After receiving the first processing result data packet, the operation adaptation layer only receives one processing result data packet, which is inconsistent with the need to perform two operations at the same time in the protocol stack configuration. Therefore, the operation adaptation layer sends the encryption data packet, context code stream, and context pointer to the hardware processing system, so that the hardware processing system performs encryption operation according to the encryption algorithm, and after the processing is completed, the second processing result packet is fed back to the operation adaptation layer, wherein the second processing result data packet includes the encryption operation processing result, context pointer, and the storage address of the encryption operation processing result. Among them, the context pointer can be used to index the target context information. Since asynchronous operations are performed between the protocol stack and the operation adaptation layer, and between the operation adaptation layer and the hardware processing system, the context pointer is sent at the same time when the information is sent. For example, the operation adaptation layer sends the context pointer to the hardware processing system, and the hardware processing system also carries the context pointer when returning the processing result. In this way, the task association positioning can be accurately performed through the context pointer. The configuration information and the target context information both contain the wireless sensor ID. The processing result can be associated with the configuration information sent by the protocol stack through the wireless sensor ID and the context pointer.

[0086] In the present invention, the integrity-related operation includes an integrity protection verification operation, the encryption / decryption-related operation includes a decryption operation, the integrity-related data packet includes an integrity protection verification data packet, and the encryption / decryption-related data packet includes a decryption data packet;

[0087] The step of sending the integrity-related information and the encryption / decryption-related information to the hardware processing system in a specified order respectively when the configuration type information indicates that the integrity-related operation and the encryption / decryption-related operation are configured at the same time includes:

[0088] When the configuration type information indicates that the integrity-related operation and the encryption / decryption-related operation are configured at the same time, and the data direction information indicates that the data is uplink, the decryption data packet, the context code stream, and the context pointer are sent to the hardware processing system so that the hardware processing system performs the decryption operation, and returns a third processing result data packet when the decryption operation is completed;

[0089] When the operation adaptation layer receives the third processing result data packet, the integrity protection check data packet, the context code stream, and the context pointer are sent to the hardware processing system, so that the hardware processing system performs an integrity protection check operation, and returns the fourth processing result data packet when the integrity protection check operation is completed.

[0090] Wherein, when the data direction information indicates that it is uplink, it is necessary to perform a decryption operation before performing an integrity protection check operation. Wherein, the hardware processing system performs a decryption operation according to the encryption algorithm, and after the processing is completed, it feeds back a third processing result packet to the operation adaptation layer, and the third processing result packet includes a decryption operation processing result, a context pointer, and a storage address of the decryption operation processing result. After the operation adaptation layer receives the third processing result packet, since only one processing result packet is received, it is inconsistent with the need to perform two operations at the same time in the protocol stack configuration. Therefore, the operation adaptation layer sends the integrity protection check packet, the context code stream, and the context pointer to the hardware processing system, so that the hardware processing system performs an integrity protection check operation according to the integrity protection algorithm, and after the processing is completed, it feeds back a fourth processing result to the operation adaptation layer, wherein the fourth processing result packet includes an integrity protection check operation processing result, a context pointer, and a storage address of the integrity protection check operation processing result.

[0091] In the present invention, when the configuration type information indicates a configuration integrity-related operation and the data direction information indicates an uplink, the operation adaptation layer sends the integrity protection check data packet, the context code stream, and the context pointer to the hardware processing system, so that the hardware processing system performs an integrity protection check operation, and returns a processing result data packet when the integrity protection check operation is completed. The operation adaptation layer then sends the processing result data packet to the protocol stack.

[0092] When the configuration type information indicates a configuration integrity-related operation and the data direction information indicates downlink, the operation adaptation layer sends the integrity protection data packet, context code stream, and context pointer to the hardware processing system, so that the hardware processing system performs the integrity protection operation and returns the processing result data packet when the integrity protection operation is completed. The operation adaptation layer then sends the processing result data packet to the protocol stack.

[0093] When the configuration type information indicates configuration of encryption and decryption related operations and the data direction information indicates uplink, the operation adaptation layer sends the decrypted data packet, context code stream, and context pointer to the hardware processing system, so that the hardware processing system performs the decryption operation and returns the processing result data packet when the decryption operation is completed. The operation adaptation layer then sends the processing result data packet to the protocol stack.

[0094] When the configuration type information indicates configuration of encryption and decryption related operations and the data direction information indicates downlink, the operation adaptation layer sends the encrypted data packet, context code stream, and context pointer to the hardware processing system, so that the hardware processing system performs encryption operations and returns the processing result data packet when the encryption operation is completed. The operation adaptation layer then sends the processing result data packet to the protocol stack.

[0095] In the present invention, the step of determining the corresponding target context information according to the context pointer includes:

[0096] Obtain the correspondence between context information and pointers;

[0097] According to the context pointer and the corresponding relationship, target context information corresponding to the context pointer is determined.

[0098] When the operation adaptation layer receives the context information sent by the protocol stack, it can generate a pointer corresponding to the context information and store the correspondence between the context information and the pointer, from which the target context information corresponding to the context pointer can be found.

[0099] Figure 3 1 is an exemplary diagram showing the interaction between the protocol stack 11, the operation adaptation layer 12, and the hardware processing system 13. Figure 3 As shown, the communication processing method may include steps 301 to 319.

[0100] Step 301: The protocol stack 11 sends initialization information to the operation adaptation layer 12.

[0101] Step 302 : The operation adaptation layer 12 receives the initialization information sent by the protocol stack 11 .

[0102] Step 303: The operation adaptation layer 12 applies for memory according to the memory allocation information, and applies for queue according to the queue depth information.

[0103] Step 304 : The protocol stack 11 sends the target context information to the operation adaptation layer 12 .

[0104] Step 305: The operation adaptation layer 12 receives the target context information sent by the protocol stack 11, and generates a context pointer corresponding to the target context information.

[0105] Step 306 : The operation adaptation layer 12 sends the context pointer to the protocol stack 11 .

[0106] Step 307 : The protocol stack 11 receives the context pointer sent by the operation adaptation layer 12 .

[0107] Step 308: The protocol stack 11 sends the configuration information to the operation adaptation layer 12. This may be regarded as an enqueue operation of the protocol stack 11 to the operation adaptation layer 12.

[0108] Step 309 : The operation adaptation layer 12 receives the configuration information sent by the protocol stack 11 .

[0109] Step 310: The operation adaptation layer 12 determines the corresponding target context information according to the context pointer, and generates a context code stream for identification by the hardware processing system 13 according to the target context information.

[0110] Step 311: When the configuration type information indicates that integrity-related operations and encryption-related operations are configured at the same time, and the data direction information indicates that it is downlink, the operation adaptation layer 12 sends the integrity protection data packet, context code stream, and context pointer to the hardware processing system 13. This can be regarded as the first enqueue operation of the operation adaptation layer 12 to the hardware processing system 13.

[0111] Step 312: The hardware processing system 13 performs integrity protection operations.

[0112] Step 313: the hardware processing system 13 sends a first processing result data packet to the operation adaptation layer 12. This may be regarded as the first dequeue operation of the hardware processing system 13 to the operation adaptation layer 12.

[0113] Step 314 : the operation adaptation layer 12 receives the first processing result data packet sent by the hardware processing system 13 .

[0114] Step 315: the operation adaptation layer 12 sends the encrypted data packet, context code stream, and context pointer to the hardware processing system 13. This can be regarded as the second enqueue operation of the operation adaptation layer 12 to the hardware processing system 13.

[0115] Step 316: The hardware processing system 13 performs encryption operations.

[0116] Step 317: the hardware processing system 13 sends a second processing result data packet to the operation adaptation layer 12. This can be regarded as the second dequeue operation of the hardware processing system 13 to the operation adaptation layer 12.

[0117] Step 318 : The operation adaptation layer 12 receives the second processing result data packet sent by the hardware processing system 13 .

[0118] Step 319: the operation adaptation layer 12 sends the first processing result data packet and the second processing result data packet to the protocol stack 11. This can be regarded as a dequeue operation of the operation adaptation layer 12 to the protocol stack 11.

[0119] Figure 3The illustrated embodiment is an embodiment in which the configuration type information indicates that integrity-related operations and encryption / decryption-related operations are configured simultaneously, and the data direction information indicates that the data direction is downlink. The implementation methods of each step have been described in detail above.

[0120] Based on the same inventive concept, the present invention also provides a communication processing device, which is applied to the operation adaptation layer. Figure 4 is a block diagram of an exemplary communication processing device, such as Figure 4 As shown, the device 40 may include:

[0121] A first receiving module 41 is used to receive configuration information sent by a protocol stack, wherein the configuration information includes a context pointer, a data packet to be processed, counting information of the data packet, a wireless sensor ID, data direction information for indicating data uplink or downlink, and configuration type information, wherein if the configuration type information indicates that integrity-related operations and encryption-decryption-related operations are configured at the same time, the data packets to be processed include integrity-related data packets and encryption-decryption-related data packets;

[0122] A determination module 42, configured to determine corresponding target context information according to the context pointer, and generate a context code stream for identification by the hardware processing system according to the target context information, wherein the target context information includes the data direction information, the wireless sensor ID, the encryption key, the key length, the parameter length required for encryption, the encryption algorithm, and the integrity protection algorithm;

[0123] A first sending module 43 is configured to send integrity-related information and encryption / decryption-related information to a hardware processing system in a specified order, respectively, when the configuration type information indicates that the integrity-related operation and the encryption / decryption-related operation are configured simultaneously, so that the hardware processing system performs the integrity-related operation and the encryption / decryption-related operation respectively, wherein the integrity-related information includes the integrity-related data packet, the context code stream, and the context pointer, and the encryption / decryption-related information includes the encryption / decryption-related data packet, the context code stream, and the context pointer;

[0124] The second sending module 44 is used to send the processing result data packets sent by the hardware processing system to the protocol stack when the number of processing result data packets received is consistent with the number of operations indicated by the configuration type information, so that the protocol stack obtains the processing result.

[0125] Optionally, the device 40 further includes:

[0126] A second receiving module, configured to receive initialization information sent by the protocol stack before the first receiving module 41 receives the configuration information sent by the protocol stack, wherein the initialization information includes memory allocation information, queue depth information, the encryption algorithm, and the integrity protection algorithm;

[0127] An application module, used to apply for memory according to the memory allocation information, and to apply for queue according to the queue depth information;

[0128] A third receiving module is used to receive the target context information sent by the protocol stack, and store the target context information in the form of a queue in the applied memory, wherein the target context information is sent by the protocol stack to the operation adaptation layer after establishing wireless sensing;

[0129] A generating module, used for generating the context pointer corresponding to the target context information;

[0130] The third sending module is used to send the context pointer to the protocol stack.

[0131] Optionally, the integrity-related operation includes an integrity protection operation, the encryption / decryption-related operation includes an encryption operation, the integrity-related data packet includes an integrity protection data packet, and the encryption / decryption-related data packet includes an encrypted data packet;

[0132] The first sending module 43 includes:

[0133] a first sending submodule, configured to send the integrity protection data packet, the context code stream, and the context pointer to the hardware processing system when the configuration type information indicates that the integrity-related operation and the encryption / decryption-related operation are configured at the same time and the data direction information indicates that the data is downlink, so that the hardware processing system performs the integrity protection operation, and returns a first processing result data packet when the integrity protection operation is completed, wherein the first processing result data packet includes a processing result of the integrity protection operation, the context pointer, and a storage address of the processing result of the integrity protection operation;

[0134] The second sending submodule is used to send the encrypted data packet, the context code stream, and the context pointer to the hardware processing system when the operation adaptation layer receives the first processing result data packet, so that the hardware processing system performs the encryption operation, and return a second processing result data packet when the encryption operation is completed, wherein the second processing result data packet includes the encryption operation processing result, the context pointer, and the storage address of the encryption operation processing result.

[0135] Optionally, the integrity-related operation includes an integrity protection check operation, the encryption / decryption-related operation includes a decryption operation, the integrity-related data packet includes an integrity protection check data packet, and the encryption / decryption-related data packet includes a decryption data packet;

[0136] The first sending module 43 includes:

[0137] a third sending submodule, configured to send the decrypted data packet, the context code stream, and the context pointer to the hardware processing system when the configuration type information indicates that the integrity-related operation and the encryption / decryption-related operation are configured at the same time and the data direction information indicates that the data is uplink, so that the hardware processing system performs the decryption operation, and returns a third processing result data packet when the decryption operation is completed, wherein the third processing result data packet includes a decryption operation processing result, the context pointer, and a storage address of the decryption operation processing result;

[0138] a fourth sending submodule, for sending the integrity protection check data packet, the context code stream, and the context pointer to the hardware processing system when the operation adaptation layer receives the third processing result data packet, so that the hardware processing system performs the integrity protection check operation, and returns a fourth processing result data packet when the integrity protection check operation is completed, wherein the fourth processing result data packet includes the integrity protection check operation processing result, the context pointer, and the storage address of the integrity protection check operation processing result.

[0139] Optionally, the determining module 42 includes:

[0140] An acquisition submodule is used to acquire the corresponding relationship between context information and pointers;

[0141] The determination submodule is used to determine the target context information corresponding to the context pointer according to the context pointer and the corresponding relationship.

[0142] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the communication processing method provided by any of the above embodiments of the present invention are implemented.

[0143] The present invention also provides an electronic device, comprising:

[0144] a memory having a computer program stored thereon;

[0145] The processor is used to execute the computer program in the memory to implement the steps of the communication processing method provided in any one of the above embodiments of the present invention.

[0146] It should be noted that: the communication processing device provided in the above embodiment only uses the division of the above functional modules as an example when performing communication processing. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the communication processing device provided in the above embodiment and the communication processing method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0147] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0148] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0149] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A communication processing method, It is characterized in that Applied to the operation adaptation layer, the method comprises: Receive configuration information sent by the protocol stack, wherein the configuration information includes a context pointer, a data packet to be processed, counting information of the data packet, a wireless sensor ID, data direction information for indicating data uplink or downlink, and configuration type information, wherein if the configuration type information indicates that integrity-related operations and encryption-decryption-related operations are configured at the same time, the data packets to be processed include integrity-related data packets and encryption-decryption-related data packets; Determine the corresponding target context information according to the context pointer, and generate a context code stream for hardware processing system identification according to the target context information, wherein the target context information includes the data direction information, the wireless sensor ID, the encryption key, the key length, the parameter length required for encryption, the encryption algorithm, and the integrity protection algorithm; In a case where the configuration type information indicates that the integrity-related operation and the encryption / decryption-related operation are configured simultaneously, the integrity-related information and the encryption / decryption-related information are respectively sent to the hardware processing system in a specified order, so that the hardware processing system performs the integrity-related operation and the encryption / decryption-related operation respectively, wherein the integrity-related information includes the integrity-related data packet, the context code stream, and the context pointer, and the encryption / decryption-related information includes the encryption / decryption-related data packet, the context code stream, and the context pointer; When the number of processing result data packets received from the hardware processing system is consistent with the number of operations indicated by the configuration type information, the processing result data packets are sent to the protocol stack so that the protocol stack obtains the processing result.

2. The method according to claim 1, It is characterized in that Before receiving the configuration information sent by the protocol stack, the method further includes: Receiving initialization information sent by the protocol stack, wherein the initialization information includes memory allocation information, queue depth information, the encryption algorithm, and the integrity protection algorithm; Applying for memory according to the memory allocation information, and applying for queues according to the queue depth information; Receiving the target context information sent by the protocol stack, and storing the target context information in the form of a queue in the applied memory, wherein the target context information is sent by the protocol stack to the operation adaptation layer after establishing wireless sensing; generating the context pointer corresponding to the target context information; The context pointer is sent to the protocol stack.

3. The method according to claim 1, It is characterized in that The integrity-related operation includes an integrity protection operation, the encryption / decryption-related operation includes an encryption operation, the integrity-related data packet includes an integrity protection data packet, and the encryption / decryption-related data packet includes an encrypted data packet; When the configuration type information indicates that the integrity-related operation and the encryption / decryption-related operation are configured simultaneously, the integrity-related information and the encryption / decryption-related information are sent to the hardware processing system in a specified order, respectively, including: When the configuration type information indicates that the integrity-related operation and the encryption / decryption-related operation are configured at the same time, and the data direction information indicates that the integrity protection operation is configured as downlink, the integrity protection data packet, the context code stream, and the context pointer are sent to the hardware processing system, so that the hardware processing system performs the integrity protection operation, and returns a first processing result data packet when the integrity protection operation is completed, wherein the first processing result data packet includes a processing result of the integrity protection operation, the context pointer, and a storage address of the processing result of the integrity protection operation; When the operation adaptation layer receives the first processing result data packet, the encrypted data packet, the context code stream, and the context pointer are sent to the hardware processing system so that the hardware processing system performs the encryption operation, and returns a second processing result data packet when the encryption operation is completed, wherein the second processing result data packet includes the encryption operation processing result, the context pointer, and the storage address of the encryption operation processing result.

4. The method according to claim 1, It is characterized in that The integrity-related operation includes an integrity protection check operation, the encryption / decryption-related operation includes a decryption operation, the integrity-related data packet includes an integrity protection check data packet, and the encryption / decryption-related data packet includes a decryption data packet; When the configuration type information indicates that the integrity-related operation and the encryption / decryption-related operation are configured simultaneously, the integrity-related information and the encryption / decryption-related information are sent to the hardware processing system in a specified order, respectively, including: When the configuration type information indicates that the integrity-related operation and the encryption / decryption-related operation are configured at the same time, and the data direction information indicates that it is uplink, the decryption data packet, the context code stream, and the context pointer are sent to the hardware processing system, so that the hardware processing system performs the decryption operation, and returns a third processing result data packet when the decryption operation is completed, wherein the third processing result data packet includes the decryption operation processing result, the context pointer, and the storage address of the decryption operation processing result; When the operation adaptation layer receives the third processing result data packet, the integrity protection check data packet, the context code stream, and the context pointer are sent to the hardware processing system, so that the hardware processing system performs the integrity protection check operation, and returns a fourth processing result data packet when the integrity protection check operation is completed, wherein the fourth processing result data packet includes the integrity protection check operation processing result, the context pointer, and the storage address of the integrity protection check operation processing result.

5. The method according to claim 1, It is characterized in that The determining corresponding target context information according to the context pointer comprises: Obtain the correspondence between context information and pointers; The target context information corresponding to the context pointer is determined according to the context pointer and the corresponding relationship.

6. A communication processing device, It is characterized in that Applied to the operation adaptation layer, the device comprises: A first receiving module is used to receive configuration information sent by a protocol stack, wherein the configuration information includes a context pointer, a data packet to be processed, counting information of the data packet, a wireless sensor ID, data direction information for indicating data uplink or downlink, and configuration type information, wherein if the configuration type information indicates that integrity-related operations and encryption-decryption-related operations are configured at the same time, the data packets to be processed include integrity-related data packets and encryption-decryption-related data packets; A determination module, configured to determine corresponding target context information according to the context pointer, and generate a context code stream for identification by a hardware processing system according to the target context information, wherein the target context information includes the data direction information, the wireless sensor ID, an encryption key, a key length, a parameter length required for encryption, an encryption algorithm, and an integrity protection algorithm; a first sending module, configured to send integrity-related information and encryption / decryption-related information to a hardware processing system in a specified order, respectively, when the configuration type information indicates that the integrity-related operation and the encryption / decryption-related operation are configured simultaneously, so that the hardware processing system performs the integrity-related operation and the encryption / decryption-related operation respectively, wherein the integrity-related information includes the integrity-related data packet, the context code stream, and the context pointer, and the encryption / decryption-related information includes the encryption / decryption-related data packet, the context code stream, and the context pointer; The second sending module is used to send the processing result data packets sent by the hardware processing system to the protocol stack when the number of processing result data packets received is consistent with the number of operations indicated by the configuration type information, so that the protocol stack obtains the processing result.

7. The device according to claim 6, It is characterized in that The device also includes: a second receiving module, configured to receive initialization information sent by the protocol stack before the first receiving module receives the configuration information sent by the protocol stack, wherein the initialization information includes memory allocation information, queue depth information, the encryption algorithm, and the integrity protection algorithm; An application module, used to apply for memory according to the memory allocation information, and to apply for queue according to the queue depth information; A third receiving module is used to receive the target context information sent by the protocol stack, and store the target context information in the form of a queue in the applied memory, wherein the target context information is sent by the protocol stack to the operation adaptation layer after establishing wireless sensing; A generating module, used for generating the context pointer corresponding to the target context information; The third sending module is used to send the context pointer to the protocol stack.

8. The device according to claim 6, It is characterized in that The integrity-related operation includes an integrity protection operation, the encryption / decryption-related operation includes an encryption operation, the integrity-related data packet includes an integrity protection data packet, and the encryption / decryption-related data packet includes an encrypted data packet; The first sending module includes: a first sending submodule, configured to send the integrity protection data packet, the context code stream, and the context pointer to the hardware processing system when the configuration type information indicates that the integrity-related operation and the encryption / decryption-related operation are configured at the same time and the data direction information indicates that the data is downlink, so that the hardware processing system performs the integrity protection operation, and returns a first processing result data packet when the integrity protection operation is completed, wherein the first processing result data packet includes a processing result of the integrity protection operation, the context pointer, and a storage address of the processing result of the integrity protection operation; The second sending submodule is used to send the encrypted data packet, the context code stream, and the context pointer to the hardware processing system when the operation adaptation layer receives the first processing result data packet, so that the hardware processing system performs the encryption operation, and return a second processing result data packet when the encryption operation is completed, wherein the second processing result data packet includes the encryption operation processing result, the context pointer, and the storage address of the encryption operation processing result.

9. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the steps of the method described in any one of claims 1 to 5 are implemented.

10. An electronic device, It is characterized in that include: a memory having a computer program stored thereon; A processor, configured to execute the computer program in the memory to implement the steps of the method according to any one of claims 1 to 5.