Data packet processing method and device, client terminal equipment and server
By receiving and decrypting the encrypted data blocks sent by the server in preset order on the client terminal device, and deleting the data blocks after the decryption is completed, the problem of excessive storage space occupied during the upgrade of the client terminal device is solved, and more efficient Storage resource utilization.
Patent Information
- Application Number
- CN202311066966.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-23
- Publication Date
- 2025-02-25
AI Technical Summary
There is a problem of excessive storage space occupied by client terminal devices during the upgrade process.
By receiving the data packets sent by the server, the data packets include multiple encrypted data blocks, these encrypted data blocks are decrypted in a preset order, and the corresponding encrypted data blocks are deleted when decryption of each encrypted data block is completed.
This greatly reduces the storage space occupied by the client terminal device during the data packet decryption process, and avoids the problem of excessive storage space occupied during the upgrade of the client terminal device.
Smart Images

Figure CN119519997A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a data packet processing method, device, client terminal equipment and server. Background Art
[0002] As a wireless access device, the Customer Premise Equipment (CPE) converts wireless cellular signals into wireless LAN / LAN data and provides data pipeline services. However, due to software quality issues or changes in specific services, CPE needs to perform firmware over-the-air (FOTA) upgrades to ensure normal use by users.
[0003] In the conventional technology, the CPE is connected to the FOTA server through the network to download the upgrade package, and the upgrade package is used for the upgrade. However, in the conventional technology, there is a problem that too much CPE storage space is occupied during the CPE upgrade process. Summary of the invention
[0004] The embodiments of the present application provide a data packet processing method, apparatus, client terminal equipment and server, which can avoid the problem of excessive occupation of CPE storage space during CPE upgrade.
[0005] In a first aspect, an embodiment of the present application provides a data packet processing method, which is applied to a client terminal device, and the method includes:
[0006] Receiving a data packet sent by a server; the data packet includes a plurality of encrypted data blocks;
[0007] The plurality of encrypted data blocks are decrypted in a preset order, and the corresponding encrypted data block is deleted when the decryption of each encrypted data block is completed.
[0008] In a second aspect, an embodiment of the present application provides a data packet processing method, which is applied to a server, and the method includes:
[0009] Encrypting the initial data packet in groups in order from the end to the beginning to obtain a data packet including a plurality of encrypted data blocks;
[0010] The data packet is sent to a client terminal device so that the client terminal device decrypts the multiple encrypted data blocks in a preset order, and deletes the corresponding encrypted data block when the decryption of each encrypted data block is completed.
[0011] In a third aspect, an embodiment of the present application provides a data packet processing device, which is applied to a client terminal device, and the device includes:
[0012] A receiving module, used for receiving a data packet sent by a server; the data packet includes a plurality of encrypted data blocks;
[0013] The processing module is used to decrypt the multiple encrypted data blocks in a preset order and delete the corresponding encrypted data block when the decryption of each encrypted data block is completed.
[0014] In a fourth aspect, an embodiment of the present application provides a data packet processing device, applied to a server, the device comprising:
[0015] The encryption module is used to encrypt the initial data packet in groups in the order from the end to the beginning to obtain a data packet including a plurality of encrypted data blocks;
[0016] The first sending module is used to send the data packet to the client terminal device, so that the client terminal device decrypts the multiple encrypted data blocks according to a preset order, and deletes the corresponding encrypted data block when the decryption of each encrypted data block is completed.
[0017] In a fifth aspect, an embodiment of the present application provides a client terminal device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the data packet processing method described in the first aspect.
[0018] In a sixth aspect, an embodiment of the present application provides a server, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the data packet processing method described in the second aspect.
[0019] In a seventh aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method described in the first aspect and the second aspect are implemented.
[0020] In an eighth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the method described in the first aspect and the second aspect.
[0021] The above-mentioned data packet processing method, device, client terminal device and server, since the data packet sent by the server and received by the client terminal device includes multiple encrypted data blocks, the client terminal device can decrypt the multiple encrypted data blocks separately in a preset order, and delete the corresponding encrypted data block when the decryption of each encrypted data block is completed. In this way, during the upgrade of the client terminal device, only the storage space corresponding to each encrypted data block is redundantly occupied. Compared with the traditional technology that occupies the storage space corresponding to the entire data packet, this solution greatly reduces the storage space occupied by the client terminal device during the data packet decryption process, and avoids the problem of excessive occupation of the storage space of the client terminal device during the upgrade of the client terminal device. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0023] Figure 1 An application environment diagram of a data packet processing method in one embodiment;
[0024] Figure 2 is a flow chart of a data packet processing method in one embodiment;
[0025] Figure 3 A schematic diagram of a process of making an encrypted upgrade image by a server in an embodiment;
[0026] Figure 4 A schematic diagram of a process of decrypting and upgrading an image on a client terminal device in one embodiment;
[0027] Figure 5 is a flow chart of a data packet processing method in another embodiment;
[0028] Figure 6 is a flow chart of a data packet processing method in another embodiment;
[0029] Figure 7 is a flow chart of a data packet processing method in one embodiment;
[0030] Figure 8 is a flow chart of a data packet processing method in one embodiment;
[0031] Fig. 9 is a structural block diagram of a data packet processing device in one embodiment;
[0032] Fig.10is a structural block diagram of a data packet processing device in another embodiment;
[0033] Fig.11 is a structural block diagram of a data packet processing device in another embodiment;
[0034] Fig.12 is a structural block diagram of a data packet processing device in one embodiment;
[0035] Fig.13 is a structural block diagram of a data packet processing device in another embodiment;
[0036] Fig.14 A schematic diagram of the internal structure of a client terminal device in one embodiment;
[0037] Fig.15 FIG. 1 is a schematic diagram of the internal structure of a server in an embodiment. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0039] The data packet processing method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the client terminal device 102 communicates with the server 104 through the network. The data storage system can store the initial data packets that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. Among them, the client terminal device 102 serves as a wireless access device, converts the wireless cellular signal into wireless LAN / LAN data, and provides data pipeline services. The server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.
[0040] First of all, it should be noted that due to software quality issues or specific service changes, the CPE needs to use the Firmware Over-The-Air (FOTA) technology to upgrade the system to ensure normal use by users. The FOTA upgrade package consists of a header and an upgrade image, which is stored on the FOTA server. The CPE connects to the FOTA server through the network to download the upgrade package. Usually, the upgrade image is encrypted as a whole. After the CPE downloads the upgrade package, it needs to decrypt the upgrade image before upgrading. After the decryption is completed, the storage space contains both the encrypted image and the decrypted image. An upgrade image generally exceeds 100MB. Since the upgrade image is decrypted as a whole in the CPE, the storage space contains both the encrypted image and the decrypted image after the upgrade image is decrypted. The redundant space required by the CPE is at least 100MB, resulting in a waste of CPE storage resources and excessive occupation of CPE storage space.
[0041] In one embodiment, Figure 2 As shown, a data packet processing method is provided, which is applied to Figure 1 The client terminal device in the example is used as an example to illustrate, including the following steps:
[0042] S201, receiving a data packet sent by a server; the data packet includes a plurality of encrypted data blocks.
[0043] Among them, the data packet can be a data packet of any application in the customer terminal equipment (Customer Premise Equipment, CPE). As an optional implementation, the data packet in the embodiment of the present application can be an air download technology (Firmware Over-The-Air, FOTA) data packet.
[0044] Optionally, in this embodiment, the client terminal device may send a request to the server to obtain the data packet from the server when an upgrade is required; or, the server may periodically send the data packet to the client terminal device according to a preset sending cycle.
[0045] Optionally, the multiple encrypted data blocks included in the data packet in this embodiment can be obtained by the server dividing the initial data packet into multiple data blocks and then encrypting the divided multiple data blocks respectively. Optionally, in this embodiment, the data volume of each encrypted data block can be determined according to a preset threshold, that is, the server can divide the initial data packet into multiple data blocks according to the preset threshold, and then encrypt the divided multiple data blocks respectively to obtain the above-mentioned multiple encrypted data blocks.
[0046] S202, decrypting a plurality of encrypted data blocks in a preset order, and deleting a corresponding encrypted data block when the decryption of each encrypted data block is completed.
[0047] Optionally, in this embodiment, after the client terminal device receives a data packet including multiple encrypted data blocks sent by the server, the client terminal device can decrypt the multiple encrypted data blocks of the data packet in order from the beginning to the end of the data packet, and delete the corresponding encrypted data block when the decryption of each encrypted data block is completed, or, after the client terminal device receives a data packet including multiple encrypted data blocks sent by the server, the client terminal device can decrypt the multiple encrypted data blocks of the data packet in order from the end to the beginning of the data packet, and delete the corresponding encrypted data block when the decryption of each encrypted data block is completed.
[0048] For example, assuming that the data size of each encrypted data block is 10MB, you can start from the end of the encrypted image of the received data packet and decrypt it in units of 10MB. After each 10MB of data is decrypted, the decrypted encrypted data block is immediately deleted. The redundant space occupied in the client terminal device is 10MB. Compared with traditional technologies, the storage space occupied by the client terminal device is greatly reduced.
[0049] Optionally, in this embodiment, when decrypting multiple encrypted data blocks, the client terminal device may use a decryption algorithm that is symmetrical to the encryption algorithm of the encrypted data block to decrypt each encrypted data block.
[0050] In the above-mentioned data packet processing method, since the data packet sent by the server received by the client terminal device includes multiple encrypted data blocks, the client terminal device can decrypt the multiple encrypted data blocks separately according to a preset order, and delete the corresponding encrypted data block when the decryption of each encrypted data block is completed. In this way, during the upgrade of the client terminal device, only the storage space corresponding to each encrypted data block is redundantly occupied. Compared with the traditional technology that occupies the storage space corresponding to the entire data packet, this solution greatly reduces the storage space occupied by the client terminal device during the data packet decryption process, and avoids the problem of excessive occupation of the storage space of the client terminal device during the upgrade of the client terminal device.
[0051] In this embodiment, the detailed process of the client terminal device decrypting multiple encrypted data blocks in a preset order is described. In one embodiment, the multiple encrypted data blocks are arranged in sequence from the beginning to the end; the above S202 includes: step A, decrypting the multiple encrypted data blocks in order from the end to the beginning.
[0052] In this embodiment, after receiving the data packet, the client terminal device can decrypt the multiple encrypted data blocks in the received data packet in order from the end to the beginning. Accordingly, as an optional implementation, the above data packet can be obtained by the server grouping and encrypting the initial data packet in order from the end to the beginning. Optionally, in this embodiment, the data volume of each encrypted data block is related to the data volume of the available storage space of the client terminal device, that is, in this embodiment, the server can determine the grouping threshold for grouping the initial data packet according to the available storage space of the client terminal device, divide the initial data packet into multiple data blocks according to the grouping threshold, and then group and encrypt the divided multiple data blocks in order from the end to the beginning to obtain the above data packet.
[0053] It should be noted that the initial data packet generally includes a header and an upgrade image. When the initial data packet is encrypted, the upgrade image therein is mainly encrypted. For example, Figure 3 As shown, Figure 3 When making an encrypted upgrade image for a server, the image data is grouped in units of 10MB, and each group of data blocks in the initial data packet is encrypted in the order from the end to the beginning of the initial data packet. The encrypted data block size is consistent with the original data block size. After the upgrade image is encrypted, the header is added to form a complete upgrade package. Accordingly, Figure 4 As shown, Figure 4 The figure shows a process in which the client terminal device decrypts a plurality of encrypted data blocks in a received data packet in order from the end to the beginning to obtain a decrypted data block corresponding to each encrypted data block.
[0054] In this embodiment, the client terminal device decrypts multiple encrypted data blocks in the received data packet in order from the end to the beginning, which can ensure that each encrypted data block in the received data packet is decrypted in sequence, ensuring the integrity of the multiple encrypted data blocks in the data packet when decrypting, and preventing decryption omissions, thereby ensuring the integrity of the decrypted data blocks obtained.
[0055] When the server encrypts the multiple data blocks in the initial data packet, the encryption key may be used for encryption. As an optional implementation, when the client terminal device decrypts the multiple encrypted data blocks, the encryption key may be used for decrypting the multiple encrypted data blocks. Figure 5 As shown, the above step A includes:
[0056] S301, receiving the encryption key of the data packet sent by the server.
[0057] Optionally, in this embodiment, the server may use a symmetric encryption algorithm to encrypt multiple data blocks in the initial data packet. After encrypting the multiple data blocks of the initial data packet, the server may send an encryption key of the symmetric encryption algorithm to the client terminal device.
[0058] S302, decrypting multiple encrypted data blocks using the encryption key in order from the end to the beginning.
[0059] In this embodiment, after the client terminal device receives the encryption key of the above-mentioned data packet sent by the server, it can use the received encryption key to decrypt multiple encrypted data blocks in the data packet in order from the end to the beginning to obtain multiple decrypted data blocks corresponding to the data packet.
[0060] In this embodiment, the client terminal device can receive the encryption key corresponding to the data packet sent by the server, so that when decrypting multiple encrypted data blocks included in the data packet, the multiple encrypted data blocks in the data packet can be decrypted in order from the end to the beginning using the received encryption key, thereby ensuring the accuracy and integrity of the decryption of the encrypted data blocks, and obtaining the decrypted data blocks corresponding to each encrypted data block in the data packet completely and accurately.
[0061] In some scenarios, the client terminal device can also use the multiple decrypted data blocks obtained above to upgrade the client terminal device. Figure 6 As shown, the above method also includes:
[0062] S401, arranging and combining decrypted data blocks corresponding to a plurality of encrypted data blocks in a decryption order to obtain a decrypted data packet.
[0063] In this embodiment, after the client terminal device decrypts multiple encrypted data blocks in the data packet and obtains the decrypted data blocks corresponding to each encrypted data block, the decrypted data blocks corresponding to the multiple encrypted data blocks can be arranged and combined in the order of decryption, and the decrypted data blocks can be combined into a complete data packet to obtain the decrypted data packet. Optionally, the client terminal device can sequentially arrange and combine the decrypted data blocks corresponding to each encrypted data block in the order of decryption to obtain the above-mentioned decrypted data packet.
[0064] S402, upgrading the client terminal device using the decrypted data packet.
[0065] In this embodiment, after the client terminal device obtains the complete decrypted data packet, the client terminal device can be further upgraded and updated using the obtained complete decrypted data packet to update the software and services of the client terminal device.
[0066] In this embodiment, after the client terminal device arranges and combines the decrypted data blocks corresponding to the multiple encrypted data blocks in the data packet in the order of decryption, it can obtain a complete decrypted data packet, so that the client terminal device can be upgraded using the complete decrypted data packet, and the client terminal device can be updated and maintained in a timely manner, ensuring the availability of the client terminal device.
[0067] In one embodiment, Figure 7 As shown, a data packet processing method is provided, which is applied to Figure 1 The server in the example is used to illustrate the following steps:
[0068] S501, encrypting the initial data packet in groups in order from the end to the beginning to obtain a data packet including a plurality of encrypted data blocks.
[0069] Optionally, in the present embodiment, the data volume of each encrypted data block included in the data packet may be related to the data volume of the available storage space of the client terminal device, that is, in the present embodiment, the server may determine a grouping threshold for grouping the initial data packet based on the available storage space of the client terminal device, divide the initial data packet into multiple data blocks according to the grouping threshold, and then group and encrypt the multiple divided data blocks in order from the end to the beginning to obtain the above-mentioned data packet.
[0070] Optionally, in this embodiment, the server may use a symmetric encryption algorithm to encrypt multiple data blocks in the initial data packet. After encrypting the multiple data blocks of the initial data packet, the server may send the encryption key of the data packet to the client terminal device, so that the client terminal device can use the encryption key to decrypt the multiple encrypted data blocks in order from tail to head when decrypting the multiple encrypted data blocks in order from tail to head.
[0071] S502, sending a data packet to a client terminal device, so that the client terminal device decrypts a plurality of encrypted data blocks according to a preset order, and deletes the corresponding encrypted data block when the decryption of each encrypted data block is completed.
[0072] Among them, the data packet can be a data packet of any application in the customer terminal equipment (Customer Premise Equipment, CPE). As an optional implementation, the data packet in the embodiment of the present application can be an air download technology (Firmware Over-The-Air, FOTA) data packet.
[0073] Optionally, in this embodiment, when the client terminal device needs to be upgraded, the client terminal device sends an acquisition request to the server, and the server sends a data packet to the client terminal device based on the acquisition request; or, the server periodically sends data packets to the client terminal device according to a preset sending cycle.
[0074] Optionally, the multiple encrypted data blocks included in the data packet in this embodiment can be obtained by the server dividing the initial data packet into multiple data blocks and then encrypting the divided multiple data blocks respectively. Optionally, in this embodiment, the data volume of each encrypted data block can be determined by the server according to a preset threshold, that is, the server can divide the initial data packet into multiple data blocks according to the preset threshold, and then encrypt the divided multiple data blocks respectively to obtain the above-mentioned multiple encrypted data blocks.
[0075] Optionally, in this embodiment, after the client terminal device receives a data packet including multiple encrypted data blocks sent by the server, the client terminal device can decrypt the multiple encrypted data blocks of the data packet in order from the beginning to the end of the data packet, and delete the corresponding encrypted data block when the decryption of each encrypted data block is completed, or, after the client terminal device receives a data packet including multiple encrypted data blocks sent by the server, the client terminal device can decrypt the multiple encrypted data blocks of the data packet in order from the end to the beginning of the data packet, and delete the corresponding encrypted data block when the decryption of each encrypted data block is completed.
[0076] For example, assuming that the data size of each encrypted data block is 10MB, you can start from the end of the encrypted image of the received data packet and decrypt it in units of 10MB. After each 10MB of data is decrypted, the decrypted encrypted data block is immediately deleted. The redundant space occupied in the client terminal device is 10MB. Compared with traditional technologies, the storage space occupied by the client terminal device is greatly reduced.
[0077] Optionally, in this embodiment, when decrypting multiple encrypted data blocks, the client terminal device may use a decryption algorithm that is symmetrical to the encryption algorithm of the encrypted data block to decrypt each encrypted data block.
[0078] In the above-mentioned data packet processing method, since the data packet sent by the server to the client terminal device is a data packet including multiple encrypted data blocks obtained by the server grouping and encrypting the initial data packet in order from the end to the beginning, the client terminal device can decrypt the multiple encrypted data blocks respectively in a preset order after receiving the data packet, and delete the corresponding encrypted data block when the decryption of each encrypted data block is completed. In this way, during the upgrade process of the client terminal device, only the storage space corresponding to each encrypted data block is redundantly occupied. Compared with the traditional technology that occupies the storage space corresponding to the entire data packet, this scheme greatly reduces the storage space occupied by the client terminal device during the data packet decryption process, and avoids the problem of excessive occupation of the storage space of the client terminal device during the upgrade process of the client terminal device.
[0079] In order to facilitate the understanding of those skilled in the art, Figure 8 As shown, the data packet processing method provided by the present application is described in detail below in combination with a complete embodiment:
[0080] S1, the server encrypts the initial data packet in groups in order from the end to the beginning, and obtains a data packet including multiple encrypted data blocks.
[0081] S2, the server sends a data packet including a plurality of encrypted data blocks and an encryption key of an initial data packet to the client terminal device.
[0082] S3, the client terminal device receives the data packet and the encryption key of the data packet sent by the server.
[0083] S4, the client terminal device decrypts the multiple encrypted data blocks using the encryption key in order from the end to the beginning.
[0084] S5, the client terminal device arranges and combines the decrypted data blocks corresponding to the multiple encrypted data blocks in a decryption order to obtain a decrypted data packet.
[0085] S6, the client terminal device uses the decrypted data packet to upgrade the client terminal device.
[0086] It should be noted that for the descriptions in the above S1-S6, reference may be made to the relevant descriptions in the above embodiments, and the effects are similar, which will not be repeated in this embodiment.
[0087] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0088] Based on the same inventive concept, the embodiment of the present application also provides a data packet processing device for implementing the data packet processing method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in the one or more data packet processing device embodiments provided below can refer to the limitations of the data packet processing method above, and will not be repeated here.
[0089] In one embodiment, Fig. 9 As shown, a data packet processing device is provided, which is applied to a client terminal device. The device includes: a receiving module 10 and a processing module 11, wherein:
[0090] The receiving module 10 is used to receive a data packet sent by the server; the data packet includes a plurality of encrypted data blocks.
[0091] The processing module 11 is used to decrypt multiple encrypted data blocks according to a preset order, and delete the corresponding encrypted data block when the decryption of each encrypted data block is completed.
[0092] The data packet processing device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0093] Based on the above embodiments, Fig.10 As shown, optionally, the above-mentioned multiple encrypted data blocks are arranged in sequence from the beginning to the end; the above-mentioned processing module 11 includes: a processing unit 111, wherein:
[0094] The processing unit 111 is configured to decrypt the plurality of encrypted data blocks in order from the end to the beginning.
[0095] The data packet processing device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0096] On the basis of the above embodiment, optionally, the above processing unit 111 is used to receive the encryption key of the data packet sent by the server; and decrypt the multiple encrypted data blocks using the encryption key in order from the end to the beginning.
[0097] The data packet processing device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0098] Based on the above embodiments, Fig.11 As shown, optionally, the above device further includes: a combination module 12 and an upgrade module 13, wherein:
[0099] The combining module 12 is used to arrange and combine the decrypted data blocks corresponding to the multiple encrypted data blocks in a decryption order to obtain a decrypted data packet.
[0100] The upgrade module 13 is used to upgrade the client terminal device using the decrypted data packet.
[0101] The data packet processing device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0102] Based on the above embodiment, optionally, in one embodiment, the above data packet is an over-the-air download technology FOTA data packet; the data volume of each encrypted data block is related to the data volume of the available storage space of the client terminal device.
[0103] The data packet processing device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0104] Each module in the above-mentioned data packet processing device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.
[0105] In one embodiment, Fig.12 As shown, a data packet processing device is provided, which is applied to a server, and the device includes: an encryption module 20 and a first sending module 21, wherein:
[0106] The encryption module 20 is used to perform group encryption on the initial data packet in order from the end to the beginning to obtain a data packet including a plurality of encrypted data blocks.
[0107] The first sending module 21 is used to send a data packet to a client terminal device, so that the client terminal device decrypts multiple encrypted data blocks according to a preset order, and deletes the corresponding encrypted data block when the decryption of each encrypted data block is completed.
[0108] The data packet processing device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0109] Based on the above embodiments, Fig.13 As shown, optionally, the above device further includes: a second sending module 22, wherein:
[0110] The second sending module 22 is used to send the encryption key of the data packet to the client terminal device, so that the client terminal device can decrypt multiple encrypted data blocks in order from the end to the beginning using the encryption key.
[0111] The data packet processing device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0112] Each module in the above-mentioned data packet processing device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.
[0113] In one embodiment, a computer device is provided. The computer device may be a client terminal device, and its internal structure diagram may be as follows: Fig.14As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a network selection method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0114] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.15 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store initial data packets. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a data packet processing method is implemented.
[0115] Those skilled in the art will understand that Fig.14 , 15The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0116] In one embodiment, a client terminal device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0117] receiving a data packet sent by a server; the data packet includes a plurality of encrypted data blocks;
[0118] The plurality of encrypted data blocks are decrypted in a preset order, and the corresponding encrypted data block is deleted when the decryption of each encrypted data block is completed.
[0119] Optionally, the data volume of each encrypted data block is related to the data volume of available storage space of the client terminal device.
[0120] Optionally, the data packet is an over-the-air download technology FOTA data packet.
[0121] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0122] Decrypt multiple encrypted data blocks in order from the end to the beginning.
[0123] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0124] Receive the encryption key of the data packet sent by the server;
[0125] Decrypt multiple encrypted data blocks using the encryption key in order from the end to the beginning.
[0126] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0127] Arrange and combine the decrypted data blocks corresponding to the multiple encrypted data blocks in the order of decryption to obtain a decrypted data packet;
[0128] The client terminal equipment is upgraded using the decrypted data packet.
[0129] In one embodiment, a server is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0130] Encrypting the initial data packet in groups in order from the end to the beginning to obtain a data packet including a plurality of encrypted data blocks;
[0131] A data packet is sent to a client terminal device so that the client terminal device decrypts a plurality of encrypted data blocks in a preset order and deletes the corresponding encrypted data block when the decryption of each encrypted data block is completed.
[0132] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0133] The encryption key of the data packet is sent to the client terminal device so that the client terminal device can decrypt the multiple encrypted data blocks using the encryption key in a sequence from the end to the beginning.
[0134] In one embodiment, a computer-readable storage medium is provided, which is applied to a client terminal device and stores a computer program. When the computer program is executed by a processor, the following steps are implemented:
[0135] receiving a data packet sent by a server; the data packet includes a plurality of encrypted data blocks;
[0136] The plurality of encrypted data blocks are decrypted in a preset order, and the corresponding encrypted data block is deleted when the decryption of each encrypted data block is completed.
[0137] Optionally, the data volume of each of the above encrypted data blocks is related to the data volume of the available storage space of the client terminal device.
[0138] Optionally, the above data packet is an over-the-air download technology FOTA data packet.
[0139] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0140] Decrypt multiple encrypted data blocks in order from the end to the beginning.
[0141] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0142] Receive the encryption key of the data packet sent by the server;
[0143] Decrypt multiple encrypted data blocks using the encryption key in order from the end to the beginning.
[0144] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0145] Arrange and combine the decrypted data blocks corresponding to the multiple encrypted data blocks in the order of decryption to obtain a decrypted data packet;
[0146] The client terminal equipment is upgraded using the decrypted data packet.
[0147] In one embodiment, a computer-readable storage medium is provided, which is applied to a server and stores a computer program. When the computer program is executed by a processor, the following steps are implemented:
[0148] Encrypting the initial data packet in groups in order from the end to the beginning to obtain a data packet including a plurality of encrypted data blocks;
[0149] A data packet is sent to a client terminal device so that the client terminal device decrypts a plurality of encrypted data blocks in a preset order and deletes the corresponding encrypted data block when the decryption of each encrypted data block is completed.
[0150] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0151] The encryption key of the data packet is sent to the client terminal device so that the client terminal device can decrypt the multiple encrypted data blocks using the encryption key in a sequence from the end to the beginning.
[0152] In one embodiment, a computer program product is provided, which is applied to a client terminal device, including a computer program, which, when executed by a processor, implements the following steps:
[0153] receiving a data packet sent by a server; the data packet includes a plurality of encrypted data blocks;
[0154] The plurality of encrypted data blocks are decrypted in a preset order, and the corresponding encrypted data block is deleted when the decryption of each encrypted data block is completed.
[0155] Optionally, the data volume of each of the above encrypted data blocks is related to the data volume of the available storage space of the client terminal device.
[0156] Optionally, the above data packet is an over-the-air download technology FOTA data packet.
[0157] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0158] Decrypt multiple encrypted data blocks in order from the end to the beginning.
[0159] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0160] Receive the encryption key of the data packet sent by the server;
[0161] Decrypt multiple encrypted data blocks using the encryption key in order from the end to the beginning.
[0162] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0163] Arrange and combine the decrypted data blocks corresponding to the multiple encrypted data blocks in the order of decryption to obtain a decrypted data packet;
[0164] The client terminal equipment is upgraded using the decrypted data packet.
[0165] In one embodiment, a computer program product is provided, which is applied to a server and includes a computer program. When the computer program is executed by a processor, the following steps are implemented:
[0166] Encrypting the initial data packet in groups in order from the end to the beginning to obtain a data packet including a plurality of encrypted data blocks;
[0167] A data packet is sent to a client terminal device so that the client terminal device decrypts a plurality of encrypted data blocks in a preset order and deletes the corresponding encrypted data block when the decryption of each encrypted data block is completed.
[0168] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0169] The encryption key of the data packet is sent to the client terminal device so that the client terminal device can decrypt the multiple encrypted data blocks using the encryption key in a sequence from the end to the beginning.
[0170] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0171] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0172] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A data packet processing method, applied to a client terminal device, characterized in that: The method comprises: Receiving a data packet sent by a server; the data packet includes a plurality of encrypted data blocks; The plurality of encrypted data blocks are decrypted in a preset order, and the corresponding encrypted data block is deleted when the decryption of each encrypted data block is completed.
2. The method according to claim 1, characterized in that: The multiple encrypted data blocks are arranged in sequence from the beginning to the end; and the decrypting the multiple encrypted data blocks in a preset order includes: The plurality of encrypted data blocks are decrypted in order from the end to the beginning.
3. The method according to claim 2, characterized in that The decrypting the plurality of encrypted data blocks in order from the end to the beginning comprises: receiving an encryption key of the data packet sent by the server; The plurality of encrypted data blocks are decrypted using the encryption key in order from the end to the beginning.
4. The method according to claim 1, characterized in that: The method further comprises: Arrange and combine the decrypted data blocks corresponding to the multiple encrypted data blocks in a decryption order to obtain a decrypted data packet; The client terminal device is upgraded using the decrypted data packet.
5. The method according to any one of claims 1 to 4, characterized in that: The data packet is an over-the-air download technology FOTA data packet; the data volume of each encrypted data block is related to the data volume of the available storage space of the client terminal device.
6. A data packet processing method, applied to a server, characterized in that: The method comprises: Encrypting the initial data packet in groups in order from the end to the beginning to obtain a data packet including a plurality of encrypted data blocks; The data packet is sent to a client terminal device so that the client terminal device decrypts the multiple encrypted data blocks in a preset order, and deletes the corresponding encrypted data block when the decryption of each encrypted data block is completed.
7. The method according to claim 6, characterized in that The method further comprises: The encryption key of the data packet is sent to the client terminal device, so that the client terminal device can decrypt the multiple encrypted data blocks using the encryption key in a sequence from the end to the beginning.
8. A data packet processing device, applied to a client terminal device, characterized in that: The device comprises: A receiving module, used for receiving a data packet sent by a server; the data packet includes a plurality of encrypted data blocks; The processing module is used to decrypt the multiple encrypted data blocks in a preset order and delete the corresponding encrypted data block when the decryption of each encrypted data block is completed.
9. A data packet processing device, applied to a server, characterized in that: The device comprises: The encryption module is used to encrypt the initial data packet in groups in the order from the end to the beginning to obtain a data packet including a plurality of encrypted data blocks; The first sending module is used to send the data packet to the client terminal device, so that the client terminal device decrypts the multiple encrypted data blocks according to a preset order, and deletes the corresponding encrypted data block when the decryption of each encrypted data block is completed.
10. A client terminal device, comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the computer program is executed by the processor, the processor executes the steps of the data packet processing method according to any one of claims 1 to 5.
11. A server comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the computer program is executed by the processor, the processor executes the steps of the data packet processing method according to any one of claims 6 to 7.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.