Code stream secure transmission method based on data dynamic grading and electronic equipment
Through dynamic data hierarchical selection of encryption and signature operations, the problem of excessive computing resources occupied in data transmission is solved, and the transmission efficiency and speed are improved.
Patent Information
- Application Number
- CN202411855393.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2044-12-16
AI Technical Summary
During the massive data transmission process, the existing encrypted transmission methods occupy too much computing resources, reducing transmission efficiency.
The security level of data security transmission method is used based on dynamic data hierarchy. The data security level is determined based on the target parameters of the data (frame type, frame content, frame source, frame generation time and frame mark), and the encryption and signature operations are selected on this basis. , reduce unnecessary processing and transmission resources.
It reduces the computing resource consumption and transmission resource usage during data transmission, and improves the data transmission rate.
Smart Images

Figure CN119316234A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a code stream security transmission method and electronic device based on dynamic data classification. Background Art
[0002] As people's safety awareness increases, data transmission security is increasingly valued by the public. To ensure data transmission security, encryption transmission is usually used, and integrity verification is added to ensure data security. However, massive data transmission in the network will occupy too much computing resources for both the sender and the receiver, reducing transmission efficiency. Summary of the invention
[0003] The present application provides a code stream security transmission method and electronic device based on dynamic data classification, which can reduce the resource occupation caused by the sender when encrypting and signing the data to be transmitted at a low security level, and at the same time reduce the resource occupation caused by the receiving side when decrypting and verifying the data to be transmitted, thereby improving data processing efficiency.
[0004] In order to achieve the above technical objectives, this application adopts the following technical solutions: In a first aspect, an embodiment of the present application provides a method for secure transmission of a code stream based on dynamic data classification, the method being applied to a data sending end, the method comprising: Acquire first data to be transmitted, where the first data is video frame data; determining a security level of the first data according to a target parameter corresponding to the first data; the target parameter includes at least one of a frame type, a frame content, a frame source, a frame generation time, and a frame mark, the frame mark being used to indicate whether the first data is data marked by a user; When the security level of the first data is higher than the preset level, performing a processing operation on the first data to obtain second data, the processing operation includes an encryption operation and / or a signing operation; If the security level of the first data is not higher than a preset level, determining the first data as the second data; Generate a message including a level identifier of a security level of the first data and the second data; the level identifier is used by a data receiving end to determine the security level of the first data; Send a message to the data receiving end.
[0005] The technical solution provided by the present application at least brings the following beneficial effects: different data to be transmitted have different importance. The present application divides different security levels for data to be transmitted with different importance, and the processing operations corresponding to different security levels are also different. For some data to be transmitted with low security levels, it is not necessary to perform encryption operations or signature operations on all of them, and they can be directly transmitted to the receiving party. In other words, before the data is transmitted, the data sending end dynamically classifies the data to be transmitted, and the security level of the data to be transmitted changes with the importance of the data to be transmitted. Different security levels correspond to different processing operations, and not all data to be transmitted need to be encrypted and signed before they can be transmitted. Therefore, when the data to be transmitted is transmitted, the resource occupation caused by the sender when encrypting and signing the data to be transmitted can be reduced, and the resource occupation caused by the receiving side when decrypting and verifying the data to be transmitted can also be reduced, thereby reducing the computing resource consumption of the receiving end. In addition, the data to be transmitted with a low security level will not carry the relevant information of the encryption operation when it is transmitted, nor will it carry the relevant information of the signature operation, which will reduce a part of the occupied transmission resources and increase the data transmission rate.
[0006] In one possible implementation, when the security level of the first data is the second level, a signature operation is performed on the first data to obtain second data including signature verification information and the first data; the second level is higher than the first level; and / or, when the security level of the first data is the third level, an encryption operation is performed on the first data using a preset encryption algorithm, and a signature operation is performed on the first data to obtain second data including signature verification information and the encrypted first data; the third level is higher than the second level.
[0007] In one possible implementation, when the security level of the first data is the second level, the first data is encrypted using a preset encryption algorithm, and the encrypted first data is used as the second data; the second level is higher than the first level; and / or, when the security level of the first data is the third level, the first data is encrypted using a preset encryption algorithm, and the first data is signed to obtain second data including signature verification information and the encrypted first data; the third level is higher than the second level.
[0008] In one possible implementation, frame types include: key frames and / or non-key frames, and frame contents include: dynamic frames and / or static frames, dynamic frames are used to characterize the presence of moving targets in video frame data, and static frames are used to characterize the absence of moving targets in video frame data; the method also includes: performing moving target identification on video frame data to determine whether there is a moving target in the video frame data; if there is a moving target in the video frame data, determining that the frame content corresponding to the video frame data is a dynamic frame; if there is no moving target in the video frame data, determining that the frame content corresponding to the video frame data is a static frame; and / or, based on a video coding standard, determining the frame type corresponding to the video frame data.
[0009] In one possible implementation, a first correspondence is pre-stored in a data sending end, and the first correspondence is used to characterize the correspondence between a target parameter and a security level; the security level of the first data is determined according to the target parameter corresponding to the first data, including: determining the security level of the first data based on the first correspondence and the target parameter corresponding to the first data; wherein, in a case where the target parameter corresponding to the video frame data includes a frame type, the security level of the video frame data corresponding to the key frame is higher than the security level of the video frame data corresponding to the non-key frame; or, in a case where the target parameter corresponding to the video frame data includes a frame content, the security level of the video frame data corresponding to the dynamic frame is higher than the security level of the video frame data corresponding to the static frame. The security level of the data; or, in the case where the target parameters corresponding to the video frame data include the frame type and the frame content: if the frame types corresponding to the video frame data are the same, the security level of the video frame data corresponding to the dynamic frames is higher than the security level of the video frame data corresponding to the static frames; if the frame contents corresponding to the video frame data are the same, the security level of the video frame data corresponding to the key frames is higher than the security level of the video frame data corresponding to the non-key frames; the security level of the video frame data corresponding to the key frames and dynamic frames is higher than the security level of the video frame data corresponding to the non-key frames and static frames; the security level of the video frame data corresponding to the key frames and static frames is the same as the security level of the video frame data corresponding to the non-key frames and dynamic frames.
[0010] In one possible implementation, a preset coding standard stipulates that the data to be transmitted is written into a data unit, the data unit includes a header position and a data position, the header position includes a first position for writing an importance character, the importance character is used to indicate the importance of the data in the data unit, the data position is used to write the data to be transmitted, and the header position is located before the data position; when the video coding standard is the preset coding standard, a message including a level identifier of the security level of the first data and the second data is generated, including: writing the level identifier of the security level of the first data in the first position of the header position, writing the second data in the data position, and obtaining the message to be transmitted; when the video coding standard is not the preset coding standard, a message including a level identifier of the security level of the first data and the second data is generated, including: constructing a second position for writing the level identifier of the security level of the first data in the format of the message; the format of the message also includes the data position, and the second position is located before the data position; writing the level identifier of the security level of the first data in the second position, writing the second data in the data position, and obtaining the message to be transmitted.
[0011] In one possible implementation, the frame source includes an important source and / or an unimportant source; the frame generation time includes an important time period and / or an unimportant time period; the frame tag includes an important tag and / or an unimportant tag; a first correspondence is pre-stored in the data sending end, and the first correspondence is used to characterize the correspondence between the target parameter and the security level; the security level of the first data is determined according to the target parameter corresponding to the first data, including: determining the security level of the first data based on the first correspondence and the target parameter corresponding to the first data; wherein, when the target parameter corresponding to the video frame data includes the frame source, the security level of the video frame data corresponding to the important source is higher than the security level of the video frame data corresponding to the unimportant source; or, when the target parameter corresponding to the video frame data includes the frame generation time, the security level of the video frame data corresponding to the important time period is higher than the security level of the video frame data corresponding to the unimportant time period; or, when the target parameter corresponding to the video frame data includes the frame tag, the security level of the video frame data corresponding to the important tag is higher than the security level of the video frame data corresponding to the unimportant tag.
[0012] In a possible implementation manner, when the second data includes signature verification information, the signature verification information is located at the end of the second data.
[0013] In the second aspect, an embodiment of the present application provides a method for secure transmission of a code stream based on dynamic data classification, which is applied to a data receiving end, and the method includes: receiving a message sent by a data sending end, the message including a level identifier and second data; determining the security level corresponding to the level identifier in the message; when the security level is higher than a preset level, processing the second data to obtain first data, the first data being video frame data; the processing operation includes a decryption operation and / or a signature verification operation; when the security level is not higher than the preset level, determining that the second data is the first data; wherein the security level is the security level of the first data; the security level of the first data is determined by the data sending end according to the target parameters corresponding to the first data, the target parameters including at least one of the frame type, frame content, frame source, frame generation time and frame mark, and the frame mark is used to characterize whether the first data is data marked by the user.
[0014] In one possible implementation, when the security level is the second level, a signature verification operation is performed on the second data to obtain the first data; the second level is higher than the first level; and / or, when the security level is the third level, a preset decryption algorithm is used to perform a decryption operation on the second data, and a signature verification operation is performed on the second data to obtain the first data; the third level is higher than the second level.
[0015] In one possible implementation, when the security level is the second level, a preset decryption algorithm is used to decrypt the second data to obtain the first data; the second level is higher than the first level; and / or, when the security level is the third level, a preset decryption algorithm is used to decrypt the second data, and a signature verification operation is performed on the second data to obtain the first data; the third level is higher than the second level.
[0016] In one possible implementation, the frame types include: key frames and / or non-key frames, and the frame contents include: dynamic frames and / or static frames. The dynamic frames are used to represent the presence of moving targets in the video frame data, and the static frames are used to represent the absence of moving targets in the video frame data. The frame content corresponding to the first data is determined by the data sending end after the data sending end identifies the moving target of the video frame, and the frame type corresponding to the first data is determined by the data sending end based on the video coding standard.
[0017] In one possible implementation, when the target parameter corresponding to the video frame data includes a frame type, the security level of the video frame data corresponding to the key frame is higher than the security level of the video frame data corresponding to the non-key frame; or, when the target parameter corresponding to the video frame data includes a frame content, the security level of the video frame data corresponding to the dynamic frame is higher than the security level of the video frame data corresponding to the static frame; or, when the target parameter corresponding to the video frame data includes a frame type and a frame content: if the frame types corresponding to the video frame data are the same, the security level of the video frame data corresponding to the dynamic frame is higher than the security level of the video frame data corresponding to the static frame; if the frame contents corresponding to the video frame data are the same, the security level of the video frame data corresponding to the key frame is higher than the security level of the video frame data corresponding to the non-key frame; the security level of the video frame data corresponding to the key frame and the dynamic frame is higher than the security level of the video frame data corresponding to the non-key frame and the static frame; the security level of the video frame data corresponding to the key frame and the static frame is the same as the security level of the video frame data corresponding to the non-key frame and the dynamic frame.
[0018] In one possible implementation, the preset coding standard stipulates that the data to be transmitted is written in a data unit, the data unit includes a header position and a data position, the header position includes a first position for writing an importance character, the importance character is used to indicate the importance of the data in the data unit, the data position is used to write the data to be transmitted, and the header position is located before the data position; in the case where the video coding standard is the preset coding standard, the level identifier of the security level of the first data is written in the first position in the header position, and the second data is written in the data position; in the case where the video coding standard is not the preset coding standard, a second position and a data position are constructed in the format of the message, the second position is located before the data position, the level identifier of the security level of the first data is written in the second position, and the second data is written in the data position.
[0019] In one possible implementation, the frame source includes an important source and / or an unimportant source; the frame generation moment includes an important time period and / or an unimportant time period; the frame mark includes an important mark and / or an unimportant mark; when the target parameter corresponding to the video frame data includes the frame source, the security level of the video frame data corresponding to the important source is higher than the security level of the video frame data corresponding to the unimportant source; or, when the target parameter corresponding to the video frame data includes the frame generation moment, the security level of the video frame data corresponding to the important time period is higher than the security level of the video frame data corresponding to the unimportant time period; or, when the target parameter corresponding to the video frame data includes the frame mark, the security level of the video frame data corresponding to the important mark is higher than the security level of the video frame data corresponding to the unimportant mark.
[0020] In a possible implementation manner, when the second data includes signature verification information, the signature verification information is located at the end of the second data.
[0021] In a third aspect, the present application provides a device for secure transmission of a code stream based on dynamic data classification, which is applied to a data sending end, and the device includes: An acquisition module, used for acquiring first data to be transmitted, where the first data is video frame data; a processing module, configured to determine the security level of the first data according to a target parameter corresponding to the first data; the target parameter includes at least one of a frame type, a frame content, a frame source, a frame generation time, and a frame tag, the frame tag being used to characterize whether the first data is data marked by a user; when the security level of the first data is higher than a preset level, performing a processing operation on the first data to obtain second data, the processing operation including an encryption operation and / or a signature operation; when the security level of the first data is not higher than a preset level, determining the first data as second data; generating a level identifier including the security level of the first data and a message of the second data; the level identifier is used by a data receiving end to determine the security level of the first data; The sending module is used to send messages to the data receiving end.
[0022] In one possible implementation, the preset level is the first level; the processing module is specifically used to: when the security level of the first data is the second level, sign the first data to obtain second data including signature verification information and the first data; the second level is higher than the first level; and / or, when the security level of the first data is the third level, encrypt the first data using a preset encryption algorithm, and sign the first data to obtain second data including signature verification information and the encrypted first data; the third level is higher than the second level.
[0023] In one possible implementation, the preset level is the first level; the processing module is specifically used to: when the security level of the first data is the second level, use a preset encryption algorithm to encrypt the first data, and use the encrypted first data as the second data; the second level is higher than the first level; and / or, when the security level of the first data is the third level, use a preset encryption algorithm to encrypt the first data, and sign the first data to obtain second data including signature verification information and the encrypted first data; the third level is higher than the second level.
[0024] In one possible implementation, frame types include: key frames and / or non-key frames, and frame contents include: dynamic frames and / or static frames. Dynamic frames are used to characterize the presence of moving targets in video frame data, and static frames are used to characterize the absence of moving targets in video frame data. The processing module is further used to: perform moving target identification on video frame data to determine whether there is a moving target in the video frame data; if there is a moving target in the video frame data, determine that the frame content corresponding to the video frame data is a dynamic frame; if there is no moving target in the video frame data, determine that the frame content corresponding to the video frame data is a static frame; and / or, based on a video coding standard, determine the frame type corresponding to the video frame data.
[0025] In one possible implementation, a first correspondence is pre-stored in a data sending end, and the first correspondence is used to characterize the correspondence between a target parameter and a security level; a processing module is specifically used to: determine the security level of the first data based on the first correspondence and the target parameter corresponding to the first data; wherein, when the target parameter corresponding to the video frame data includes a frame type, the security level of the video frame data corresponding to a key frame is higher than the security level of the video frame data corresponding to a non-key frame; or, when the target parameter corresponding to the video frame data includes a frame content, the security level of the video frame data corresponding to a dynamic frame is higher than the security level of the video frame data corresponding to a static frame; or In the case where the target parameters corresponding to the video frame data include frame type and frame content: if the frame types corresponding to the video frame data are the same, the security level of the video frame data corresponding to dynamic frames is higher than the security level of the video frame data corresponding to static frames; if the frame contents corresponding to the video frame data are the same, the security level of the video frame data corresponding to key frames is higher than the security level of the video frame data corresponding to non-key frames; the security level of the video frame data corresponding to key frames and dynamic frames is higher than the security level of the video frame data corresponding to non-key frames and static frames; the security level of the video frame data corresponding to key frames and static frames is the same as the security level of the video frame data corresponding to non-key frames and dynamic frames.
[0026] In one possible implementation, the preset coding standard stipulates that the data to be transmitted is written in a data unit, the data unit includes a header position and a data position, the header position includes a first position for writing an importance character, the importance character is used to indicate the importance of the data in the data unit, the data position is used to write the data to be transmitted, and the header position is located before the data position; when the video coding standard is the preset coding standard, the processing module is specifically used to: write a level identifier of the security level of the first data in the first position of the header position, write the second data in the data position, and obtain the message to be transmitted, and the header position is located before the data position; when the video coding standard is not the preset coding standard, the processing module is specifically used to: construct a second position for writing a level identifier of the security level of the first data in the format of the message; the format of the message also includes a data position, and the second position is located before the data position; write the level identifier of the security level of the first data in the second position, write the second data in the data position, and obtain the message to be transmitted.
[0027] In one possible implementation, the frame source includes an important source and / or an unimportant source; the frame generation time includes an important time period and / or an unimportant time period; the frame tag includes an important tag and / or an unimportant tag; a first corresponding relationship is pre-stored in the data sending end, and the first corresponding relationship is used to characterize the corresponding relationship between the target parameter and the security level; the processing module is specifically used to: determine the security level of the first data based on the first corresponding relationship and the target parameter corresponding to the first data; wherein, when the target parameter corresponding to the video frame data includes the frame source, the security level of the video frame data corresponding to the important source is higher than the security level of the video frame data corresponding to the unimportant source; or, when the target parameter corresponding to the video frame data includes the frame generation time, the security level of the video frame data corresponding to the important time period is higher than the security level of the video frame data corresponding to the unimportant time period; or, when the target parameter corresponding to the video frame data includes the frame tag, the security level of the video frame data corresponding to the important tag is higher than the security level of the video frame data corresponding to the unimportant tag.
[0028] In a possible implementation manner, when the second data includes signature verification information, the signature verification information is located at the end of the second data.
[0029] In a fourth aspect, the present application provides a device for securely transmitting a code stream based on dynamic data classification, which is applied to a data receiving end, and the device includes: A receiving module, used for receiving a message sent by a data sending end, wherein the message includes a level identifier and second data; A processing module is used to determine the security level corresponding to the level identifier in the message; when the security level is higher than the preset level, the second data is processed to obtain the first data, and the first data is the video frame data; the processing operation includes a decryption operation and / or a signature verification operation; when the security level is not higher than the preset level, the second data is determined to be the first data; wherein the security level is the security level of the first data; the security level of the first data is determined by the data sending end according to the target parameters corresponding to the first data, and the target parameters include at least one of the frame type, frame content, frame source, frame generation time and frame mark, and the frame mark is used to indicate whether the first data is data marked by the user.
[0030] In one possible implementation, the preset level is the first level; the processing module is specifically used to: when the security level is the second level, perform a signature verification operation on the second data to obtain the first data; the second level is higher than the first level; and / or, when the security level is the third level, use a preset decryption algorithm to perform a decryption operation on the second data, and perform a signature verification operation on the second data to obtain the first data; the third level is higher than the second level.
[0031] In one possible implementation, the preset level is the first level; the processing module is specifically used to: when the security level is the second level, use a preset decryption algorithm to decrypt the second data to obtain the first data; the second level is higher than the first level; and / or, when the security level is the third level, use a preset decryption algorithm to decrypt the second data, and perform a signature verification operation on the second data to obtain the first data; the third level is higher than the second level.
[0032] In one possible implementation, the frame types include: key frames and / or non-key frames, and the frame contents include: dynamic frames and / or static frames. The dynamic frames are used to represent the presence of moving targets in the video frame data, and the static frames are used to represent the absence of moving targets in the video frame data. The frame content corresponding to the first data is determined by the data sending end after the data sending end identifies the moving target of the video frame, and the frame type corresponding to the first data is determined by the data sending end based on the video coding standard.
[0033] In one possible implementation, when the target parameter corresponding to the video frame data includes a frame type, the security level of the video frame data corresponding to the key frame is higher than the security level of the video frame data corresponding to the non-key frame; or, when the target parameter corresponding to the video frame data includes a frame content, the security level of the video frame data corresponding to the dynamic frame is higher than the security level of the video frame data corresponding to the static frame; or, when the target parameter corresponding to the video frame data includes a frame type and a frame content: if the frame types corresponding to the video frame data are the same, the security level of the video frame data corresponding to the dynamic frame is higher than the security level of the video frame data corresponding to the static frame; if the frame contents corresponding to the video frame data are the same, the security level of the video frame data corresponding to the key frame is higher than the security level of the video frame data corresponding to the non-key frame; the security level of the video frame data corresponding to the key frame and the dynamic frame is higher than the security level of the video frame data corresponding to the non-key frame and the static frame; the security level of the video frame data corresponding to the key frame and the static frame is the same as the security level of the video frame data corresponding to the non-key frame and the dynamic frame.
[0034] In one possible implementation, the preset coding standard stipulates that the data to be transmitted is written in a data unit, the data unit includes a header position and a data position, the header position includes a first position for writing an importance character, the importance character is used to indicate the importance of the data in the data unit, the data position is used to write the data to be transmitted, and the header position is located before the data position; in the case where the video coding standard is the preset coding standard, the level identifier of the security level of the first data is written in the first position in the header position, and the second data is written in the data position; in the case where the video coding standard is not the preset coding standard, a second position and a data position are constructed in the format of the message, the second position is located before the data position, the level identifier of the security level of the first data is written in the second position, and the second data is written in the data position.
[0035] In one possible implementation, the frame source includes an important source and / or an unimportant source; the frame generation moment includes an important time period and / or an unimportant time period; the frame mark includes an important mark and / or an unimportant mark; when the target parameter corresponding to the video frame data includes the frame source, the security level of the video frame data corresponding to the important source is higher than the security level of the video frame data corresponding to the unimportant source; or, when the target parameter corresponding to the video frame data includes the frame generation moment, the security level of the video frame data corresponding to the important time period is higher than the security level of the video frame data corresponding to the unimportant time period; or, when the target parameter corresponding to the video frame data includes the frame mark, the security level of the video frame data corresponding to the important mark is higher than the security level of the video frame data corresponding to the unimportant mark.
[0036] In a possible implementation manner, when the second data includes signature verification information, the signature verification information is located at the end of the second data.
[0037] In a fifth aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement any one of the code stream security transmission methods based on dynamic data classification provided in the first aspect or the second aspect.
[0038] In a sixth aspect, the present application provides a computer-readable storage medium, which stores computer-executable instructions. When the computer instructions are executed by a processor, they implement any one of the code stream security transmission methods based on dynamic data classification provided in the first aspect or the second aspect.
[0039] In a seventh aspect, the present application provides a computer program product, which includes computer instructions. When the computer instructions are executed by a processor, they implement any one of the code stream security transmission methods based on dynamic data classification provided in the first aspect or the second aspect.
[0040] For the specific description of the third to seventh aspects and their various implementations in the present application, reference may be made to the detailed description in the first and second aspects and their various implementations; and for the beneficial effects of the third to seventh aspects and their various implementations, reference may be made to the analysis of the beneficial effects in the first and second aspects and their various implementations, which will not be repeated here.
[0041] These and other aspects of the present application will become more apparent from the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 A schematic diagram of the architecture of a data processing system provided in an embodiment of the present application; Figure 2 A schematic diagram of a flow chart of a method for secure transmission of a code stream based on dynamic data classification provided in an embodiment of the present application; Figure 3 A schematic diagram of a data format provided in an embodiment of the present application; Figure 4 A schematic diagram of a NALU header format provided in an embodiment of the present application; Figure 5 A schematic diagram of a signing process provided in an embodiment of the present application; Figure 6 A schematic diagram of an encryption process provided in an embodiment of the present application; Figure 7 A schematic diagram of an interactive process of data transmission provided in an embodiment of the present application; Figure 8 A schematic diagram of the composition of a code stream secure transmission device based on dynamic data classification provided in an embodiment of the present application; Fig. 9 A schematic diagram of the composition of another device for securely transmitting a code stream based on dynamic data classification provided in an embodiment of the present application; Fig.10 A schematic diagram of the composition of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0043] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0044] It should be noted that, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way. The terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features.
[0045] In the description of this application, unless otherwise specified, " / " means "or", for example, A / B can mean A or B. "And / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, "at least one" means one or more, and "multiple" means two or more.
[0046] As described in the background art, in a scenario where a large amount of data is transmitted in a network, if all data is encrypted and signed for protection, it will undoubtedly occupy more computing resources and increase the computing pressure on the data sender and the data receiver.
[0047] Based on this, the present application provides a method for secure transmission of a code stream based on dynamic data classification, the method comprising: a data sending end obtains first data to be transmitted, the first data is video frame data, and the security level of the first data is determined according to the target parameters corresponding to the first data, the target parameters include at least one of the frame type, frame content, frame source, frame generation time and frame mark, and the frame mark is used to characterize whether the first data is data marked by the user. When the security level of the first data is higher than the preset level, the first data is processed to obtain the second data. When the security level of the first data is not higher than the preset level, the first data is determined as the second data. The processing operation includes an encryption operation and / or a signature operation. The data sending end generates a level identifier of the security level of the first data and a message of the second data, and sends the level identifier of the security level of the first data and the message of the second data to the data receiving end. The level identifier is used by the data receiving end to determine the security level of the first data.
[0048] After receiving the message, the data receiving end determines the security level corresponding to the second data according to the level identifier in the message. When the data receiving end determines that the security level of the received message is higher than the preset level, the second data is processed to obtain the first data. The processing operation includes a decryption operation and / or a signature verification operation. When the data receiving end determines that the security level of the received message is not higher than the preset level, the second data is determined as the first data.
[0049] As can be seen from the above, different target parameters of the data to be transmitted in the above method are different. This application divides different security levels for the data to be transmitted with different target parameters, and the processing operations corresponding to different security levels are also different. For some data to be transmitted with low security levels, it is not necessary to perform encryption operations or signature operations on all of them, and they can be directly transmitted to the receiver. In other words, before the data is transmitted, the data sender dynamically classifies the data to be transmitted, and the security level of the data to be transmitted changes with the target parameters corresponding to the data to be transmitted. Different security levels correspond to different processing operations, and not all data to be transmitted need to be encrypted and signed before they can be transmitted. Therefore, when the data to be transmitted is transmitted, the resource occupation caused by the sender when encrypting and signing the data to be transmitted can be reduced, and the resource occupation caused by the receiving side when decrypting and verifying the data to be transmitted can also be reduced, thereby reducing the computing resource consumption of the receiving end. In addition, the data to be transmitted with a low security level will not carry the relevant information of the encryption operation when it is transmitted, nor will it carry the relevant information of the signature operation, which will reduce a part of the occupied transmission resources and increase the data transmission rate.
[0050] Please refer to Figure 1, which shows a data processing system applicable to a code stream security transmission method based on dynamic data classification provided by the present application. Figure 1 As shown, the data processing system 100 includes a data sending end 101 and a data receiving end 102 .
[0051] The data transmitting end 101 is connected to the data receiving end 102 by communication. It should be understood that the connection method can be a wireless connection, such as a Bluetooth connection, a wireless fidelity (Wi-Fi) connection, etc.; or, the connection method can also be a wired connection, such as an optical fiber connection, an Ethernet connection, a universal serial bus (USB) connection, a high-speed serial computer expansion bus (Peripheral Component Interconnect Express, PCIE), a serial peripheral interface (Serial Peripheral Interface, SPI), an integrated circuit bus (Inter-Integrated Circuit, I 2 C), universal asynchronous receiver / transmitter (URAT), etc., without limitation.
[0052] In some embodiments, the upstream device / equipment of the data transmitting end 101 may be an image acquisition device (there may be multiple devices), and the image acquisition device may establish a communication connection with the data transmitting end 101. The image acquisition device is used to output video frame data to the data transmitting end 101, and then the data transmitting end 101 processes the video frame data based on the method provided in the present application and sends it to the data receiving end 102. Alternatively, the data transmitting end 101 is integrated in the image acquisition device, that is, the image acquisition device acts as the data transmitting end 101 to encode the acquired video frame data and send it to the data receiving end 102. Figure 1 , the connection relationship between the image acquisition device as a data sending end 101 and the data receiving end 102 is shown.
[0053] The image acquisition device may be a mobile phone terminal, a smart camera or other electronic device with an image acquisition function. The data sending end 101 may be a mobile phone terminal, a server or other electronic device with a data processing function.
[0054] In some embodiments, the downstream device / equipment of the data receiving end 102 may be a display device (there may be multiple devices), the display device may establish a communication connection with the data receiving end 102, and the display device is used to display the video frame data parsed by the data receiving end 102. The data receiving end 102 processes the received video frame data based on the method provided in this application and then displays it through the display device. Alternatively, the data receiving end 102 is integrated in the display device, that is, the display device, as the data receiving end 102, parses and displays the video frame data sent by the data sending end 101. Figure 1 2 shows the connection relationship between the display device as a data receiving end 102 and the data sending end 101.
[0055] The display device may be a mobile phone terminal, a computer, a television, or other electronic device with an image display function. The data receiving end 102 may be a mobile phone terminal, a server, or other electronic device with a data processing function.
[0056] The server may be a server cluster composed of multiple servers, or a single server, or a computer. The data sending end 101 or the data receiving end 102 may specifically be a processor in a server, etc. The embodiment of the present application does not limit the specific device form of the data sending end 101 or the data receiving end 102.
[0057] In some embodiments, the data transmitting end 101 needs to determine the security level of the first data according to the target parameters of the first data to be transmitted, and also needs to determine what kind of processing operation needs to be performed on the first data according to the security level of the first data. Therefore, the data transmitting end 101 should include a memory, in which the corresponding relationship between the target parameter and the security level, and the corresponding relationship between the security level and the processing operation are stored, and then after the data transmitting end 101 receives the first data and determines the target parameter of the first data, it can determine the security level of the first data based on the pre-stored corresponding relationship between the target parameter and the security level, and then determine the processing operation that needs to be performed on the first data according to the pre-stored corresponding relationship between the security level and the processing operation, so as to perform the corresponding processing operation on the first data.
[0058] Similarly, the data receiving end 102 needs to determine what kind of processing operation needs to be performed on the second data in the message according to the security level in the message, so the data receiving end 102 should include a memory, in which the corresponding relationship between the security level and the processing operation is stored. After the data receiving end 102 receives the message sent by the data sending end 101, the data receiving end 102 determines the security level from the message, and based on the pre-stored corresponding relationship between the security level and the processing operation, determines the processing operation to be performed on the second data in the message, thereby performing the corresponding data operation on the second data to obtain the first data.
[0059] In some embodiments, the data transmitting end 101 and the data receiving end 102 may be as follows Figure 1 The devices shown are independent of each other, or the data sending end 101 and the data receiving end 102 can also be integrated into one electronic device.
[0060] The implementation of the embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0061] like Figure 2 As shown, the embodiment of the present application provides a code stream security transmission method based on dynamic data classification, which can Figure 1 The data sending end 101 in the embodiment may also be executed by a data processing system. The embodiment of the present application is described with the data sending end as the execution subject. The method includes the following steps: S201: Acquire first data to be transmitted.
[0062] The first data to be transmitted is video frame data.
[0063] For example, the video frame data may be acquired by an image acquisition device and transmitted to the data transmitting end, so that the data transmitting end may obtain the first data to be transmitted.
[0064] S202: Determine a security level of the first data according to a target parameter corresponding to the first data.
[0065] The target parameter may include at least one of a frame type, a frame content, a frame source, a frame generation time, and a frame tag, and the frame tag is used to indicate whether the first data is data marked by a user.
[0066] Frame types include: key frames and / or non-key frames. Key frames (Intra-coded frames, I frames, also known as intra-coded frames) are independent frames that do not rely on information from other frames, contain complete image information, and can be decoded independently. Non-key frames include Predicted frames (P frames, also known as predicted frames) and Bidirectional frames (B frames, also known as bidirectional predicted frames). P frames rely on the previous I frames or P frames, store the amount of change in the image (i.e., the difference from the previous frame), and cannot be decoded independently. B frames rely on adjacent I frames or P frames and cannot be decoded independently. Therefore, when the video frame data is a key frame, its importance should be higher than that of the video frame data of a non-key frame. When the target parameters corresponding to the video frame data include the frame type, the security level of the video frame data corresponding to the key frame is higher than that of the video frame data corresponding to the non-key frame.
[0067] The frame content includes: dynamic frames and / or static frames. The dynamic frames are used to represent the presence of moving targets in the video frame data, and the static frames are used to represent the absence of moving targets in the video frame data. When a moving target appears in the scene represented by the video screen, that is, when a screen appears for the user to obtain new information, the user needs to focus on it, and the video screen is a dynamic frame. When no moving target appears in the scene represented by the video screen, it represents that there is no new information for the user to obtain in the scene, and the user does not need to focus on it. The video screen is a static frame. Therefore, when the video frame data is a dynamic frame, its importance should be higher than that of the video frame data of a static frame. When the target parameters corresponding to the video frame data include the frame content, the security level of the video frame data corresponding to the dynamic frame is higher than the security level of the video frame data corresponding to the static frame.
[0068] The frame source is used to characterize the source of the video frame data ("source" can be understood as the camera that generates the video frame data). The frame source includes important sources and / or non-important sources. Important sources represent cameras used to shoot important places, and non-important sources represent cameras used to shoot non-important places). The video frame data shot by cameras used to shoot important places that can provide high-value information (places that require users to pay special attention to, such as confidential rooms, confidential office areas, places where moving targets appear, etc.) contains high-value information, and the consequences of its loss are relatively serious. In this case, these data can be classified as important data, and better confidentiality processing operations should be performed before transmission. The video frame data shot by cameras used to shoot non-important places that can provide low-value information (places that do not require users to pay special attention to, such as corridors, unmanned areas, etc.) basically cannot be analyzed for high-value information, and even if lost, it will not cause serious consequences. In this case, these data can be classified as non-important data, and the confidentiality of the processing operations performed on non-important data can be lower than the confidentiality of the processing operations performed on important data. Therefore, the importance of video frame data taken by cameras used to shoot important places is higher than the importance of video frame data taken by cameras used to shoot unimportant places. When the target parameters corresponding to the video frame data include the frame source, the security level of video frame data corresponding to important sources is higher than the security level of video frame data corresponding to unimportant sources.
[0069] The frame generation time is used to characterize the generation time of the video frame data, and the frame generation time includes important time periods and / or non-important time periods. For some important time periods that require user attention, for example, some time periods have people entering and exiting, and these time periods are important time periods, and other time periods have no people entering and exiting, and these time periods are non-important time periods. When people enter and exit, special attention needs to be paid. The importance of the video frame data generated in the important time period is higher than that of the video frame data generated in the non-important time period. When the target parameters corresponding to the video frame data include the frame generation time, the security level of the video frame data corresponding to the important time period is higher than that of the video frame data corresponding to the non-important time period.
[0070] Frame tag, frame tag includes important tag and / or non-important tag. The user defines the video frame data to be transmitted as important data or non-important data. For the video frame data of important data, the user actively operates to mark the important tag before the video frame data. Then, when the data sending end detects that the frame tag of the video frame data is an important tag, the data sending end determines that the video frame data is important data actively marked by the user. When the data sending end detects that the frame tag of the video frame data is a non-important tag, the data sending end determines that the video frame data is non-important data. The importance of the video frame data with the frame tag as an important tag should be higher than the importance of the video frame data with the frame tag as a non-important tag. In the case where the target parameter corresponding to the video frame data includes the frame tag, the security level of the video frame data corresponding to the important tag is higher than the security level of the video frame data corresponding to the non-important tag. The data sending end determines the frame tag of the video frame data in a way that the user controls the image acquisition device through the user device to add the characters recording the frame tag of the video frame data to the frame header of the generated video frame data. The data sending end obtains the video frame data generated by the image acquisition device, determines the frame tag of the video frame data from the frame header of the video frame data, and thus determines the importance of the video frame data. For example, assuming that 1 represents an important mark and 0 represents an unimportant mark, if the data sending end obtains a frame header of the video frame data including a value of 1, it means that the frame mark of the video frame data is an important mark, and the data sending end determines that the video frame data is important data. If the data sending end obtains a frame header of the video frame data including a value of 0, it means that the frame mark of the video frame data is an unimportant mark, and the data sending end determines that the video frame data is unimportant data. Alternatively, the user notifies the data sending end of the frame mark of the video frame data generated by the image acquisition device through the user device, and then the data sending end determines the importance of the video frame data. The user can expand other ways for the data sending end to determine the frame mark of the video frame data according to actual application conditions, and this application does not specifically limit this.
[0071] In summary, the target parameters can be summarized as parameters used to characterize the importance of the first data, not limited to one or more of the frame type, frame content, frame source, frame generation time, and frame mark. Users can also expand other specific implementations of the target parameters according to actual application scenarios.
[0072] In particular, when the user actually divides more than two security levels, the user can also further divide the important sources, important time periods, and important marks, and set the security level corresponding to each target parameter. Taking the frame source as an example, assuming that the user divides it into three security levels, the third level is higher than the second level, and the second level is higher than the first level. The important sources in the frame source are divided into the first source and the second source. The video frame data of the first source is more important, then the video frame data of the first source corresponds to the third level, the video frame data of the second source corresponds to the second level, and the video frame data of the non-important source corresponds to the first level. The data sending end parses the frame source of the video frame data, and then determines the security level of the video frame data based on the frame source. Taking the frame generation time as an example, assuming that the user divides it into three security levels, the third level is higher than the second level, and the second level is higher than the first level. The important time period in the frame generation time is divided into the first time period and the second time period. The video frame data of the first time period is more important, then the video frame data of the first time period corresponds to the third level, the video frame data of the second time period corresponds to the second level, and the video frame data of the non-important time period corresponds to the first level. The data sending end parses the frame generation time of the video frame data, and then determines the security level of the video frame data based on the frame generation time. The same is true for frame marking, which will not be described here.
[0073] The following takes the case where the target parameter includes a frame type and a frame content as an example to describe the corresponding relationship between the target parameter and the security level of the first data.
[0074] If the frame types corresponding to the video frame data are the same, the security level of the video frame data corresponding to the dynamic frames is higher than the security level of the video frame data corresponding to the static frames; if the frame contents corresponding to the video frame data are the same, the security level of the video frame data corresponding to the key frames is higher than the security level of the video frame data corresponding to the non-key frames; the security level of the video frame data corresponding to the key frames and dynamic frames is higher than the security level of the video frame data corresponding to the non-key frames and static frames; the security level of the video frame data corresponding to the key frames and static frames is the same as the security level of the video frame data corresponding to the non-key frames and dynamic frames.
[0075] In particular, users can set, based on their own needs, the security level of video frame data corresponding to key frames and static frames to be higher than the security level of video frame data corresponding to non-key frames and dynamic frames, or the security level of video frame data corresponding to key frames and static frames to be lower than the security level of video frame data corresponding to non-key frames and dynamic frames.
[0076] When the target parameters include multiple items of frame type, frame content, frame source, frame generation time, and frame mark, the corresponding relationship between the target parameters and the security level of the first data is similar to the specific implementation of the corresponding relationship between the target parameters and the security level of the first data when the target parameters include frame type and frame content, and can be set by the user according to needs. For example, the target parameters include frame generation time and frame source: if the frame generation time corresponding to the video frame data is the same, the security level of the video frame data corresponding to the important time period is higher than the security level of the video frame data corresponding to the non-important time period; if the frame sources corresponding to the video frame data are the same, the security level of the video frame data corresponding to the important source is higher than the security level of the video frame data corresponding to the non-important source; the security level of the video frame data corresponding to the important time period and important source is higher than the security level of the video frame data corresponding to the non-important time period and non-important source; the security level of the video frame data corresponding to the important time period and non-important source is the same as the security level of the video frame data corresponding to the non-important time period and important source. For another example, the target parameters include frame content, frame generation time and frame mark: the security level of video frame data corresponding to dynamic frames, important time periods and important marks is higher than the security level of video frame data corresponding to any two of the dynamic frames, important time periods and important marks; the security level of video frame data corresponding to any two of the dynamic frames, important time periods and important marks is higher than the security level of video frame data corresponding to any one of the dynamic frames, important time periods and important marks; the security level of video frame data corresponding to any one of the dynamic frames, important time periods and important marks is higher than the security level of video frame data corresponding to static frames, non-important time periods and non-important marks; the security levels of video frame data corresponding to any two of the dynamic frames, important time periods and important marks are the same; the security levels of video frame data corresponding to any one of the dynamic frames, important time periods and important marks are the same.
[0077] The above content describes the correspondence between the target parameter and the security level of the first data. The user can send the determined first correspondence (the correspondence between the target parameter and the security level of the first data) to the data sending end through the user device, so that the data sending end can store the first correspondence. When there is first data to be transmitted, the data sending end determines the target parameter of the first data, and then determines the security level of the first data according to the pre-stored first correspondence. For example, the target parameter includes a frame tag, the frame tag includes a first tag, a second tag and a non-important tag, the security level includes a first level, a second level and a third level, the third level is higher than the second level, and the second level is higher than the first level. The first correspondence includes: the first tag corresponds to the third level, the second tag corresponds to the second level, and the third tag corresponds to the first level. If the data sending end identifies that the frame tag of the first data to be transmitted is the first tag, the data sending end can determine that the security level of the first data is the third level according to the first correspondence.
[0078] In some embodiments, the data sending end performs mobile target identification on the video frame data to determine whether there is a mobile target in the video frame data; if there is a mobile target in the video frame data, the data sending end determines that the frame content corresponding to the video frame data is a dynamic frame; if there is no mobile target in the video frame data, the data sending end determines that the frame content corresponding to the video frame data is a static frame; and / or, the data sending end determines the frame type corresponding to the video frame data based on the video coding standard.
[0079] The data transmitter determines the frame type corresponding to the video frame data based on the video coding standard, which can be specifically: determining whether the video frame data is key frame data according to the generation time of the video frame data. Video coding standards (such as MPEG, H264, H265, etc.) specify the encoding method and judgment rules of I frames, P frames, and B frames. By consulting the relevant video coding standard documents, it is possible to determine what the generation rules of I frames, P frames, and B frames are. Combined with the time when the video frame data starts to be generated, it is possible to know when the I frame is generated, when the B frame is generated, and when the P frame is generated.
[0080] The data sending end performs mobile target recognition on the video frame data to determine whether there is a mobile target in the video frame data. This can be specifically implemented as follows: a mobile target recognition algorithm is configured in the data sending end, and the mobile target recognition algorithm is used to identify whether there is a mobile target in the picture represented by the video frame data. Alternatively, the data sending end is configured with a frame of preset video frame data without a mobile target, and the data sending end determines whether there is a mobile target by comparing the video frame data with the preset video frame data. The data sending end can also determine whether there is a mobile target in the video frame data by other means, and the embodiments of the present application do not specifically limit this.
[0081] In actual applications, the common code stream encoding formats in the live broadcast and video detection industries are H264 or H265. Encoding can compress data. For example, if the resolution of the video played on the display is 1280×720 and the frame rate is 25, the amount of data generated in one second is 1280×720 (pixels) × 25 (pictures) / 8 (1 byte 8 bits) (result: B) / 1024 (result: KB) / 1024 (result: MB) = 2.75MB. The display cannot receive such a large amount of data, so the data needs to be compressed. After encoding the data collected by the image acquisition device through the encoding standard, the data to be transmitted can be obtained. In the H264 structure, the data after a video image is encoded is called a frame. A frame consists of a slice or multiple slices. A slice consists of one or more macroblocks (MB). A macroblock consists of 16x16 YUV data. Macroblock is the basic unit of H264 encoding. H264 uses intra-frame compression and inter-frame compression to improve the encoding compression rate; H264 uses a unique I-frame, P-frame and B-frame strategy to achieve compression between consecutive frames.
[0082] Specifically, when the target parameters include the frame type and the frame content, the security level of the data to be transmitted is divided into the first level, the second level and the third level, the third level is higher than the second level, and the second level is higher than the first level. In the case where the first data to be transmitted is not key frame data and is not a dynamic frame, the security level of the first data is the first level; in the case where the first data is key frame data and is not a dynamic frame, the security level of the first data is the second level; in the case where the data to be transmitted is not key frame data and is a dynamic frame, the security level of the first data is the second level; in the case where the first data is key frame data and is a dynamic frame, the security level of the first data is the third level.
[0083] For example, if the current first data video frame is a P frame and is a video captured by a personnel channel camera (non-important data), it can be determined that the security level of the video frame to be transmitted is the first level, that is, the lowest security level.
[0084] The current video frame of the first data is an I frame, and the video is collected from the personnel channel camera (non-important data), so it can be determined that the security level of the video frame to be transmitted is the second level, that is, the security level is medium.
[0085] The current video frame of the first data is a B frame, and it is a video (important data) collected by a camera inside the cargo warehouse. It can be determined that the security level of the video frame to be transmitted is the second level, that is, the security level is medium.
[0086] The current video frame of the first data is an I frame, and it is a video (important data) collected by a camera inside a cargo warehouse. It can be determined that the security level of the video frame to be transmitted is the third level, that is, the highest security level.
[0087] Optionally, the user may set more graded security levels according to their own needs; for example, when the first data is key frame data and not a dynamic frame, the security level of the first data is higher than the security level of the first data when the data to be transmitted is not key frame data but a dynamic frame; or, when the data to be transmitted is not key frame data but a dynamic frame, the security level of the first data is higher than the security level of the first data when the first data is key frame data and not a dynamic frame.
[0088] It should be noted that the security level corresponding to the video frame captured by the same camera is not constant and may change with the content of the first data to be transmitted. If there are dynamic objects in the video frame, the security level of the current video frame data is determined to be the third level. If it is detected that the video frame is restored from dynamic to static, the security level of the current video frame data is determined to be the second level.
[0089] Exemplarily, if the data of the first video frame received by the data transmitting end corresponds to a key frame and a dynamic frame, the data transmitting end determines the security level of the video frame as the third level, and in the process of encoding the video frame, both encryption and signature operations are performed on the data of the video frame. If the second video frame received by the data transmitting end corresponds to a non-key frame and a dynamic frame, the data transmitting end determines the security level of the video frame as the second level, and in the process of encoding the video frame, encryption operations (or signature operations) are performed on the data of the video frame. If the third video frame received by the data transmitting end corresponds to a non-key frame and a static frame, the data transmitting end determines the security level of the video frame as the first level, and in the process of encoding the video frame, neither encryption operations nor signature operations are performed on the data of the video frame.
[0090] As the target parameters of the data to be transmitted processed by the data sending end change dynamically, the security level of the data to be transmitted also changes dynamically, and the processing operations required for the data to be transmitted also change accordingly. The data sending end does not need to encrypt or sign all the data to be transmitted, which can not only reduce the resources occupied by the data sending end in processing the data to be transmitted, but also save transmission bandwidth and increase the transmission speed.
[0091] S203: When the security level of the first data is higher than a preset level, perform a processing operation on the first data to obtain second data.
[0092] The processing operation includes an encryption operation and / or a signature operation.
[0093] In some embodiments, when the preset level is the first level, if the security level of the first data is the second level, a signature operation is performed on the first data to obtain second data including signature verification information and the first data; the second level is higher than the first level; and / or, when the security level of the first data is the third level, an encryption operation is performed on the first data using a preset encryption algorithm, and a signature operation is performed on the first data to obtain second data including signature verification information and the encrypted first data; the third level is higher than the second level.
[0094] In other embodiments, when the security level of the first data is the second level, the first data is encrypted using a preset encryption algorithm, and the encrypted first data is used as the second data; the second level is higher than the first level; and / or, when the security level of the first data is the third level, the first data is encrypted using a preset encryption algorithm, and the first data is signed to obtain second data including signature verification information and the encrypted first data; the third level is higher than the second level.
[0095] That is, for the first data of the second level, the processing operation includes encrypting or signing the data to be transmitted; and for the first data of the third level, the processing operation includes encrypting and signing the data to be transmitted.
[0096] As can be seen from the above, encryption or signature operations can ensure the security of data transmission and prevent tampering. The solution of the present application determines the security level of the data to be transmitted and determines whether to perform encryption or signature operations based on the security level. While ensuring the security of important data, it can also take into account the improvement of data transmission efficiency.
[0097] S204: When the security level of the first data is not higher than a preset level, determine the first data as the second data.
[0098] In some embodiments, for the first data to be transmitted at the first level, the processing operation does not include encryption and signing operations on the first data. That is, when the security level of the first data is the first level, the data sending end does not perform any processing on the first data, does not encrypt or sign, and the final transmission is the original first data.
[0099] Based on the above description, a second corresponding relationship may be pre-stored in the data sending end, and the second corresponding relationship is used to characterize the corresponding relationship between the security level of the first data and the processing operation that the data sending end needs to perform on the first data, and then the data sending end can determine what kind of processing operation needs to be performed on the first data based on the security level of the first data and the second corresponding relationship. For example, the security level of the first data includes the first level, the second level and the third level, the third level is higher than the second level, and the second level is higher than the first level. The second corresponding relationship includes: when the security level of the first data is the first level, the processing operation of the first data is to directly determine the first data as the second data, when the security level of the first data is the second level, the processing operation of the first data is to encrypt the first data (or sign the first data), and when the security level of the first data is the third level, the processing operation of the first data is to encrypt and sign the first data.
[0100] S205: Generate a message including a level identifier of the security level of the first data and the second data.
[0101] The level identifier is used by the data receiving end to determine the security level of the first data.
[0102] In some embodiments, since the preset encoding standard stipulates that the data to be transmitted is written in the data unit, the data unit includes a header position and a data position, the header position includes a first position for writing an importance character, the importance character is used to indicate the importance of the data in the data unit, the data position is used to write the data to be transmitted, and the header position is located before the data position.
[0103] Then, in the case where the video coding standard is the preset coding standard, generating a message including a level identifier of the security level of the first data and the second data can be specifically implemented as follows: writing the level identifier of the security level of the first data in the first position of the header position, and writing the second data in the data position to obtain the message to be transmitted; in the case where the video coding standard is not the preset coding standard, generating a message including a level identifier of the security level of the first data and the second data can be specifically implemented as follows: constructing a second position for writing the level identifier of the security level of the first data in the format of the message; the format of the message also includes the data position, and the second position is located before the data position; writing the level identifier of the security level of the first data in the second position, and writing the second data in the data position to obtain the message to be transmitted.
[0104] Among them, "before" can be understood as the data in front is generated first, the data receiving end receives this part of data first, and parses this part of data first. For example, the header position is before the data position. When the data sending end generates a message, it first generates the data in the header position, and then generates the data in the data position. When the data receiving end receives the message, the data in the header position is parsed first, and then the data in the data position is parsed. For another example, the second position is before the data position. When the data sending end generates a message, it first generates the data in the second position, and then generates the data in the data position. When the data receiving end receives the message, the data in the second position is parsed first, and then the data in the data position is parsed.
[0105] Optionally, when the second data includes signature verification information, the signature verification information is located at the end of the second data.
[0106] The "tail" can be understood as the data at the tail that is generated last by the data sending end and parsed last by the data receiving end. For example, when the data sending end generates the second data, it first generates the previous unencrypted or encrypted data, and then adds the signature verification information to the previous data. After the data receiving end receives the second data, it finally parses the signature verification information.
[0107] For example, when the encoding format requires constructing a specific string, the data sender may add a security level identifier to the constructed specific string.
[0108] For example, the encoding format is H264 code stream encoding format or H265 code stream encoding format. The H264 or H265 code stream encoding format is NALU format, and the specific composition is as follows Figure 3 As shown in the figure, it includes the network abstraction layer units (NALU) header part and the raw byte sequence payload (RBSP) part. The NALU header part corresponds to the header position, and the RBSP part corresponds to the data position.
[0109] When the data sender uses a preset encoding format (such as H264 or H265 code stream encoding format), it is necessary to construct a NALU header. The NALU header format is as follows: Figure 4 As shown, it includes the F part (forbidden_zero_bit), the NRI part (nal_ref_idc) and the Type part (nal_unit_type). The F part is generally 0 in H264, and the NRI part is used to indicate the importance of NALU, that is, the position of the NRI part in the NALU header is the first position. The Type part is used to identify the data type of RBSP.
[0110] The data sender can write the "security level" identifier in the NALU header. When the frame needs to complete the data signature, after writing the security level, the data sender uses its own signature private key to complete the NALU signature, and the signature value is written to the end of the RBSP. That is, the NALU composition after writing the signature can be as follows Figure 5 When the frame needs to complete data encryption, after writing the security level, the data sender can also encrypt the frame and write the parameters required for decryption into the code stream and send it to the data receiver. The data receiver can decrypt the code stream according to the decryption parameters in the code stream. The encrypted NALU format is as follows Figure 6 As shown, the RBSP plain text is written before encryption, and the RBSP cipher text is written after encryption.
[0111] S206: Send a message to the data receiving end.
[0112] In some embodiments, a third corresponding relationship may be stored in the data receiving end, and the third corresponding relationship is used to characterize the corresponding relationship between the security level and the processing operation that the data receiving end needs to perform on the second data, and then the data receiving end can determine what kind of processing operation needs to be performed on the second data based on the security level and the third corresponding relationship. For example, the security level includes the first level, the second level and the third level, the third level is higher than the second level, and the second level is higher than the first level. The third corresponding relationship includes: when the security level is the first level, the processing operation on the second data is to directly determine the second data as the first data, when the security level is the second level, the processing operation on the second data is to decrypt the second data (or perform a signature verification operation on the second data), and when the security level is the third level, the processing operation on the second data is to decrypt the second data and perform a signature verification operation on the second data.
[0113] In some embodiments, a data receiving end receives a message sent by a data sending end, and determines the security level corresponding to the level identifier in the message; when the security level is higher than a preset level, a processing operation is performed on the second data, and the data receiving end obtains the first data; the processing operation includes a decryption operation and / or a signature verification operation; when the security level is not higher than the preset level, the data receiving end determines that the second data is the first data, that is, the data receiving end directly obtains the first data.
[0114] Exemplarily, taking the case where the first data includes video frame data, after the data receiving end obtains the code stream, it parses the code stream NALU header to obtain the security level, and performs corresponding signature verification, data decryption or direct decoding and playback according to the security level.
[0115] for example, Figure 7 FIG. 1 is a schematic diagram of an interactive process of data transmission provided by an embodiment of the present application. Figure 7 As shown, when the data transmitting end is an image acquisition device and the data receiving end is a receiving terminal, the image acquisition device is used to acquire and encode video data, thereby sending the video data. The receiving terminal is used to receive and decode the received data, thereby playing the video data.
[0116] The image acquisition device acquires the first video data according to the color coding format. The image acquisition device determines the security level of the first video data according to whether the video data includes key frames and / or dynamic frames. If the first video data does not include key frames and does not include dynamic frames, it can be determined that the security level of the first video data is the first level. At this time, the first video data is determined to be the second video data. If the first video data only includes one of the key frames or dynamic frames, it can be determined that the security level of the first video data is the second level. At this time, the first video data is signed (or encrypted). Figure 7In the example of only performing signature processing, the second video data is obtained. If the first video data includes key frames and dynamic frames, it can be determined that the security level of the first video data is the third level. At this time, the first video data is encrypted and signed to obtain the second video data. After obtaining the second video data, the image acquisition device generates a message including a level identifier of the security level of the first video data and the second video data, and sends the message to the receiving terminal.
[0117] After receiving the message, the receiving terminal determines the security level of the data contained in the message according to the level identifier included in the message. According to different security levels, different processing operations are performed on the second video data to obtain the first video data. If it is determined that the security level of the second video data is the first level, the receiving terminal directly decodes and plays the second video data. If it is determined that the security level of the second video data is the second level, the receiving terminal performs corresponding signature verification processing (or decryption processing) on the second video data. Figure 7 In the example of only performing signature verification processing), the first video data is obtained and played. If it is determined that the security level of the second video data is the third level, the receiving terminal performs corresponding signature verification processing and decryption processing on the second video data to obtain the first video data and play it.
[0118] Among them, there should be a trusted third-party certificate service between the data sender and the data receiver to facilitate the exchange of certificates for signing operations, signature verification operations, encryption operations, and decryption operations between the data sender and the data receiver.
[0119] In summary, Figure 2 The technical solution shown at least brings the following beneficial effects: different target parameters of different data to be transmitted are different. This application divides different security levels for data with different target parameters, and the processing operations corresponding to different security levels are also different. For some data to be transmitted with low security levels, it is not necessary to perform encryption operations or signature operations on all of them, and they can be directly transmitted to the receiving party. In other words, before the data is transmitted, the data sending end dynamically classifies the data to be transmitted, and the security level of the data to be transmitted changes with the target parameters corresponding to the data to be transmitted. Different security levels correspond to different processing operations, and not all data to be transmitted need to be encrypted and signed before they can be transmitted. Therefore, when the data to be transmitted is transmitted, the resource occupation caused by the sender when encrypting and signing the data to be transmitted can be reduced, and the resource occupation caused by the receiving side when decrypting and verifying the data to be transmitted can also be reduced, thereby reducing the computing resource consumption of the receiving end. In addition, the data to be transmitted with a low security level will not carry the relevant information of the encryption operation when it is transmitted, nor will it carry the relevant information of the signature operation, which will reduce a part of the occupied transmission resources and increase the data transmission rate.
[0120] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to achieve the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. It should be easy to realize that the technical goals in this field are combined with the units and algorithm steps of each example described in the embodiments disclosed in this article, and the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical goals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0121] like Figure 8 As shown, the embodiment of the present application also provides a device 300 for secure transmission of a code stream based on dynamic data classification, which is applied to a data sending end. The device 300 for secure transmission of a code stream based on dynamic data classification includes: An acquisition module 301 is used to acquire first data to be transmitted, where the first data is video frame data; The processing module 302 is used to determine the security level of the first data according to the target parameter corresponding to the first data; the target parameter includes at least one of the frame type, frame content, frame source, frame generation time and frame mark, and the frame mark is used to indicate whether the first data is data marked by the user; when the security level of the first data is higher than the preset level, the first data is processed to obtain the second data, and the processing operation includes an encryption operation and / or a signature operation; when the security level of the first data is not higher than the preset level, the first data is determined as the second data; a level identifier including the security level of the first data and a message of the second data is generated; the level identifier is used by the data receiving end to determine the security level of the first data; The sending module 303 is used to send a message to a data receiving end.
[0122] Exemplary, combined Figure 7 The code stream security transmission device 300 based on data dynamic classification can be applied to Figure 7 The image acquisition device shown.
[0123] In one possible implementation, the preset level is the first level; the processing module 302 is specifically used to: when the security level of the first data is the second level, sign the first data to obtain second data including signature verification information and the first data; the second level is higher than the first level; and / or, when the security level of the first data is the third level, encrypt the first data using a preset encryption algorithm, and sign the first data to obtain second data including signature verification information and the encrypted first data; the third level is higher than the second level.
[0124] In one possible implementation, the preset level is the first level; the processing module 302 is specifically used to: when the security level of the first data is the second level, use a preset encryption algorithm to encrypt the first data, and use the encrypted first data as the second data; the second level is higher than the first level; and / or, when the security level of the first data is the third level, use a preset encryption algorithm to encrypt the first data, and sign the first data to obtain second data including signature verification information and the encrypted first data; the third level is higher than the second level.
[0125] In one possible implementation, the frame types include: key frames and / or non-key frames, and the frame contents include: dynamic frames and / or static frames. The dynamic frames are used to characterize the presence of moving targets in the video frame data, and the static frames are used to characterize the absence of moving targets in the video frame data. The processing module 302 is also used to: perform moving target identification on the video frame data to determine whether there is a moving target in the video frame data; if there is a moving target in the video frame data, determine that the frame content corresponding to the video frame data is a dynamic frame; if there is no moving target in the video frame data, determine that the frame content corresponding to the video frame data is a static frame; and / or, based on the video coding standard, determine the frame type corresponding to the video frame data.
[0126] In one possible implementation, a first correspondence is pre-stored in a bitstream secure transmission device 300 based on dynamic data grading, and the first correspondence is used to characterize the correspondence between a target parameter and a security level; a processing module 302 is specifically used to: when the target parameter corresponding to the video frame data includes a frame type, determine the security level of the first data based on the first correspondence and the target parameter corresponding to the first data; wherein the security level of the video frame data corresponding to the key frame is higher than the security level of the video frame data corresponding to the non-key frame; or, when the target parameter corresponding to the video frame data includes a frame content, determine the security level of the first data based on the first correspondence and the target parameter corresponding to the first data; wherein the security level of the video frame data corresponding to the dynamic frame is higher than the security level of the video frame data corresponding to the static frame. The security level of the data; or, in the case where the target parameters corresponding to the video frame data include the frame type and the frame content, the security level of the first data is determined based on the first corresponding relationship and the target parameters corresponding to the first data; wherein, if the frame types corresponding to the video frame data are the same, the security level of the video frame data corresponding to the dynamic frames is higher than the security level of the video frame data corresponding to the static frames; if the frame contents corresponding to the video frame data are the same, the security level of the video frame data corresponding to the key frames is higher than the security level of the video frame data corresponding to the non-key frames; the security level of the video frame data corresponding to the key frames and dynamic frames is higher than the security level of the video frame data corresponding to the non-key frames and static frames; the security level of the video frame data corresponding to the key frames and static frames is the same as the security level of the video frame data corresponding to the non-key frames and dynamic frames.
[0127] In one possible implementation, the preset coding standard stipulates that the data to be transmitted is written into a data unit, the data unit includes a header position and a data position, the header position includes a first position for writing an importance character, the importance character is used to indicate the importance of the data in the data unit, the data position is used to write the data to be transmitted, and the header position is located before the data position; when the video coding standard is the preset coding standard, the processing module 302 is specifically used to: write a level identifier of the security level of the first data in the first position of the header position, write the second data in the data position, and obtain a message to be transmitted, and the header position is located before the data position; when the video coding standard is not the preset coding standard, the processing module 302 is specifically used to: construct a second position for writing a level identifier of the security level of the first data in the format of the message; the format of the message also includes a data position, and the second position is located before the data position; write the level identifier of the security level of the first data in the second position, write the second data in the data position, and obtain the message to be transmitted.
[0128] In a possible implementation, the frame source includes an important source and / or a non-important source; the frame generation time includes an important period and / or a non-important period; the frame tag includes an important tag and / or a non-important tag; a first corresponding relationship is pre-stored in the data sending end, and the first corresponding relationship is used to characterize the corresponding relationship between the target parameter and the security level; the processing module is specifically used to: when the target parameter corresponding to the video frame data includes the frame source, determine the security level of the first data based on the first corresponding relationship and the target parameter corresponding to the first data; wherein the security level of the video frame data corresponding to the important source is higher than the security level of the video frame data corresponding to the non-important source; or, when the target parameter corresponding to the video frame data includes the frame generation time, determine the security level of the first data based on the first corresponding relationship and the target parameter corresponding to the first data; wherein the security level of the video frame data corresponding to the important period is higher than the security level of the video frame data corresponding to the non-important period; or, when the target parameter corresponding to the video frame data includes the frame tag, determine the security level of the first data based on the first corresponding relationship and the target parameter corresponding to the first data; wherein the security level of the video frame data corresponding to the important tag is higher than the security level of the video frame data corresponding to the non-important tag.
[0129] In a possible implementation manner, when the second data includes signature verification information, the signature verification information is located at the end of the second data.
[0130] like Fig. 9 As shown, the embodiment of the present application also provides a device 400 for secure transmission of a code stream based on dynamic data classification, which is applied to a data receiving end. The device 400 for secure transmission of a code stream based on dynamic data classification includes: The receiving module 401 is used to receive a message sent by a data sending end, where the message includes a level identifier and second data; The processing module 402 is used to determine the security level corresponding to the level identifier in the message; when the security level is higher than the preset level, the second data is processed to obtain the first data, and the first data is the video frame data; the processing operation includes a decryption operation and / or a signature verification operation; when the security level is not higher than the preset level, the second data is determined to be the first data; wherein the security level is the security level of the first data; the security level of the first data is determined by the data sending end according to the target parameters corresponding to the first data, and the target parameters include at least one of the frame type, frame content, frame source, frame generation time and frame mark, and the frame mark is used to indicate whether the first data is data marked by the user.
[0131] Exemplary, combined Figure 7 The code stream security transmission device 400 based on data dynamic classification can be applied to Figure 7 The receiving terminal is shown.
[0132] In one possible implementation, the preset level is the first level; the processing module 402 is specifically used to: when the security level is the second level, perform a signature verification operation on the second data to obtain the first data; the second level is higher than the first level; and / or, when the security level is the third level, use a preset decryption algorithm to perform a decryption operation on the second data, and perform a signature verification operation on the second data to obtain the first data; the third level is higher than the second level.
[0133] In one possible implementation, the preset level is the first level; the processing module 402 is specifically used to: when the security level is the second level, use a preset decryption algorithm to decrypt the second data to obtain the first data; the second level is higher than the first level; and / or, when the security level is the third level, use a preset decryption algorithm to decrypt the second data, and perform a signature verification operation on the second data to obtain the first data; the third level is higher than the second level.
[0134] In one possible implementation, the frame types include: key frames and / or non-key frames, and the frame contents include: dynamic frames and / or static frames. The dynamic frames are used to represent the presence of moving targets in the video frame data, and the static frames are used to represent the absence of moving targets in the video frame data. The frame content corresponding to the first data is determined by the data sending end after the data sending end identifies the moving target of the video frame, and the frame type corresponding to the first data is determined by the data sending end based on the video coding standard.
[0135] In one possible implementation, when the target parameter corresponding to the video frame data includes a frame type, the security level of the video frame data corresponding to the key frame is higher than the security level of the video frame data corresponding to the non-key frame; or, when the target parameter corresponding to the video frame data includes a frame content, the security level of the video frame data corresponding to the dynamic frame is higher than the security level of the video frame data corresponding to the static frame; or, when the target parameter corresponding to the video frame data includes a frame type and a frame content: if the frame types corresponding to the video frame data are the same, the security level of the video frame data corresponding to the dynamic frame is higher than the security level of the video frame data corresponding to the static frame; if the frame contents corresponding to the video frame data are the same, the security level of the video frame data corresponding to the key frame is higher than the security level of the video frame data corresponding to the non-key frame; the security level of the video frame data corresponding to the key frame and the dynamic frame is higher than the security level of the video frame data corresponding to the non-key frame and the static frame; the security level of the video frame data corresponding to the key frame and the static frame is the same as the security level of the video frame data corresponding to the non-key frame and the dynamic frame.
[0136] In one possible implementation, the preset coding standard stipulates that the data to be transmitted is written in a data unit, the data unit includes a header position and a data position, the header position includes a first position for writing an importance character, the importance character is used to indicate the importance of the data in the data unit, the data position is used to write the data to be transmitted, and the header position is located before the data position; in the case where the video coding standard is the preset coding standard, the level identifier of the security level of the first data is written in the first position in the header position, and the second data is written in the data position; in the case where the video coding standard is not the preset coding standard, a second position and a data position are constructed in the format of the message, the second position is located before the data position, the level identifier of the security level of the first data is written in the second position, and the second data is written in the data position.
[0137] In one possible implementation, the frame source includes an important source and / or an unimportant source; the frame generation moment includes an important time period and / or an unimportant time period; the frame mark includes an important mark and / or an unimportant mark; when the target parameter corresponding to the video frame data includes the frame source, the security level of the video frame data corresponding to the important source is higher than the security level of the video frame data corresponding to the unimportant source; or, when the target parameter corresponding to the video frame data includes the frame generation moment, the security level of the video frame data corresponding to the important time period is higher than the security level of the video frame data corresponding to the unimportant time period; or, when the target parameter corresponding to the video frame data includes the frame mark, the security level of the video frame data corresponding to the important mark is higher than the security level of the video frame data corresponding to the unimportant mark.
[0138] In a possible implementation manner, when the second data includes signature verification information, the signature verification information is located at the end of the second data.
[0139] It should be noted that Figure 8 , Fig. 9 The division of modules in the example is schematic and is only a logical function division. There may be other division methods in actual implementation. For example, two or more functions may be integrated into one processing module. The above integrated modules may be implemented in the form of hardware or software function modules.
[0140] Another embodiment of the present application further provides an electronic device, such as Fig.10 As shown, the electronic device 500 includes a memory 501 and a processor 502; the memory 501 and the processor 502 are coupled; the memory 501 is used to store computer program codes, and the computer program codes include computer instructions. When the processor 502 executes the computer instructions, the electronic device 500 executes each step performed by the data sending end or the data receiving end in the method flow shown in the above method embodiment.
[0141] by Figure 8 Taking the code stream security transmission device 300 based on data dynamic classification as an example, in actual implementation, the acquisition module 301, the processing module 302 and the sending module 303 can be composed of Fig.10 The processor 502 shown is implemented by calling the computer program code in the memory 501. The specific execution process can refer to the description of the above data processing method part, which will not be repeated here.
[0142] Another embodiment of the present application also provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes each step performed by the data sending end or the data receiving end in the method flow shown in the above method embodiment.
[0143] In another embodiment of the present application, a computer program product is also provided. The computer program product includes computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes each step executed by the data sending end or the data receiving end in the method flow shown in the above method embodiment.
[0144] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer execution instruction is loaded and executed on the computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instruction can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instruction can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that can be accessed by the computer or a data storage device such as a server, data center, etc. that contains one or more servers that can be integrated with the medium. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), etc.
[0145] The above is only a specific implementation of the present application. Those skilled in the art may conceive of changes or substitutions based on the specific implementation provided by the present application, which should all be included in the protection scope of the present application.
Claims
1. A code stream secure transmission method based on dynamic data classification, characterized in that: Applied to a data sending end, the method comprises: Acquire first data to be transmitted, where the first data is video frame data; determining a security level of the first data according to a target parameter corresponding to the first data; the target parameter includes at least one of a frame type, a frame content, a frame source, a frame generation time, and a frame tag, the frame tag being used to indicate whether the first data is data marked by a user; When the security level of the first data is higher than a preset level, performing a processing operation on the first data to obtain second data, the processing operation including an encryption operation and / or a signing operation; If the security level of the first data is not higher than the preset level, determining the first data as the second data; generating a message including a level identifier of the security level of the first data and the second data; the level identifier is used by a data receiving end to determine the security level of the first data; Send the message to the data receiving end.
2. The method according to claim 1, characterized in that The preset level is the first level; When the security level of the first data is higher than a preset level, processing the first data to obtain second data includes: When the security level of the first data is the second level, performing a signing operation on the first data to obtain the second data including signature verification information and the first data; the second level is higher than the first level; and / or, When the security level of the first data is the third level, the first data is encrypted using a preset encryption algorithm, and the first data is signed to obtain the second data including signature verification information and the encrypted first data; the third level is higher than the second level.
3. The method according to claim 1, characterized in that The preset level is the first level; When the security level of the first data is higher than a preset level, processing the first data to obtain second data includes: When the security level of the first data is the second level, a preset encryption algorithm is used to encrypt the first data, and the encrypted first data is used as the second data; the second level is higher than the first level; and / or, When the security level of the first data is the third level, the first data is encrypted using a preset encryption algorithm, and the first data is signed to obtain the second data including signature verification information and the encrypted first data; the third level is higher than the second level.
4. The method according to claim 1, characterized in that The frame type includes: a key frame and / or a non-key frame, and the frame content includes: a dynamic frame and / or a static frame, wherein the dynamic frame is used to indicate that there is a moving target in the video frame data, and the static frame is used to indicate that there is no moving target in the video frame data; The method further comprises: Performing moving target recognition on the video frame data to determine whether there is a moving target in the video frame data; If there is a moving object in the video frame data, determining that the frame content corresponding to the video frame data is a dynamic frame; If there is no moving object in the video frame data, determining that the frame content corresponding to the video frame data is a static frame; and / or, Based on a video coding standard, a frame type corresponding to the video frame data is determined.
5. The method according to claim 4, characterized in that The data sending end has a first corresponding relationship pre-stored in it, where the first corresponding relationship is used to characterize the corresponding relationship between the target parameter and the security level; The determining, according to the target parameter corresponding to the first data, the security level of the first data includes: determining a security level of the first data based on the first corresponding relationship and a target parameter corresponding to the first data; Wherein, when the target parameter corresponding to the video frame data includes a frame type, the security level of the video frame data corresponding to the key frame is higher than the security level of the video frame data corresponding to the non-key frame; or In the case where the target parameter corresponding to the video frame data includes frame content, the security level of the video frame data corresponding to the dynamic frame is higher than the security level of the video frame data corresponding to the static frame; or In the case where the target parameters corresponding to the video frame data include frame type and frame content: if the frame types corresponding to the video frame data are the same, the security level of the video frame data corresponding to the dynamic frames is higher than the security level of the video frame data corresponding to the static frames; if the frame contents corresponding to the video frame data are the same, the security level of the video frame data corresponding to the key frames is higher than the security level of the video frame data corresponding to the non-key frames; the security level of the video frame data corresponding to the key frames and the dynamic frames is higher than the security level of the video frame data corresponding to the non-key frames and the static frames; the security level of the video frame data corresponding to the key frames and the static frames is the same as the security level of the video frame data corresponding to the non-key frames and the dynamic frames.
6. The method according to claim 4, characterized in that The preset coding standard stipulates that the data to be transmitted is written into a data unit, the data unit includes a header position and a data position, the header position includes a first position for writing an importance character, the importance character is used to indicate the importance of the data in the data unit, the data position is used to write the data to be transmitted, and the header position is located before the data position; In a case where the video coding standard is the preset coding standard, generating a message including a level identifier of a security level of the first data and the second data includes: Writing a level identifier of a security level of the first data into the first position of the header position, and writing the second data into the data position, to obtain the message to be transmitted; In a case where the video coding standard is not the preset coding standard, generating a message including a level identifier of a security level of the first data and the second data includes: Constructing a second position for writing the level identifier of the security level of the first data in the format of the message; the format of the message also includes a data position, and the second position is located before the data position; The security level identifier of the first data is written into the second position, and the second data is written into the data position to obtain the message to be transmitted.
7. The method according to claim 1, characterized in that The frame source includes an important source and / or a non-important source; the frame generation time includes an important period and / or a non-important period; the frame tag includes an important tag and / or a non-important tag; the data sending end pre-stores a first corresponding relationship, and the first corresponding relationship is used to characterize the corresponding relationship between the target parameter and the security level; The determining, according to the target parameter corresponding to the first data, the security level of the first data includes: determining a security level of the first data based on the first corresponding relationship and a target parameter corresponding to the first data; Wherein, in the case where the target parameter corresponding to the video frame data includes a frame source, the security level of the video frame data corresponding to the important source is higher than the security level of the video frame data corresponding to the non-important source; or In the case where the target parameter corresponding to the video frame data includes the frame generation time, the security level of the video frame data corresponding to the important time period is higher than the security level of the video frame data corresponding to the unimportant time period; or In the case where the target parameter corresponding to the video frame data includes a frame mark, the security level of the video frame data corresponding to the important mark is higher than the security level of the video frame data corresponding to the unimportant mark.
8. The method according to claim 2 or 3, characterized in that: In the case where the second data includes signature verification information, the signature verification information is located at the end of the second data.
9. A code stream secure transmission method based on dynamic data classification, characterized in that: Applied to a data receiving end, the method comprises: receiving a message sent by a data transmitting end, wherein the message includes a level identifier and second data; Determining a security level corresponding to the level identifier in the message; When the security level is higher than a preset level, performing a processing operation on the second data to obtain first data, where the first data is video frame data; the processing operation includes a decryption operation and / or a signature verification operation; When the security level is not higher than the preset level, determining that the second data is the first data; Among them, the security level is the security level of the first data; the security level of the first data is determined by the data sending end according to the target parameters corresponding to the first data, and the target parameters include at least one of the frame type, frame content, frame source, frame generation time and frame mark, and the frame mark is used to indicate whether the first data is data marked by the user.
10. The method according to claim 9, characterized in that The preset level is the first level; When the security level is higher than a preset level, processing the second data to obtain the first data includes: When the security level is the second level, performing a signature verification operation on the second data to obtain the first data; the second level is higher than the first level; and / or, When the security level is the third level, a preset decryption algorithm is used to perform a decryption operation on the second data, and a signature verification operation is performed on the second data to obtain the first data; the third level is higher than the second level.
11. The method according to claim 9, characterized in that The preset level is the first level; When the security level is higher than a preset level, processing the second data to obtain the first data includes: When the security level is the second level, a preset decryption algorithm is used to decrypt the second data to obtain the first data; the second level is higher than the first level; and / or, When the security level is the third level, a preset decryption algorithm is used to perform a decryption operation on the second data, and a signature verification operation is performed on the second data to obtain the first data; the third level is higher than the second level.
12. The method according to claim 9, characterized in that The frame types include: key frames and / or non-key frames, and the frame contents include: dynamic frames and / or static frames. The dynamic frames are used to represent the presence of moving targets in the video frame data, and the static frames are used to represent the absence of moving targets in the video frame data. The frame content corresponding to the first data is determined by the data sending end after the data sending end identifies the moving target of the video frame, and the frame type corresponding to the first data is determined by the data sending end based on the video coding standard.
13. The method according to claim 12, characterized in that In the case where the target parameter corresponding to the video frame data includes a frame type, the security level of the video frame data corresponding to the key frame is higher than the security level of the video frame data corresponding to the non-key frame; or In the case where the target parameter corresponding to the video frame data includes frame content, the security level of the video frame data corresponding to the dynamic frame is higher than the security level of the video frame data corresponding to the static frame; or In the case where the target parameters corresponding to the video frame data include frame type and frame content: if the frame types corresponding to the video frame data are the same, the security level of the video frame data corresponding to the dynamic frames is higher than the security level of the video frame data corresponding to the static frames; if the frame contents corresponding to the video frame data are the same, the security level of the video frame data corresponding to the key frames is higher than the security level of the video frame data corresponding to the non-key frames; the security level of the video frame data corresponding to the key frames and the dynamic frames is higher than the security level of the video frame data corresponding to the non-key frames and the static frames; the security level of the video frame data corresponding to the key frames and the static frames is the same as the security level of the video frame data corresponding to the non-key frames and the dynamic frames.
14. The method according to claim 12, characterized in that The preset coding standard stipulates that the data to be transmitted is written into a data unit, the data unit includes a header position and a data position, the header position includes a first position for writing an importance character, the importance character is used to indicate the importance of the data in the data unit, the data position is used to write the data to be transmitted, and the header position is located before the data position; In the case where the video coding standard is the preset coding standard, the level identifier of the security level of the first data is written into a first position in the header position, and the second data is written into the data position; When the video encoding standard is not the preset encoding standard, a second position and a data position are constructed in the format of the message, the second position is located before the data position, the level identifier of the security level of the first data is written in the second position, and the second data is written in the data position.
15. The method according to claim 9, characterized in that The frame source includes an important source and / or a non-important source; the frame generation time includes an important period and / or a non-important period; the frame mark includes an important mark and / or a non-important mark; In the case where the target parameter corresponding to the video frame data includes a frame source, the security level of the video frame data corresponding to the important source is higher than the security level of the video frame data corresponding to the non-important source; or In the case where the target parameter corresponding to the video frame data includes the frame generation time, the security level of the video frame data corresponding to the important time period is higher than the security level of the video frame data corresponding to the unimportant time period; or In the case where the target parameter corresponding to the video frame data includes a frame mark, the security level of the video frame data corresponding to the important mark is higher than the security level of the video frame data corresponding to the unimportant mark.
16. The method according to claim 10 or 11, characterized in that In the case where the second data includes signature verification information, the signature verification information is located at the end of the second data.
17. An electronic device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1-8 or 9-16.
Citation Information
Patent Citations
Data storage, reconstruction and cleaning methods and apparatuses, and data processing system
CN108664351A
Video data storage method and device in cloud storage system
CN110597453A
Data processing method, device and system
CN110650107A
Communication method for bus dispatching system and bus dispatching system
CN113114621A
Video data scheduling method and device, base station, storage medium and computer product
CN118265080A
Cited By
Streaming security encryption method for prototype verification of power video monitoring chip
CN122093593A
