Data encryption determination method and device, storage medium and electronic device

By screening non -critical data in the operating system interface of the server, and only encrypted key data, the high power consumption problem caused by encrypted all data was solved, and more efficient data encryption was achieved.

CN118886041BActive Publication Date: 2025-01-24SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411359850.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2025-01-24
Estimated Expiration
2044-09-27

AI Technical Summary

Technical Problem

In the server's operating system interface, encrypting all data results in a large amount of data calculation, which in turn makes the chip on chip consume a lot of power.

Method used

By determining the target comparison table corresponding to the encryption data, non -critical data is screened, and only critical data is encrypted.

Benefits of technology

The amount of data of encrypted data operations is reduced, the power consumption of the server management control chip is reduced, and the efficiency of data encryption is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118886041B_ABST
    Figure CN118886041B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a method and device for determining data encryption, a storage medium and an electronic device, wherein the method for determining data encryption includes: determining a target comparison table corresponding to the data to be encrypted, wherein the target comparison table includes: non-critical data; determining whether there is first data consistent with the data to be encrypted in the target comparison table; if it is determined that the first data exists in the target comparison table, determining to prohibit encryption of the data to be encrypted; if it is determined that the first data does not exist in the target comparison table, determining to allow encryption of the data to be encrypted. The above method can solve the problem in the related art that all data in the operating system interface are encrypted, resulting in the need to introduce a large amount of data calculation in the data encryption process, thereby causing high power consumption of the on-chip chip.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of big data, and more specifically, to a method and device for determining data encryption, a storage medium, and an electronic device. Background Art

[0002] At present, in the actual application of servers, the real key information of the operating system display interface (including the software running on the server) is relatively small or only occupies a part of the entire display interface. For example, the background color (typically white) of the typical Linux operating system (open source operating system) interface in terminal operation is non-critical information or non-critical data. Such data will not cause any damage to the security of the server if it is seen in plain text. However, such data exists in large quantities in the entire display interface. At the same time, because the traditional solution needs to encrypt all data on the operating system interface, although the chip hardware encryption is used on the local side, it will introduce a large amount of data calculation, causing the chip power consumption to increase rapidly (because video data is continuously generated).

[0003] Therefore, the problem that all data in the operating system interface is encrypted in the related technology, which requires the introduction of a large amount of data calculation during the data encryption process and thus causes high power consumption of the on-chip chip, has not yet been effectively solved. Summary of the invention

[0004] The embodiments of the present application provide a method and device for determining data encryption, a storage medium and an electronic device, so as to at least solve the problem in the related art that all data in the operating system interface is encrypted, resulting in the need to introduce a large amount of data calculation in the data encryption process, thereby causing high power consumption of the on-chip chip.

[0005] According to an embodiment of the present application, a method for determining data encryption is provided, including: determining a target comparison table corresponding to the data to be encrypted, wherein the target comparison table includes: non-critical data; determining whether there is first data consistent with the data to be encrypted in the target comparison table; if it is determined that the first data exists in the target comparison table, determining that encryption of the data to be encrypted is prohibited; if it is determined that the first data does not exist in the target comparison table, determining that encryption of the data to be encrypted is allowed.

[0006] In an exemplary embodiment, determining a target comparison table corresponding to the data to be encrypted includes: parsing the data to be encrypted to determine first video mode information of the data to be encrypted; when the first video mode information indicates that the data to be encrypted is data in a compressed video mode, determining the first comparison table as the target comparison table, wherein the first comparison table is used to store data in a compressed data mode; when the first video mode information indicates that the data to be encrypted is data in a YUV video mode, determining the second comparison table as the target comparison table, wherein the second comparison table is used for data in a YUV data mode.

[0007] In an exemplary embodiment, before determining the target comparison table corresponding to the data to be encrypted, the method also includes: determining a data range corresponding to non-critical data in the operating system; parsing the non-critical data within the data range to determine the second video mode information to be configured for the non-critical data; and updating the first comparison table and / or the second comparison table according to the second video mode information.

[0008] In an exemplary embodiment, updating the first comparison table and / or the second comparison table according to the second video mode information includes: when the second video mode information indicates that non-critical data within the data range are to be configured as the compressed video mode, configuring the non-critical data according to the compressed video mode to generate second data of the compressed video mode; and writing the second data into the first comparison table to update the first comparison table.

[0009] In an exemplary embodiment, generating the first comparison table and / or the second comparison table according to the second video mode information includes: when the second video mode information indicates that non-critical data within the data range are to be configured as the YUV video mode, configuring the non-critical data according to the YUV video mode to generate third data of the YUV video mode; and writing the third data into the second comparison table to update the second comparison table.

[0010] In an exemplary embodiment, updating the first comparison table and / or the second comparison table according to the second video mode information includes: when the second video mode information indicates that the first non-critical data of the first data range in the data range is to be configured as the compressed video mode, and the second non-critical data of the second data range in the data range is to be configured as the YUV video mode, configuring the first non-critical data according to the compressed video mode to generate fourth data of the compressed video mode, and configuring the second non-critical data according to the YUV video mode to generate fifth data of the YUV video mode; writing the fourth data into the first comparison table to update the first comparison table, and writing the fifth data into the second comparison table to update the second comparison table.

[0011] In an exemplary embodiment, determining whether there is first data consistent with the data to be encrypted in the target comparison table includes: parsing the data to be encrypted to determine first video mode information of the data to be encrypted; when the first video mode information indicates that the data to be encrypted is data in a compressed video mode, determining an output signal corresponding to the data to be encrypted; determining data after data compression of the data to be encrypted based on the output signal; determining whether there is first data consistent with the data after data compression in the target comparison table; and when the compressed video mode information indicates that the data to be encrypted is data in a YUV video mode, determining whether there is first data consistent with the data to be encrypted in the target comparison table.

[0012] In an exemplary embodiment, after determining that the data to be encrypted is allowed to be encrypted, the method further includes: acquiring key information corresponding to the data to be encrypted; and encrypting the data to be encrypted according to the key information.

[0013] In an exemplary embodiment, after determining whether there is first data consistent with the data to be encrypted in the target comparison table, the method further includes: when it is determined that there is data consistent with sixth data in the data to be encrypted in the target comparison table, and there is no data consistent with other data in the data to be encrypted, adjusting the indication signal corresponding to the sixth data to a first indication signal, and adjusting the indication signal corresponding to the other data to a second indication signal, wherein the other data includes: data in the data to be encrypted other than the sixth data; encrypting the other data according to the second indication signal to generate seventh data based on the encrypted other data and the sixth data.

[0014] In an exemplary embodiment, after encrypting the other data according to the second indication signal to generate the encrypted data to be encrypted, the method also includes: determining the first position of the sixth data in the data to be encrypted, and assigning a first encryption identifier to the sixth data at the first position; and determining the second position of the other data in the data to be encrypted, and assigning a second encryption identifier to the other data at the second position; sorting the first encryption identifier and the second encryption identifier according to the first position and the second position to determine the encryption identification information table corresponding to the seventh data according to the sorted first encryption identifier and the sorted first encryption identifier.

[0015] In an exemplary embodiment, after sorting the first encryption identifier and the second encryption identifier according to the first position and the second position to determine the encryption identification information table corresponding to the seventh data according to the sorted first encryption identifier and the sorted first encryption identifier, the method further includes: upon receiving a decryption request to decrypt the seventh data, determining whether there is data to be decrypted in the seventh data according to the encryption identification information table; upon determining that the data to be decrypted exists in the seventh data, determining a third position of the data to be decrypted according to the encryption identification information table; and sending the third position to the target device so that the target device decrypts the seventh data.

[0016] According to another embodiment of the present application, a data encryption determination device is provided, including: a first determination module, used to determine a target comparison table corresponding to the data to be encrypted, wherein the target comparison table includes: non-critical data; a second determination module, used to determine whether there is first data consistent with the data to be encrypted in the target comparison table; a third determination module, used to determine that encryption of the data to be encrypted is prohibited when it is determined that the first data exists in the target comparison table; and a fourth determination module, used to determine that encryption of the data to be encrypted is allowed when it is determined that the first data does not exist in the target comparison table.

[0017] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps in the above method embodiment when running.

[0018] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in the above method embodiment.

[0019] According to another embodiment of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiment are implemented.

[0020] Through the data encryption determination method of the present application, the target comparison table corresponding to the data to be encrypted is determined, and the target comparison table includes: non-critical data; determining whether there is first data consistent with the data to be encrypted in the target comparison table; in the case of determining that there is first data consistent with the data to be encrypted in the target comparison table, determining that the data to be encrypted is prohibited from being encrypted; in the case of determining that the first data does not exist in the target comparison table, determining that the data to be encrypted is allowed to be encrypted. According to the embodiment of the present application, after determining the target comparison table corresponding to the data to be encrypted, it can be determined whether the first data in the data to be encrypted is consistent with the non-critical data in the target comparison table. By comparing the data to be encrypted with the non-critical data in the target comparison table, the non-critical data in the data to be encrypted can be screened out, and then the non-critical data is not encrypted, and only the critical data in the data to be encrypted is encrypted. Through the embodiment of the present application, the problem that all data in the operating system interface is encrypted in the related technology, resulting in the need to introduce a large amount of data calculation in the data encryption process, thereby causing the on-chip chip to consume a large amount of power. The power consumption of the on-chip chip is reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 It is a hardware structure block diagram of a computer terminal of a method for determining data encryption in an embodiment of the present application;

[0022] Figure 2 is a flow chart of a method for determining data encryption according to an embodiment of the present application;

[0023] Figure 3 It is a schematic diagram of the video function in the server management control chip in the related art;

[0024] Figure 4 It is a structural block diagram of a video encryption module in the related art;

[0025] Figure 5 It is a structural block diagram of a design method for optimizing a video encryption function in a server management control chip according to an optional embodiment of the present application;

[0026] Figure 6 is a specific architecture diagram of DATA_ENCRY_MDY according to an optional embodiment of the present application;

[0027] Figure 7 This is a schematic diagram of a typical application scenario of a server according to an optional embodiment of the present application;

[0028] Figure 8It is a structural block diagram of a device for determining data encryption according to an embodiment of the present application. DETAILED DESCRIPTION

[0029] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0031] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a computer terminal as an example, Figure 1 1 is a hardware structure block diagram of a computer terminal of a method for determining data encryption in an embodiment of the present application. Figure 1 As shown, the computer terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the above-mentioned computer terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0032] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for determining the interactive state in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0033] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of a computer terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0034] Figure 2 is a flow chart of a method for determining data encryption according to an embodiment of the present application, which is applied to Figure 1 Computer terminals such as Figure 2 As shown, the process includes the following steps:

[0035] Step S202, determining a target comparison table corresponding to the data to be encrypted, wherein the target comparison table includes: non-critical data;

[0036] Step S204, determining whether there is first data consistent with the data to be encrypted in the target comparison table;

[0037] Step S206, when it is determined that the first data exists in the target comparison table, determining to prohibit encryption of the data to be encrypted;

[0038] Step S208: When it is determined that the first data does not exist in the target comparison table, it is determined that encryption of the data to be encrypted is allowed.

[0039] Through the data encryption determination method of the present application, the target comparison table corresponding to the data to be encrypted is determined, and the target comparison table includes: non-critical data; determining whether there is first data consistent with the data to be encrypted in the target comparison table; in the case of determining that there is first data consistent with the data to be encrypted in the target comparison table, determining that the data to be encrypted is prohibited from being encrypted; in the case of determining that the first data does not exist in the target comparison table, determining that the data to be encrypted is allowed to be encrypted. According to the embodiment of the present application, after determining the target comparison table corresponding to the data to be encrypted, it can be determined whether the first data in the data to be encrypted is consistent with the non-critical data in the target comparison table. By comparing the data to be encrypted with the non-critical data in the target comparison table, the non-critical data in the data to be encrypted can be screened out, and then the non-critical data is not encrypted, and only the critical data in the data to be encrypted is encrypted. Through the embodiment of the present application, the problem that all data in the operating system interface is encrypted in the related technology, resulting in the need to introduce a large amount of data calculation in the data encryption process, thereby causing the on-chip chip to consume a large amount of power. The power consumption of the on-chip chip is reduced.

[0040] Optionally, the above-mentioned step S202 of determining the target comparison table corresponding to the data to be encrypted includes: parsing the data to be encrypted to determine the first video mode information of the data to be encrypted; when the first video mode information indicates that the data to be encrypted is data in a compressed video mode, determining the first comparison table as the target comparison table, wherein the first comparison table is used to store data in a compressed data mode; when the first video mode information indicates that the data to be encrypted is data in a YUV video mode, determining the second comparison table as the target comparison table, wherein the second comparison table is used for data in a YUV data mode.

[0041] It can be understood that different video modes of the data to be encrypted correspond to different comparison tables. For example, when it is determined that the data to be encrypted is data in a compressed video mode, the first comparison table can be determined as the target comparison table, and the non-critical data in the first comparison table are all data in the compressed video mode; when it is determined that the data to be encrypted is data in a YUV video mode, the second comparison table can be determined as the target comparison table, and the non-critical data in the second comparison table are all data in the compressed video mode.

[0042] According to the data processing architecture in the YUV video mode and the compressed video mode, the first comparison table and the second comparison table are flexibly obtained, which greatly speeds up the analysis and processing of non-critical area data in the encryption module.

[0043] Among them, before determining the target comparison table corresponding to the data to be encrypted, the method also includes: determining the data range corresponding to the non-critical data in the operating system; parsing the non-critical data within the data range to determine the second video mode information to be configured for the non-critical data; updating the first comparison table and / or the second comparison table according to the second video mode information.

[0044] It is understandable that before determining the target comparison table, the first comparison table and / or the second comparison table needs to be updated. Specifically:

[0045] Determine the data range corresponding to the non-critical data in the operating system. The area of ​​the non-critical data corresponding to the data range in the operating system may be one area or multiple areas. Parse the non-critical data within the data range to determine the second video mode information corresponding to the non-critical data within the data range. The second video mode information includes: compressed video mode, YUV video mode. Store the non-critical data in the first comparison table and / or the second comparison table according to the second video mode information. When the data of a new time frame of the operating system is displayed on the display interface corresponding to the operating system, the second video mode information of the non-critical data in the data of the new time frame is also determined, and the first comparison table and / or the second comparison table are updated according to the second video mode information.

[0046] The first comparison table and the second comparison table are updated in real time to more accurately determine the non-critical data in the data to be encrypted, thereby improving the accuracy of the analysis of the data to be encrypted.

[0047] In an exemplary embodiment, updating the first comparison table and / or the second comparison table according to the second video mode information includes:

[0048] (1) When the second video mode information indicates that all non-critical data within the data range are to be configured as the compressed video mode, configure the non-critical data according to the compressed video mode to generate second data of the compressed video mode; and write the second data into the first comparison table to update the first comparison table.

[0049] (2) When the second video mode information indicates that all non-critical data within the data range are to be configured as the YUV video mode, configure the non-critical data according to the YUV video mode to generate third data of the YUV video mode; and write the third data into the second comparison table to update the second comparison table.

[0050] It can be understood that, when the second video mode information indicates that the non-critical data is only to be configured as the YUV video mode, the non-critical data in the data area can be configured, and the specific configuration method is:

[0051] According to the information range of non-critical data configured by the user, the YUV format of non-critical data is captured. At the same time, N groups of YUV data of unit length are captured in units of encryption length (N can be configured by the user through registers, or the default value, for example: 5 / 6). Only when the values ​​of N consecutive groups of YUV data are the same (or the error is within the range allowed by the user, for example: the error of each group is less than 5%, and this error range can also be configured by the user through registers), the YUV format value of the data in the non-critical area sent by the user can be accurately obtained: NO_KEY_YUV_DATA_0...NO_KEY_YUV_DATA_M (obtain M+1 non-critical YUVs). Further, the above NO_KEY_YUV_DATA_0...NO_KEY_YUV_DATA_M are written into the second comparison table respectively.

[0052] When the second video mode information indicates that the non-critical data is only to be configured as the compressed video mode, the non-critical data in the data area may be configured, and the specific configuration method is as follows:

[0053] Determine the accurate YUV value of the non-critical area sent by the user. At this time, the value of the YUV BLOCK (YUV data block) must be confirmed. The size of the BLOCK is selected according to the compression mode. Determine whether the compression mode is YUV444 or YUV420. If it is YUV444 compression mode, the size of the YUV BLOCK is 8*8, and if it is YUV420, the size of the YUV BLOCK is 16*16. Similarly, capture N groups of unit length YUV BLOCK data (N can be configured by the user through registers, or the default value, such as: 5 / 6), only the values ​​of the consecutive N groups of YUV BLOCK data are the same (or the error is within the range allowed by the user, for example: the error of each group is less than 5%, and this error range can also be configured by the user through registers), and then obtain the accurate value of the YUV BLOCK format of the non-critical data (NO_KEY_YUV_BLOCK_DATA), you can determine the compressed data corresponding to the data in the YUV BLOCK format. Specifically: Change the resolution of CMP_IP (video compression IP, for example, JPEG format) to 8*8 or 16*16, and send NO_KEY_YUV_BLOCK_DATA to CMP_IP in the order of first sending Y_BLOCK, then U_BLOCK, and then V_BLOCK.

[0054] That is, in YUV444 mode, first input 8*8 Y data, then 8*8 U data, and then 8*8 V data. In YUV420 mode, first input 16*16 Y data, then input 8*8 U data of even rows and even columns, that is, 16*16 U data, retaining even rows and even columns, is transformed into 8*8 U data. Then input 8*8 V data of even rows and even columns, that is, 16*16 V data, retaining even rows and even columns, is transformed into 8*8 V data. Finally, the output result of CMP_IP is obtained, and the frame header and frame tail information is removed, and the compressed data NO_KEY_CMP_DATA corresponding to NO_KEY_YUV_BLOCK_DATA (non-key data) of 16*16 or 8*8 size can be obtained.

[0055] By configuring data of different video modes in a targeted manner through different methods, video data in a compressed format of YUV video data of non-critical data in a non-critical area sent by a user can be accurately obtained.

[0056] (3) When the second video mode information indicates that the first non-critical data of the first data range in the data range is to be configured as the compressed video mode, and the second non-critical data of the second data range in the data range is to be configured as the YUV video mode, the first non-critical data is configured according to the compressed video mode to generate fourth data of the compressed video mode, and the second non-critical data is configured according to the YUV video mode to generate fifth data of the YUV video mode; the fourth data is written into the first comparison table to update the first comparison table, and the fifth data is written into the second comparison table to update the second comparison table.

[0057] It is understandable that the non-critical data may include both compressed video mode data and YUV video mode data. At this time, the configured compressed video mode data can be written into the first comparison table and the configured YUV video mode data can be written into the second comparison table according to the above methods (1) and (2).

[0058] Optionally, the above-mentioned step S204 of determining whether there is first data consistent with the data to be encrypted in the target comparison table includes: parsing the data to be encrypted to determine first video mode information of the data to be encrypted; when the first video mode information indicates that the data to be encrypted is data in a compressed video mode, determining an output signal corresponding to the data to be encrypted; determining data after data compression of the data to be encrypted according to the output signal; determining whether there is first data consistent with the data after data compression in the target comparison table; and when the compressed video mode information indicates that the data to be encrypted is data in a YUV video mode, determining whether there is first data consistent with the data to be encrypted in the target comparison table.

[0059] It can be understood that the method for determining whether there is first data consistent with the data to be encrypted in the target comparison table includes:

[0060] Determine the first video mode information of the data to be encrypted, and divide it into the following two cases according to the difference of the first video mode information:

[0061] (1) When it is determined that the data to be encrypted is data in a compressed video mode, the output signal one_block_end of the data to be encrypted (the signal indicates that compression of one block group of data is completed) is determined, and data after compression of the data to be encrypted is determined according to the output signal, and then the compressed data is compared with the data in the target comparison table to determine whether the first data exists in the target comparison table.

[0062] (2) When it is determined that the data to be encrypted is data in a YUV video mode, it is only necessary to determine whether there is first data consistent with the data to be encrypted in the target comparison table.

[0063] The key data and non-key data in the data to be encrypted are determined by the first comparison table and the second comparison table, and only the key data is encrypted, thereby reducing the amount of data for encryption data operation and thus reducing the power consumption of the server management control chip.

[0064] Wherein, after determining that the data to be encrypted is allowed to be encrypted, the method further includes: acquiring key information corresponding to the data to be encrypted; and encrypting the data to be encrypted according to the key information.

[0065] Optionally, after determining whether there is first data consistent with the data to be encrypted in the target comparison table in the above step S204, the method further includes: when it is determined that there is data consistent with sixth data in the data to be encrypted in the target comparison table, and there is no data consistent with other data in the data to be encrypted, adjusting the indication signal corresponding to the sixth data to the first indication signal, and adjusting the indication signal corresponding to the other data to the second indication signal, wherein the other data includes: data in the data to be encrypted except the sixth data; encrypting the other data according to the second indication signal to generate seventh data based on the encrypted other data and the sixth data.

[0066] Among them, after encrypting the other data according to the second indication signal to generate the encrypted data to be encrypted, the method also includes: determining the first position of the sixth data in the data to be encrypted, and assigning a first encryption identifier to the sixth data at the first position; and determining the second position of the other data in the data to be encrypted, and assigning a second encryption identifier to the other data at the second position; sorting the first encryption identifier and the second encryption identifier according to the first position and the second position to determine the encryption identification information table corresponding to the seventh data according to the sorted first encryption identifier and the sorted first encryption identifier.

[0067] According to whether the current data to be encrypted is actually encrypted, the generated encryption identification information table can more quickly locate the encrypted seventh data that needs to be decrypted, thereby improving the decryption efficiency.

[0068] It is understandable that after determining the key data that is allowed to be encrypted and the non-key data that is prohibited from being encrypted in the data to be encrypted, the data to be encrypted can also be encrypted. Specifically: determine the non-key data (i.e., the sixth data) in the data to be encrypted, pull down the indication signal corresponding to the sixth data (the indication signal after being pulled down is the first indication signal) to indicate that the sixth data is not encrypted. And pull up the indication signal corresponding to the key data (i.e., other data) in the data to be encrypted (the indication signal after being pulled up is the second or signal) to indicate that the other data is to be encrypted.

[0069] After encrypting the other data, it is necessary to assign a first encryption identifier to the sixth data, and assign a second encryption identifier to the encrypted other data, and determine the encryption identification information table according to the first encryption identifier and the second encryption identifier. For example: the first encryption identifier is 0, the second encryption identifier is 1, and the encryption flag information table is 110001000..., which means that the encryption status of the data of the current length is encryption, encryption, non-encryption, non-encryption, non-encryption, encryption, non-encryption, non-encryption.

[0070] Among them, after sorting the first encryption identifier and the second encryption identifier according to the first position and the second position to determine the encryption identification information table corresponding to the seventh data according to the sorted first encryption identifier and the sorted first encryption identifier, the method also includes: when receiving a decryption request to decrypt the seventh data, determining whether there is data to be decrypted in the seventh data according to the encryption identification information table; when it is determined that the data to be decrypted exists in the seventh data, determining a third position of the data to be decrypted according to the encryption identification information table; and sending the third position to the target device so that the target device decrypts the seventh data.

[0071] It is understandable that after determining the encryption identification information table, if the seventh data needs to be decrypted, the encryption identification information table can be read first, and which data in the seventh data needs to be decrypted can be determined through the encryption identification information table, and the response data can be decrypted after the data that needs to be decrypted is determined. Through the above technical solution, only the data that needs to be decrypted is decrypted, which improves the decryption efficiency of the data and reduces the power consumption of the target device.

[0072] In order to better understand the process of the above-mentioned data encryption determination method, the implementation process of the above-mentioned data encryption determination method is described below in combination with an optional embodiment, but it is not used to limit the technical solution of the embodiment of the present application.

[0073] The traditional video processing and encryption process of the server management control chip is as follows: the original video data (operating system interface) on the host side is transmitted to the video graphics array module (VGA) inside the baseboard management control chip through the high-speed peripheral component interconnect Express (PCIe) interface to generate the original video data in the red green blue color model (RGB) format, and then after the color space conversion, the luminance-chrominance-chrominance (Luma-Chroma-Chroma, referred to as YUV format) video data is generated, and the YUV format data is converted into 16*16 or 8*8 BLOCK (data block) data, and then compressed by the joint image format (Joint Photographic Experts Group, Joint Photographic Experts Group compression, referred to as JPEG) to obtain the compressed video data. After the compressed data or the original data in the YUV format is encrypted, the encrypted video data is written into the double data rate synchronous dynamic random access memory (Double Data Rate Synchronous Dynamic Random-Access Memory, referred to as external DDR). The purpose of encryption is to improve the security of remote server management and prevent the Internet Protocol (IP) from being stolen by criminals and then used to conduct malicious and illegal operations on the local server, causing the leakage of key information of the local server or other damage.

[0074] The traditional solution requires encryption of all data in the operating system interface. Although the chip hardware is encrypted on the local side, it will introduce a large amount of data calculation, causing the chip power consumption to increase rapidly (because video data is continuously generated). It will also cause many cycle delays. At the same time, the remote side first uses software to decrypt, and the efficiency of software decryption is very low, so it will cause the screen to be disconnected when the remote side displays it.

[0075] Figure 3 It is a schematic diagram of the video function in the server management control chip in the related art, such as Figure 3 As shown:

[0076] The processing process of the video processing function in the traditional solution is:

[0077] (1) The video memory space includes video memory space A and video memory space B. The video data of the HOST end is written to the video memory space A in the DDR through PCIe. The VGA module of the baseboard management control chip reads the data in the video memory space A. After processing inside the VGA, the original RGB format data is generated. The RGB data is processed by the data conversion module.

[0078] Among them, DATA_OUT_CTRL is a data output control module, which is used to control the transmission of data.

[0079] (2) RGB_CAP is an RGB data capture module. Its function is to obtain raw RGB data. It receives the output of the VGA digital video interface (DVI interface for short). The main signals are R_DATA[7:0], G_DATA[7:0], B_DATA[7:0] (all representing the signals output by the DVI interface), as well as the horizontal synchronization signal Hs, the field synchronization signal Vs, and the signal Data_en indicating that the data is valid.

[0080] (3) Color space conversion module (i.e. Figure 3 The RGB-YUV in the image is used to convert the RGB format to the YUV format, and the conversion process is completed using the matrix conversion formula.

[0081] Y=(0.257*R)+(0.504*G)+(0.098*B)+16;

[0082] U=0.148*R–0.291*G +0.439*B+128;

[0083] V=0.439*R-0.368*G-0.071*B+128.

[0084] (4) The YUV data that has completed the color space conversion needs to be converted into BLOCK format, converted into 16*16 or 8*8 BLOCK data, and then transmitted to the next stage. BLOCK format refers to the random access memory array (RAM) array cache of the data input by line in the original video stream. Then the read and write control of the RAM array is controlled to generate 16*16 and 8*8 BLOCK format data. Therefore, 16 Y_RAMs, 16 U_RAMs, and 16 V_RAMs are required for data caching. Specifically:

[0085] YUV write side control logic:

[0086] 1) In YUV420 mode, (the principle is to keep all Y data and keep U / V data in even rows and columns):

[0087] Write the Y data of row 0 / 16 / 32 / 48… into Y_RAM_0;

[0088] Write the Y data of row 1 / 17 / 33 / 49… into Y_RAM_1;

[0089] Write the Y data of row 2 / 18 / 34 / 50… into Y_RAM_2;…,

[0090] Write the Y data of row 15 / 31 / 47 / 63… into Y_RAM_15; and,

[0091] Write the even-numbered column U data of row 0 / 16 / 32 / 48… into U_RAM_0;

[0092] Write the even-numbered column U data of the 2nd / 18th / 34th / 50th…row into U_RAM_1;…,

[0093] Write the even-numbered column U data of rows 14 / 30 / 46 / 62… into U_RAM_7;

[0094] Write the even-numbered column U data of rows 14 / 30 / 46 / 62… into U_RAM_7; and,

[0095] Write the even-numbered column U data of row 0 / 16 / 32 / 48… into V_RAM_0;

[0096] Write the even-numbered column U data of the 2nd / 18th / 34th / 50th…row into V_RAM_1;…,

[0097] Write the even-numbered column U data of rows 14 / 30 / 46 / 62… into V_RAM_7.

[0098] 2) In YUV444 mode: (keep Y / U / V data of all rows and columns):

[0099] Write the Y data of row 0 / 8 / 16 / 24… into Y_RAM_0;

[0100] Write the Y data of row 1 / 9 / 17 / 25… into Y_RAM_1;

[0101] Write the Y data of row 2 / 10 / 18 / 26… into Y_RAM_2;…,

[0102] Write the Y data of row 7 / 15 / 23 / 31… into Y_RAM_7; and,

[0103] Write the U data of row 0 / 8 / 16 / 24… into U_RAM_0;

[0104] Write the U data of row 1 / 9 / 17 / 25… into U_RAM_1;

[0105] Write the U data of row 2 / 10 / 18 / 26… into U_RAM_2;…,

[0106] Write the U data of row 7 / 15 / 23 / 31… into U_RAM_7; and,

[0107] Write the V data of row 0 / 8 / 16 / 24… into V_RAM_0;

[0108] Write the V data of row 1 / 9 / 17 / 25… into V_RAM_1;

[0109] Write the V data of row 2 / 10 / 18 / 26… into V_RAM_2;…,

[0110] Write the V data of rows 7 / 15 / 23 / 31… into V_RAM_7.

[0111] YUV read-out side control logic:

[0112] 1) In YUV420 mode, read Y_RAM_0 16 times, Y_RAM_1 16 times... Y_RAM_15 16 times in sequence, thus forming 16*16 Y_BLOCK data;

[0113] 8 times U_RAM_0, 8 times U_RAM_1, 8 times U_RAM_7, forming 8*8 U_BLOCK data;

[0114] 8 times V_RAM_0, 8 times V_RAM_1, 8 times V_RAM_7, forming 8*8 V_BLOCK data;

[0115] Then cycle in sequence;

[0116] 2) In YUV444 mode, read Y_RAM_0 8 times, Y_RAM_1 8 times...Y_RAM_7 8 times in sequence to form 8*8 Y_BLOCK data;

[0117] 8 times U_RAM_0, 8 times U_RAM_1, 8 times U_RAM_7, forming 8*8 U_BLOCK data;

[0118] 8 times V_RAM_0, 8 times V_RAM_1, 8 times V_RAM_7, forming 8*8 V_BLOCK data.

[0119] (5) Input the YUV BLOCK data into the CMP IP to complete video compression and obtain compressed data.

[0120] also, Figure 3 The server management control chip also includes: DATA_ENCRY data encryption module, DATA_OUT_CTRL data output control module and EMAC embedded module access controller, among which EMAC can be remotely connected to the remote end software (Remote).

[0121] (6) The server management control chip has two video modes, one is YUV video mode and the other is compressed video mode. If the user selects the YUV video mode, the YUV data obtained after the color space conversion is sent to Figure 4 The encryption module in Figure 4 is a structural block diagram of a video encryption module in the related art. If the user selects the compressed video mode, the compressed video data is sent to Figure 4 The encryption module in .

[0122] in, Figure 4 The encryption modules in include:

[0123] SECRET_KEY_GEN (key generation module, i.e. Figure 4 SRC_KEY_GEN encryption key generation module in the module): It is responsible for generating specific key data according to a specific algorithm and encryption length, and then sending it to DATA_PROCESS (data processing module, typical processing methods such as "or", etc.) together with the video data of the encryption length obtained by the SRC_DATA_GEN (encryption data generation module) module (YUV data or compressed data, the encryption length is typically 128 bits or 192 bits, etc.), and finally obtaining the encrypted data. Write the encrypted data into the off-chip DDR space.

[0124] (7) The network module in the server management control chip reads the encrypted video data cached in the DDR, sends it to the remote end, and then displays it, thereby realizing the remote control and management of the local HOST host by the remote end.

[0125] In response to the above problems, an optional embodiment of the present application proposes a design method for optimizing the video encryption function in the server management control chip. Specifically: First, the user customizes the area of ​​non-critical data according to different application scenarios, and configures the relevant information to the key data identification module. The key data identification module captures the non-critical RGB data of the corresponding area. At the same time, the key data identification module reuses the color space conversion module, the BLOCK generation module, and the compression IP module to generate YUV_TABLE (YUV data comparison table) and CMP_DATA_TABLE (compressed data comparison table). At the same time, the optimized encryption module, according to the user-configured video mode, combined with the input agreed length of the data to be encrypted, is searched in parallel in YUV_TABLE or CMP_DATA_TABLE. If it is determined that the data of the current length to be encrypted is non-critical data, the data of the current length is not encrypted. If it is determined that the data of the current encrypted length is critical data, the data is encrypted according to the traditional scheme. At the same time, an encrypted data list is created and transmitted to the remote end. At the same time, the decryption software program of the remote end is modified. According to the encrypted data list, it is determined which data does not need to be decrypted and which data needs to be decrypted. Because the proportion of non-critical data information is very large in actual applications, the use of the optional embodiments of the present application will greatly reduce the video data that needs to be encrypted on the local end, and thus reduce the amount of data for encrypted data operations, thereby reducing the power consumption of the server management control chip. At the same time, at the remote end, the amount of data that needs to be decrypted is greatly reduced, which speeds up the software decryption, thereby reducing the video disconnection feeling, improving the display quality, and improving the human-computer interaction experience.

[0126] Figure 5 is a structural block diagram of a design method for optimizing the video encryption function in a server management control chip according to an optional embodiment of the present application, such as Figure 5 As shown:

[0127] Figure 5 Some modules in Figure 3 Different, specifically, including: ENCRY_FLAG_GEN (encryption flag generation module), DATA_ENCRY_MDY (data encryption module), KEY_REG_CFG (register configuration module), YUV_TABLE (color space conversion module), YUV_TABLE (YUV data comparison table) and CMP_DATA_TABLE (compressed data comparison table).

[0128] Other parts and Figure 3 Same as Figure 3 The module functions of the modules in the same part are also the same Figure 3 Consistent.

[0129] in, Figure 6 is a specific architecture diagram of DATA_ENCRY_MDY according to an optional embodiment of the present application, such as Figure 6 As shown:

[0130] DATA_ENCRY_MDY includes: SRC_DATA_COMP (data comparison module), DATA_PROCESS (data processing module), DATA_COMP (data compression module), FLAG_GEN (identification generation module), and SECRET_KEY_GEN (key generation module).

[0131] Figure 7 is a schematic diagram of a typical application scenario of a server according to an optional embodiment of the present application, such as Figure 7 As shown: In a typical server application scenario (operation management host operating system), Figure 7 The code area on the left side of the screen is the key data area. The entire blank area on the right side of the screen is the non-key data area, because even if such video or image data is intercepted by illegal elements, it will not affect the security of the server at all.

[0132] The specific steps of the optional embodiment of the present application can be applied to Figure 5 , Figure 6 In the architecture diagram shown, specifically:

[0133] (1) The user determines the range of duplicate data (i.e., the data range of this application) based on the current server application scenario. The range does not need to be very specific. At least a range of 16*16 pixels can be determined. For example: Figure 7 In the example, if the resolution is 640*480, the range of the non-critical data area can be determined to be 400*200.

[0134] It is understandable that the scope of the non-critical area is not unique, because in many application scenarios, there is more than one non-critical area.

[0135] (2) The location of non-critical information, video mode information (YUV video mode or compressed video mode), resolution information, etc. are configured to KEY_REG_CFG, i.e., the register configuration module. The register configuration module receives the relevant register configuration sent by the user and parses it.

[0136] (3) KEY_DATA_ANA module, namely the key data analysis module. The functions performed by the key data analysis module are very complex.

[0137] (3.1) The key data analysis module receives the register configuration. If the YUV video mode is configured, the key data analysis module captures the YUV format of the non-key information range data at the output port of the RGB-YUV module according to the non-key information range configured by the user. The RGB-YUV module needs to have the function of counting the pixel positions within a frame (based on the resolution information and the line / field synchronization signal) so that it can determine which range is the non-key information range. At the same time, N groups of unit length YUV data are captured in units of encryption length (N can be configured by the user through registers, or the default value, such as: 5 / 6). Only the values ​​of N consecutive groups of YUV data are the same (or the error is within the range allowed by the user, for example: the error of each group is less than 5%, and this error range can also be configured by the user through registers). The purpose of this is to remove the possible deviation when the user sets the range. The YUV format value of the data in the non-key area sent by the user can be accurately obtained: NO_KEY_YUV_DATA_0...NO_KEY_YUV_DATA_M (obtaining M+1 non-key YUVs). And write NO_KEY_YUV_DATA_0...NO_KEY_YUV_DATA_M respectively Figure 4 YUV_TABLE in .

[0138] (3.2) If the user configures the compressed video mode, the processing will be more complicated.

[0139] Determine the accurate YUV value of the non-critical area sent by the user. At this time, the value of the YUV BLOCK needs to be confirmed. It is necessary to determine whether the compression mode corresponding to the BLOCK size is YUV444 or YUV420. If it is YUV444 compression mode, the size of the YUVBLOCK is 8*8, and if it is YUV420, the size of the YUV BLOCK is 16*16. Capture N groups of YUVBLOCK data of unit length (N can be configured by the user through registers, or the default value can be used, for example: 5 / 6). Only the values ​​of N consecutive groups of YUV BLOCK data are the same (or the error is within the range allowed by the user, for example: the error of each group is less than 5%, and this error range can also be configured by the user through registers). The purpose of this is to remove the deviation that may exist when the user sets the range.

[0140] After obtaining the accurate value of the YUV BLOCK format of the non-key data (NO_KEY_YUV_BLOCK_DATA), it is necessary to determine the compressed data corresponding to the data in the YUV BLOCK format: change the resolution of CMP_IP (video compression IP, for example: JPEG format) to 8*8 or 16*16. Send NO_KEY_YUV_BLOCK_DATA to CMP_IP in the order of first sending Y_BLOCK, then sending U_BLOCK, and then sending V_BLOCK. The sending process is to input only one BLOCK of Y / U / V data. That is, in YUV444 mode, first input 8*8 Y data, then 8*8 U data, and then 8*8 V data. In YUV420 mode, first input 16*16 Y data, and then input 8*8 U data of even rows and even columns, that is, 16*16 U data, retaining even rows and even columns, is converted into 8*8 U data. Then input the 8*8V data of even rows and even columns, that is, the 16*16 V data, retaining the even rows and even columns, is transformed into 8*8 V data. Get the output result of CMP_IP, and remove the frame header and frame tail information at the same time, you can get the compressed data NO_KEY_CMP_DATA corresponding to the 16*16 or 8*8 size NO_KEY_YUV_BLOCK_DATA. Through the above process, you can accurately get the compressed format data of the YUV data in the non-key area sent by the user: NO_KEY_CMP_DATA_0...NO_KEY_CMP_DATA_P (get P+1 non-key YUV block compressed data), and write NO_KEY_CMP_DATA_0...NO_KEY_CMP_DATA_P into CMP_DATA_TABLE respectively.

[0141] (4) YUV_TABLE, i.e. the second comparison table of the present application. This module is used to cache the comparison table of non-critical data in YUV format.

[0142] (5) CMP_DATA_TABLE, i.e. the first comparison table of the present application, is a comparison table for caching non-critical data in YUV block compression format. Block compressed data in YUV444 and YUV420 compression formats need to be stored separately.

[0143] (6) DATA_ENCRY_MDY, this submodule is an optimization of the traditional solution DATA_ENCRY (data encryption module). The specific optimization parts are: adding DATA_COMP (data comparison module), the function of this submodule is to receive the encrypted data in encryption length units transmitted by the previous SRC_DATA_GEN module,

[0144] (6.1) If it is YUV video mode, then search in parallel from YUV_TABLE (i.e., compare and find in parallel whether NO_KEY_YUV_DATA_0...NO_KEY_YUV_DATA_M exists); check whether the current data to be encrypted is non-critical data. If it is determined that the current data to be encrypted is non-critical data, the data within this length will not be encrypted, and the FLAG_GEN submodule will pull down the indicator bit NEED_ENCRY (i.e., the indicator signal of this application). On the contrary, if it is determined that the data to be encrypted of the current length is critical data, the FLAG_GEN submodule will pull up the indicator signal NEED_ENCRY.

[0145] (6.2) If it is a compressed video mode, then according to the output signal one_block_end of CMP_IP (this signal indicates that the compression of a block group of data is completed), a group of data values ​​after YUV BLOCK data compression is obtained, and then parallel search is performed in CMP_DATA_TABLE (search NO_KEY_CMP_DATA_0...NO_KEY_CMP_DATA_P). Check whether the current data to be encrypted is non-critical data. If it is determined that the current data to be encrypted is non-critical data, the compressed data of the YUV BLOCK is not encrypted, and the FLAG_GEN submodule pulls down the indicator bit NEED_ENCRY. On the contrary, if it is determined that the compressed data to be encrypted by the YUVBLOCK is critical data, the FLAG_GEN submodule pulls up the indicator signal NEED_ENCRY.

[0146] (6.3) DATA_PROCESS, according to the data to be encrypted and the indication signal NEED_ENCRY and the key information transmitted from the previous stage, the data with NEED_ENCRY pulled high (i.e., other data of the present application) is encrypted, and the data with NEED_ENCRY pulled low (i.e., the sixth data of the present application) is not encrypted.

[0147] (7) ENCRY_FLAG_GEN, encryption flag generation module. The function of this submodule is to generate an encryption flag information table (i.e., the encryption identification information table of this application) according to whether the current data to be encrypted is actually encrypted. The 1-bit information ENCRY_FLAG in the encryption flag information table indicates whether the current length (the encrypted length in the YUV video mode or a group of BLOCK data in the compression mode) is encrypted. ENCRY_FLAG = 1 (i.e., the first encryption identifier of this application) indicates encryption; ENCRY_FLAG = 0 (i.e., the second encryption identifier of this application) indicates no encryption. For example: the encryption flag information table generated in the YUV mode is 110001000...; it indicates that the encryption status of the current length is encrypted, encrypted, not encrypted, not encrypted, not encrypted, encrypted, not encrypted, not encrypted.

[0148] (8) The driver of the EMAC (i.e., embedded module access controller) network module and the corresponding decryption software at the remote end also need corresponding modifications. Before reading the encrypted data of the current frame, the EMAC network driver must first read the encryption flag information table of the frame, and then read the encrypted data of the current frame. That is, the remote end decryption software first obtains the encryption flag information table of the current frame before decrypting, and does not decrypt the unencrypted data end indicated in the table. Through the optional embodiments of the present application, the decryption burden of the remote end decryption software can be greatly reduced, the decryption speed can be greatly accelerated, the sense of freeze in the video screen can be reduced, and the user experience can be greatly improved.

[0149] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0150] In this embodiment, a device for determining data encryption is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0151] Figure 8is a structural block diagram of a data encryption determination device according to an embodiment of the present application, such as Figure 8 As shown, the device comprises:

[0152] A first determination module 72 is used to determine a target comparison table corresponding to the data to be encrypted, wherein the target comparison table includes: non-critical data;

[0153] A second determination module 74 is used to determine whether there is first data consistent with the data to be encrypted in the target comparison table;

[0154] A third determination module 76, configured to determine to prohibit encryption of the to-be-encrypted data when it is determined that the first data exists in the target comparison table;

[0155] The fourth determination module 78 is used to determine that encryption of the to-be-encrypted data is allowed when it is determined that the first data does not exist in the target comparison table.

[0156] Through the data encryption determination device of the present application, the target comparison table corresponding to the data to be encrypted is determined, and the target comparison table includes: non-critical data; determining whether there is first data consistent with the data to be encrypted in the target comparison table; in the case of determining that there is first data consistent with the data to be encrypted in the target comparison table, determining that the data to be encrypted is prohibited from being encrypted; in the case of determining that there is first data consistent with the data to be encrypted in the target comparison table, determining that the data to be encrypted is allowed to be encrypted. According to the embodiment of the present application, after determining the target comparison table corresponding to the data to be encrypted, it can be determined whether the first data in the data to be encrypted is consistent with the non-critical data in the target comparison table. By comparing the data to be encrypted with the non-critical data in the target comparison table, the non-critical data in the data to be encrypted can be screened out, and then the non-critical data is not encrypted, and only the critical data in the data to be encrypted is encrypted. Through the embodiment of the present application, the problem of encrypting all data in the operating system interface in the related technology, resulting in the need to introduce a large amount of data calculation in the data encryption process, thereby causing the on-chip chip to consume a large amount of power. The power consumption of the on-chip chip is reduced.

[0157] In an exemplary embodiment, the first determination module 72 is also used to parse the data to be encrypted to determine the first video mode information of the data to be encrypted; when the first video mode information indicates that the data to be encrypted is data in a compressed video mode, the first comparison table is determined as the target comparison table, wherein the first comparison table is used to store data in a compressed data mode; when the first video mode information indicates that the data to be encrypted is data in a YUV video mode, the second comparison table is determined as the target comparison table, wherein the second comparison table is used for data in a YUV data mode.

[0158] In an exemplary embodiment, the first determination module 72 is further used to determine a data range corresponding to non-critical data in the operating system; parse the non-critical data within the data range to determine the second video mode information to be configured for the non-critical data; and update the first comparison table and / or the second comparison table according to the second video mode information.

[0159] In an exemplary embodiment, the first determination module 72 is also used to configure the non-critical data according to the compressed video mode to generate second data of the compressed video mode when the second video mode information indicates that the non-critical data within the data range are all to be configured as the compressed video mode; and write the second data into the first comparison table to update the first comparison table.

[0160] In an exemplary embodiment, the first determination module 72 is further used to configure the non-critical data according to the YUV video mode to generate third data of the YUV video mode when the second video mode information indicates that the non-critical data within the data range are all to be configured as the YUV video mode; and write the third data into the second comparison table to update the second comparison table.

[0161] In an exemplary embodiment, the first determination module 72 is also used to configure the first non-critical data according to the compressed video mode to generate fourth data of the compressed video mode, and configure the second non-critical data according to the YUV video mode to generate fifth data of the YUV video mode, when the second video mode information indicates that the first non-critical data of the first data range in the data range is to be configured as the compressed video mode, and the second non-critical data of the second data range in the data range is to be configured as the YUV video mode; write the fourth data into the first comparison table to update the first comparison table, and write the fifth data into the second comparison table to update the second comparison table.

[0162] In an exemplary embodiment, the second determination module 74 is also used to parse the data to be encrypted to determine the first video mode information of the data to be encrypted; when the first video mode information indicates that the data to be encrypted is data in a compressed video mode, determine the output signal corresponding to the data to be encrypted; determine the data after data compression of the data to be encrypted according to the output signal; determine whether there is first data consistent with the data after data compression in the target comparison table; when the compressed video mode information indicates that the data to be encrypted is data in a YUV video mode, determine whether there is first data consistent with the data to be encrypted in the target comparison table.

[0163] In an exemplary embodiment, the third determination module 76 is further configured to obtain key information corresponding to the data to be encrypted; and encrypt the data to be encrypted according to the key information.

[0164] In an exemplary embodiment, the second determination module 74 is also used to adjust the indication signal corresponding to the sixth data to a first indication signal and adjust the indication signal corresponding to the other data to a second indication signal when it is determined that there is data consistent with the sixth data in the data to be encrypted in the target comparison table and there is no data consistent with other data in the data to be encrypted, wherein the other data includes: data in the data to be encrypted except the sixth data; encrypting the other data according to the second indication signal to generate seventh data based on the encrypted other data and the sixth data.

[0165] In an exemplary embodiment, the second determination module 74 is also used to determine the first position of the sixth data in the data to be encrypted, and assign a first encryption identifier to the sixth data at the first position; and determine the second position of the other data in the data to be encrypted, and assign a second encryption identifier to the other data at the second position; sort the first encryption identifier and the second encryption identifier according to the first position and the second position, so as to determine the encryption identification information table corresponding to the seventh data according to the sorted first encryption identifier and the sorted first encryption identifier.

[0166] In an exemplary embodiment, the second determination module 74 is further used to determine whether there is data to be decrypted in the seventh data according to the encryption identification information table when a decryption request for decrypting the seventh data is received; when it is determined that the data to be decrypted exists in the seventh data, determine a third position of the data to be decrypted according to the encryption identification information table; and send the third position to the target device so that the target device decrypts the seventh data.

[0167] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps in the above method embodiment when running.

[0168] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0169] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in the above method embodiment.

[0170] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0171] An embodiment of the present application further provides a computer program product, including a computer program, which is implemented to perform the steps in the above method embodiment when executed by a processor.

[0172] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0173] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.

[0174] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for determining data encryption, characterized in that: include: Determine a target comparison table corresponding to the data to be encrypted, wherein the target comparison table includes: non-critical data; Determine whether there is first data consistent with the data to be encrypted in the target comparison table; In a case where it is determined that the first data exists in the target comparison table, determining to prohibit encryption of the data to be encrypted; In a case where it is determined that the first data does not exist in the target comparison table, determining to allow encryption of the data to be encrypted; Wherein, determining the target comparison table corresponding to the data to be encrypted includes: Parsing the data to be encrypted to determine first video mode information of the data to be encrypted; In a case where the first video mode information indicates that the data to be encrypted is data in a compressed video mode, determining a first comparison table as the target comparison table, wherein the first comparison table is used to store data in a compressed data mode; In a case where the first video mode information indicates that the data to be encrypted is data in a YUV video mode, determining a second comparison table as the target comparison table, wherein the second comparison table is used for data in a YUV data mode; Before determining the target comparison table corresponding to the data to be encrypted, the method further includes: Determine the data range corresponding to non-critical data in the operating system; Parsing the non-critical data within the data range to determine the second video mode information to be configured for the non-critical data, wherein the second video mode information includes: a compressed video mode and a YUV video mode; updating the first comparison table and / or the second comparison table according to the second video mode information; Wherein, updating the first comparison table and / or the second comparison table according to the second video mode information includes: In a case where the second video mode information indicates that all non-critical data within the data range are to be configured as the compressed video mode, configuring the non-critical data according to the compressed video mode to generate second data in the compressed video mode; Writing the second data into the first comparison table to update the first comparison table; The step of generating the first comparison table and / or the second comparison table according to the second video mode information includes: When the second video mode information indicates that all non-critical data within the data range are to be configured as the YUV video mode, configuring the non-critical data according to the YUV video mode to generate third data in the YUV video mode; Writing the third data into the second comparison table to update the second comparison table; Wherein, updating the first comparison table and / or the second comparison table according to the second video mode information includes: In a case where the second video mode information indicates that first non-critical data of a first data range in the data range is to be configured as the compressed video mode, and second non-critical data of a second data range in the data range is to be configured as the YUV video mode, configuring the first non-critical data according to the compressed video mode to generate fourth data in the compressed video mode, and configuring the second non-critical data according to the YUV video mode to generate fifth data in the YUV video mode; writing the fourth data into the first comparison table to update the first comparison table, and writing the fifth data into the second comparison table to update the second comparison table; After determining whether there is first data consistent with the data to be encrypted in the target comparison table, the method further includes: When it is determined that there is data consistent with the sixth data in the data to be encrypted in the target comparison table, and there is no data consistent with other data in the data to be encrypted, adjusting the indication signal corresponding to the sixth data to a first indication signal, and adjusting the indication signal corresponding to the other data to a second indication signal, wherein the other data includes: data in the data to be encrypted except the sixth data; encrypting the other data according to the second indication signal to generate seventh data according to the encrypted other data and the sixth data; Wherein, after encrypting the other data according to the second indication signal to generate seventh data according to the encrypted other data and the sixth data, the method further includes: determining a first position of the sixth data in the data to be encrypted, and assigning a first encryption identifier to the sixth data at the first position; and, Determine a second position of the other data in the data to be encrypted, and assign a second encryption identifier to the other data at the second position, wherein the first encryption identifier is used to indicate that the data has been encrypted, and the second encryption identifier is used to indicate that the data has not been encrypted; The first encryption identifier and the second encryption identifier are sorted according to the first position and the second position, so as to determine an encryption identification information table corresponding to the seventh data according to the sorted first encryption identifier and the sorted first encryption identifier.

2. The method for determining data encryption according to claim 1, characterized in that: Determining whether there is first data consistent with the data to be encrypted in the target comparison table includes: Parsing the data to be encrypted to determine first video mode information of the data to be encrypted; In the case where the first video mode information indicates that the data to be encrypted is data in a compressed video mode, determining an output signal corresponding to the data to be encrypted; determining data after data compression of the data to be encrypted according to the output signal; and determining whether there is first data in the target comparison table that is consistent with the data after data compression; When the compressed video mode information indicates that the data to be encrypted is data in a YUV video mode, it is determined whether there is first data consistent with the data to be encrypted in the target comparison table.

3. The method for determining data encryption according to claim 1, characterized in that: After determining that encryption of the data to be encrypted is permitted, the method further includes: Obtaining key information corresponding to the data to be encrypted; The data to be encrypted is encrypted according to the key information.

4. The method for determining data encryption according to claim 1, characterized in that: After sorting the first encryption identifier and the second encryption identifier according to the first position and the second position to determine the encryption identification information table corresponding to the seventh data according to the sorted first encryption identifier and the sorted first encryption identifier, the method further includes: In case of receiving a decryption request for decrypting the seventh data, determining whether there is data to be decrypted in the seventh data according to the encryption identification information table; In the case where it is determined that the data to be decrypted exists in the seventh data, determining a third position of the data to be decrypted according to the encryption identification information table; The third position is sent to a target device so that the target device decrypts the seventh data.

5. A data encryption determination device, characterized in that: include: A first determination module is used to determine a target comparison table corresponding to the data to be encrypted, wherein the target comparison table includes: non-critical data; A second determination module, used to determine whether there is first data consistent with the data to be encrypted in the target comparison table; A third determination module, configured to determine that encryption of the to-be-encrypted data is prohibited when it is determined that the first data exists in the target comparison table; A fourth determination module, configured to determine that encryption of the data to be encrypted is allowed when it is determined that the first data does not exist in the target comparison table; The first determination module is further used to parse the data to be encrypted to determine the first video mode information of the data to be encrypted; when the first video mode information indicates that the data to be encrypted is data in a compressed video mode, the first comparison table is determined as the target comparison table, wherein the first comparison table is used to store data in a compressed data mode; when the first video mode information indicates that the data to be encrypted is data in a YUV video mode, the second comparison table is determined as the target comparison table, wherein the second comparison table is used for data in a YUV data mode; The first determination module is further used to determine a data range corresponding to non-critical data in the operating system; parse the non-critical data within the data range to determine the second video mode information to be configured for the non-critical data; and update the first comparison table and / or the second comparison table according to the second video mode information; The first determination module is further configured to configure the non-critical data according to the compressed video mode to generate second data in the compressed video mode when the second video mode information indicates that all non-critical data within the data range are to be configured as the compressed video mode; and write the second data into the first comparison table to update the first comparison table; The first determination module is further configured to configure the non-critical data according to the YUV video mode to generate third data in the YUV video mode when the second video mode information indicates that the non-critical data within the data range are to be configured as the YUV video mode; and write the third data into the second comparison table to update the second comparison table; Wherein, the first determination module is further used for, when the second video mode information indicates that the first non-critical data of the first data range in the data range is to be configured as the compressed video mode, and the second non-critical data of the second data range in the data range is to be configured as the YUV video mode, configuring the first non-critical data according to the compressed video mode to generate fourth data of the compressed video mode, and configuring the second non-critical data according to the YUV video mode to generate fifth data of the YUV video mode; writing the fourth data into the first comparison table to update the first comparison table, and writing the fifth data into the second comparison table to update the second comparison table; The second determination module is further configured to, when it is determined that there is data consistent with the sixth data in the data to be encrypted in the target comparison table, and there is no data consistent with other data in the data to be encrypted, adjust the indication signal corresponding to the sixth data to the first indication signal, and adjust the indication signal corresponding to the other data to the second indication signal, wherein the other data includes: data in the data to be encrypted except the sixth data; encrypt the other data according to the second indication signal, so as to generate the seventh data according to the encrypted other data and the sixth data; Among them, the second determination module is also used to determine the first position of the sixth data in the data to be encrypted, and assign a first encryption identifier to the sixth data at the first position; and determine the second position of the other data in the data to be encrypted, and assign a second encryption identifier to the other data at the second position; sort the first encryption identifier and the second encryption identifier according to the first position and the second position, so as to determine the encryption identification information table corresponding to the seventh data according to the sorted first encryption identifier and the sorted first encryption identifier.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method according to any one of claims 1 to 4 when executed by a processor.

7. An electronic device 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 steps of the method according to any one of claims 1 to 4 are implemented.

8. A computer program product, comprising a computer program, characterized in that The computer program is used by a processor to execute the steps of the method described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Audio file processing method and equipment

    CN104517068A