File restoration method, device, equipment and computer readable storage medium
By separating data plane and control plane traffic packets in DPI devices and utilizing network interface card (NIC) queuing technology and blockchain storage, the forwarding and parsing functions are decoupled, solving the problem of tight coupling between parsing, identification, and restoration functions in DPI devices. This improves device performance and file restoration efficiency, and enhances security and traceability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-19
- Publication Date
- 2026-04-07
AI Technical Summary
In existing DPI devices, the parsing, identification, and reconstruction functions of the parsing server are tightly coupled, which affects the device's performance and efficiency.
By separating the raw bitstream into data plane and control plane traffic packets, and using network interface card RSS and Flow Director technology to allocate them to different queues, the forwarding and parsing functions are decoupled. Combined with blockchain storage, the security and traceability of file restoration are ensured.
It improves the throughput of the parsing server, ensures priority processing of latency-sensitive data traffic, and enhances the security and traceability of the file restoration process.
Smart Images

Figure CN116264571B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The embodiment of the present application relates to the technical field of computer communication, in particular to a file restoration method, a file restoration device, a file restoration equipment and a computer readable storage medium. BACKGROUND
[0002] The DPI (Deep Packet Inspection) device usually supports the function of file restoration of the user to the file carried in the upload, download or mail attachment, and the current common method is that the parsing server in the DPI device needs to be responsible for the functions of packet parsing, protocol identification and file restoration.
[0003] In the process of implementing the embodiment of the present application, the inventor finds that in the existing design, the parsing, identification and restoration functions in the parsing server are tightly coupled together, which seriously affects the performance and efficiency of the device. SUMMARY
[0004] In view of the above problems, the embodiment of the present application provides a file restoration method, device, equipment and computer storage medium, which overcomes the technical problem of low processing efficiency of file restoration in the prior art.
[0005] According to one aspect of the embodiment of the present application, a file restoration method is provided, and the method comprises:
[0006] Receiving an original code stream;
[0007] Separating the original code stream into a data plane traffic packet and a control plane traffic packet with file key field information;
[0008] Distributing the control plane traffic packet into a parsing group network card queue and distributing the data plane traffic packet into a forwarding group network card queue;
[0009] Performing parsing processing on the control plane traffic packet in the parsing group network card queue to obtain a control plane parsed packet;
[0010] Forwarding the data plane traffic packet in the forwarding group network card queue to a restoration server for file restoration processing to obtain a restored data plane packet;
[0011] Storing the control plane parsed packet and the restored data plane packet in association to obtain a restored file.
[0012] In an optional manner, before the control plane traffic packet is distributed into the parsing group network card queue and the data plane traffic packet is distributed into the forwarding group network card queue, the method further comprises:
[0013] Configuring a network card RSS and a Flow Director;
[0014] The method further comprises:
[0015] The control plane traffic message with file key field information is distributed to the parsing group network card queue through the Flow Director;
[0016] The data plane traffic message is distributed to the forwarding group network card queue through the RSS.
[0017] In an optional manner, the data plane traffic message is forwarded to the restoration server through the forwarding group network card queue for file restoration processing, and a restored data plane message is obtained, which comprises:
[0018] The service category of the data plane traffic message is determined;
[0019] According to the service category of the data plane traffic message and a preset forwarding priority rule, the data plane traffic message with high priority is preferentially forwarded to the restoration server.
[0020] In an optional manner, the control plane traffic message is parsed through the parsing group network card queue to obtain a control plane parsed message, which comprises:
[0021] The service category of the control plane traffic message is determined;
[0022] According to the service category of the control plane traffic message and a preset parsing priority rule, the control plane traffic message with high priority is preferentially parsed.
[0023] In an optional manner, after the service category of the control plane traffic message is determined, the method further comprises:
[0024] According to the service category of the control plane traffic message and a preset parsing priority rule, different bandwidths are allocated to the control plane traffic messages with different priority levels, and the lower the priority, the smaller the bandwidth. The control plane traffic message with low priority is rate-limited.
[0025] In an optional manner, after the control plane traffic message is parsed through the parsing group network card queue to obtain a control plane parsed message, the method further comprises:
[0026] The control plane parsed message is stored through a block chain;
[0027] The associating and storing of the control plane analysis packet and the restored data plane packet to obtain a restored file comprises: determining whether a control plane analysis packet matching the restored data plane packet is acquired.
[0028] If the matching control plane analysis packet is acquired, the matching control plane analysis packet and the corresponding restored data plane packet are associated and stored in a block chain to obtain a restored file.
[0029] In an optional manner, after the restored file is obtained, the method further comprises:
[0030] receiving a query request;
[0031] accessing the block chain;
[0032] acquiring the restored file;
[0033] If the restored file is successfully acquired, a file access record is written in the form of a block.
[0034] According to another aspect of the embodiment of the present application, a file restoration device is provided, which comprises an analysis server, a traffic analysis module, a traffic forwarding module, a file restoration module and an associated storage module.
[0035] The analysis server is configured to receive an original code stream, distribute control plane traffic packets with file key field information in the original code stream to the traffic analysis module, and distribute data plane traffic packets of the original code stream to the traffic forwarding module.
[0036] The traffic analysis module is configured to receive the control plane traffic packet, analyze the control plane traffic packet, and obtain a control plane analysis packet.
[0037] The traffic forwarding module is configured to receive the data plane traffic packet, and forward the data plane traffic packet to the file restoration module.
[0038] The file restoration module is configured to receive the data plane traffic packet, perform file restoration processing on the data plane traffic packet, and obtain a restored data plane packet.
[0039] The associated storage module is configured to associate and store the control plane analysis packet and the restored data plane packet to obtain a restored file.
[0040] According to another aspect of the embodiment of the present application, a file restoration device is provided, which comprises a processor, a memory, a communication interface and a communication bus, and the processor, the memory and the communication interface complete communication with each other through the communication bus.
[0041] The memory is used to store at least one executable instruction that causes the processor to perform the steps of the file restoration method described above.
[0042] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein at least one executable instruction is stored therein, the executable instruction causing the processor to perform the steps of the file restoration method described above.
[0043] This invention utilizes the network card's RSS and Flow Director features, as well as CPU affinity, to decouple the forwarding and parsing functions during file restoration, reducing the overhead of software filtering packets. This fundamentally achieves the goal of divide and conquer among services, thereby improving the throughput of the parsing server.
[0044] Furthermore, by combining network interface card (NIC) multi-queue technology with traffic category quality of service (QoS), it is ensured that latency-sensitive data traffic types are processed with higher priority than latency-insensitive data traffic types throughout the entire process, thereby improving traffic parsing capabilities during file restoration.
[0045] Furthermore, by setting up a blockchain and leveraging its immutability, the security of the storage module's file data is guaranteed, thereby improving the security of the file restoration system. At the same time, information about upper-layer application systems accessing files is recorded and stored in the blockchain, ensuring that the information about upper-layer application systems accessing files is traceable, achieving the purpose of tracking and tracing the source, and effectively monitoring the security of upper-layer application systems accessing files.
[0046] The above description is merely an overview of the technical solutions of the embodiments of the present invention. In order to better understand the technical means of the embodiments of the present invention and to implement them in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the embodiments of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0047] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0048] Figure 1 A flowchart of the file restoration method provided in an embodiment of the present invention is shown;
[0049] Figure 2 This diagram illustrates a raw bitstream parsing and forwarding method provided by an embodiment of the present invention.
[0050] Figure 3 The following is a flowchart of a method for retrieving restored files provided by an embodiment of the present invention;
[0051] Figure 4 A schematic diagram of the file recovery device provided in an embodiment of the present invention is shown;
[0052] Figure 5 A schematic diagram of the file recovery device provided in an embodiment of the present invention is shown. Detailed Implementation
[0053] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this invention will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
[0054] Below, we will first explain the nouns:
[0055] RSS (Receive Side Scaling) is a network interface card (NIC) driver technology that enables efficient distribution of received packets among multiple CPUs in a multiprocessor system.
[0056] Flow Director technology is a technique that assigns packets to a specific queue based on precise field matching.
[0057] Figure 1 A flowchart illustrating an embodiment of the document restoration method of the present invention is shown. This method is applied to a computing device, which may be a computer device, such as a personal computer, tablet computer, server device, smart terminal, etc. Figure 1 As shown, the method includes the following steps:
[0058] Step 110: Receive the raw bitstream.
[0059] In this embodiment of the invention, the original bitstream refers to the decrypted bitstream, and it is assumed that all bitstreams are complete and valid binary streams. Specifically, receiving the original bitstream can be achieved by: receiving the original bitstream from the user end; the original bitstream passing through a Load Balancer (LB) cluster system; hashing the traffic according to the five-tuple of the traffic, i.e., the source IP address (Internet Protocol), source port, destination IP address, destination port, and transport layer protocol; and then evenly forwarding the traffic to each resolution server.
[0060] Step 120: Separate the original bitstream into data plane traffic packets and control plane traffic packets containing file key field information.
[0061] Specifically, the raw bitstream is separated into data plane traffic packets and control plane traffic packets containing key file field information. This can be achieved by: parsing the server to initialize the network interface card (NIC) configuration, setting the NIC's RSS and Flow Director functions according to the corresponding configuration information, and the raw bitstream parsing and forwarding process as follows: Figure 2 As shown.
[0062] After the parsing server receives the raw bitstream, the RSS network card calculates the hash value corresponding to the first preset keyword using a hash function. Then, the hash value is used to determine the data plane traffic packet by matching the preset hash value with the queue correspondence table, resulting in the corresponding forwarding network card queue. The first preset keyword can be set as a four-tuple of the data stream: source IP address, destination IP address, source port, and destination port. After the Flow Director network card receives the raw bitstream, it queries the preset Flow Director table according to the second preset keyword. After matching, it processes the data according to the action in the table entry, allocates control plane traffic packets, and obtains the corresponding parsing network card queue. The second preset keyword can be set as a four-tuple of the data stream: source IP address, destination IP address, source port, and destination port.
[0063] Step 130: Allocate the control plane traffic packets to the parsing group network card queue, and allocate the data plane traffic packets to the forwarding group network card queue.
[0064] The parsing network card queue and the forwarding network card queue are the packet sending and receiving queues of the parsing server. The parsing server sets the packet sending and receiving queue information of the network card, which is logically set as the parsing network card queue and the forwarding network card queue. The ratio of the number of queues in the parsing and forwarding network card queues is set according to the characteristics of the service type. The reserved memory space for sending and receiving packets is set, and the size of the sending and receiving packet queue is set.
[0065] like Figure 2 As shown, the resolution group network card queue consists of one or more resolution network card queues, each queue is bound to a control plane CPU core, and all control plane CPU cores form a control plane CPU core group; the forwarding group network card queue consists of one or more forwarding network card queues, each queue is bound to a data plane CPU core, and all data plane CPU cores form a data plane CPU core group.
[0066] Specifically, allocating the control plane traffic packets to the parsing network card queue can be achieved by using RSS load balancing to distribute the data plane traffic packets to the forwarding network card queue.
[0067] Specifically, allocating the data plane traffic packets to the forwarding network card queue can be achieved by using Flow Director to allocate control plane traffic packets containing file key field information to the designated parsing network card queue.
[0068] Step 140: Parse the control plane traffic packets in the parsing group network card queue to obtain control plane parsing packets; forward the data plane traffic packets in the forwarding group network card queue to the restoration server for file restoration processing to obtain restored data plane packets.
[0069] In this embodiment of the invention, the control plane traffic packets in the NIC queue of the parsing group are parsed to obtain control plane parsed packets. Specifically, the CPU core of the control plane parses the control plane traffic packets in the corresponding NIC queue to obtain the corresponding control plane parsed packets.
[0070] Specifically, the data plane traffic packets in the forwarding group network card queue are forwarded to the restoration server for file restoration processing to obtain the restored data plane packets. This can be achieved by the CPU core of the data plane forwarding the control plane traffic packets in the corresponding forwarding network card queue, and then the restored data plane packets are obtained after the file restoration is performed by the restoration server.
[0071] In some embodiments of the present invention, the data plane traffic packets in the forwarding group network card queue are forwarded to the restoration server for file restoration processing to obtain restored data plane packets. Specifically, the data plane traffic packets are a type of data stream, and the forwarding of the data plane traffic packets to the restoration server for file restoration processing to obtain restored data plane packets includes restoring the data stream to its original format.
[0072] Specifically, the control plane parsing message may include detailed information about a text file or an audio / video file. The detailed information for either the text file or the audio / video file may include the file name, file type, and file size.
[0073] Specifically, the restored data plane message may include: the restored text file or audio / video file itself.
[0074] In some embodiments of the present invention, parsing the control plane traffic packets in the parsing network interface card queue to obtain control plane parsing packets further includes:
[0075] Step 1411: Determine the service category of data plane traffic packets. The parsing server assigns different Quality of Service (QoS) levels to the forwarding group network interface card (NIC) queues. The NICs classify data flows into a specific service category based on a priority field, and assign different priority levels to different service categories.
[0076] Step 1412: Based on the service category of the data plane traffic packets and the preset forwarding priority rules, forward the data plane traffic packets with higher priority to the restoration server.
[0077] In some embodiments of the present invention, forwarding the data plane traffic packets in the forwarding group network card queue to the restoration server for file restoration processing to obtain restored data plane packets further includes:
[0078] Step 1421: Determine the service category of control plane traffic packets. The resolution server allocates different Quality of Service (QoS) levels to the network interface card (NIC) queues. The NICs classify data flows into a specific service category based on a priority field, and assign different priority levels to different service categories.
[0079] Step 1422: Based on the service category of the control plane traffic packets and the preset parsing priority rules, prioritize the service parsing of control plane traffic packets with higher priority.
[0080] Specifically, based on the service category of the control plane traffic packets and the preset parsing priority rules, different bandwidths are allocated to control plane traffic packets of different priority levels. The lower the priority, the smaller the bandwidth. Low-priority control plane traffic packets are rate-limited, while high-priority control plane traffic packets are given priority for service parsing.
[0081] Step 150: Associate and store the control plane parsed message with the restored data plane message to obtain the restored file.
[0082] In one embodiment of the present invention, the control plane parses the message through the blockchain storage, specifically: the information storage module stores the control plane parses the message; the restored file is stored through the blockchain storage, specifically: the file storage module stores the restored file.
[0083] The process involves associating and storing the control plane parsing message with the restored data plane message to obtain the restored file. This further includes: determining whether a control plane parsing message matching the restored data plane message has been obtained; if a matching control plane parsing message is obtained, it is associated with the corresponding restored data plane message and stored in the blockchain to obtain the restored file. Periodic verification is performed based on the corresponding control plane parsing message in the storage module. When the file restoration process is confirmed to be complete, the file is saved to the blockchain storage module. If a matching control plane parsing message cannot be obtained, the data plane message is temporarily cached, and a matching control plane parsing message is periodically retrieved from the storage module. If a matching control plane parsing message is not successfully retrieved after a specified period, the data plane message is discarded, and the cache is cleared.
[0084] In some embodiments of the present invention, users can query the restored files stored on the blockchain. Specifically, such as... Figure 3 As shown, after step 150, the method further includes:
[0085] Step 151: Receive the query request input by the user. The query request refers to the user's query request for the target file, which is the restored file. Receiving the query request can specifically involve the user operating the upper-layer application system of the blockchain to submit a query request for the restored file.
[0086] Step 152: Access the blockchain and query the target file. Upon receiving a user query request, the upper-layer application system searches the blockchain for the reconstructed file.
[0087] Step 153: If the restored file is successfully retrieved, write the file access record in the form of a block.
[0088] If the restored file is successfully obtained, it is written into the file access record in the form of a block. Specifically, if the restored file is successfully obtained, the file access record is written into the blockchain storage module in the form of a block. This block is saved to the access record storage module and added to the node's blockchain. The node updates the control plane parsing message corresponding to the restored file in its file storage module.
[0089] This invention utilizes the network card's RSS and Flow Director features, as well as CPU affinity, to decouple the forwarding and parsing functions during file restoration, reducing the overhead of software filtering packets. This fundamentally achieves the goal of divide and conquer among services, thereby improving the throughput of the parsing server.
[0090] Furthermore, by combining network interface card (NIC) multi-queue technology with traffic category quality of service (QoS), it is ensured that latency-sensitive data traffic types are processed with higher priority than latency-insensitive data traffic types throughout the entire process, thereby improving traffic parsing capabilities during file restoration.
[0091] Furthermore, by setting up a blockchain and leveraging its immutability, the security of the storage module's file data is guaranteed, thereby improving the security of the file restoration system. At the same time, information about upper-layer application systems accessing files is recorded and stored in the blockchain, ensuring that the information about upper-layer application systems accessing files is traceable, achieving the purpose of tracking and tracing the source, and effectively monitoring the security of upper-layer application systems accessing files.
[0092] Figure 4 A schematic diagram of an embodiment of the document restoration device of the present invention is shown. Figure 4 As shown, the device 200 includes: a parsing server 210, a traffic parsing module 220, a traffic forwarding module 230, a file restoration module 240, and an associated storage module 250.
[0093] The parsing server 210 is used to receive the raw bitstream, allocate the control plane traffic packets containing file key field information in the raw bitstream to the traffic parsing module, and allocate the data plane traffic packets in the raw bitstream to the traffic forwarding module.
[0094] The traffic parsing module 220 is used to receive the control plane traffic messages and parse the control plane traffic messages to obtain control plane parsing messages.
[0095] The traffic forwarding module 230 is used to receive data plane traffic packets and forward the data plane traffic packets to the file restoration module.
[0096] The file restoration module 240 is used to receive data plane traffic packets, perform file restoration processing on the data plane traffic packets, and obtain restored data plane packets.
[0097] The associated storage module 250 is used to associate and store the control plane parsed message with the restored data plane message to obtain the restored file.
[0098] In one optional approach, the method of allocating control plane traffic packets containing file key field information from the original bitstream to the traffic parsing module and allocating data plane traffic packets from the original bitstream to the traffic forwarding module further includes: configuring the network interface card RSS and Flow Director on the parsing server; the method of allocating control plane traffic packets containing file key field information from the original bitstream to the traffic parsing module and allocating data plane traffic packets from the original bitstream to the traffic forwarding module includes: allocating control plane traffic packets containing file key field information to the traffic parsing module through the FlowDirector; and allocating data plane traffic packets to the traffic forwarding module through the RSS.
[0099] In one optional manner, the traffic parsing module 220 is specifically used to: determine the service category of the control plane traffic packet; and, according to the service category of the control plane traffic packet and the preset parsing priority rules, perform service parsing on the control plane traffic packets with higher priority to obtain control plane parsed packets.
[0100] In one alternative approach, determining the service category of control plane traffic packets can specifically involve: the resolution server assigning different Quality of Service (QoS) to the resolution group network card queues, the network card classifying the data flow into a certain service category according to the priority field, and specifying different priority levels for different service categories.
[0101] In one optional approach, the step of prioritizing the service parsing of control plane traffic packets with higher priority based on the service category of the control plane traffic packets and a preset parsing priority rule can specifically be: allocating different bandwidths to control plane traffic packets of different priority levels according to the service category of the control plane traffic packets and the preset parsing priority rule, with lower priority receiving smaller bandwidths, rate limiting for low-priority control plane traffic packets, and prioritizing the service parsing of high-priority control plane traffic packets.
[0102] In one optional manner, the traffic forwarding module 230 is specifically used to: determine the service category of the data plane traffic packet; and, according to the service category of the data plane traffic packet and the preset forwarding priority rules, forward the data plane traffic packet with higher priority to the file restoration module.
[0103] In one alternative approach, determining the service category of data plane traffic packets can specifically involve: the parsing server assigning different Quality of Service (QoS) to the forwarding group network card queues, the network card classifying the data flow into a certain service category according to the priority field, and specifying different priority levels for different service categories.
[0104] In one optional manner, the file restoration module 240 is specifically used to: receive data plane traffic packets, perform file restoration processing on the data plane traffic packets, and obtain restored data plane packets.
[0105] In one optional approach, the associated storage module 250 is specifically used to: determine whether a control plane parsing message matching the restored data plane message is obtained; if a matching control plane parsing message is obtained, then the matching control plane parsing message is associated with and stored with the corresponding restored data plane message to obtain the restored file.
[0106] In one alternative embodiment, the device further includes a query module. The query module is specifically used to: receive a query request; access the blockchain; obtain the restored file; and if the restored file is successfully obtained, write it into the file access record in the form of a block.
[0107] It should be noted that the file recovery device provided in the embodiments of the present invention is a device capable of executing the above-described file recovery method. Therefore, all embodiments of the above-described file recovery method are applicable to this device and can achieve the same or similar beneficial effects.
[0108] This embodiment utilizes the network interface card's RSS and Flow Director features, along with CPU affinity, to decouple the forwarding and parsing functions during file restoration, reducing the overhead of software packet filtering. This fundamentally achieves the goal of divide and conquer among services, improving the throughput of the parsing server. Secondly, the network interface card's multi-queue technology, combined with traffic category quality of service (QoS), ensures that latency-sensitive data traffic types have a higher processing priority than latency-insensitive data traffic types throughout the entire process, improving the forwarding throughput and traffic parsing capabilities during file restoration.
[0109] Figure 5 The diagram shows a structural schematic of an embodiment of the file restoration device of the present invention. The specific embodiments of the present invention do not limit the specific implementation of the file restoration device.
[0110] like Figure 5 As shown, the file restoration device may include: processor 402, communications interface 404, memory 406, and communications bus 408.
[0111] The processor 402, communication interface 404, and memory 406 communicate with each other via communication bus 408. Communication interface 404 is used to communicate with other network elements such as clients or other servers. The processor 402 is used to execute program 410, specifically the file restoration method described in any of the above method embodiments.
[0112] Specifically, program 410 may include program code that includes computer operation instructions.
[0113] Processor 402 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The file recovery device includes one or more processors, which may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.
[0114] Memory 406 is used to store program 410. Memory 406 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0115] Specifically, program 410 can be called by processor 402 to cause the electronic device to perform the following operations:
[0116] Receive the raw bitstream;
[0117] The original bitstream is separated into data plane traffic packets and control plane traffic packets containing key file field information;
[0118] The control plane traffic packets are allocated to the parsing group network card queue, and the data plane traffic packets are allocated to the forwarding group network card queue;
[0119] The control plane traffic packets in the NIC queue of the resolution group are parsed to obtain control plane parsed packets;
[0120] The data plane traffic packets in the forwarding group network card queue are forwarded to the restoration server for file restoration processing to obtain the restored data plane packets;
[0121] The control plane parsed message is associated with the restored data plane message and stored to obtain the restored file.
[0122] In one alternative approach, before allocating the control plane traffic packets to the resolution network interface card (NIC) queue and the data plane traffic packets to the forwarding NIC queue, the method further includes:
[0123] Configure the network card's RSS and Flow Director;
[0124] The step of allocating the control plane traffic packets to the parsing group network card queue and the data plane traffic packets to the forwarding group network card queue includes:
[0125] Control plane traffic packets containing key file field information are distributed to the parsing group network card queue through the Flow Director;
[0126] Data plane traffic packets are distributed to the forwarding group network card queue via the RSS.
[0127] In one optional approach, the step of forwarding the data plane traffic packets to the restoration server via the forwarding network interface card queue for file restoration processing, to obtain the restored data plane packets, includes:
[0128] Determine the service category of the data plane traffic packets;
[0129] Based on the service category of the data plane traffic packets and the preset forwarding priority rules, the data plane traffic packets with higher priority are forwarded to the restoration server first.
[0130] In one optional approach, the step of parsing the control plane traffic packets through the parsing network interface card queue to obtain control plane parsed packets includes:
[0131] Determine the service category of the control plane traffic message;
[0132] Based on the service category of the control plane traffic packets and the preset parsing priority rules, the control plane traffic packets with higher priority are parsed first.
[0133] In an alternative approach, after determining the service category of the control plane traffic message, the method further includes:
[0134] Based on the service category of the control plane traffic packets and the preset parsing priority rules, different bandwidths are allocated to control plane traffic packets with different priority levels. The lower the priority, the smaller the bandwidth. The control plane traffic packets with low priority are rate-limited.
[0135] In one alternative approach, after parsing the control plane traffic packets through the parsing network interface card queue to obtain control plane parsed packets, the method further includes:
[0136] The control plane parsing messages are stored via blockchain;
[0137] The step of associating and storing the control plane parsing message with the restored data plane message to obtain the restored file includes: determining whether a control plane parsing message matching the restored data plane message has been obtained;
[0138] If a matching control plane parsing message is obtained, the matching control plane parsing message is associated with the corresponding restored data plane message and stored in the blockchain to obtain the restored file.
[0139] In an alternative approach, after obtaining the restored file, the method further includes:
[0140] Receive query requests;
[0141] Access the blockchain;
[0142] Obtain the restored file;
[0143] If the restored file is successfully retrieved, it will be written into the file access record in the form of a block.
[0144] This invention utilizes the network card's RSS and Flow Director features, as well as CPU affinity, to decouple the forwarding and parsing functions during file restoration, reducing the overhead of software filtering packets. This fundamentally achieves the goal of divide and conquer among services, thereby improving the throughput of the parsing server.
[0145] Furthermore, by combining network interface card (NIC) multi-queue technology with traffic category quality of service (QoS), it is ensured that latency-sensitive data traffic types are processed with higher priority than latency-insensitive data traffic types throughout the entire process, thereby improving traffic parsing capabilities during file restoration.
[0146] Furthermore, by setting up a blockchain and leveraging its immutability, the security of the storage module's file data is guaranteed, thereby improving the security of the file restoration system. At the same time, information about upper-layer application systems accessing files is recorded and stored in the blockchain, ensuring that the information about upper-layer application systems accessing files is traceable, achieving the purpose of tracking and tracing the source, and effectively monitoring the security of upper-layer application systems accessing files.
[0147] This invention provides a computer-readable storage medium storing at least one executable instruction that, when executed on an electronic device, causes the electronic device to perform the file restoration method described in any of the above method embodiments.
[0148] Executable instructions can be used to cause an electronic device to perform the following operations:
[0149] Receive the raw bitstream;
[0150] The original bitstream is separated into data plane traffic packets and control plane traffic packets containing key file field information;
[0151] The control plane traffic packets are allocated to the parsing group network card queue, and the data plane traffic packets are allocated to the forwarding group network card queue;
[0152] The control plane traffic packets in the NIC queue of the resolution group are parsed to obtain control plane parsed packets;
[0153] The data plane traffic packets in the forwarding group network card queue are forwarded to the restoration server for file restoration processing to obtain the restored data plane packets;
[0154] The control plane parsed message is associated with the restored data plane message and stored to obtain the restored file.
[0155] In one alternative approach, before allocating the control plane traffic packets to the resolution network interface card (NIC) queue and the data plane traffic packets to the forwarding NIC queue, the method further includes:
[0156] Configure the network card's RSS and Flow Director;
[0157] The step of allocating the control plane traffic packets to the parsing group network card queue and the data plane traffic packets to the forwarding group network card queue includes:
[0158] Control plane traffic packets containing key file field information are distributed to the parsing group network card queue through the Flow Director;
[0159] Data plane traffic packets are distributed to the forwarding group network card queue via the RSS.
[0160] In one optional approach, the step of forwarding the data plane traffic packets to the restoration server via the forwarding network interface card queue for file restoration processing, to obtain the restored data plane packets, includes:
[0161] Determine the service category of the data plane traffic packets;
[0162] Based on the service category of the data plane traffic packets and the preset forwarding priority rules, the data plane traffic packets with higher priority are forwarded to the restoration server first.
[0163] In one optional approach, the step of parsing the control plane traffic packets through the parsing network interface card queue to obtain control plane parsed packets includes:
[0164] Determine the service category of the control plane traffic message;
[0165] Based on the service category of the control plane traffic packets and the preset parsing priority rules, the control plane traffic packets with higher priority are parsed first.
[0166] In an alternative approach, after determining the service category of the control plane traffic message, the method further includes:
[0167] Based on the service category of the control plane traffic packets and the preset parsing priority rules, different bandwidths are allocated to control plane traffic packets with different priority levels. The lower the priority, the smaller the bandwidth. The control plane traffic packets with low priority are rate-limited.
[0168] In one alternative approach, after parsing the control plane traffic packets through the parsing network interface card queue to obtain control plane parsed packets, the method further includes:
[0169] The control plane parsing messages are stored via blockchain;
[0170] The step of associating and storing the control plane parsing message with the restored data plane message to obtain the restored file includes: determining whether a control plane parsing message matching the restored data plane message has been obtained;
[0171] If a matching control plane parsing message is obtained, the matching control plane parsing message is associated with the corresponding restored data plane message and stored in the blockchain to obtain the restored file.
[0172] In an alternative approach, after obtaining the restored file, the method further includes:
[0173] Receive query requests;
[0174] Access the blockchain;
[0175] Obtain the restored file;
[0176] If the restored file is successfully retrieved, it will be written into the file access record in the form of a block.
[0177] This invention provides a file recovery apparatus for performing the above-described file recovery method.
[0178] This invention provides a file recovery computer program that can be invoked by a processor to enable an electronic device to execute the file recovery method described in any of the above method embodiments.
[0179] This invention provides a computer program product, which includes a computer program stored on a computer-readable storage medium. The computer program includes program instructions, which, when executed on a computer, cause the computer to perform the file restoration method described in any of the above method embodiments.
[0180] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings herein. The required structure for constructing such systems is apparent from the above description. Furthermore, the embodiments of the present invention are not directed to any particular programming language. It should be understood that the content of the invention described herein can be implemented using various programming languages, and the above description of specific languages is for the purpose of disclosing the best mode of implementation of the invention.
[0181] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.
[0182] Similarly, it should be understood that, in order to simplify the invention and aid in understanding one or more of the various inventive aspects, features of the embodiments of the invention are sometimes grouped together in a single embodiment, figure, or description thereof in the above description of exemplary embodiments of the invention. However, this disclosure should not be construed as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as reflected in the following claims, inventive aspects lie in fewer than all features of a single foregoing disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into this detailed description, wherein each claim itself is a separate embodiment of the invention.
[0183] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.
[0184] Furthermore, those skilled in the art will understand that although some embodiments herein include certain features included in other embodiments but not others, combinations of features from different embodiments are intended to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination.
[0185] It should be noted that the above embodiments are illustrative of the invention and not restrictive, and that those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be construed as limiting the order of execution.
Claims
1. A file recovery method, characterized in that, The method includes: Receive the raw bitstream; The original bitstream is separated into data plane traffic packets and control plane traffic packets containing key file field information; The control plane traffic packets are allocated to the parsing group network card queue, and the data plane traffic packets are allocated to the forwarding group network card queue; The control plane traffic packets in the NIC queue of the resolution group are parsed to obtain control plane parsed packets; The data plane traffic packets in the forwarding group network card queue are forwarded to the restoration server for file restoration processing to obtain restored data plane packets; the restored data plane packets include the restored text file or audio / video file body; The control plane parsing message is associated with the restored data plane message and stored to obtain the restored file; if a matching control plane parsing message cannot be obtained, the data plane message is temporarily cached and a matching control plane parsing message is obtained periodically. If a matching control plane parsing message is not successfully obtained after a specified period, the data plane message is discarded and the cache is cleared. The step of forwarding the data plane traffic packets in the forwarding group network card queue to the restoration server for file restoration processing, and obtaining the restored data plane packets, further includes: Determine the service category of the data plane traffic packets; Based on the service category of the data plane traffic packets and the preset forwarding priority rules, the data plane traffic packets with higher priority are forwarded to the restoration server first.
2. The method according to claim 1, characterized in that, Before allocating the control plane traffic packets to the parsing group network interface card queue and the data plane traffic packets to the forwarding group network interface card queue, the method further includes: Configure the network card's RSS and Flow Director; The step of allocating the control plane traffic packets to the parsing group network card queue and the data plane traffic packets to the forwarding group network card queue includes: Control plane traffic packets containing key file field information are distributed to the parsing group network card queue through the Flow Director; Data plane traffic packets are distributed to the forwarding group network card queue via the RSS.
3. The method according to claim 1, characterized in that, The process of parsing the control plane traffic packets in the NIC queue to obtain control plane parsed packets includes: Determine the service category of the control plane traffic message; Based on the service category of the control plane traffic packets and the preset parsing priority rules, the control plane traffic packets with higher priority are parsed first.
4. The method according to claim 3, characterized in that, After determining the service category of the control plane traffic packet, the method further includes: Based on the service category of the control plane traffic packets and the preset parsing priority rules, different bandwidths are allocated to control plane traffic packets with different priority levels. The lower the priority, the smaller the bandwidth, so as to limit the rate of control plane traffic packets with low priority.
5. The method according to claim 1, characterized in that, After parsing the control plane traffic packets in the NIC queue to obtain control plane parsed packets, the method further includes: The control plane parsing messages are stored via blockchain; The step of associating and storing the control plane parsed message with the restored data plane message to obtain the restored file includes: Determine whether a control plane parsing message matching the restored data plane message has been obtained; If a matching control plane parsing message is obtained, the matching control plane parsing message is associated with the corresponding restored data plane message and stored in the blockchain to obtain the restored file.
6. The method according to claim 5, characterized in that, After obtaining the restored file, the method further includes: Receive query requests; Access the blockchain; Obtain the restored file; If the restored file is successfully retrieved, it will be written into the file access record in the form of a block.
7. A document restoration device, characterized in that, The device includes: a parsing server, a traffic parsing module, a traffic forwarding module, a file restoration module, and an associated storage module; The parsing server is used to receive the raw bitstream, allocate the control plane traffic packets containing file key field information in the raw bitstream to the traffic parsing module, and allocate the data plane traffic packets of the raw bitstream to the traffic forwarding module; The traffic parsing module is used to receive the control plane traffic packets and parse the control plane traffic packets to obtain control plane parsed packets; The traffic forwarding module is used to receive the data plane traffic packets and forward the data plane traffic packets to the file restoration module; The file restoration module is used to receive the data plane traffic packets, perform file restoration processing on the data plane traffic packets, and obtain restored data plane packets; the restored data plane packets include the restored text file or audio / video file body; The associated storage module is used to associate and store the control plane parsing message with the restored data plane message to obtain the restored file; if a matching control plane parsing message cannot be obtained, the data plane message is temporarily cached, and a matching control plane parsing message is obtained periodically. If a matching control plane parsing message is not successfully obtained after a specified period, the data plane message is discarded and the cache is cleared. The traffic forwarding module is further used for: Determine the service category of the data plane traffic packets; Based on the service category of the data plane traffic packets and the preset forwarding priority rules, the data plane traffic packets with higher priority are forwarded to the file restoration module first.
8. A file recovery device, comprising: The processor, memory, communication interface, and communication bus are provided, wherein the processor, memory, and communication interface communicate with each other via the communication bus. The memory is used to store at least one executable instruction that causes the processor to perform the steps of the file restoration method according to any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one executable instruction that causes a processor to perform the steps of the file restoration method according to any one of claims 1-6.
Citation Information
Patent Citations
Code stream transmission method and device based on 5GSA network
CN112105056A
Message processing method, device and system
CN112152940A