Data processing method, chip, embedded device and vehicle

By selectively performing encryption or compression processing according to the amount of data in the data storage process and splitting data fragments, the problem of low storage efficiency in the prior art is solved, and data security and space saving are achieved, and it is suitable for data caching and persistent storage.

CN120491890APending Publication Date: 2025-08-15GUANGZHOU AUTOMOBILE GROUP CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510467597.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-14
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

Existing data storage technologies are difficult to take into account the needs of data security and space saving, and the storage efficiency is low.

Method used

Depending on the size of the data, encryption or compression processing strategies are selectively executed, and the data is divided into fragments for processing to meet the needs of different storage types.

Benefits of technology

It improves data processing efficiency, takes into account the purpose of data security and space saving, supports data caching and persistent storage, and is easy to promote.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120491890A_ABST
    Figure CN120491890A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing method, a chip, embedded equipment and a vehicle. The method comprises the steps of obtaining a data writing request, wherein first target data is unprocessed target data; when the data volume of the first target data is smaller than a preset data volume, executing a processing strategy corresponding to the target processing identifier, processing the first target data, and determining second target data; when the data volume of the first target data is not smaller than a preset data volume, segmenting the first target data into at least two data fragments, synchronously executing a processing strategy corresponding to the target processing identifier, respectively processing the at least two data fragments, and determining at least two pieces of second target data; and writing second target data into a storage space corresponding to the target storage type, wherein the second target data is processed target data. According to the method, the processing efficiency can be guaranteed, and the purposes of data security and / or space saving are taken into account.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data storage technology, and in particular to a data processing method, a chip, an embedded device and a vehicle. Background Art

[0002] Current data storage technologies are developing towards diversification, intelligence, security, and efficiency to accommodate the ever-increasing volume of data and complex data processing needs. However, existing data storage processes suffer from low data efficiency, making it difficult to balance data security and space conservation. Summary of the Invention

[0003] Embodiments of the present invention provide a data processing method, chip, embedded device, and vehicle to address the problems of low efficiency of existing data storage and difficulty in balancing data security and space saving.

[0004] A data processing method, comprising: Obtaining a write data request, the write data request including first target data, a target processing identifier, and a target storage type, the target processing identifier including at least one of an encryption identifier and a compression identifier, the first target data being unprocessed target data; When the data volume of the first target data is less than a preset data volume, executing a processing strategy corresponding to the target processing identifier, processing the first target data, and determining second target data; When the data volume of the first target data is not less than the preset data volume, the first target data is divided into at least two data segments, the processing strategy corresponding to the target processing identifier is synchronously executed, the at least two data segments are processed respectively, and at least two second target data are determined; The second target data is written into a storage space corresponding to the target storage type, where the second target data is processed target data.

[0005] Preferably, executing the processing strategy corresponding to the target processing identifier includes: When the target processing identifier includes a compression identifier, performing a compression operation; When the target processing identifier includes an encryption identifier, performing an encryption operation; When the target processing identifier includes a compression identifier and an encryption identifier, determining a target execution order corresponding to the compression identifier and the encryption identifier, and sequentially performing a compression operation and an encryption operation based on the target execution order; The performing of the compression operation includes: determining a target compression algorithm from at least one preset compression algorithm displayed on a target operation interface, obtaining a target compression parameter corresponding to the target compression algorithm, and compressing the input data based on the target compression algorithm and the target compression parameter; The performing of the encryption operation includes: determining a target encryption algorithm from at least one preset encryption algorithm displayed on a target operation interface, obtaining a target key corresponding to the target encryption algorithm, and encrypting input data based on the target encryption algorithm and the target key; The input data is the first target data or the data segment.

[0006] Preferably, writing the second target data into the storage space corresponding to the target storage type includes: When the target storage type is a temporary storage type, determining a data attribute corresponding to the first target data; Based on the data attribute, determining a cache space corresponding to the data attribute and a current data volume corresponding to the cache space in a cache disk; When the current data amount corresponding to the cache space is less than the maximum data amount corresponding to the cache space, writing the second target data into the cache space; When the current data volume corresponding to the cache space is not less than the maximum data volume corresponding to the cache space, the cache data with the earliest storage time in the cache space is deleted, and the second target data is written into the cache space.

[0007] Preferably, writing the second target data into the storage space corresponding to the target storage type includes: When the target storage type is a persistent storage type, determining a file storage path corresponding to the first target data; Based on the file storage path, determining a persistent space corresponding to the file storage path and a current data volume corresponding to the persistent space in the persistent storage disk; When the current data volume corresponding to the persistent space is less than the maximum data volume corresponding to the persistent space, writing the second target data into the persistent space; When the current data volume corresponding to the persistent space is not less than the maximum data volume corresponding to the persistent space, the storage file with the earliest storage time or the storage file with the lowest priority in the persistent space is deleted, and the second target data is written into the persistent space.

[0008] A data processing device, comprising: a write request acquisition module, configured to acquire a write data request, wherein the write data request includes first target data, a target processing identifier, and a target storage type, wherein the target processing identifier includes at least one of an encryption identifier and a compression identifier, and the first target data is unprocessed target data; a data processing module configured to, when the amount of the first target data is less than a preset amount, execute the processing strategy corresponding to the target processing identifier, process the first target data, and determine second target data; and, when the amount of the first target data is not less than the preset amount, divide the first target data into at least two data segments, synchronously execute the processing strategy corresponding to the target processing identifier, process the at least two data segments separately, and determine at least two second target data; The data writing module is used to write the second target data into the storage space corresponding to the target storage type, where the second target data is processed target data.

[0009] Before performing a write operation on the first target data, the data size of the first target data is compared with a preset data size. If the data size of the first target data is less than the preset data size, the first target data is directly processed without slicing, thereby helping to ensure its processing efficiency. If the data size of the first target data is not less than the preset data size, the first target data needs to be segmented to determine at least two data segments, and then the at least two data segments are processed simultaneously to improve its processing efficiency. The target processing identifier includes at least one of an encryption identifier and a compression identifier, which is used to implement encryption and / or compression processing of the first target data to achieve the purpose of both data security and space saving.

[0010] A data processing method, comprising: Obtaining a read data request, where the read data request includes a data index; Reading second target data corresponding to the data index from the storage space, determining a target processing identifier in the second target data, the target processing identifier including at least one of a compression identifier and an encryption identifier, and the second target data being processed target data; When the number of the second target data is one, executing the inverse processing strategy corresponding to the target processing identifier, performing inverse processing on the second target data to determine the first target data, where the first target data is unprocessed target data; When the number of the second target data is at least two, the inverse processing strategy corresponding to the target processing identifier is synchronously executed, the at least two second target data are inversely processed, at least two data fragments are determined, and the at least two data fragments are spliced together to form the first target data.

[0011] Preferably, executing the inverse processing strategy corresponding to the target processing identifier includes: When the target processing identifier includes a compression identifier, performing a decompression operation; When the target processing identifier includes an encryption identifier, performing a decryption operation; When the target processing identifier includes a compression identifier and an encryption identifier, determining a target execution order corresponding to the compression identifier and the encryption identifier, and sequentially performing a decompression operation and a decryption operation based on the target execution order; The performing of the decompression operation includes: determining a target compression algorithm and target compression parameters from the second target data, and decompressing the second target data based on a decompression algorithm and target compression parameters corresponding to the target compression algorithm; The performing of the decryption operation includes: determining a target encryption algorithm from the second target data, receiving a target key input by a user, and decrypting the second target data based on a decryption algorithm and a target key corresponding to the target encryption algorithm.

[0012] A data processing device, comprising: A read request acquisition module, configured to acquire a read data request, wherein the read data request includes a data index; a data reading module, configured to read second target data corresponding to the data index from a storage space, determine a target processing identifier in the second target data, the target processing identifier including at least one of a compression identifier and an encryption identifier, and the second target data being processed target data; A data inverse processing module is used to, when the number of the second target data is one, execute the inverse processing strategy corresponding to the target processing identifier, inversely process the second target data, and determine the first target data, where the first target data is the unprocessed target data; when the number of the second target data is at least two, synchronously execute the inverse processing strategy corresponding to the target processing identifier, inversely process at least two of the second target data, determine at least two data fragments, and splice the at least two data fragments to form the first target data.

[0013] In this example, the second target data is first determined from the storage space based on the data index; when the number of the second target data is one, the second target data is directly inversely processed to ensure the reading efficiency of the first target data with a smaller data volume; when the number of the second target data is at least two, at least two second target data are simultaneously inversely processed to determine at least two data fragments, and then the at least two data fragments are spliced into the first target data, thereby ensuring the reading efficiency of the first target data with a larger data volume.

[0014] A processing chip includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the above-mentioned data processing method is implemented.

[0015] An embedded device comprises the above-mentioned processing chip, a cache disk and a persistent storage disk connected to the processing chip.

[0016] A vehicle comprises an on-board controller and the above-mentioned embedded device, wherein the on-board controller is connected to the embedded device.

[0017] The above-mentioned data processing methods, chips, embedded devices and vehicles support both data caching and local persistent storage of data, that is, data file storage, and are well compatible with both scenarios. At the same time, they can perform lossless compression on the data to ensure less data space. For scenarios with data privacy requirements, they support data encryption and decryption operations, and the operation process can be performed according to the display content of the target operation interface. The operation is easy and the learning cost is low, which is conducive to promotion and application. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0019] Figure 1 is a flow chart of a data processing method according to an embodiment of the present invention; Figure 2 is another flow chart of a data processing method according to an embodiment of the present invention; Figure 3 is a principle block diagram of a data processing device in one embodiment of the present invention; Figure 4 is another principle block diagram of a data processing device according to an embodiment of the present invention; Figure 5 is a schematic diagram of a data processing method according to an embodiment of the present invention; Figure 6 It is a structural diagram of an embedded device in one embodiment of the present invention. DETAILED DESCRIPTION

[0020] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0021] The embodiment of the present invention provides a data processing method, which is described by taking the data processing method applied to a processing chip as an example. Figure 1 As shown, the data processing method includes: S11: Obtain a write data request, where the write data request includes first target data, a target processing identifier, and a target storage type, where the target processing identifier includes at least one of an encryption identifier and a compression identifier, and the first target data is unprocessed target data; S12: When the data volume of the first target data is less than the preset data volume, executing the processing strategy corresponding to the target processing identifier, processing the first target data, and determining the second target data; S13: When the data volume of the first target data is not less than a preset data volume, the first target data is divided into at least two data segments, and a processing strategy corresponding to the target processing identifier is synchronously executed to process the at least two data segments respectively to determine at least two second target data; S14: Writing the second target data into the storage space corresponding to the target storage type, where the second target data is the processed target data.

[0022] The write data request is a request for triggering a write data operation. The first target data refers to the data to be processed. The target processing identifier is an identifier for indicating the execution of different processing operations. The target processing identifier includes at least one of an encryption identifier and a compression identifier. The encryption identifier is used to indicate the encryption operation of the data to ensure data security and privacy protection; the compression identifier is used to indicate the compression of the first target data to save storage space. The target storage type refers to the type of data storage, which can be a temporary storage type or a persistent storage type.

[0023] The data volume of the first target data represents the size of the first target data. A larger data volume indicates a longer processing time, while a smaller data volume indicates a shorter processing time. The preset data volume is a pre-set data volume used to assess whether the data volume of the first target data meets the larger standard.

[0024] As an example, in step S11, the processing chip can receive a write data request triggered by a user. The write data request includes a write instruction, which is used to instruct to write the first target data to the disk. It also includes the first target data corresponding to the write instruction, the target processing identifier and the target storage type. The first target data here refers to the data that needs to be written to the disk, the target processing identifier is used to indicate what kind of processing needs to be performed on the data before the data is written, and the target storage type is used to indicate what type of disk the data is to be written to.

[0025] As an example, in step S12, the processing chip can determine the data volume of the first target data. When the data volume of the first target data is less than the preset data volume, it is determined that the first target data to be written to the disk is small, and its processing process takes a short time and will not affect the storage efficiency of the first target data. Therefore, the processing strategy corresponding to the target processing identifier can be directly executed to process the first target data, and the processed data can be determined as the second target data.

[0026] As an example, in step S13, the processing chip may determine the data size of the first target data. If the data size of the first target data is not less than a preset data size, it is determined that the first target data to be written to the disk is large, and the serial processing process is time-consuming, which will affect the storage efficiency of the first target data. Therefore, it is necessary to split the first target data into at least two data segments. Then, the processing strategy corresponding to the target processing identifier is synchronously executed to process the at least two data segments separately and determine the second target data corresponding to the at least two data segments. In this example, if the first target data is large, it is split into at least two data segments and the at least two data segments are processed synchronously, which helps improve the processing efficiency of the first target data.

[0027] In this example, the target processing identifier includes at least one of an encryption identifier and a compression identifier. When executing the processing strategy corresponding to the target processing identifier, the processing chip can determine that the user has a processing requirement for encryption and / or compression of the first target data, and can display a target operation interface on a screen connected to the processing chip. The target operation interface displays information related to at least one preset processing algorithm, allowing the user to determine the target processing algorithm from the at least one preset processing algorithm through the target operation interface and determine the target processing parameters corresponding to the target processing algorithm. The processing chip can receive target operation data input by the user, the target operation data including the user determining the target processing algorithm from the at least one preset processing algorithm based on the at least one preset processing algorithm displayed on the target operation interface, and inputting the target processing parameters corresponding to the target processing algorithm accordingly. For example, when the target processing identifier is an encryption identifier, the preset processing algorithm displayed is the preset encryption algorithm, the selected target processing algorithm is the target encryption algorithm, and the corresponding target processing parameters are the control parameters related to the target encryption algorithm input by the user. For another example, when the target processing identifier is a compression identifier, the preset processing algorithm displayed is the preset compression algorithm, the selected target processing algorithm is the target compression algorithm, and the corresponding target processing parameters are the control parameters related to the target compression algorithm input by the user. After determining the target operation data, the processing chip can process the first target data or data fragment based on the target operation data. Specifically, when the data amount of the first target data is less than the preset data amount, the first target data can be processed based on the target processing algorithm and its corresponding target processing parameters to determine the second target data; or, when the data amount of the first target data is not less than the preset data amount, at least two data fragments can be processed synchronously based on the target processing algorithm and its corresponding target processing parameters to determine at least two second target data.

[0028] As an example, in step S14, the processing chip may write the second target data obtained after processing the first target data into the storage space corresponding to the target storage type to meet the storage requirements corresponding to different target storage types. In this example, when the target storage type is a temporary storage type, the first target data may be stored in the storage space corresponding to the cache disk; when the target storage type is a persistent storage type, the first target data may be stored in the storage space corresponding to the persistent storage disk to achieve cache data or persistent storage of the second target data according to user needs. A cache disk refers to a disk dedicated to storing cache data, where cache data refers to data that is not saved after the processing chip loses power. A persistent storage disk refers to a disk dedicated to storing persistent second target data, where persistent second target data refers to data that needs to be saved after the processing chip loses power.

[0029] In this example, before performing a write operation on the first target data, the data size of the first target data is first compared with a preset data size. When the data size of the first target data is less than the preset data size, the first target data is directly processed without slicing, which helps to ensure its processing efficiency. When the data size of the first target data is not less than the preset data size, the first target data needs to be segmented to determine at least two data segments, and then the at least two data segments are processed synchronously to improve their processing efficiency. The target processing identifier includes at least one of an encryption identifier and a compression identifier, which is used to implement encryption and / or compression processing of the first target data to achieve the purpose of both data security and space saving.

[0030] In one embodiment, step S12 or step S13, i.e., executing the processing strategy corresponding to the target processing identifier, includes: When the target processing identifier includes a compression identifier, performing a compression operation; When the target processing identifier includes an encryption identifier, performing an encryption operation; When the target processing identifier includes a compression identifier and an encryption identifier, determining a target execution order corresponding to the compression identifier and the encryption identifier, and sequentially executing the compression operation and the encryption operation based on the target execution order; Performing a compression operation includes: determining a target compression algorithm from at least one preset compression algorithm displayed on a target operation interface, obtaining a target compression parameter corresponding to the target compression algorithm, and compressing the input data based on the target compression algorithm and the target compression parameter; Performing an encryption operation, including: determining a target encryption algorithm from at least one preset encryption algorithm displayed on a target operation interface, obtaining a target key corresponding to the target encryption algorithm, and encrypting input data based on the target encryption algorithm and the target key; The input data is the first target data or a data segment.

[0031] The target operation interface is a target operation interface used to realize human-computer interaction.

[0032] In one example, reference Figure 5As shown, when the target processing identifier includes a compression identifier, the processing chip can determine that the user requires compression of the first target data. In this case, the target operation interface can be controlled to display relevant information of at least one preset compression algorithm, so that the user can determine the target compression algorithm from the at least one preset compression algorithm through the target operation interface and receive the target compression parameters input by the user. After determining the target compression algorithm and target compression parameters input by the user, the processing chip can compress the first target data based on the target compression algorithm and target compression parameters, and write the compressed second target data to the disk corresponding to its target storage type. In this example, when the target storage type is a temporary storage type, a lossless compression algorithm such as Huffman coding, LZ77, LZSS, or DEFLATE can be used to compress the first target data in the form of data blocks, and then write the compressed first target data to the cache disk. When the target storage type is a persistent storage type, a lossless compression algorithm such as Huffman coding, LZ77, LZSS, or DEFLATE can be used to compress the first target data in the form of files, and then write the compressed second target data to the persistent storage disk, thereby saving disk space. It is understandable that each compressed first target data carries a compression identifier, which can be embedded in the data header or other location of the compressed second target data for subsequent identification. Among them, the preset compression algorithm is a pre-set algorithm for implementing data compression. Correspondingly, the target compression algorithm is a preset compression algorithm selected by the user. The target compression parameters are control parameters input during the data compression process. The target compression parameters here may include but are not limited to the compression ratio and compression rate, and may also include parameters such as whether a password is required, the name of the compressed file, and whether to overwrite files with the same name.

[0033] In another example, reference Figure 5As shown, when the target processing identifier is an encryption identifier, the processing chip can determine that the user has an encryption requirement for the first target data. At this time, the target operation interface can be controlled to display relevant information of at least one preset encryption algorithm, so that the user can determine the target encryption algorithm from at least one preset encryption algorithm through the target operation interface and receive the target key entered by the user. After determining the target encryption algorithm and target key entered by the user, the processing chip can encrypt the first target data based on the target encryption algorithm and target key, and write the encrypted second target data to the disk corresponding to its target storage type. In this example, when the target storage type is a temporary storage type, the target encryption algorithm can be used to encrypt the first target data in the form of a data block to write the encrypted second target data to the cache disk; when the target storage type is a persistent storage type, the target encryption algorithm can be used to encrypt the first target data in the form of a file to write the encrypted second target data to the persistent storage disk to achieve the purpose of ensuring data security. It can be understood that each encrypted first target data carries an encryption identifier, which can be embedded in the data header or other location of the encrypted first target data for subsequent identification. The default encryption algorithm is a pre-set algorithm used to implement data encryption. This default encryption algorithm can be either symmetric or asymmetric. The target encryption algorithm is the default encryption algorithm selected by the user. The target key is the key entered during the data encryption process and is also the key required for data decryption.

[0034] The target execution order is the order determined by the user for executing encryption operations and compression operations.

[0035] As an example, refer to Figure 5 As shown, when the target processing identifier includes a compression identifier and an encryption identifier, the processing chip needs to further obtain the target execution order corresponding to the compression identifier and the encryption identifier, and can control the target operation interface to display relevant information of at least one preset compression algorithm and at least one preset encryption algorithm, so that the user can determine the target compression algorithm from at least one preset compression algorithm and receive the target compression parameters input by the user through the target operation interface, and determine the target encryption algorithm from at least one preset encryption algorithm and receive the target key input by the user; the processing chip can determine whether to perform the compression operation first and then the encryption operation, or to perform the encryption operation first and then the compression operation according to the target execution order, and in the process of performing the compression operation, the first target data can be compressed based on the target compression algorithm and the target compression parameters; in the process of performing the encryption operation, the first target data can be encrypted based on the target encryption algorithm and the target key. In this example, the compressed and encrypted first target data can be stored in the disk corresponding to the target storage type.

[0036] In this example, the data processing method supports both data caching and local persistent storage of data, that is, data file storage, which is well compatible with both scenarios. At the same time, it can perform lossless compression on the data to ensure less data space. For scenarios with data privacy requirements, it supports data encryption and decryption operations, and the operation process can be performed according to the display content of the target operation interface. The operation is easy and the learning cost is low, which is conducive to promotion and application.

[0037] In one embodiment, step S14, i.e., writing the second target data into the storage space corresponding to the target storage type, includes: A141: When the target storage type is a temporary storage type, determine a data attribute corresponding to the first target data; A142: Based on the data attributes, determine the cache space corresponding to the data attributes and the current data volume corresponding to the cache space in the cache disk; A143: When the current data size corresponding to the cache space is less than the maximum data size corresponding to the cache space, write the second target data into the cache space; A144: When the current data volume corresponding to the cache space is not less than the maximum data volume corresponding to the cache space, the cache data with the oldest storage time in the cache space is deleted, and the second target data is written into the cache space.

[0038] As an example, during the cache disk configuration process, at least one data attribute may be set, and the cache disk may be divided into different storage spaces based on the data attribute, each storage space being used to store data corresponding to the data attribute.

[0039] As an example, in step A141, when the target storage type is a temporary storage type, the processing chip needs to further determine the data attributes corresponding to the first target data. The data attributes here can be at least one of the data generation time, data priority, and data type. In this case, the first target data is a data block that needs to be cached. Among them, data attributes refer to attributes used to classify data in different dimensions. Data attributes include at least one of the data generation time, data priority, and data type; among them, the data generation time can be weeks, days, hours, minutes, seconds, etc.; the data priority can be high, medium, low, etc.; the data type can be diagnostic type, analog type, or digital type, etc.

[0040] As an example, in step A142, when the target storage type is a temporary storage type, the processing chip determines that the corresponding disk is a cache disk, searches for a cache space that matches the data attributes in the cache disk, and determines the current data volume corresponding to the cache space. The current data volume can be understood as the data volume of all cached data that has been stored before the write data request is received. Then, the current data volume corresponding to the cache space is compared with the maximum data volume corresponding to the cache space, and different processing flows are executed based on the comparison result. The maximum data volume here is the amount of data that can be cached by the cache space corresponding to the data attributes in the cache disk, and the maximum data volume is a pre-set data volume threshold.

[0041] As an example, in step A143, when the current data amount corresponding to the cache space is less than the maximum data amount corresponding to the cache space, the processing chip can determine that the cache space still has free space to store the first target data. Therefore, the processed second target data can be directly written into the cache space corresponding to the data attribute to achieve management of all cached data in the cache disk, so as to facilitate subsequent efficient retrieval based on the data attributes.

[0042] As an example, in step A144, when the current data volume corresponding to the cache space of the processing chip is not less than the maximum data volume corresponding to the cache space, it can be determined that the cache space is full and no more data can be cached. At this time, the cache data with the earliest storage time in the cache space can be deleted. The cache data is the data that has been stored in the cache space before the write data request is received, and then the processed second target data is written to the cache space to achieve rollback coverage, so as to facilitate subsequent efficient retrieval based on data attributes.

[0043] In one embodiment, step S14, i.e., writing the second target data into the storage space corresponding to the target storage type, includes: B141: When the target storage type is a persistent storage type, determine a file storage path corresponding to the first target data; B142: Based on the file storage path, determine the persistent space corresponding to the file storage path and the current data volume corresponding to the persistent space in the persistent storage disk; B143: When the current data size corresponding to the persistent space is less than the maximum data size corresponding to the persistent space, write the second target data into the persistent space; B144: When the current data volume corresponding to the persistent space is not less than the maximum data volume corresponding to the persistent space, delete the storage file with the oldest storage time or the storage file with the lowest priority in the persistent space, and write the second target data into the persistent space.

[0044] As an example, in step B141, when the target storage type is a persistent storage type, the processing chip needs to further determine the file storage path corresponding to the first target data. The file storage path here can be determined based on a pre-configured file storage directory. At this time, the first target data is a data file that needs to be persistently stored.

[0045] As an example, in step B142, when the target storage type is a persistent storage type, the processing chip determines that the corresponding disk is a persistent storage disk, determines the persistent space corresponding to the file storage path in the persistent storage disk, and obtains the current data volume corresponding to the persistent space. The current data volume can be understood as the data volume of all storage files that have been stored before the write data request is received. Then, the current data volume corresponding to the persistent space is compared with the maximum data volume corresponding to the persistent space, and different processing flows are executed according to the comparison result. The maximum data volume here is the amount of data that can be stored in the persistent space corresponding to the file storage path in the persistent storage disk. The maximum data volume is a pre-set data volume threshold.

[0046] As an example, in step B143, when the current data volume corresponding to the persistent space is less than the maximum data volume corresponding to the persistent space, the processing chip can determine that there is still free space in the persistent space to store the first target data. Therefore, the processed second target data can be directly written to the persistent space corresponding to the data attribute to achieve management of all files in the persistent storage disk, so as to facilitate subsequent efficient retrieval based on the file storage path.

[0047] As an example, in step B144, when the current data volume corresponding to the persistent space is not less than the maximum data volume corresponding to the persistent space, the processing chip can determine that the persistent space is full and cannot store more files. Therefore, the storage file with the earliest storage time or the storage file with the lowest priority can be deleted. The storage file is the file that has been stored in the persistent space before the write data request is received, and then the processed second target data is written to the persistent space for subsequent efficient retrieval based on the file storage path.

[0048] The embodiment of the present invention provides a data processing method, which is described by taking the data processing method applied to a processing chip as an example. Figure 2 As shown, the data processing method includes: S21: Obtain a read data request, where the read data request includes a data index, and the data index is used to indicate first target data to be read; S22: Reading second target data corresponding to the data index from the storage space, and determining a target processing identifier in the second target data, where the target processing identifier includes at least one of a compression identifier and an encryption identifier; S23: When the number of the second target data is one, executing the inverse processing strategy corresponding to the target processing identifier, performing inverse processing on the second target data, and determining the first target data; S24: When the number of the second target data is at least two, synchronously execute the inverse processing strategy corresponding to the target processing identifier, perform inverse processing on the at least two second target data, determine at least two data segments, and splice the at least two data segments to form the first target data.

[0049] As an example, in step S21, the processing chip may receive a read data request triggered by a user, the read data request including a read instruction and a data index corresponding to the read instruction, the read instruction being used to instruct to read data from the disk, and the data index being used to indicate first target data to be read.

[0050] As an example, in step S22, after receiving a data read request, the processing chip may determine the data index in the read instruction, search the disk's storage space based on the data index, and read the second target data corresponding to the data index from the disk's storage space. The second target data is data stored on the disk and associated with the data index. For example, the data index may be, but is not limited to, a data name or data identifier that uniquely identifies the first target data. Based on the data index, the disk is searched, and data associated with the data name or data identifier in the storage space is determined as the second target data.

[0051] As an example, in step S23, when the number of second target data is one, the processing chip can determine that the second target data has not been split before storage, and can read its corresponding target processing identifier from the second target data. Specifically, it can determine whether the target processing identifier is included from the data header or other location of the second target data to determine whether the second target data has undergone a processing operation corresponding to the target processing identifier before being written to the disk; when the second target data contains the target processing identifier, the inverse processing strategy corresponding to the target processing identifier can be directly executed to inversely process the second target data to determine the inversely processed data as the first target data.

[0052] As an example, in step S24, when the number of second target data is at least two, the processing chip can determine that the second target data has been split before storage. From this, it can be seen that the data volume of the first target data corresponding to the data index is large, and its corresponding target processing identifier can be read from the at least two second target data. Specifically, it can be determined from the data header or other location of the second target data whether it contains the target processing identifier to determine whether the second target data has undergone the processing operation corresponding to the target processing identifier before being written to the disk; when the second target data contains the target processing identifier, the inverse processing strategy corresponding to the target processing identifier can be synchronously executed to perform inverse processing on at least two second target data to determine the inversely processed data as the split data fragments; then, the at least two data fragments are spliced to determine the first target data.

[0053] In this example, the second target data is first determined from the storage space based on the data index; when the number of second target data is one, the second target data is directly inversely processed to ensure the reading efficiency of the first target data with a smaller data volume; when the number of second target data is at least two, at least two second target data are simultaneously inversely processed to determine at least two data fragments, and then the at least two data fragments are spliced into the first target data, thereby ensuring the reading efficiency of the first target data with a larger data volume.

[0054] In one embodiment, executing the inverse processing strategy corresponding to the target processing identifier includes: When the target processing identifier includes a compression identifier, performing a decompression operation; When the target processing identifier includes an encryption identifier, performing a decryption operation; When the target processing identifier includes a compression identifier and an encryption identifier, determining a target execution order corresponding to the compression identifier and the encryption identifier, and sequentially performing a decompression operation and a decryption operation based on the target execution order; Performing a decompression operation includes: determining a target compression algorithm and target compression parameters from the second target data, and decompressing the second target data based on a decompression algorithm and target compression parameters corresponding to the target compression algorithm; Performing a decryption operation includes: determining a target encryption algorithm from the second target data, receiving a target key input by a user, and decrypting the second target data based on a decryption algorithm and a target key corresponding to the target encryption algorithm.

[0055] The decompression algorithm is a pre-set algorithm for realizing data decompression. The decryption algorithm is a pre-set algorithm for realizing data decryption.

[0056] As an example, refer to Figure 5As shown, when the target processing identifier carried by the processing chip in the read data request includes a compression identifier, for example, when the file name of the second target data carries a compression identifier, it can be determined that the second target data read from the disk is compressed data, and the file name of the second target data or other information related to the second target data can be identified to determine the target compression algorithm and target compression parameters adopted in its compression process; then, based on the decompression algorithm and target compression parameters corresponding to the target compression algorithm, the second target data read from the disk is decompressed to obtain the decompressed first target data.

[0057] As an example, refer to Figure 5 As shown, when the target processing identifier carried by the processing chip in the read data request includes an encryption identifier, for example, when the file name of the second target data carries an encryption identifier, it can be determined that the second target data read from the disk is encrypted data, and the file name of the second target data or other information related to the second target data can be identified, the target encryption algorithm used in its encryption process can be determined, and the target key input by the user can be obtained; then, based on the decryption algorithm and target key corresponding to the target encryption algorithm, the second target data read from the disk is decrypted to obtain the decrypted first target data.

[0058] In one embodiment, reference Figure 5 As shown, the target processing identifier carried by the processing chip in the read data request includes a compression identifier and an encryption identifier. It is necessary to obtain the target execution order corresponding to the second target data, and perform decompression and decryption operations based on the target execution order. For example, when the target execution order determines that the compression operation is performed first and then the encryption operation, the decompression operation must be performed first and then the decompression operation; when the target execution order determines that the encryption operation is performed first and then the compression operation, the decompression operation must be performed first and then the decryption operation. In this example, during the decompression operation, the target compression algorithm and target compression parameters used in the compression process can be determined by identifying the file name of the second target data or other information related to the second target data; then, based on the decompression algorithm and target compression parameters corresponding to the target compression algorithm, the second target data read from the disk is decompressed to determine the decompressed second target data. During the decryption operation, the target encryption algorithm and target key used in the encryption process can be determined by identifying the file name of the second target data or other information related to the second target data; then, based on the decryption algorithm and target key corresponding to the target encryption algorithm, the second target data read from the disk is decrypted.

[0059] Furthermore, the read data request also includes data attributes; Reading the second target data corresponding to the data index from the storage space includes: reading the second target data corresponding to the data index from the storage space corresponding to the data attribute.

[0060] As an example, when the processing chip receives a read data request, it needs to parse the read data request and determine the data attributes of the first target data that needs to be searched. The data attributes here can be a single data attribute or a data attribute in a specific range. Then, the second target data corresponding to the data index is read from the storage space corresponding to the data attribute to achieve efficient search for the corresponding second target data based on the data attributes.

[0061] In one embodiment, the processing chip can be connected to the encryption and decryption chip, which is a chip used to implement encryption and decryption functions. The encryption and decryption chip is another chip independent of the device. In this example, when the processing chip carries an encryption identifier in the received read data request, it can send the first target data to the encryption and decryption chip for encryption, obtain the encrypted second target data fed back by the encryption and decryption chip, and write the encrypted second target data to the disk corresponding to the target storage type. Accordingly, after the processing chip determines the second target data based on the data index, if the second target data carries an encryption identifier, the second target data is sent to the encryption and decryption chip for decryption, and the first target data decrypted by the encryption and decryption chip is obtained. In this example, a dedicated encryption and decryption chip is used for encryption and decryption processing to ensure the security of the first target data, so that the first target data stored on the disk has a certain degree of privacy to ensure data security.

[0062] In one embodiment, a data processing device is provided, which corresponds one-to-one to the data processing method in the above embodiment. Figure 3 As shown, the data processing device includes a write request acquisition module 31, a data processing module 32 and a data writing module 33. The functional modules are described in detail as follows: A write request acquisition module 31 is configured to acquire a write data request, the write data request including first target data, a target processing identifier, and a target storage type, the target processing identifier including at least one of an encryption identifier and a compression identifier, and the first target data being unprocessed target data; The data processing module 32 is configured to, when the amount of the first target data is less than a preset amount, execute a processing strategy corresponding to the target processing identifier to process the first target data and determine the second target data; and, when the amount of the first target data is not less than the preset amount, split the first target data into at least two data segments, synchronously execute a processing strategy corresponding to the target processing identifier, process the at least two data segments separately, and determine at least two second target data; The data writing module 33 is configured to write the second target data into the storage space corresponding to the target storage type, where the second target data is the processed target data.

[0063] In one embodiment, the data processing module is configured to, when the target processing identifier includes a compression identifier, perform a compression operation; when the target processing identifier includes an encryption identifier, perform an encryption operation; when the target processing identifier includes a compression identifier and an encryption identifier, determine a target execution order corresponding to the compression identifier and the encryption identifier, and sequentially perform the compression operation and the encryption operation based on the target execution order; Performing a compression operation includes: determining a target compression algorithm from at least one preset compression algorithm displayed on a target operation interface, obtaining a target compression parameter corresponding to the target compression algorithm, and compressing the input data based on the target compression algorithm and the target compression parameter; Performing an encryption operation, including: determining a target encryption algorithm from at least one preset encryption algorithm displayed on a target operation interface, obtaining a target key corresponding to the target encryption algorithm, and encrypting input data based on the target encryption algorithm and the target key; The input data is the first target data or a data segment.

[0064] In one embodiment, the data writing module 33 includes: a data attribute determining unit, configured to determine a data attribute corresponding to the first target data when the target storage type is a temporary storage type; a data volume determination unit, configured to determine, based on data attributes, a cache space corresponding to the data attributes in the cache disk and a current data volume corresponding to the cache space; A data writing unit is used to write the second target data into the cache space when the current data volume corresponding to the cache space is less than the maximum data volume corresponding to the cache space; and to delete the cache data with the earliest storage time in the cache space and write the second target data into the cache space when the current data volume corresponding to the cache space is not less than the maximum data volume corresponding to the cache space.

[0065] In one embodiment, the data writing module 33 includes: a storage path determining unit, configured to determine a file storage path corresponding to the first target data when the target storage type is a persistent storage type; A data volume determination unit, configured to determine, based on the file storage path, a persistent space corresponding to the file storage path in the persistent storage disk and a current data volume corresponding to the persistent space; The data writing unit is used to write the second target data into the persistent space when the current data volume corresponding to the persistent space is less than the maximum data volume corresponding to the persistent space; and when the current data volume corresponding to the persistent space is not less than the maximum data volume corresponding to the persistent space, delete the storage file with the earliest storage time or the storage file with the lowest priority in the persistent space, and write the second target data into the persistent space.

[0066] In one embodiment, a data processing device is provided, which corresponds one-to-one to the data processing method in the above embodiment. Figure 4 As shown, the data processing device includes a read request acquisition module 41, a data reading module 42 and a data inverse processing module 43. The functional modules are described in detail as follows: A read request acquisition module 41 is configured to acquire a read data request, wherein the read data request includes a data index; a data reading module 42 configured to read second target data corresponding to the data index from the storage space, determine a target processing identifier in the second target data, the target processing identifier including at least one of a compression identifier and an encryption identifier, and the second target data being processed target data; The data inverse processing module 43 is used to execute the inverse processing strategy corresponding to the target processing identifier when the number of second target data is one, perform inverse processing on the second target data, and determine the first target data, where the first target data is the unprocessed target data; when the number of second target data is at least two, synchronously execute the inverse processing strategy corresponding to the target processing identifier, perform inverse processing on at least two second target data, determine at least two data fragments, and splice the at least two data fragments to form the first target data.

[0067] In one embodiment, the data inverse processing module 43 is configured to perform a decompression operation when the target processing identifier includes a compression identifier; perform a decryption operation when the target processing identifier includes an encryption identifier; and determine a target execution order corresponding to the compression identifier and the encryption identifier when the target processing identifier includes a compression identifier and an encryption identifier, and sequentially perform the decompression operation and the decryption operation based on the target execution order. Performing a decompression operation includes: determining a target compression algorithm and target compression parameters from the second target data, and decompressing the second target data based on a decompression algorithm and target compression parameters corresponding to the target compression algorithm; Performing a decryption operation includes: determining a target encryption algorithm from the second target data, receiving a target key input by a user, and decrypting the second target data based on a decryption algorithm and a target key corresponding to the target encryption algorithm.

[0068] For the specific definition of the data processing device, please refer to the definition of the data processing method above and will not be repeated here. Each module in the above-mentioned data processing device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the processing chip in hardware form, or can be stored in the memory of the processing chip in software form, so that the processor can call and execute the operations corresponding to each of the above modules.

[0069] In one embodiment, a processing chip is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the data processing method in the above embodiment is implemented, for example Figure 1 As shown in S11-S14, Figure 2 Alternatively, when the processor executes the computer program, the functions of each module / unit in the embodiment of the data processing device are realized, for example, Figure 3 The functions of the write request acquisition module 31, the data processing module 32 and the data writing module 33 are shown in FIG. Figure 4 The functions of the read request acquisition module 41 , the data reading module 42 and the data inverse processing module 43 are not described here in detail to avoid repetition.

[0070] An embodiment of the present invention provides an embedded device, such as Figure 6 As shown, the embedded device includes a processing chip, a cache disk connected to the processing chip, and a persistent storage disk. The embedded device is provided with an operation interface connected to the processing chip. The operation interface is used to receive user input of write data requests or read data requests, and the processing chip is used to execute the above-mentioned data processing method.

[0071] Among them, an embedded device refers to a device that can be embedded and set on a target device. The embedded device can be embedded in the target device through a USB interface or other hardware interface, so that the embedded device can transmit data with the target device, and then the target device can store data in the cache disk or persistent storage disk of the embedded device. In this example, the target device can be but is not limited to an on-board controller used in a car, and the on-board controller here refers to a controller set on the car. Among them, the processing chip, also called a processor chip or a microprocessor, is a device in an embedded device that is mainly responsible for executing programs and processing various data and information. The operation interface is an interface in an embedded device for realizing data transmission, for example, it can be a GPIO or other interface.

[0072] An embodiment of the present invention provides a vehicle including an onboard controller and the aforementioned embedded device, wherein the embedded device is connected to the onboard controller. A processing chip of the embedded device is in communication with the onboard controller. When the embedded device is embedded in the onboard controller, the onboard controller can read and write target data via the embedded device as needed, thereby meeting various storage requirements.

[0073] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0074] Those skilled in the art will clearly understand that for the sake of convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0075] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention, and should all be included in the scope of protection of the present invention.

Claims

1. A data processing method, characterized in that: include: Obtaining a write data request, the write data request including first target data, a target processing identifier, and a target storage type, the target processing identifier including at least one of an encryption identifier and a compression identifier, the first target data being unprocessed target data; When the data volume of the first target data is less than a preset data volume, executing a processing strategy corresponding to the target processing identifier, processing the first target data, and determining second target data; When the data volume of the first target data is not less than the preset data volume, the first target data is divided into at least two data segments, the processing strategy corresponding to the target processing identifier is synchronously executed, the at least two data segments are processed respectively, and at least two second target data are determined; The second target data is written into a storage space corresponding to the target storage type, where the second target data is processed target data.

2. The data processing method according to claim 1, wherein: The executing the processing strategy corresponding to the target processing identifier includes: When the target processing identifier includes a compression identifier, performing a compression operation; When the target processing identifier includes an encryption identifier, performing an encryption operation; When the target processing identifier includes a compression identifier and an encryption identifier, determining a target execution order corresponding to the compression identifier and the encryption identifier, and sequentially performing a compression operation and an encryption operation based on the target execution order; The performing of the compression operation includes: determining a target compression algorithm from at least one preset compression algorithm displayed on a target operation interface, obtaining a target compression parameter corresponding to the target compression algorithm, and compressing the input data based on the target compression algorithm and the target compression parameter; The performing of the encryption operation includes: determining a target encryption algorithm from at least one preset encryption algorithm displayed on a target operation interface, obtaining a target key corresponding to the target encryption algorithm, and encrypting input data based on the target encryption algorithm and the target key; The input data is the first target data or the data segment.

3. The data processing method according to claim 1, wherein: Writing the second target data into the storage space corresponding to the target storage type includes: When the target storage type is a temporary storage type, determining a data attribute corresponding to the first target data; Based on the data attribute, determining a cache space corresponding to the data attribute and a current data volume corresponding to the cache space in a cache disk; When the current data amount corresponding to the cache space is less than the maximum data amount corresponding to the cache space, writing the second target data into the cache space; When the current data volume corresponding to the cache space is not less than the maximum data volume corresponding to the cache space, the cache data with the earliest storage time in the cache space is deleted, and the second target data is written into the cache space.

4. The data processing method according to claim 1, wherein: Writing the second target data into the storage space corresponding to the target storage type includes: When the target storage type is a persistent storage type, determining a file storage path corresponding to the first target data; Based on the file storage path, determining a persistent space corresponding to the file storage path and a current data volume corresponding to the persistent space in the persistent storage disk; When the current data volume corresponding to the persistent space is less than the maximum data volume corresponding to the persistent space, writing the second target data into the persistent space; When the current data volume corresponding to the persistent space is not less than the maximum data volume corresponding to the persistent space, the storage file with the earliest storage time or the storage file with the lowest priority in the persistent space is deleted, and the second target data is written into the persistent space.

5. A data processing method, characterized in that: include: Obtaining a read data request, where the read data request includes a data index; Reading second target data corresponding to the data index from the storage space, determining a target processing identifier in the second target data, the target processing identifier including at least one of a compression identifier and an encryption identifier, and the second target data being processed target data; When the number of the second target data is one, executing the inverse processing strategy corresponding to the target processing identifier, performing inverse processing on the second target data to determine the first target data, where the first target data is unprocessed target data; When the number of the second target data is at least two, the inverse processing strategy corresponding to the target processing identifier is synchronously executed, the at least two second target data are inversely processed, at least two data fragments are determined, and the at least two data fragments are spliced together to form the first target data.

6. The data processing method according to claim 1, wherein: The executing the inverse processing strategy corresponding to the target processing identifier includes: When the target processing identifier includes a compression identifier, performing a decompression operation; When the target processing identifier includes an encryption identifier, performing a decryption operation; When the target processing identifier includes a compression identifier and an encryption identifier, determining a target execution order corresponding to the compression identifier and the encryption identifier, and sequentially performing a decompression operation and a decryption operation based on the target execution order; The performing of the decompression operation includes: determining a target compression algorithm and target compression parameters from the second target data, and decompressing the second target data based on a decompression algorithm and target compression parameters corresponding to the target compression algorithm; The performing of the decryption operation includes: determining a target encryption algorithm from the second target data, receiving a target key input by a user, and decrypting the second target data based on a decryption algorithm and a target key corresponding to the target encryption algorithm.

7. A data processing device, characterized in that: include: a write request acquisition module, configured to acquire a write data request, wherein the write data request includes first target data, a target processing identifier, and a target storage type, wherein the target processing identifier includes at least one of an encryption identifier and a compression identifier, and the first target data is unprocessed target data; a data processing module configured to, when the amount of the first target data is less than a preset amount, execute the processing strategy corresponding to the target processing identifier, process the first target data, and determine second target data; and, when the amount of the first target data is not less than the preset amount, divide the first target data into at least two data segments, synchronously execute the processing strategy corresponding to the target processing identifier, process the at least two data segments separately, and determine at least two second target data; The data writing module is used to write the second target data into the storage space corresponding to the target storage type, where the second target data is processed target data.

8. A data processing device, characterized in that: include: A read request acquisition module, configured to acquire a read data request, wherein the read data request includes a data index; a data reading module, configured to read second target data corresponding to the data index from a storage space, determine a target processing identifier in the second target data, the target processing identifier including at least one of a compression identifier and an encryption identifier, and the second target data being processed target data; a data inverse processing module, configured to, when the number of the second target data is one, execute an inverse processing strategy corresponding to the target processing identifier, inversely process the second target data, and determine first target data, where the first target data is unprocessed target data; When the number of the second target data is at least two, the inverse processing strategy corresponding to the target processing identifier is synchronously executed, the at least two second target data are inversely processed, at least two data fragments are determined, and the at least two data fragments are spliced together to form the first target data.

9. A processing chip comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the data processing method according to any one of claims 1 to 7 is implemented.

10. An embedded device, characterized in that: The method comprises the processing chip according to claim 9, a cache disk and a persistent storage disk connected to the processing chip.

11. A vehicle, characterized in that: The vehicle-mounted controller comprises a vehicle-mounted controller and the embedded device according to claim 10, wherein the vehicle-mounted controller is connected to the embedded device.

Citation Information

Patent Citations

  • Synchronous disc data security protection writing and reading method

    CN103248632A

  • File storage method and device and server

    CN113032357A

  • Data storage synchronization method and device

    CN114676103A

  • Encrypted storage method and device, equipment and storage medium

    CN117708895A