A driving recorder data security protection method, system, device and storage medium
By performing RGB value distortion and row-to-row conversion on dash recorder video data, secure data is generated, and through encrypted transmission and identity verification mechanisms, the problem of insufficient security protection of dash recorder data in the existing technology is solved, achieving higher data security and privacy protection.
Patent Information
- Application Number
- CN202510194794.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-21
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2045-02-21
AI Technical Summary
The existing dash recorder data security protection technology has weak security protection effects, which leads to easy leakage of dash recorder data, further leading to the problem of user privacy leakage.
By acquiring the image of each frame of video data, RGB value distorts the pixel color of the frame image, and converting the distorted frame image into a garbled image to obtain safe data. The secure data is then transferred to the storage device for storage through encrypted transmission, authenticating and restoring the secure data when accessed by the user.
Dual encryption of video data through color value transformation and image transformation improves the security and effectiveness of dash recorder data, prevents data leakage and protects user privacy.
Smart Images

Figure CN119670133B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of driving recorder data security protection, and in particular to a driving recorder data security protection method, system, device and storage medium. Background Art
[0002] Dash cam data security protection technology refers to a series of technical measures applied to the dash cam system to ensure the security and privacy protection of videos and other related data generated during vehicle driving. These technologies are designed to prevent unauthorized access, tampering or leakage of recorder data, and protect the privacy and rights of drivers and vehicles.
[0003] Under normal circumstances, dash cam data can be used to understand the owner's daily movements and places of entry and exit through video data. Therefore, dash cam data should be considered private data and needs to be protected. However, the existing dash cam data security protection technology is not sufficient for the protection of dash cam data, and mostly uses partition storage and permission authentication to protect it. Partition storage and permission authentication can only provide weak security protection and cannot prevent others from forcibly reading it, which makes the dash cam data easy to leak. For example, in a patent application with publication number CN115167768A, a method for protecting the security of dash cam storage data is disclosed. The solution is to protect the dash cam data through partition storage. This method is too simple and has a weak security protection effect, and cannot effectively ensure the security of dash cam data. The existing dash cam data security protection technology also has a weak security protection effect, which makes the dash cam data easy to leak, and further leads to the problem of user privacy leakage. Summary of the invention
[0004] The present invention aims to solve one of the technical problems in the prior art to at least a certain extent, by acquiring an image of each frame of video data, marking it as a frame image, changing the pixel color of the frame image to distort its RGB value, and then performing row-column conversion on the distorted frame image to convert the frame image into a garbled image to obtain security data, and then transmitting the security data to a storage device through encrypted transmission for storage. When a user accesses a driving recorder, the user is authenticated and the security data is restored after the authentication is passed, so as to solve the problem that the existing driving recorder data security protection technology still has a weak security protection effect, which makes the driving recorder data easy to be leaked, and further leads to the leakage of user privacy.
[0005] To achieve the above objectives, in a first aspect, the present application provides a driving recorder data security protection method, comprising the following steps:
[0006] Provide security protection for the video data recorded by the driving recorder to obtain safe data;
[0007] Transferring secure data to a storage device for storage via encrypted transmission;
[0008] When a user accesses the driving recorder, the user's identity is authenticated and the security data is restored after the authentication is passed.
[0009] Furthermore, the video data recorded by the driving recorder is protected and the security data is obtained, which includes the following sub-steps:
[0010] Obtain an image of each frame of the video data, mark it as a frame image, and change the pixel color of the frame image to distort its RGB value;
[0011] The distorted frame image is converted into a garbled image by performing row-column conversion.
[0012] Furthermore, obtaining an image of each frame of the video data, marking it as a frame image, and changing the pixel color of the frame image to distort its RGB value includes the following sub-steps:
[0013] Obtain an image of each frame of the video data, marked as a frame image, extract the RGB value of the pixel in the frame image, marked as pixel RGB, the pixel RGB includes R color, G color and B color, and the display format of the RGB value is (R, G, B);
[0014] For any pixel, calculate the median of R, G, and B colors, marked as C;
[0015] Adjust the RGB value of the pixel to (R, GC, BC), expressed as (r, g, b), where r is R, g is GC, and b is BC;
[0016] Determine whether g is a negative number. If g is a negative number, increase g by 1, otherwise output a signal indicating that the value is in compliance.
[0017] Determine whether b is greater than 1. If b is greater than 1, reduce b by 1; otherwise, output a numerical compliance signal.
[0018] Furthermore, performing row-column conversion on the distorted frame image to convert the frame image into a garbled image includes the following sub-steps:
[0019] The pixel rows in the frame image are numbered in units of rows and marked as H from top to bottom. n , the pixel columns in the frame image are numbered in columns, and are marked as L from left to right. m , where n and m are both positive integers and n is the serial number of H, and m is the serial number of L;
[0020] Set the first number of transpositions, represented by the symbol Q, construct two Q×2 matrices, named row transposition matrix and column transposition matrix respectively, obtain the maximum value of n, marked as N, obtain the maximum value of m, marked as M, randomly generate integers in the interval [1, N] to fill the row transposition matrix, and randomly generate integers in the interval [1, M] to fill the column transposition matrix, where the elements in the row transposition matrix are represented by the symbol DH(i, j), and the elements in the column transposition matrix are represented by the symbol DL(i, j), i and j are both positive integers and (i, j) is the serial number of DH and DL, 1≤i≤Q, 1≤j≤2, because the specifications of the row transposition matrix and the column transposition matrix are both Q×2, so (i, j) is used as the serial number;
[0021] First, H n To exchange, H n After the replacement is completed, m Replacement, for H n , get the row permutation matrix, starting with i=1, and replace H DH(i,1) With H DH(i,2) Replace, where H DH(i,1) With H DH(i,2) Represents H with n equal to DH(i,1) and DH(i,2) respectively n , then add one to i and swap again until i is greater than Q;
[0022] For L m , get the column permutation matrix, starting with i=1, and replace L DL(i,1) With L DL(i,2) Replace, where L DL(i,1) With L DL(i,2) Represents L with m equal to DL(i,1) and DL(i,2) respectively m , then add one to i and swap again until i is greater than Q;
[0023] After all the replacements are completed, a garbled image is obtained, and each frame image is converted into a garbled image to obtain secure data.
[0024] Furthermore, the encrypted transmission uses the HTTPS protocol to ensure the security of data transmission.
[0025] Furthermore, when a user accesses the driving recorder, the user is authenticated, and after the authentication is passed, the security data is restored, including the following sub-steps:
[0026] When a user accesses the dashcam, authenticate the user;
[0027] The identity verification includes account login and face recognition;
[0028] If the user logs in to the account with the login password and passes the face recognition corresponding to the account, the user is authorized to access the driving recorder;
[0029] When the user is authorized to access the driving recorder, the clips read by the user are restored from security data to video data.
[0030] Furthermore, when the user is authorized to access the driving recorder, restoring the clip read by the user from the security data to the video data includes the following sub-steps:
[0031] When restoring the security data from the garbled image to the distorted frame image, a row permutation matrix and a column permutation matrix are obtained, and an inverse operation is performed based on the execution steps of the row permutation matrix and the column permutation matrix in security protection to obtain a distorted frame image, which is marked as a distorted image;
[0032] In the process of restoring the distorted image to the frame image, when (r, g, b) is restored to (R, G, B), the equation group Solve G and B. If the system of equations has no solution, reduce g by 1 and solve again. If there is no solution again, increase b by 1 and solve again. If there is no solution again, reduce g by 1 and increase b by 1 and solve again.
[0033] The g and b in the RGB value of the pixel point are modified to the solved G and B to obtain a frame image, and all distorted images are restored to obtain video data.
[0034] In a second aspect, the present application provides a driving recorder data security protection system, including a data protection module, a data storage module and an access verification module; the data storage module and the access verification module are respectively data-connected to the data protection module;
[0035] The data protection module is used to perform security protection on the video data recorded by the driving recorder to obtain security data;
[0036] The data storage module is used to transfer the security data to the storage device for storage through encrypted transmission;
[0037] The access verification module is used to authenticate the user when the user accesses the driving recorder, and restore the security data after the verification is passed.
[0038] In a third aspect, the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps in the above method are performed.
[0039] In a fourth aspect, the present application provides a storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps in the above method are performed.
[0040] Beneficial effects of the present invention: The present invention obtains an image of each frame of video data, marks it as a frame image, changes the pixel color of the frame image to distort its RGB value, and then performs row-column conversion on the distorted frame image to convert the frame image into a garbled image to obtain secure data. The advantage is that the video data is doubly encrypted by color value conversion and image conversion. If the dashcam data is forcibly obtained, it needs to be decrypted, and the decryption difficulty is relatively high, thereby improving the security and effectiveness of the dashcam data security protection.
[0041] The present invention transmits security data to a storage device for storage through encrypted transmission. When a user accesses the driving recorder, the user's identity is authenticated and the security data is restored after the authentication is passed. The advantage is that security data is obtained after the video data is encrypted. Encrypted transmission is used in the process of transferring the security data to the storage device for storage to prevent theft during the transmission process. At the same time, user authority is queried by identity authentication. The user can view the driving recorder data only when authorized, which further improves the security and effectiveness of the driving recorder data security protection. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 is a functional block diagram of the system of the present invention;
[0043] Figure 2 A flow chart of the steps of the access verification module of the present invention;
[0044] Figure 3 is a flow chart of the steps of the method of the present invention;
[0045] Figure 4 It is a schematic structural diagram of the electronic device of the present invention. DETAILED DESCRIPTION
[0046] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0047] Example 1, please refer to Figure 1As shown, the present application provides a driving recorder data security protection system, including a data protection module, a data storage module and an access verification module; the data storage module and the access verification module are respectively data-connected to the data protection module;
[0048] The data protection module is used to perform security protection on the video data recorded by the driving recorder to obtain safe data; the data protection module includes a color value conversion unit and an image conversion unit;
[0049] The color value conversion unit is used to obtain an image of each frame of the video data, mark it as a frame image, and change the pixel color of the frame image to distort its RGB value;
[0050] The color value conversion unit is configured with a color value conversion strategy, which includes:
[0051] Get the image of each frame of the video data, marked as frame image, extract the RGB value of the pixel in the frame image, marked as pixel RGB, pixel RGB includes R color, G color and B color, and the display format of RGB value is (R, G, B);
[0052] For any pixel, calculate the median of R, G, and B colors, marked as C;
[0053] Adjust the RGB value of the pixel to (R, GC, BC), expressed as (r, g, b), where r is R, g is GC, and b is B+C;
[0054] Determine whether g is a negative number. If g is a negative number, increase g by 1, otherwise output a signal indicating that the value is in compliance.
[0055] Determine whether b is greater than 1. If b is greater than 1, reduce b by 1, otherwise output a value compliance signal;
[0056] In practical applications, since video data involves user privacy, this embodiment does not specifically display the frame image. It is only necessary to clarify the processing process of the pixel RGB in the frame image. Assume that there is a pixel point α in this embodiment, and the pixel RGB of α is (0.61, 0.014, 0.014), where R color is 0.61, G color is 0.014, and B color is 0.014. It is calculated that C=(0.61+0.014+0.014) / 2=0.319. For the convenience of calculation, the RGB value in this embodiment is Using a 32-bit RGB32 image format code, each color value ranges from 0 to 1. In the traditional RGB332 format, each color value is an integer, which is not convenient for subsequent restoration. The adjustment results in (r, g, b) being (0.61, -0.305, 0.333). Since g is a negative number, g is added by 1 to obtain the final (r, g, b) being (0.61, 0.695, 0.333). Each pixel in the frame image is adjusted to obtain a distorted frame image, which is named a distorted image in this embodiment.
[0057] The image conversion unit is used to perform row-column conversion on the distorted frame image, and convert the frame image into a garbled image;
[0058] The image conversion unit is configured with an image conversion strategy, which includes:
[0059] The pixel rows in the frame image are numbered in units of rows and marked as H from top to bottom. n , the pixel columns in the frame image are numbered in columns, and are marked as L from left to right. m , where n and m are both positive integers and n is the serial number of H, and m is the serial number of L;
[0060] Set the first number of transpositions, represented by the symbol Q, construct two Q×2 matrices, named row transposition matrix and column transposition matrix respectively, obtain the maximum value of n, marked as N, obtain the maximum value of m, marked as M, randomly generate integers in the interval [1, N] to fill the row transposition matrix, and randomly generate integers in the interval [1, M] to fill the column transposition matrix, where the elements in the row transposition matrix are represented by the symbol DH(i, j), and the elements in the column transposition matrix are represented by the symbol DL(i, j), i and j are both positive integers and (i, j) is the serial number of DH and DL, 1≤i≤Q, 1≤j≤2, because the specifications of the row transposition matrix and the column transposition matrix are both Q×2, so (i, j) is used as the serial number;
[0061] In practical applications, the first number of swaps Q is set to 500, that is, the pixel rows are converted 500 times, and the pixel columns are converted 500 times. Since the resolution of the frame image is 1280×720, the numbers are H1 to H720 , L1 to L 1280 , 1≤n≤720, 1≤m≤1280, N=720, M=1280; construct a 500×2 row swap matrix and a column swap matrix, randomly generate integers in the interval [1,720] to fill the row swap matrix, and randomly generate integers in the interval [1,1280] to fill the column swap matrix. Since the matrix is too large, it is not convenient to show it in detail in this embodiment. Only the first three rows of the row swap matrix are taken as an example to illustrate the format of the matrix and the swap processing of the distorted image. The first three rows of the row swap matrix are , where 269 is DH(1,1) and 432 is DH(3,2);
[0062] First, H n To exchange, H n After the replacement is completed, m Replacement, for H n , get the row permutation matrix, starting with i=1, and replace H DH(i,1) With H DH(i,2) Replace, where H DH(i,1) With H DH(i,2) Represents H with n equal to DH(i,1) and DH(i,2) respectively n , then add one to i and swap again until i is greater than Q;
[0063] For L m , get the column permutation matrix, starting with i=1, and replace L DL(i,1) With L DL(i,2) Replace, where L DL(i,1) With L DL(i,2) Represents L with m equal to DL(i,1) and DL(i,2) respectively m , then add one to i and swap again until i is greater than Q;
[0064] After all the replacements are completed, a garbled image is obtained, and each frame image is converted into a garbled image to obtain secure data;
[0065] In practical applications, for H n , get the row permutation matrix. When i=1, DH(i,1) and DH(i,2) are 269 and 370 respectively. 269 With H 370 Swap, that is, swap the pixels in the 269th row with the pixels in the 370th row, add 1 to i and repeat this step until i is greater than 500 and stop swapping. The swapping of pixel columns is similar, and no specific explanation is given in this embodiment. After all the swaps are completed, a garbled image is obtained, and each frame image is converted into a garbled image to obtain secure data.
[0066] The data storage module is used to transfer secure data to a storage device for storage through encrypted transmission; encrypted transmission uses the HTTPS protocol to ensure the security of data transmission;
[0067] In actual applications, encrypted transmission is performed using the existing HTTPS protocol to ensure the security of secure data during transmission.
[0068] See also Figure 2 As shown, the access verification module is used to authenticate the user when the user accesses the driving recorder, and restore the security data after the authentication is passed; the access verification module includes an identity authentication unit and a data restoration unit;
[0069] The authentication unit is configured with an authentication policy, which includes:
[0070] When a user accesses the dashcam, authenticate the user;
[0071] Authentication includes account login and facial recognition;
[0072] If the user logs in to the account with the login password and passes the face recognition corresponding to the account, the user is authorized to access the driving recorder;
[0073] When the user is authorized to access the dashcam, the clip read by the user is restored from security data to video data;
[0074] In actual applications, identity authentication uses existing identity authentication technologies, including but not limited to password login, face recognition, mobile phone verification code, fingerprint recognition and other identity authentication technologies, and any two of them can be combined;
[0075] The data restoration unit is configured with a data restoration strategy, which includes:
[0076] When restoring the security data from the garbled image to the distorted frame image, a row permutation matrix and a column permutation matrix are obtained, and an inverse operation is performed based on the execution steps of the row permutation matrix and the column permutation matrix in security protection to obtain a distorted frame image, which is marked as a distorted image;
[0077] In the process of restoring the distorted image to the frame image, when (r, g, b) is restored to (R, G, B), the equation group Solve G and B. If the system of equations has no solution, reduce g by 1 and solve again. If there is no solution again, increase b by 1 and solve again. If there is no solution again, reduce g by 1 and increase b by 1 and solve again.
[0078] Modify the g and b in the RGB value of the pixel point to the solved G and B to obtain a frame image, and restore all distorted images to obtain video data;
[0079] In practical applications, the inverse operation is performed in reverse, and the image conversion strategy can be performed in reverse. It will not be described in detail in this embodiment. In the process of restoring the distorted image to the frame image, taking (r, g, b) as (0.61, 0.695, 0.333) in this embodiment as an example, when solving for the first time, G is greater than 1, and the value range of G is 0 to 1, so G is an incorrect value and there is no solution. Then g is reduced by 1, and g is -0.305 at this time. Solve again and find that both G and B are in the range of 0 to 1. The solution is successful, and RGB is (0.61, 0.014, 0.014). After restoring all distorted images, the video data can be obtained. It should be noted that if the solution is not successful when g is reduced by 1, g needs to be restored to the reduced value, and the same applies to b.
[0080] Example 2, please refer to Figure 3 As shown, the present application provides a driving recorder data security protection method, comprising the following steps:
[0081] Step S1, performing security protection on the video data recorded by the driving recorder to obtain security data; Step S1 includes the following sub-steps:
[0082] Step S101, obtaining an image of each frame of video data, marking it as a frame image, and changing the pixel color of the frame image to distort its RGB value;
[0083] Step S101 includes the following sub-steps:
[0084] Step S1011, obtaining an image of each frame of the video data, marking it as a frame image, extracting the RGB value of a pixel in the frame image, marking it as a pixel RGB, where the pixel RGB includes R color, G color and B color, and the display format of the RGB value is (R, G, B);
[0085] Step S1012, for any pixel point, calculate the median of R color, G color and B color, marked as C;
[0086] Step S1013, adjusting the RGB value of the pixel to (R, GC, BC), expressed as (r, g, b), where r is R, g is GC, and b is BC;
[0087] Step S1014, determining whether g is a negative number, if g is a negative number, increasing g by 1, otherwise outputting a numerical compliance signal;
[0088] Step S1015, determining whether b is greater than 1, if b is greater than 1, reducing b by 1, otherwise outputting a numerical compliance signal;
[0089] Step S102, performing row-column conversion on the distorted frame image to convert the frame image into a garbled image;
[0090] Step S102 includes the following sub-steps:
[0091] Step S1021: Number the pixel rows in the frame image in units of rows, and mark them as H in order from top to bottom. n , the pixel columns in the frame image are numbered in columns, and are marked as L from left to right. m , where n and m are both positive integers and n is the serial number of H, and m is the serial number of L;
[0092] Step S1022, set the first number of transpositions, represented by the symbol Q, construct two Q×2 matrices, named row transposition matrix and column transposition matrix respectively, obtain the maximum value of n, marked as N, obtain the maximum value of m, marked as M, randomly generate integers in the interval [1, N] to fill the row transposition matrix, and randomly generate integers in the interval [1, M] to fill the column transposition matrix, wherein the elements in the row transposition matrix are represented by the symbol DH(i, j), and the elements in the column transposition matrix are represented by the symbol DL(i, j), i and j are both positive integers and (i, j) is the serial number of DH and DL, 1≤i≤Q, 1≤j≤2, because the specifications of the row transposition matrix and the column transposition matrix are both Q×2, so (i, j) is used as the serial number;
[0093] Step S1023, first n To exchange, H n After the replacement is completed, m Replacement, for H n , get the row permutation matrix, starting with i=1, and replace H DH(i,1) With H DH(i,2) Replace, where H DH(i,1) With H DH(i,2) Represents H with n equal to DH(i,1) and DH(i,2) respectively n , then add one to i and swap again until i is greater than Q;
[0094] Step S1024, for L m , get the column permutation matrix, starting with i=1, and replace L DL(i,1) With L DL(i,2) Replace, where L DL(i,1) With L DL(i,2) Represents L with m equal to DL(i,1) and DL(i,2) respectivelym , then add one to i and swap again until i is greater than Q;
[0095] Step S1025, after all the replacements are completed, a garbled image is obtained, and each frame image is converted into a garbled image to obtain secure data;
[0096] Step S2, transferring the secure data to a storage device for storage through encrypted transmission; the encrypted transmission uses the HTTPS protocol to ensure the security of data transmission;
[0097] Step S3, when the user accesses the driving recorder, the user's identity is authenticated, and the security data is restored after the authentication is passed; Step S3 includes the following sub-steps:
[0098] Step S301, when a user accesses the driving recorder, the user is authenticated;
[0099] Step S302, identity verification includes account login and face recognition;
[0100] Step S303: If the user logs in to the account with the login password and passes the face recognition corresponding to the account, the user is authorized to access the driving recorder;
[0101] Step S304, when the user is authorized to access the driving recorder, the clip read by the user is restored from security data to video data;
[0102] Step S304 includes the following sub-steps:
[0103] Step S3041, when restoring the security data from the garbled image to the distorted frame image, obtain a row permutation matrix and a column permutation matrix, perform inverse operations based on the execution steps of the row permutation matrix and the column permutation matrix in security protection, and obtain a distorted frame image, which is marked as a distorted image;
[0104] Step S3042, in the process of restoring the distorted image to the frame image, when restoring (r, g, b) to (R, G, B), the equation group Solve G and B. If the system of equations has no solution, reduce g by 1 and solve again. If there is no solution again, increase b by 1 and solve again. If there is no solution again, reduce g by 1 and increase b by 1 and solve again.
[0105] Step S3043, modifying g and b in the RGB value of the pixel point to the solved G and B to obtain a frame image, and restoring all distorted images to obtain video data.
[0106] Example 3, please refer to Figure 4 As shown, Figure 4The structural diagram of an electronic device is illustrated, and the electronic device may include: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus. The memory stores computer-readable instructions, and the processor can call the instructions in the memory. When the computer-readable instructions are executed by the processor, the steps in a method for protecting data security of a driving recorder are executed to achieve the following functions: performing security protection on the video data recorded by the driving recorder to obtain security data; transmitting the security data to a storage device for storage through encrypted transmission; and performing identity authentication on the user when the user accesses the driving recorder, and restoring the security data after the authentication is passed.
[0107] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0108] Embodiment 4, the present application also provides a computer-readable storage medium, the present application provides a storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method for protecting the data security of a driving recorder are executed to achieve the following functions: performing security protection on the video data recorded by the driving recorder to obtain security data; transmitting the security data to a storage device for storage through encrypted transmission; when a user accesses the driving recorder, authenticating the user, and restoring the security data after the authentication is passed.
[0109] Through the description of the above implementation methods, the embodiments of the present invention can be provided as methods, systems or computer program products. Based on such an understanding, the above technical solutions can be essentially or partly contributed to the prior art in the form of software products, which can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and include several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0110] In the embodiments provided in the present application, it should be understood that the disclosed system or method can be implemented in other ways. The embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or units can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of systems, modules and units can be electrical, mechanical or other forms.
[0111] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A driving recorder data security protection method, characterized in that: The steps include: Provide security protection for the video data recorded by the driving recorder to obtain safe data; Obtain an image of each frame of the video data, mark it as a frame image, and change the pixel color of the frame image to distort its RGB value, including the following sub-steps: Obtain an image of each frame of the video data, marked as a frame image, extract the RGB value of the pixel in the frame image, marked as pixel RGB, the pixel RGB includes R color, G color and B color, and the display format of the RGB value is (R, G, B); For any pixel, calculate the median of R, G, and B colors, marked as C; Adjust the RGB value of the pixel to (R, GC, BC), expressed as (r, g, b), where r is R, g is GC, and b is BC; Determine whether g is a negative number. If g is a negative number, increase g by 1, otherwise output a signal indicating that the value is in compliance. Determine whether b is greater than 1. If b is greater than 1, reduce b by 1, otherwise output a value compliance signal; Performing row-column conversion on the distorted frame image to convert the frame image into a garbled image includes the following sub-steps: The pixel rows in the frame image are numbered in units of rows and marked as H from top to bottom. n , the pixel columns in the frame image are numbered in columns, and are marked as L from left to right. m , where n and m are both positive integers and n is the serial number of H, and m is the serial number of L; Set the first number of transpositions, represented by the symbol Q, construct two Q×2 matrices, named row transposition matrix and column transposition matrix respectively, obtain the maximum value of n, marked as N, obtain the maximum value of m, marked as M, randomly generate integers in the interval [1, N] to fill the row transposition matrix, and randomly generate integers in the interval [1, M] to fill the column transposition matrix, where the elements in the row transposition matrix are represented by the symbol DH(i, j), and the elements in the column transposition matrix are represented by the symbol DL(i, j), i and j are both positive integers and (i, j) is the serial number of DH and DL, 1≤i≤Q, 1≤j≤2, because the specifications of the row transposition matrix and the column transposition matrix are both Q×2, so (i, j) is used as the serial number; First, H n To exchange, H n After the replacement is completed, m Replacement, for H n , get the row permutation matrix, starting with i=1, and replace H DH(i,1) With H DH(i,2) Replace, where H DH(i,1) With H DH(i,2) Represents H with n equal to DH(i,1) and DH(i,2) respectively n , then add one to i and swap again until i is greater than Q; For L m , get the column permutation matrix, starting with i=1, and replace L DL(i,1) With L DL(i,2) Replace, where L DL(i,1) With L DL(i,2) Represents L with m equal to DL(i,1) and DL(i,2) respectively m , then add one to i and swap again until i is greater than Q; After all the replacements are completed, a garbled image is obtained, and each frame image is converted into a garbled image to obtain secure data; Transferring secure data to a storage device for storage via encrypted transmission; When a user accesses the driving recorder, the user's identity is authenticated, and after the authentication is passed, the security data is restored, including the following sub-steps: When a user accesses the dashcam, authenticate the user; The identity verification includes account login and face recognition; If the user logs in to the account with the login password and passes the face recognition corresponding to the account, the user is authorized to access the driving recorder; When the user is authorized to access the driving recorder, the clip read by the user is restored from security data to video data, including the following sub-steps: When restoring the security data from the garbled image to the distorted frame image, a row permutation matrix and a column permutation matrix are obtained, and an inverse operation is performed based on the execution steps of the row permutation matrix and the column permutation matrix in security protection to obtain a distorted frame image, which is marked as a distorted image; In the process of restoring the distorted image to the frame image, when (r, g, b) is restored to (R, G, B), the equation group Solve G and B. If the system of equations has no solution, reduce g by 1 and solve again. If there is no solution again, increase b by 1 and solve again. If there is no solution again, reduce g by 1 and increase b by 1 and solve again. The g and b in the RGB value of the pixel point are modified to the solved G and B to obtain a frame image, and all distorted images are restored to obtain video data.
2. A driving recorder data security protection method according to claim 1, characterized in that: The encrypted transmission uses the HTTPS protocol to ensure the security of data transmission.
3. A driving recorder data security protection system, used to implement a driving recorder data security protection method according to claim 1 or 2, characterized in that: It includes a data protection module, a data storage module and an access verification module; the data storage module and the access verification module are respectively data-connected to the data protection module; The data protection module is used to perform security protection on the video data recorded by the driving recorder to obtain security data; The data storage module is used to transfer the security data to the storage device for storage through encrypted transmission; The access verification module is used to authenticate the user when the user accesses the driving recorder, and restore the security data after the verification is passed.
4. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the steps in the method according to claim 1 or 2 are executed.
5. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps in the method according to claim 1 or 2 are executed.
Citation Information
Patent Citations
Method for protecting safety of stored data of automobile data recorder
CN115167768A
Cloud service data information security management method and system
CN116776386A
Permuting in a matrix-vector processor
GB201802586D0