A data security encryption method and system based on vehicle networking environment

By converting the image data in the Internet of Vehicles environment into a basic array and generating candidate arrays, and combining the two-dimensional chaotic mapping function for encryption, the problem of local similarity and statistical characteristics that cannot be destroyed when image data is encrypted in the Internet of Vehicles environment is solved, and higher data security is achieved.

CN119743556BActive Publication Date: 2025-06-06MAIWEI TECH (GUANGZHOU) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510238157.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-03
Publication Date
2025-06-06
Estimated Expiration
2045-03-03

AI Technical Summary

Technical Problem

Image data in the Internet of Vehicles environment has local similarity characteristics and statistical characteristics. The existing encryption methods cannot effectively destroy these characteristics, resulting in security risks in the encryption process of image data.

Method used

Through the four-sided theorem, convert the grayscale value into a basic array, arrange and deduplicate it to generate a candidate array. Adjust the probability of the candidate array based on the target array of other pixel points in the neighborhood, and randomly obtain the target array. The two-dimensional chaos mapping function is used to generate key and chaos value pairs, encrypt plain text pixel points, and generate ciphertext images.

Benefits of technology

It destroys the local similarity characteristics and statistical characteristics of image data, improves the security of image data, prevents data from being abused, and protects users' privacy and legitimate rights and interests.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119743556B_ABST
    Figure CN119743556B_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of data security encryption, and specifically relates to a data security encryption method and system based on a vehicle networking environment, wherein the method comprises: converting a gray value into a basic array by using the four-party theorem, arranging and removing the four basic numbers in the basic array, obtaining all the arrangement arrays of the basic array, and in the image data in the vehicle networking environment, taking all the arrangement arrays of all the basic arrays corresponding to the gray value of the pixel point as candidate arrays, adjusting the theoretical probability of each candidate array according to the target array of other pixels in the neighborhood of the pixel point, randomly obtaining the target array with unequal probability from all the candidate arrays according to the adjusted probability, determining the plaintext pixel point pair corresponding to the pixel point according to the four basic numbers in the target array, encrypting the plaintext pixel point pair by using the chaotic value pair, and obtaining the ciphertext image composed of the ciphertext pixel point pair. The present invention makes the image data in the vehicle networking environment safer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data security encryption, and more specifically, to a data security encryption method and system based on a vehicle networking environment. Background Art

[0002] The vehicle-to-everything (V2X) environment refers to a network environment that enables real-time information exchange between vehicles (V2V), vehicles and infrastructure (V2I), vehicles and pedestrians (V2P), and vehicles and networks (V2N) through advanced communication technologies. The vehicle-to-everything (V2X) environment provides strong support for intelligent transportation systems, improves traffic safety, optimizes traffic flow, reduces congestion, and provides a foundation for the development of autonomous driving technology.

[0003] The data in the Internet of Vehicles environment contains sensitive information. In order to prevent information leakage and malicious attacks and ensure the privacy and security of users, the data in the Internet of Vehicles environment needs to be encrypted.

[0004] In the related technology, for example, the Chinese patent application document with application publication number CN119211836A discloses a method, system and terminal device for positioning a vehicle in an Internet of Vehicles, including: determining regional vehicles based on vehicle captured images; determining a target cooperative vehicle based on status information of the vehicle to be positioned, driving information of regional vehicles and the number of collaborative positioning times; generating a key pair based on the vehicle information of the remaining regional vehicles to obtain a public key and a private key, and sending the public key to the vehicle to be positioned; instructing the vehicle to be positioned to encrypt the location information according to the public key to obtain encrypted location data, and sending the encrypted location data to the target cooperative vehicle for collaborative forwarding; when the road test base station receives the encrypted location data forwarded by the target cooperative vehicle, it decrypts the encrypted location data according to the private key to obtain a vehicle positioning result. This patent application document effectively prevents the leakage of encrypted location data by sending the encrypted location data to the target cooperative vehicle for collaborative forwarding, thereby improving the security of vehicle positioning in the Internet of Vehicles.

[0005] Compared with the vehicle's location information, the image data in the Internet of Vehicles environment has local similarity characteristics and statistical properties, among which the local similarity characteristics of image data are an important basis for image processing and analysis, and the statistical characteristics of image data are an important basis for obtaining useful information by performing statistical analysis on image data and ciphertext images. Therefore, the local similarity characteristics and statistical characteristics of image data are security risks in image data encryption. In order to protect the security of image data in the Internet of Vehicles environment, the local similarity characteristics and statistical characteristics of image data need to be destroyed in the process of encrypting characteristic data. However, the method for encrypting the vehicle's location information in the related art cannot destroy the local similarity characteristics and statistical characteristics of image data, and therefore is not suitable for encrypting image data in the Internet of Vehicles environment. Summary of the invention

[0006] In order to solve the above-mentioned technical problem that the method of encrypting the vehicle location information is not suitable for encrypting image data in the Internet of Vehicles environment because the image data in the Internet of Vehicles environment has local similarity characteristics and statistical characteristics, the present invention provides solutions in the following aspects.

[0007] In a first aspect, the present invention provides a data security encryption method based on a vehicle networking environment, comprising: converting each grayscale value in the range of [0,255] into at least one basic array through the four-party theorem, wherein the basic array is composed of four basic numbers; arranging the four basic numbers in the basic array, deduplicating all the arrangement results of the basic array, and obtaining all the arrangement arrays of the basic array; acquiring image data in a vehicle networking environment; sequentially taking the pixel points in the image data as target pixel points: taking all the arrangement arrays of all the basic arrays corresponding to the grayscale value of the target pixel point as all the candidate arrays of the target pixel point; and according to the target arrays of other pixel points in the neighborhood of the target pixel point, The theoretical probability of each candidate array of the target pixel point is adjusted; according to the adjusted probability of all candidate arrays of the target pixel point, a candidate array is randomly obtained from all candidate arrays of the target pixel point with unequal probability as the target array of the target pixel point; according to the binary number corresponding to the four basic numbers in the target array, the plaintext pixel point pair corresponding to the target pixel point is determined; according to the initial value and parameter of the two-dimensional chaotic mapping function, a key is generated; according to the key and the two-dimensional chaotic mapping function, a plurality of chaotic value pairs are generated; each plaintext pixel point pair is encrypted by each chaotic value pair to obtain each ciphertext pixel point pair, and all the ciphertext pixel point pairs are combined into a ciphertext image, and the ciphertext image is the encryption result of the image data.

[0008] The present invention adjusts the probability of the candidate array to be smaller for the candidate array that has appeared in the target array of other pixels in the neighborhood of the target pixel point when the number of times the candidate array appears is greater. Then, when the target array of the target pixel point is randomly obtained from all the candidate arrays of the target pixel point with unequal probability, the target array is most likely a candidate array that has not appeared in the target array of other pixels in the neighborhood of the target pixel point, so that the target arrays of pixels with the same grayscale value in the local area of ​​the image data are different, thereby destroying the local similarity feature of the image data, and it is difficult to obtain useful information by performing image processing and analysis on the ciphertext image; since the pixels with the same grayscale value in the image data The target array may be different. Therefore, when the plaintext pixel pairs corresponding to the pixels are determined according to the binary numbers corresponding to the four basic numbers in the target array, the plaintext pixel pairs corresponding to the pixels with the same grayscale value may be different. On this basis, the chaotic value pairs used to encrypt each plaintext pixel pair may be different, and ultimately the encryption results of the pixels with the same grayscale value, that is, the ciphertext pixel pairs, may be different, thereby destroying the statistical characteristics of the image data, making it difficult to obtain useful information by performing statistical analysis on the image data and the ciphertext image; by destroying the local similarity characteristics and statistical characteristics of the image data, the image data can be effectively prevented from being abused, the privacy and legal rights of users can be protected, and the image data in the Internet of Vehicles environment can be made safer.

[0009] Preferably, for any grayscale value in the range [0,255] , gray value The sum of the squares of the four basic numbers in the corresponding basic array is equal to the grayscale value .

[0010] The present invention converts the grayscale value into a basic array composed of four basic numbers, so that different target arrays can be assigned to pixel points with the same grayscale value in a local area of ​​the image data, thereby destroying the local similarity characteristics of the image data.

[0011] Preferably, the method for acquiring other pixel points in the neighborhood of the target pixel point is: marking the coordinates of the target pixel point in the rectangular coordinate system as , , are the horizontal and vertical coordinates of the target pixel respectively; the horizontal coordinate is In the range and the vertical coordinate is The pixels within the range are other pixels in the neighborhood of the target pixel. is the maximum value function.

[0012] Preferably, the theoretical probability of all candidate arrays of the target pixel point is the same and equal to , is the number of all candidate arrays for the target pixel.

[0013] Preferably, the target pixel The adjusted probability of the candidate array ; Indicates that within the neighborhood of the target pixel, the target array is equal to the first The number of all other pixels in the candidate array, is the target pixel The theoretical probability of candidate arrays, is the normalization function; where, for the normalization function , , Indicates that within the neighborhood of the target pixel, the target array is equal to the first The number of all other pixels in the candidate array, is the target pixel The theoretical probability of a candidate array.

[0014] The present invention adjusts the probability of a candidate array that has appeared in the target arrays of other pixel points in the neighborhood of the target pixel point to be smaller the more times the candidate array appears. When the target array of the target pixel point is subsequently randomly acquired with unequal probabilities from all candidate arrays of the target pixel point, the target array is most likely a candidate array that has not appeared in the target arrays of other pixel points in the neighborhood of the target pixel point, so that the target arrays of pixels with the same grayscale values ​​in a local area of ​​the image data are different, thereby destroying the local similarity characteristics of the image data.

[0015] Preferably, the plaintext pixel pair corresponding to the target pixel consists of two plaintext pixel points, which are respectively recorded as the first plaintext pixel point and the second plaintext pixel point; for the four basic numbers in the target array, each basic number in the target array is converted into a number with a length equal to The decimal number corresponding to the binary number whose length is equal to 8 obtained by splicing the binary numbers of the first two basic numbers is used as the grayscale value of the first plaintext pixel in the plaintext pixel pair, and the decimal number corresponding to the binary number whose length is equal to 8 obtained by splicing the binary numbers of the last two basic numbers is used as the grayscale value of the second plaintext pixel in the plaintext pixel pair.

[0016] Preferably, the method for obtaining the chaotic value pair is: according to the key , iterate the equation of the two-dimensional chaotic mapping function times, and each iteration obtains a chaotic value pair, and a total of chaotic value pairs, the size of the image data is , , are respectively the length and width of the image data; wherein each chaotic value pair consists of two chaotic values, the two chaotic values ​​are respectively the first chaotic value and the second chaotic value, and for each chaotic value, 4 decimal places are retained; for the obtained Chaotic value pairs, delete the first 40 chaotic value pairs, and keep the remaining A chaotic value pair.

[0017] Since the chaotic mapping function has pseudo-randomness, sensitivity to initial conditions, non-periodicity and long-term unpredictability, the present invention generates multiple chaotic value pairs according to the key and the two-dimensional chaotic mapping function, and subsequently uses the chaotic value pairs to encrypt the plaintext pixel pairs, so that the encryption algorithm of the present invention has high security.

[0018] Preferably, the step of encrypting each plaintext pixel pair by each chaotic value pair to obtain each ciphertext pixel pair comprises: Chaos value pair Encrypt the plaintext pixel pairs to obtain A ciphertext pixel pair, a ciphertext pixel pair consists of two ciphertext pixels, which are respectively recorded as the first ciphertext pixel and the second ciphertext pixel; The gray value of the first ciphertext pixel in the ciphertext pixel pair is equal to , No. The gray value of the second ciphertext pixel in the plaintext pixel pair is equal to , , Respectively The first chaotic value and the second chaotic value in a chaotic value pair, , Respectively The grayscale values ​​of the first plaintext pixel and the second plaintext pixel in a plaintext pixel pair, To round down.

[0019] The present invention encrypts each plaintext pixel pair through different chaotic value pairs, so that the encryption results of pixels with the same grayscale value, that is, the ciphertext pixel pairs, are different, thereby destroying the statistical characteristics of the image data.

[0020] Preferably, sequentially taking pixel points in the image data as target pixel points comprises: sequentially taking pixel points in the image data as target pixel points row by row from left to right in the image data.

[0021] In a second aspect, the present invention provides a data security encryption system based on a vehicle networking environment, comprising a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned data security encryption method based on the vehicle networking environment is implemented.

[0022] By adopting the above technical solution, the above-mentioned data security encryption method based on the Internet of Vehicles environment is generated into a computer program and stored in the memory to be loaded and executed by the processor, so that a terminal device is made according to the memory and the processor for easy use.

[0023] The beneficial effects of the present invention are:

[0024] The present invention adjusts the probability of the candidate array to be smaller for the candidate array that has appeared in the target array of other pixels in the neighborhood of the target pixel point when the number of times the candidate array appears is greater. Then, when the target array of the target pixel point is randomly obtained from all the candidate arrays of the target pixel point with unequal probability, the target array is most likely a candidate array that has not appeared in the target array of other pixels in the neighborhood of the target pixel point, so that the target arrays of pixels with the same grayscale value in the local area of ​​the image data are different, thereby destroying the local similarity feature of the image data, and it is difficult to obtain useful information by performing image processing and analysis on the ciphertext image; since the pixels with the same grayscale value in the image data The target array may be different. Therefore, when the plaintext pixel pairs corresponding to the pixels are determined according to the binary numbers corresponding to the four basic numbers in the target array, the plaintext pixel pairs corresponding to the pixels with the same grayscale value may be different. On this basis, the chaotic value pairs used to encrypt each plaintext pixel pair may be different, and ultimately the encryption results of the pixels with the same grayscale value, that is, the ciphertext pixel pairs, may be different, thereby destroying the statistical characteristics of the image data, making it difficult to obtain useful information by performing statistical analysis on the image data and the ciphertext image; by destroying the local similarity characteristics and statistical characteristics of the image data, the image data can be effectively prevented from being abused, the privacy and legal rights of users can be protected, and the image data in the Internet of Vehicles environment can be made safer. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:

[0026] Figure 1 is a flow chart schematically illustrating a data security encryption method based on a vehicle networking environment in the present invention;

[0027] Figure 2It schematically shows that when the coordinates of the target pixel are Schematic diagram of the positions of other pixels in the neighborhood of the target pixel when ;

[0028] Figure 3 It schematically shows that when the coordinates of the target pixel are Schematic diagram of the positions of other pixels in the neighborhood of the target pixel when ;

[0029] Figure 4 is a schematic diagram schematically showing a target pixel and other pixels in its neighborhood;

[0030] Figure 5 is a flow chart schematically illustrating step S5;

[0031] Figure 6 is a schematic diagram schematically showing image data;

[0032] Figure 7 It is schematically shown Figure 6 The encryption result of the image data schematic is shown. DETAILED DESCRIPTION

[0033] 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 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 those skilled in the art without creative work are within the scope of protection of the present invention.

[0034] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0035] The embodiment of the present invention discloses a data security encryption method based on a vehicle networking environment, referring to Figure 1 , comprising steps S1 to S5:

[0036] S1. Acquire image data in the Internet of Vehicles environment.

[0037] The vehicle-to-everything (V2X) environment refers to a network environment that enables real-time information exchange between vehicles (V2V), vehicles and infrastructure (V2I), vehicles and pedestrians (V2P), and vehicles and networks (V2N) through advanced communication technologies. The vehicle-to-everything (V2X) environment provides strong support for intelligent transportation systems, improves traffic safety, optimizes traffic flow, reduces congestion, and provides a foundation for the development of autonomous driving technology.

[0038] The data in the IoV environment include the location information and image data of the vehicle. The image data in the IoV environment is mainly used in environmental perception, accident prevention, vehicle tracking, smart parking and other aspects to improve traffic safety and efficiency and improve people's travel experience. In terms of environmental perception, the vehicle collects images of the surrounding environment through the camera to identify road signs, traffic signals, pedestrians, other vehicles, etc., and provide decision-making basis for automatic driving and assisted driving systems. In terms of traffic flow monitoring, the cameras installed in the road infrastructure can collect traffic images in real time to monitor traffic flow, provide data support for traffic management departments, and optimize traffic signal control and road planning. In terms of accident prevention, through image analysis, the vehicle can detect potential dangerous situations in advance, such as sudden deceleration of the vehicle in front, pedestrians crossing the road, etc., and issue warnings in time or automatically take braking measures. In terms of vehicle tracking, image data can be used to track the vehicle's driving trajectory to provide support for traffic flow analysis and fleet management. In terms of smart parking, through image recognition technology, the vehicle can automatically find a parking space and assist the driver to complete the parking operation.

[0039] Specifically, image data in a connected vehicle environment is acquired, where the image data includes an environment image around the vehicle and a traffic image.

[0040] Among them, for the image data, the pixel point in the upper left corner of the image data is the origin of the rectangular coordinate system, the horizontal right direction of the origin is the positive direction of the horizontal axis of the rectangular coordinate system, and the vertical downward direction of the origin is the positive direction of the vertical axis of the rectangular coordinate system; and the size of the image data is , , are the length and width of the image data respectively, so the value range of the horizontal coordinate of the pixel point is , the vertical coordinate value range of the pixel point is .

[0041] It should be noted that the data in the Internet of Vehicles environment contains sensitive information. In order to prevent information leakage and malicious attacks and ensure the privacy and security of users, the data in the Internet of Vehicles environment needs to be encrypted.

[0042] It should be further explained that, compared with the vehicle's location information, the image data in the Internet of Vehicles environment has local similarity characteristics and statistical properties, among which the local similarity characteristics of image data are an important basis for image processing and analysis, and the statistical characteristics of image data are an important basis for obtaining useful information by performing statistical analysis on image data and ciphertext images. Therefore, the local similarity characteristics and statistical characteristics of image data are security risks in image data encryption. In order to protect the security of image data in the Internet of Vehicles environment, the local similarity characteristics and statistical characteristics of image data need to be destroyed in the process of encrypting characteristic data; however, the method for encrypting the vehicle's location information in the related art cannot destroy the local similarity characteristics and statistical characteristics of image data, and therefore is not suitable for encrypting image data in the Internet of Vehicles environment.

[0043] In summary, the present invention provides an encryption method that can destroy the local similarity features and statistical characteristics of image data, which can effectively prevent the abuse of image data, protect the privacy and legal rights of users, and make image data in the Internet of Vehicles environment more secure.

[0044] S2. Convert each grayscale value into at least one basic array by using the Four-square Theorem; arrange the four basic numbers in the basic array, remove duplicates from all arrangement results of the basic array, and obtain all arrangement arrays of the basic array.

[0045] Among them, the four-square theorem is also called Lagrange's four-square theorem, which states that every positive integer can be expressed as the sum of the squares of four integers; since the grayscale value of the pixel in the image data ranges from [0,255], the value range of the base number is [0,15].

[0046] Specifically, for any grayscale value in the range [0,255] , through the four-square theorem, the gray value Convert to at least one basic array, each basic array consists of four basic numbers, and the sum of the squares of the four basic numbers in each basic array is equal to the grayscale value ,Right now , , , , are the four basic numbers in the basic array, and these four basic numbers are An integer in the range.

[0047] Among them, for the gray value Two different base arrays, the four base numbers in one base array are not exactly the same as the four base numbers in the other base array; for example: when the gray value When the gray value Converted into two basic arrays, one of which has four basic numbers: , , , ,and , the four basic numbers in the other basic array are , , , ,and ; The four basis numbers in the two basis arrays are not exactly the same.

[0048] For example, when the gray value When the gray value Converted to a basic array, the four basic numbers in the basic array are , , , ,and ; When the gray value When the gray value Converted into 9 basic arrays, the 9 basic arrays are:

[0049] The four basic numbers in the first basic array are: , , , ,and ;

[0050] The four basic numbers in the second basic array are: , , , ,and ;

[0051] The four basic numbers in the third basic array are: , , , ,and ;

[0052] The four basic numbers in the 4th basic array are: , , , ,and ;

[0053] The four basic numbers in the fifth basic array are: , , , ,and ;

[0054] The four basic numbers in the sixth basic array are: , , , ,and ;

[0055] The four basic numbers in the 7th basic array are: , , , ,and ;

[0056] The four basic numbers in the 8th basic array are: , , , ,and ;

[0057] The four basic numbers in the 9th basic array are: , , , ,and .

[0058] It should be noted that the present invention converts the grayscale value into a basic array composed of four basic numbers so that different target arrays can be assigned to pixels with the same grayscale value in a local area of ​​the image data, thereby destroying the local similarity characteristics of the image data.

[0059] Furthermore, the four basic numbers in each basic array are arranged, and each basic array has The results of the arrangement, Represents factorial; remove duplicates from all permutation results of each base array, and use the permutation results after removal of duplicates as all permutation arrays of each base array.

[0060] For example, for the gray value The four basic numbers in the base array , , , , arrange these four basic numbers, there are The permutation results are {3, 7, 7, 12}, {3, 7, 12, 7}, {3, 7, 7, 12}, {3, 7, 12, 7}, {3, 12, 7, 7}, {3, 12, 7, 7}, {7, 3, 7, 12}, {7, 3, 12, 7}, {7, 12, 3, 7}, {7, 12, 7, 3}, {7, 7, 3, 12}, {7, 7, 12, 3}, {7, 3, 7, 12}, {7, 3, 12, 7}, {7, 12, 3, 7}, {7, 12, 7, 3}, {7, 7, 3, 12}, {7, 7, 12, 3}, {12, 3, 7, 7}, {12, 3, 7, 7}, {12, 3, 7, 7}, { After deduplication of all the permutation results, there are 12 permutation results left, namely {3, 7, 7, 12}, {3, 7, 12, 7}, {3, 12, 7, 7}, {7, 3, 7, 12}, {7, 3, 12, 7}, {7, 12, 3, 7}, {7, 12, 7, 3}, {7, 7, 3, 12}, {7, 7, 12, 3}, {12, 3, 7, 7}, {12, 7, 3, 7}, {12, 7, 7, 3}. The 12 permutation results after deduplication are used as all the permutation arrays of the base array.

[0061] It should be noted that the present invention obtains all arrangement arrays of each basic array by arranging and removing duplicates of the four basic numbers in each basic array corresponding to the grayscale value, so that different target arrays can be assigned to the pixels with the same grayscale value in the local area of ​​the image data, thereby destroying the local similarity characteristics of the image data.

[0062] S3. Take the pixel points in the image data as the target pixel points in turn, and take all the permutation arrays of all the basic arrays corresponding to the grayscale value of the target pixel points as all the candidate arrays of the target pixel points, and adjust the theoretical probability of each candidate array of the target pixel points according to the target arrays of other pixel points in the neighborhood of the target pixel points.

[0063] Specifically, in the image data, the pixel points in the image data are taken as target pixel points in turn from left to right, and the coordinates of the target pixel points in the rectangular coordinate system are marked as , , are the horizontal and vertical coordinates of the target pixel respectively.

[0064] Further, the horizontal axis is In the range and the vertical coordinate is The pixels within the range are other pixels in the neighborhood of the target pixel. is the maximum value function; exemplarily, when the coordinates of the target pixel are When , the schematic diagram of the positions of other pixels in the neighborhood of the target pixel is as follows Figure 2 As shown, when the coordinates of the target pixel are When , the schematic diagram of the positions of other pixels in the neighborhood of the target pixel is as follows Figure 3 shown.

[0065] Furthermore, all permutation arrays of all basic arrays corresponding to the grayscale value of the target pixel are used as all candidate arrays of the target pixel; the theoretical probabilities of all candidate arrays of the target pixel are the same and equal to , is the number of all candidate arrays of the target pixel; according to the target arrays of other pixels in the neighborhood of the target pixel, the theoretical probability of each candidate array of the target pixel is adjusted, then the first The adjusted probability of the candidate array ; Indicates that within the neighborhood of the target pixel, the target array is equal to the first The number of all other pixels in the candidate array, is the target pixel The theoretical probability of candidate arrays, is the normalization function.

[0066] Among them, for the normalized function , , Indicates that within the neighborhood of the target pixel, the target array is equal to the first The number of all other pixels in the candidate array, is the target pixel The theoretical probability of a candidate array.

[0067] It should be specially noted that, since the present invention sequentially uses pixel points in the image data as target pixel points row by row in order from left to right, before adjusting the theoretical probability of each candidate array of the target pixel point according to the target array of other pixel points in the neighborhood of the target pixel point, the other pixel points in the neighborhood of the target pixel point have already been used as target pixel points and the target array has been obtained.

[0068] For example, Figure 4: shown is a schematic diagram of a target pixel and other pixels in its neighborhood, wherein the grayscale value of the target pixel is equal to 4, and the grayscale values ​​of other pixels in the neighborhood of the target pixel are equal to 7, 6, 4, 5, 4, 5, 4, 4, respectively, and the target arrays of other pixels in the neighborhood are {1, 1, 1, 2}, {2, 0, 1, 1}, {0, 2, 0, 0}, {0, 1, 0, 2}, {0, 0, 0, 2}, {1, 0, 0, 2}, {0, 2, 0, 0}, {1, 1, 1, 1}; since the grayscale value of the target pixel is equal to 4, and the two basic arrays corresponding to the grayscale value 4 are {0, 0, 0, 2} and {1, 1, 1, 1}, among which, the first basic array has 4 permutation arrays, namely: {2, 0, 0, 0}, {0, 2, 0, 0}, {0, 0, 2, 0}, {0, 0, 0, 2}, and the second basic array has 1 permutation array, {1, 1, 1, 1}; taking all the permutation arrays of all basic arrays corresponding to the gray value 4 of the target pixel as all the candidate arrays of the target pixel, then the target pixel has 5 candidate arrays, namely: {2, 0, 0, 0}, {0, 2, 0, 0}, {0, 0, 2, 0}, {0, 0, 0, 2}, {1, 1, 1, 1}, and the theoretical probabilities of all candidate arrays are the same and equal to ; In the neighborhood of the target pixel, the target array is equal to the first , 2, 3, 4, 5 The number of all other pixels in the candidate array , , , , ,but , , , , , Therefore, the target pixel , 2, 3, 4, 5 candidate arrays adjusted probability , , , , .

[0069] It should be noted that, for the candidate arrays that have appeared in the target arrays of other pixel points in the neighborhood of the target pixel point, the present invention adjusts the probability of the candidate array to be smaller the more times the candidate array appears. Then, when the target array of the target pixel point is subsequently randomly obtained from all candidate arrays of the target pixel point with unequal probabilities, the target array is most likely a candidate array that has not appeared in the target arrays of other pixel points in the neighborhood of the target pixel point, so that the target arrays of pixels with the same grayscale values ​​in the local area of ​​the image data are different, thereby destroying the local similarity characteristics of the image data.

[0070] S4. According to the adjusted probabilities of all candidate arrays of the target pixel, a candidate array is randomly obtained from all candidate arrays of the target pixel with unequal probability as the target array of the target pixel; and the plaintext pixel pair corresponding to the target pixel is determined according to the binary numbers corresponding to the four basic numbers in the target array.

[0071] Specifically, according to the adjusted probabilities of all candidate arrays of the target pixel, a candidate array is randomly obtained from all candidate arrays of the target pixel with unequal probabilities as the target array of the target pixel.

[0072] Further, a plaintext pixel pair is composed of two plaintext pixel points, and the two plaintext pixel points that constitute a plaintext pixel pair are respectively recorded as a first plaintext pixel point and a second plaintext pixel point; according to the four basic numbers in the target array, the grayscale values ​​of the first plaintext pixel point and the second plaintext pixel point in the plaintext pixel pair corresponding to the target pixel point are determined, including: for the four basic numbers in the target array, since the four basic numbers are Therefore, convert each base number in the destination array to an integer with length equal to The decimal number corresponding to the binary number whose length is equal to 8 obtained by splicing the binary numbers of the first two basic numbers is used as the grayscale value of the first plaintext pixel in the plaintext pixel pair, and the decimal number corresponding to the binary number whose length is equal to 8 obtained by splicing the binary numbers of the last two basic numbers is used as the grayscale value of the second plaintext pixel in the plaintext pixel pair.

[0073] For example, for a target pixel with a grayscale value of 4, according to the first , 2, 3, 4, 5 candidate arrays adjusted probability , , , , , randomly obtain a candidate array from all candidate arrays of the target pixel with unequal probability as the target array of the target pixel. Then, when the target array of the target pixel obtained is the third candidate array {0, 0, 2, 0}, convert the four basic numbers 0, 0, 2, 0 in the target array into a number with a length equal to The binary numbers of the first two basic numbers are 0000, 0000, 0010, and 0000 respectively. The decimal number 0 corresponding to the binary number 00000000 with a length of 8 obtained by splicing the binary numbers of the first two basic numbers is used as the grayscale value of the first plaintext pixel in the plaintext pixel pair. The decimal number 32 corresponding to the binary number 00100000 with a length of 8 obtained by splicing the binary numbers of the last two basic numbers is used as the grayscale value of the second plaintext pixel in the plaintext pixel pair. The plaintext pixel pair corresponding to the target pixel is .

[0074] Finally, the plaintext pixel pair corresponding to each pixel in the image data is obtained. Since the number of all pixels in the image data is equal to , therefore, the number of all plaintext pixel pairs obtained is equal to ; is the size of the image data, , are the length and width of the image data respectively.

[0075] It should be noted that, for the candidate arrays that have appeared in the target arrays of other pixel points in the neighborhood of the target pixel point, the present invention adjusts the probability of the candidate arrays to be smaller the more times the candidate arrays appear. Then, when the target array of the target pixel point is subsequently randomly obtained from all the candidate arrays of the target pixel point with unequal probabilities, the target array is most likely a candidate array that has not appeared in the target arrays of other pixel points in the neighborhood of the target pixel point, so that the target arrays of pixels with the same grayscale values ​​in the local area of ​​the image data are different, thereby destroying the local similarity characteristics of the image data, and it is difficult to obtain useful information by performing image processing and analysis on the ciphertext image. By destroying the local similarity characteristics of the image data, the image data can be effectively prevented from being abused, the privacy and legal rights of users are protected, and the image data in the Internet of Vehicles environment is made safer.

[0076] S5. Generate a key according to the initial value and parameters of the two-dimensional chaotic mapping function; generate multiple chaotic value pairs according to the key and the two-dimensional chaotic mapping function; encrypt each plaintext pixel pair through each chaotic value pair to obtain each ciphertext pixel pair, and combine all the ciphertext pixel pairs into a ciphertext image, which is the encryption result of the image data.

[0077] See the flowchart of step S5. Figure 5 , including steps S501 to S503, specifically:

[0078] S501. Generate a key according to the initial value and parameters of the two-dimensional chaotic mapping function.

[0079] It should be noted that the chaotic mapping function has pseudo-randomness, sensitivity to initial conditions, non-periodicity and long-term unpredictability, and is suitable for encrypting large amounts of data. Therefore, the chaotic mapping function is often used in key generators.

[0080] In this embodiment, only the two-dimensional Logistic chaotic mapping function is used as an example to generate a key; in other embodiments, the key can be generated according to other two-dimensional chaotic mapping functions, and the two-dimensional chaotic mapping function includes but is not limited to a two-dimensional Henon mapping chaotic algorithm, a two-dimensional Henon mapping chaotic algorithm, and a Lotka-Volterra model; the two-dimensional Logistic chaotic mapping function, the two-dimensional Henon mapping chaotic algorithm, the two-dimensional Henon mapping chaotic algorithm, and the Lotka-Volterra model are all well-known technologies and will not be described in detail here.

[0081] Specifically, when both initial values ​​are The four parameters are in the range , , and When the two-dimensional Logistic chaotic mapping function is in the range of [0,1], it enters the chaotic state and generates chaotic values ​​between [0,1]. And the value ranges of the four parameters , , and In, two initial values ​​are randomly generated and And four parameters , , , , the two initial values and And four parameters , , , Composition key .

[0082] S502: Generate multiple chaotic value pairs according to the key and the two-dimensional chaotic mapping function.

[0083] Specifically, since the number of all plaintext pixel pairs obtained is equal to , so according to the key , iterate the equation of the two-dimensional chaotic mapping function times, and each iteration obtains a chaotic value pair, and a total of chaotic value pairs, the size of the image data is , , are the length and width of the image data respectively.

[0084] Each chaotic value pair is composed of two chaotic values, the two chaotic values ​​are the first chaotic value and the second chaotic value, and for each chaotic value, 4 decimal places are retained; The first iteration obtained The calculation formula for the first chaotic value and the second chaotic value in a chaotic value pair is:

[0085] ;

[0086] ;

[0087] in, , Respectively The first chaotic value and the second chaotic value in a chaotic value pair, , Respectively The first chaotic value and the second chaotic value in a chaotic value pair.

[0088] Furthermore, for the obtained Chaotic value pairs, delete the first 40 chaotic value pairs, and keep the remaining A chaotic value pair.

[0089] It should be noted that due to the pseudo-randomness, sensitivity to initial conditions, non-periodicity and long-term unpredictability of the chaotic mapping function, the present invention generates multiple chaotic value pairs based on the key and the two-dimensional chaotic mapping function, and subsequently uses the chaotic value pairs to encrypt the plaintext pixel pairs, so that the encryption algorithm of the present invention has high security.

[0090] S503, encrypting each plaintext pixel pair through each chaotic value pair to obtain each ciphertext pixel pair, and combining all the ciphertext pixel pairs into a ciphertext image, where the ciphertext image is the encryption result of the image data.

[0091] Specifically, for the obtained plaintext pixel pairs, through the Chaos value pair Encrypt the plaintext pixel pairs to obtain A ciphertext pixel point pair, wherein the ciphertext pixel point pair is composed of two ciphertext pixel points, and the two ciphertext pixel points that constitute a ciphertext pixel point pair are respectively recorded as a first ciphertext pixel point and a second ciphertext pixel point; according to The first and second chaotic values ​​in the chaotic value pair and the The grayscale values ​​of the first plaintext pixel and the second plaintext pixel in the plaintext pixel pair are determined by The grayscale values ​​of the first ciphertext pixel and the second ciphertext pixel in the ciphertext pixel pair include: The gray value of the first ciphertext pixel in the ciphertext pixel pair is equal to , No. The gray value of the second ciphertext pixel in the plaintext pixel pair is equal to , , Respectively The first chaotic value and the second chaotic value in a chaotic value pair, , Respectively The grayscale values ​​of the first plaintext pixel and the second plaintext pixel in a plaintext pixel pair, To round down.

[0092] It should be noted that the present invention encrypts each plaintext pixel pair through different chaotic value pairs, so that the encryption results of pixels with the same grayscale value, that is, the ciphertext pixel pairs, are different, thereby destroying the statistical characteristics of the image data.

[0093] For example, when The grayscale values ​​of the first and second plaintext pixel points in a plaintext pixel pair , , and the first The first chaotic value and the second chaotic value in a chaotic value pair , When the The gray value of the first ciphertext pixel in the ciphertext pixel pair equal , obtained The gray value of the first ciphertext pixel in the ciphertext pixel pair equal .

[0094] Furthermore, all ciphertext pixel pairs are combined into a ciphertext image, where the ciphertext image is the encryption result of the image data.

[0095] It should be noted that since the target arrays of pixels with the same grayscale value in the image data may be different, when the present invention determines the plaintext pixel pairs corresponding to the pixels according to the binary numbers corresponding to the four basic numbers in the target array, the plaintext pixel pairs corresponding to the pixels with the same grayscale value may be different. On this basis, the chaotic value pairs for encrypting each plaintext pixel pair may be different, and ultimately the encryption results of pixels with the same grayscale value, that is, the ciphertext pixel pairs, may be different, thereby destroying the statistical characteristics of the image data, making it difficult to obtain useful information by performing statistical analysis on the image data and the ciphertext image. By destroying the statistical characteristics of the image data, the image data can be effectively prevented from being abused, the privacy and legal rights of users can be protected, and the image data in the Internet of Vehicles environment can be made safer.

[0096] In one embodiment, the two ciphertext pixels constituting the ciphertext pixel pair are arranged horizontally in the ciphertext image, and the size of the ciphertext image is equal to , and the length of the ciphertext image is equal to , with a width equal to ;in, is the size of the image data, , are the length and width of the image data respectively; in another embodiment, the two ciphertext pixels constituting the ciphertext pixel pair are arranged vertically in the ciphertext image, then the size of the ciphertext image is equal to , and the length of the ciphertext image is equal to , with a width equal to .

[0097] For example, for Figure 6 The image data diagram shown is Figure 6 The encryption result of the image data diagram shown is as follows Figure 7 shown.

[0098] When the encrypted image is subsequently decrypted, first, multiple chaotic value pairs are generated according to the key and the two-dimensional chaotic mapping function; then, in the ciphertext image, a ciphertext pixel pair consisting of every two ciphertext pixels in the ciphertext image is arranged in a certain manner, and each ciphertext pixel pair is decrypted by each chaotic value pair to obtain each plaintext pixel pair, thus forming the first The grayscale values ​​of the two plaintext pixels in a plaintext pixel pair are equal to , ,in, , Respectively The first chaotic value and the second chaotic value in a chaotic value pair, , Respectively The grayscale values ​​of the first ciphertext pixel and the second ciphertext pixel in a ciphertext pixel pair, To round up; Finally, the first The grayscale values ​​of the two plaintext pixels of a plaintext pixel pair are obtained by obtaining a binary number of length 8 corresponding to the binary number, splitting each binary number of length 8 into two binary numbers of length 4, and taking the decimal number corresponding to each binary number of length 4 as the base number, and obtaining a total of 4 base numbers; the sum of the squares of the obtained 4 base numbers is taken as the grayscale value of the pixel, and then the image composed of all the pixels is taken as the decryption result of the encrypted image, that is, the image data in the Internet of Vehicles environment.

[0099] An embodiment of the present invention also discloses a data security encryption system based on a vehicle networking environment, including a processor and a memory, wherein the memory stores computer program instructions. When the computer program instructions are executed by the processor, a data security encryption method based on a vehicle networking environment according to the present invention is implemented.

[0100] The above system also includes other components well known to those skilled in the art, such as a communication bus and a communication interface, and their configuration and functions are known in the art, so they will not be described in detail here.

[0101] In the description of this specification, "plurality" or "several" means at least two, such as two, three or more, etc., unless otherwise clearly and specifically defined.

[0102] Although this specification has shown and described a number of embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will conceive of many modifications, changes and alternatives without departing from the ideas and spirit of the present invention. It should be understood that in the practice of the present invention, alternatives to the embodiments of the present invention described herein may be employed.

Claims

1. A data security encryption method based on a vehicle networking environment, characterized in that: include: By using the Four-square Theorem, each grayscale value in the range of [0,255] is converted into at least one basic array, where the basic array consists of four basic numbers; the four basic numbers in the basic array are arranged, and all the arrangement results of the basic array are deduplicated to obtain all the arrangement arrays of the basic array; Acquire image data in a connected vehicle environment; sequentially use pixel points in the image data as target pixel points: use all permutation arrays of all basic arrays corresponding to the grayscale value of the target pixel point as all candidate arrays of the target pixel point; adjust the theoretical probability of each candidate array of the target pixel point according to the target arrays of other pixel points in the neighborhood of the target pixel point; randomly obtain a candidate array from all candidate arrays of the target pixel point with unequal probability according to the adjusted probability of all candidate arrays of the target pixel point as the target array of the target pixel point; determine the plaintext pixel point pair corresponding to the target pixel point according to the binary number corresponding to the four basic numbers in the target array; the first The adjusted probability of the candidate array ; Indicates that within the neighborhood of the target pixel, the target array is equal to the first The number of all other pixels in the candidate array, is the target pixel The theoretical probability of candidate arrays, is the normalization function; Among them, for the normalized function , , Indicates that within the neighborhood of the target pixel, the target array is equal to the first The number of all other pixels in the candidate array, is the target pixel The theoretical probability of candidate arrays; Generate a key according to the initial value and parameter of the two-dimensional chaotic mapping function; generate a plurality of chaotic value pairs according to the key and the two-dimensional chaotic mapping function; Each plaintext pixel pair is encrypted by each chaotic value pair to obtain each ciphertext pixel pair, and all the ciphertext pixel pairs are combined into a ciphertext image, which is the encryption result of the image data.

2. According to claim 1, a data security encryption method based on a vehicle networking environment is characterized in that: For any grayscale value in the range [0,255] , gray value The sum of the squares of the four basic numbers in the corresponding basic array is equal to the grayscale value .

3. According to claim 1, a data security encryption method based on a vehicle networking environment is characterized in that: The method for obtaining other pixels in the neighborhood of the target pixel is as follows: The coordinates of the target pixel in the rectangular coordinate system are marked as , , are the horizontal and vertical coordinates of the target pixel respectively; The horizontal axis is In the range and the vertical coordinate is The pixels within the range are other pixels in the neighborhood of the target pixel. is the maximum value function.

4. The data security encryption method based on the Internet of Vehicles environment according to claim 1 is characterized in that: The theoretical probability of all candidate arrays of the target pixel point is the same and equal to , is the number of all candidate arrays for the target pixel.

5. The data security encryption method based on the Internet of Vehicles environment according to claim 1 is characterized in that: The plaintext pixel pair corresponding to the target pixel consists of two plaintext pixels, which are respectively recorded as the first plaintext pixel and the second plaintext pixel; for the four basic numbers in the target array, each basic number in the target array is converted into a length equal to The decimal number corresponding to the binary number whose length is equal to 8 obtained by splicing the binary numbers of the first two basic numbers is used as the grayscale value of the first plaintext pixel in the plaintext pixel pair, and the decimal number corresponding to the binary number whose length is equal to 8 obtained by splicing the binary numbers of the last two basic numbers is used as the grayscale value of the second plaintext pixel in the plaintext pixel pair.

6. The data security encryption method based on the Internet of Vehicles environment according to claim 1 is characterized in that: The method for obtaining the chaotic value pair is: According to the key , iterate the equation of the two-dimensional chaotic mapping function times, and each iteration obtains a chaotic value pair, and a total of chaotic value pairs, the size of the image data is , , are the length and width of the image data respectively; Wherein, each chaotic value pair consists of two chaotic values, the two chaotic values ​​are respectively a first chaotic value and a second chaotic value, and for each chaotic value, 4 decimal places are retained; For the obtained Chaotic value pairs, delete the first 40 chaotic value pairs, and keep the remaining A chaotic value pair.

7. The data security encryption method based on the Internet of Vehicles environment according to claim 1 is characterized in that: The method of encrypting each plaintext pixel pair by each chaotic value pair to obtain each ciphertext pixel pair includes: Through the Chaos value pair Encrypt the plaintext pixel pairs to obtain A ciphertext pixel pair, a ciphertext pixel pair consists of two ciphertext pixels, which are respectively recorded as the first ciphertext pixel and the second ciphertext pixel; The gray value of the first ciphertext pixel in the ciphertext pixel pair is equal to , No. The gray value of the second ciphertext pixel in the plaintext pixel pair is equal to , , Respectively The first chaotic value and the second chaotic value in a chaotic value pair, , Respectively The grayscale values ​​of the first plaintext pixel and the second plaintext pixel in a plaintext pixel pair, To round down.

8. The data security encryption method based on the Internet of Vehicles environment according to claim 1 is characterized in that: The sequentially taking pixel points in the image data as target pixel points comprises: In the image data, pixel points in the image data are taken as target pixel points in sequence from left to right, row by row.

9. A data security encryption system based on a vehicle networking environment, characterized in that: include: A processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, a data security encryption method based on a vehicle networking environment according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Vehicle positioning method and system of Internet of Vehicles, and terminal equipment

    CN119211836A

  • Video encoding and decoding method of vehicle-mounted display

    CN116016931A

  • Privacy protection method and system for crew data

    CN117793267A