Image encryption method and system for pixel replacement

By constructing a dynamic model and identifying encrypted regions, capturing and fitting the region flow in the image stream, and adjusting the acquisition frequency, the problems of large information volume and information leakage in video supervision are solved, and information hiding and secure display are achieved.

CN120980176APending Publication Date: 2025-11-18山东外事职业大学
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511102169.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-07
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

Existing video surveillance solutions contain a large amount of information, and information leakage could lead to significant losses. Therefore, it is necessary to hide visual information to accommodate the needs of supervisors with different levels of authority.

Method used

By constructing a dynamic model based on images received at a preset frequency, the encrypted region and its encrypted interval are identified. The region stream is then extracted from the image stream, the content is fitted and replaced, and the acquisition frequency of the image stream is adjusted to achieve information hiding.

Benefits of technology

It achieves sufficient information hiding capacity to meet different display needs, complements the video surveillance process, and improves information security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120980176A_ABST
    Figure CN120980176A_ABST
Patent Text Reader

Abstract

The invention is suitable for the technical field of image encryption, and particularly relates to a pixel replacement image encryption method and system, and the method comprises the steps: receiving an image based on a preset frequency, carrying out the recognition of an image flow, and constructing a dynamic model; positioning an encryption region and an encryption interval thereof in the dynamic model, intercepting a region stream corresponding to the encryption region in the image stream, and determining replacement content of the encryption interval according to the region stream; fitting the replacement content of each encryption area, and outputting an encryption result; recursively adjusting the acquisition frequency of the image stream according to the encryption process; according to the method, visual information is firstly identified, then three-dimensional modeling is performed, a dynamic model is constructed, which is a first hiding process, an encryption area and an encryption time period thereof are selected based on the dynamic model, historical data, sufficiently similar to the encryption time period, of the encryption area are queried, and the historical data are replaced to the encryption area of the encryption time period to serve as a second hiding process. And the information hiding amount is sufficient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image encryption technology, and in particular to an image encryption method and system with pixel replacement. Background Technology

[0002] With the advancement of visual processing technology, visualization processes are being introduced into many existing scenarios. Visual modeling is a common visualization process. In some scenarios, such as building areas or workshops, production activities need to be monitored. Existing monitoring solutions are based on video monitoring processes, which involve a huge amount of information. Once a leak is discovered, the resulting losses can be significant. Therefore, it is necessary to hide the information to a certain extent so that it can be disclosed to monitoring personnel with different permissions. How to hide visual information is the technical problem that this invention aims to solve. Summary of the Invention

[0003] The purpose of this invention is to provide an image encryption method and system with pixel replacement to solve the problems mentioned in the background art.

[0004] To achieve the above objectives, the present invention provides the following technical solution:

[0005] An image encryption method with pixel replacement includes:

[0006] Images are received based on a preset frequency, the image stream is identified, and a dynamic model is constructed; the images in the image stream contain time tags, and the dynamic model is a sequence of static models at each time point;

[0007] In the dynamic model, the encrypted region and its encrypted interval are located, and the region stream corresponding to the encrypted region is extracted from the image stream. The replacement content of the encrypted interval is determined based on the region stream; the replacement content is a subset of the region stream.

[0008] Fit the replacement content for each encrypted region and output the encryption result;

[0009] The acquisition frequency of the image stream is recursively adjusted according to the encryption process.

[0010] Furthermore, the step of receiving images based on a preset frequency, identifying the image stream, and constructing a dynamic model includes:

[0011] Environmental data is acquired based on environmental sensors installed within the scene; these environmental sensors include temperature sensors and audio sensors.

[0012] The environmental data is input into a preset environmental identification model to obtain an environmental score;

[0013] The initial frequency is determined based on the environmental score. Images with time tags are received based on the initial frequency and sorted according to time order to obtain an image stream.

[0014] Based on a preset feature library, target recognition is performed on images in the image stream in sequence, and a static model is constructed based on the recognized targets.

[0015] Arrange the static models in chronological order to obtain the dynamic model;

[0016] Once the target recognition process for any image is completed, the recognized features are recorded, and the feature is placed at the top of the feature library.

[0017] Furthermore, the steps of locating the encrypted region and its encrypted interval in the dynamic model, extracting the region stream corresponding to the encrypted region from the image stream, and determining the replacement content of the encrypted interval based on the region stream include:

[0018] The system reads the identified targets from each image and queries the encrypted radius of the target in a preset encrypted radius library; the encrypted radius library contains target items and encrypted radius items.

[0019] With the target as the center, a region is constructed based on the encryption radius to obtain the target's influence area in the corresponding image;

[0020] For any target, query the region of influence of the target in all images, calculate the union of the regions of influence, and use it as the encrypted region;

[0021] The maximum time span of images containing the target's affected area is recorded synchronously and used as the encryption interval;

[0022] Extract the region stream corresponding to the encrypted region from the image stream, and determine the replacement content of the encrypted interval based on the region stream.

[0023] Furthermore, the step of extracting the region stream corresponding to the encrypted region from the image stream and determining the replacement content of the encrypted interval based on the region stream includes:

[0024] Extract the encrypted region from each image, preserving the order of the image stream to obtain the region stream;

[0025] Each region in the region flow is input into a preset numerical normalization model to obtain the region feature value;

[0026] By fitting the feature values ​​of the region, the region's variation function is obtained;

[0027] In the regional change function, the encrypted interval segment is marked, and the function segment whose similarity to the encrypted interval segment reaches a preset threshold is marked simultaneously as the candidate function segment;

[0028] Query the region stream corresponding to the candidate function segment. If the image stream does not contain any target to be encrypted, replace the region stream of the encrypted interval segment with the region stream corresponding to the candidate function segment.

[0029] Furthermore, the step of fitting the replacement content of each encrypted region and outputting the encryption result includes:

[0030] Select images sequentially and search for encrypted regions within them;

[0031] Fit the boundaries of the encrypted region;

[0032] Once the boundaries of each image have been fitted, the image stream is output as the encrypted result.

[0033] Furthermore, the recursive adjustment of the image stream acquisition frequency according to the encryption process includes:

[0034] Real-time acquisition of the number of targets to be encrypted in the latest image;

[0035] The instantaneous workload of the encryption process is recorded in real time; the instantaneous workload is determined by the hardware utilization rate.

[0036] The adjustment coefficient is determined based on the quantity and instantaneous workload, and the acquisition frequency of the image stream is adjusted accordingly.

[0037] Among them, the adjustment coefficient is directly proportional to the quantity and inversely proportional to the instantaneous workload.

[0038] The present invention also provides an image encryption system with pixel replacement, comprising:

[0039] The dynamic model construction module is used to receive images based on a preset frequency, identify the image stream, and construct a dynamic model; the images in the image stream contain time tags, and the dynamic model is a sequence of static models at each time point;

[0040] The replacement content determination module is used to locate the encrypted region and its encrypted interval in the dynamic model, extract the region stream corresponding to the encrypted region in the image stream, and determine the replacement content of the encrypted interval based on the region stream; the replacement content is a subset of the region stream.

[0041] The replacement content fitting module is used to fit the replacement content of each encrypted area and output the encryption result;

[0042] The frequency recursive adjustment module is used to recursively adjust the acquisition frequency of the image stream according to the encryption process.

[0043] Furthermore, the dynamic model building module includes:

[0044] An environmental data acquisition unit is used to acquire environmental data based on environmental sensors installed in the scene; the environmental sensors include a temperature sensor and an audio sensor.

[0045] An environmental score generation unit is used to input the environmental data into a preset environmental identification model to obtain an environmental score.

[0046] The image stream generation unit is used to determine the initial frequency based on the environmental score, receive images with time labels based on the initial frequency, sort them according to the time order, and obtain the image stream.

[0047] The target recognition unit is used to sequentially recognize targets in the image stream based on a preset feature library and construct a static model based on the recognized targets.

[0048] The model arrangement unit is used to arrange static models in chronological order to obtain dynamic models.

[0049] Once the target recognition process for any image is completed, the recognized features are recorded, and the feature is placed at the top of the feature library.

[0050] Furthermore, the replacement content determination module includes:

[0051] The radius query unit is used to read the identified targets in each image and query the encrypted radius of the target in a preset encrypted radius library; the encrypted radius library contains target items and encrypted radius items;

[0052] The influence region generation unit is used to construct a region centered on the target and based on the encryption radius to obtain the influence region of the target in the corresponding image.

[0053] The union calculation unit is used to query the influence region of any target in all images, calculate the union of the influence regions, and use it as the encrypted region.

[0054] The encryption interval generation unit is used to synchronously record the maximum time span of images containing the influence area of ​​the target, as the encryption interval;

[0055] The cropping and replacement unit is used to crop the region stream corresponding to the encrypted region in the image stream, and determine the replacement content of the encrypted interval based on the region stream.

[0056] Furthermore, the replacement content fitting module includes:

[0057] The query unit is used to select images sequentially and query the encrypted areas within the images.

[0058] Fitting unit, used to fit the boundaries in the encrypted region;

[0059] The output unit is used to output an image stream as an encrypted result after the boundaries of each image have been fitted.

[0060] Compared with the prior art, the beneficial effects of the present invention are:

[0061] This invention first identifies visual information, then performs 3D modeling to construct a dynamic model. This is the first step of the hiding process. Then, based on the dynamic model, it selects an encrypted area and its encrypted time period, queries historical data that is sufficiently similar to the encrypted time period in the encrypted area, and replaces it with the encrypted area in the encrypted time period as the second step of the hiding process. The amount of information hidden is sufficient to meet different display needs and complements the existing video surveillance process. Attached Figure Description

[0062] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention.

[0063] Figure 1 A flowchart illustrating the image encryption method for pixel replacement provided in an embodiment of the present invention.

[0064] Figure 2 A block diagram illustrating the composition of an image encryption system for pixel replacement provided in an embodiment of the present invention. Detailed Implementation

[0065] To make the technical problems to be solved, the technical solutions, and the beneficial effects of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present invention and are not intended to limit the present invention.

[0066] Figure 1 This is a flowchart illustrating an image encryption method for pixel replacement provided in an embodiment of the present invention. The method includes:

[0067] Step S100: Receive images based on a preset frequency, identify the image stream, and construct a dynamic model; the images in the image stream contain time tags, and the dynamic model is a sequence of static models at each time point;

[0068] An image is received at preset intervals, and the image is recognized to obtain a static model. The static model is then arranged in the order of the images to obtain a dynamic model. This process is equivalent to processing the images and then displaying the processed images continuously, converting them into a video-like format.

[0069] Step S200: Locate the encrypted region and its encrypted interval in the dynamic model, extract the region stream corresponding to the encrypted region in the image stream, and determine the replacement content of the encrypted interval based on the region stream; the replacement content is a subset of the region stream.

[0070] The dynamic model is identified to determine the region to be encrypted and the time span (encryption interval). Then, the content corresponding to the encryption region is extracted from each image in the image stream. The extracted content is then arranged, and the arranged content is called the region stream. The region stream is the content at the same position in the image stream. The region stream is analyzed to determine the replacement content. The replacement content is the replacement content within the encryption interval, that is, the model within a certain period of time is replaced. The replacement content is a subset of the region stream. In other words, historical data is used as the replacement content.

[0071] Step S300: Fit the replacement content of each encrypted region and output the encryption result;

[0072] After replacing the content and inserting it into the image, there may be some differences, such as color value differences. This is equivalent to explicitly indicating which area has been encrypted, which is obviously problematic. Therefore, a fitting process needs to be introduced to hide the encrypted location to a certain extent.

[0073] Step S400: Recursively adjust the acquisition frequency of the image stream according to the encryption process;

[0074] The image acquisition process of the technical solution of this invention adopts an interval acquisition scheme, which has an acquisition frequency. The higher the acquisition frequency, the more images are acquired, the more content (number of images) needs to be encrypted, and the smoother the dynamic model is. These two are actually relative. The encryption process is analyzed and the acquisition frequency is adjusted to balance the needs of encryption workload and dynamic model smoothness.

[0075] Regarding step S100, the step of receiving images based on a preset frequency, identifying the image stream, and constructing a dynamic model includes:

[0076] Environmental data is acquired based on environmental sensors installed within the scene; these environmental sensors include temperature sensors and audio sensors.

[0077] The environmental data is input into a preset environmental identification model to obtain an environmental score;

[0078] The initial frequency is determined based on the environmental score. Images with time tags are received based on the initial frequency and sorted according to time order to obtain an image stream.

[0079] Based on a preset feature library, target recognition is performed on images in the image stream in sequence, and a static model is constructed based on the recognized targets.

[0080] The static model is arranged in chronological order to obtain the dynamic model.

[0081] An environmental sensor is a single data acquisition device that collects a small amount of data. It can be used as a pre-recognition process. Based on the environmental data acquired by the environmental sensor installed in the scene, the environmental data is input into a preset environmental recognition model to obtain an environmental score. The initial frequency is determined based on the environmental score, that is, the baseline interval for image acquisition is determined by the current environment, such as one image per second. Based on the initial frequency, images with time tags are received and sorted according to time order to obtain an image stream. Based on a preset feature library, target recognition is performed on the images in the image stream in sequence. This process is a convolutional recognition process, and the feature library is a preset convolutional kernel library. After the target is identified, the model state of the target is queried and inserted into the environmental model to obtain the static model at each time. The static models are arranged according to time order to obtain the dynamic model.

[0082] It is worth mentioning that since targets in a scene do not suddenly disappear, if a target appears in an image at one moment, the same target is likely to appear in an image at the next moment. Based on this principle, after the target recognition process of any image is completed, the recognized features are recorded and the feature is placed at the top of the feature library. Therefore, the application process of the feature library is to read the features in sequence, then traverse the image and place the features that appeared in the previous moment, which can match the target more quickly.

[0083] Regarding step S200, the steps of locating the encrypted region and its encrypted interval in the dynamic model, extracting the region stream corresponding to the encrypted region from the image stream, and determining the replacement content of the encrypted interval based on the region stream include:

[0084] The system reads the identified targets from each image and queries the encrypted radius of the target in a preset encrypted radius library; the encrypted radius library contains target items and encrypted radius items.

[0085] With the target as the center, a region is constructed based on the encryption radius to obtain the target's influence area in the corresponding image;

[0086] For any target, query the region of influence of the target in all images, calculate the union of the regions of influence, and use it as the encrypted region;

[0087] The maximum time span of images containing the target's affected area is recorded synchronously and used as the encryption interval;

[0088] Extract the region stream corresponding to the encrypted region from the image stream, and determine the replacement content of the encrypted interval based on the region stream.

[0089] In one example of the technical solution of this invention, the process of determining the replacement content is described. The identified targets in each image are read, and the encryption radius of the target is queried from a preset encryption radius library. A circular range is constructed based on the encryption radius and centered on the target to obtain the target's influence area in the corresponding image. For any target, the influence area of ​​the target in all images is queried, and the union of the influence areas is calculated as the encryption area. This is equivalent to setting all parts where the target appears as encryption areas. Each image containing the target's influence area has a time tag. The maximum difference between the time tags is calculated, called the maximum time span, and serves as the encryption interval. The region stream corresponding to the encryption area is extracted from the image stream, and the replacement content for the encryption interval is determined based on the region stream.

[0090] Specifically, the step of extracting the region stream corresponding to the encrypted region from the image stream and determining the replacement content of the encrypted region based on the region stream includes:

[0091] Extract the encrypted region from each image, preserving the order of the image stream to obtain the region stream;

[0092] Each region in the region flow is input into a preset numerical normalization model to obtain the region feature value;

[0093] By fitting the feature values ​​of the region, the region's variation function is obtained;

[0094] In the regional change function, the encrypted interval segment is marked, and the function segment whose similarity to the encrypted interval segment reaches a preset threshold is marked simultaneously as the candidate function segment;

[0095] Query the region stream corresponding to the candidate function segment. If the image stream does not contain any target to be encrypted, replace the region stream of the encrypted interval segment with the region stream corresponding to the candidate function segment.

[0096] In one example of the technical solution of this invention, the process of determining the replacement content is described. An encrypted region is extracted from each image, and the order of the image stream is preserved to obtain a region stream. Each region in the region stream is input into a preset numerical normalization model to obtain region feature values. The numerical normalization model is preset; the simplest way is to calculate the mean of pixel values. Of course, the image itself also has other types of feature values, such as parameters used to reflect texture features. After processing by the numerical normalization model, each region is converted into a numerical value, called a region feature value. The region feature value is fitted to obtain the region change function. This fitting process is the simplest mathematical fitting process: the list-plotting method.

[0097] In the regional change function, the encrypted interval segment is marked, and the function segment whose similarity to the encrypted interval segment reaches a preset threshold is marked as the candidate function segment. The regional flow corresponding to the candidate function segment is queried. Thus, the content that is relatively similar to the current encrypted content is obtained (since the feature value is just a numerical value, it loses a lot of information, so it can only guarantee a certain degree of approximate similarity).

[0098] When the image stream does not contain any target to be encrypted, the region stream corresponding to the candidate function segment is used to replace the region stream of the encrypted interval segment. In fact, the candidate function segment is not unique, and the resulting region stream that can be used for replacement is also not unique. Often at this stage, an additional port is added to filter these candidate region streams. The port can be an AI port or a manual port. For the subject executing the technical solution of this invention, it is only necessary to transmit data with this port.

[0099] Regarding step S300, the step of fitting the replacement content of each encrypted region and outputting the encryption result includes:

[0100] Select images sequentially and search for encrypted regions within them;

[0101] Fit the boundaries of the encrypted region;

[0102] Once the boundaries of each image have been fitted, the image stream is output as the encrypted result.

[0103] The fitting process needs to be performed on each image. Images are selected sequentially, encrypted regions are queried, and the boundaries of the encrypted regions are fitted. Once the boundaries of each image are fitted, the image stream is output as the encryption result. During the sequential fitting process, the fitting process can be recorded in real time. When reading the next image, the fitting scheme of the previous fitting process can be used because the images at adjacent times are almost not significantly different. The meaning of using the fitting scheme is that the preprocessing stage is the same. For example, when fitting color values, it is necessary to detect the image parameters of the image. Since the image parameters of the previous image are very similar to those of the current image, the image parameters of the previous image can even be directly used as the image parameters of the current image.

[0104] Regarding step S400, the recursive adjustment of the image stream acquisition frequency according to the encryption process includes:

[0105] Real-time acquisition of the number of targets to be encrypted in the latest image;

[0106] The instantaneous workload of the encryption process is recorded in real time; the instantaneous workload is determined by the hardware utilization rate.

[0107] The adjustment coefficient is determined based on the quantity and instantaneous workload, and the acquisition frequency of the image stream is adjusted accordingly.

[0108] Among them, the adjustment coefficient is directly proportional to the quantity and inversely proportional to the instantaneous workload.

[0109] The system continuously acquires the number of targets to be encrypted in the latest images. A larger number indicates more key targets in the scene at the current moment, requiring more frequent image acquisition. It also records the instantaneous workload of the encryption process, determined by hardware utilization, such as CPU utilization. A larger instantaneous workload indicates higher complexity of the encryption process, requiring a reduction in the number of images to prevent excessive encryption from affecting the encryption effect (e.g., slow response speed, some areas not yet encrypted). Therefore, a lower acquisition frequency is needed.

[0110] Figure 2 This is a structural block diagram of an image encryption system for pixel replacement provided in an embodiment of the present invention. The system includes:

[0111] The dynamic model construction module is used to receive images based on a preset frequency, identify the image stream, and construct a dynamic model; the images in the image stream contain time tags, and the dynamic model is a sequence of static models at each time point;

[0112] The replacement content determination module is used to locate the encrypted region and its encrypted interval in the dynamic model, extract the region stream corresponding to the encrypted region in the image stream, and determine the replacement content of the encrypted interval based on the region stream; the replacement content is a subset of the region stream.

[0113] The replacement content fitting module is used to fit the replacement content of each encrypted area and output the encryption result;

[0114] The frequency recursive adjustment module is used to recursively adjust the acquisition frequency of the image stream according to the encryption process.

[0115] The dynamic model construction module includes:

[0116] An environmental data acquisition unit is used to acquire environmental data based on environmental sensors installed in the scene; the environmental sensors include a temperature sensor and an audio sensor.

[0117] An environmental score generation unit is used to input the environmental data into a preset environmental identification model to obtain an environmental score.

[0118] The image stream generation unit is used to determine the initial frequency based on the environmental score, receive images with time labels based on the initial frequency, sort them according to the time order, and obtain the image stream.

[0119] The target recognition unit is used to sequentially recognize targets in the image stream based on a preset feature library and construct a static model based on the recognized targets.

[0120] The model arrangement unit is used to arrange static models in chronological order to obtain dynamic models.

[0121] Once the target recognition process for any image is completed, the recognized features are recorded, and the feature is placed at the top of the feature library.

[0122] The replacement content determination module includes:

[0123] The radius query unit is used to read the identified targets in each image and query the encrypted radius of the target in a preset encrypted radius library; the encrypted radius library contains target items and encrypted radius items;

[0124] The influence region generation unit is used to construct a region centered on the target and based on the encryption radius to obtain the influence region of the target in the corresponding image.

[0125] The union calculation unit is used to query the influence region of any target in all images, calculate the union of the influence regions, and use it as the encrypted region.

[0126] The encryption interval generation unit is used to synchronously record the maximum time span of images containing the influence area of ​​the target, as the encryption interval;

[0127] The cropping and replacement unit is used to crop the region stream corresponding to the encrypted region in the image stream, and determine the replacement content of the encrypted interval based on the region stream.

[0128] The replacement content fitting module includes:

[0129] The query unit is used to select images sequentially and query the encrypted areas within the images.

[0130] Fitting unit, used to fit the boundaries in the encrypted region;

[0131] The output unit is used to output an image stream as an encrypted result after the boundaries of each image have been fitted.

[0132] The above are merely preferred embodiments of the present invention and do not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. An image encryption method with pixel replacement, characterized in that, include: Images are received based on a preset frequency, the image stream is identified, and a dynamic model is constructed. The images in the image stream contain time labels, and the dynamic model is a sequence of static models at each time point; In the dynamic model, the encrypted region and its encrypted interval are located, the region stream corresponding to the encrypted region is extracted from the image stream, and the replacement content of the encrypted interval is determined based on the region stream. The replacement content is a subset of the region stream; Fit the replacement content for each encrypted region and output the encryption result; The acquisition frequency of the image stream is recursively adjusted according to the encryption process.

2. The image encryption method for pixel replacement according to claim 1, characterized in that, The steps of receiving images based on a preset frequency, identifying the image stream, and constructing a dynamic model include: Environmental data is acquired based on environmental sensors installed within the scene; these environmental sensors include temperature sensors and audio sensors. The environmental data is input into a preset environmental identification model to obtain an environmental score; The initial frequency is determined based on the environmental score. Images with time tags are received based on the initial frequency and sorted according to time order to obtain an image stream. Based on a preset feature library, target recognition is performed on images in the image stream in sequence, and a static model is constructed based on the recognized targets. Arrange the static models in chronological order to obtain the dynamic model; Once the target recognition process for any image is completed, the recognized features are recorded, and the feature is placed at the top of the feature library.

3. The image encryption method for pixel replacement according to claim 1, characterized in that, The steps of locating the encrypted region and its encrypted interval in the dynamic model, extracting the region stream corresponding to the encrypted region from the image stream, and determining the replacement content of the encrypted interval based on the region stream include: The system reads the identified targets from each image and queries the encrypted radius of the target in a preset encrypted radius library; the encrypted radius library contains target items and encrypted radius items. With the target as the center, a region is constructed based on the encryption radius to obtain the target's influence area in the corresponding image; For any target, query the region of influence of the target in all images, calculate the union of the regions of influence, and use it as the encrypted region; The maximum time span of images containing the target's affected area is recorded synchronously and used as the encryption interval; Extract the region stream corresponding to the encrypted region from the image stream, and determine the replacement content of the encrypted interval based on the region stream.

4. The image encryption method for pixel replacement according to claim 3, characterized in that, The step of extracting the region stream corresponding to the encrypted region from the image stream, and determining the replacement content of the encrypted region based on the region stream, includes: Extract the encrypted region from each image, preserving the order of the image stream to obtain the region stream; Each region in the region flow is input into a preset numerical normalization model to obtain the region feature value; By fitting the feature values ​​of the region, the region's variation function is obtained; In the regional change function, the encrypted interval segment is marked, and the function segment whose similarity to the encrypted interval segment reaches a preset threshold is marked simultaneously as the candidate function segment; Query the region stream corresponding to the candidate function segment. If the image stream does not contain any target to be encrypted, replace the region stream of the encrypted interval segment with the region stream corresponding to the candidate function segment.

5. The image encryption method for pixel replacement according to claim 1, characterized in that, The steps of fitting the replacement content of each encrypted region and outputting the encryption result include: Select images sequentially and search for encrypted regions within them; Fit the boundaries of the encrypted region; Once the boundaries of each image have been fitted, the image stream is output as the encrypted result.

6. The image encryption method for pixel replacement according to claim 1, characterized in that, The recursive adjustment of the image stream acquisition frequency according to the encryption process includes: Real-time acquisition of the number of targets to be encrypted in the latest image; The instantaneous workload of the encryption process is recorded in real time; the instantaneous workload is determined by the hardware utilization rate. The adjustment coefficient is determined based on the quantity and instantaneous workload, and the acquisition frequency of the image stream is adjusted accordingly. Among them, the adjustment coefficient is directly proportional to the quantity and inversely proportional to the instantaneous workload.

7. An image encryption system with pixel replacement, characterized in that, include: The dynamic model building module is used to receive images based on a preset frequency, identify the image stream, and build a dynamic model. The images in the image stream contain time labels, and the dynamic model is a sequence of static models at each time point; The replacement content determination module is used to locate the encrypted region and its encrypted interval in the dynamic model, extract the region stream corresponding to the encrypted region in the image stream, and determine the replacement content of the encrypted interval based on the region stream; the replacement content is a subset of the region stream. The replacement content fitting module is used to fit the replacement content of each encrypted area and output the encryption result. The frequency recursive adjustment module is used to recursively adjust the acquisition frequency of the image stream according to the encryption process.

8. The image encryption system with pixel replacement according to claim 7, characterized in that, The dynamic model construction module includes: An environmental data acquisition unit is used to acquire environmental data based on environmental sensors installed in the scene; the environmental sensors include a temperature sensor and an audio sensor. An environmental score generation unit is used to input the environmental data into a preset environmental identification model to obtain an environmental score. The image stream generation unit is used to determine the initial frequency based on the environmental score, receive images with time labels based on the initial frequency, sort them according to the time order, and obtain the image stream. The target recognition unit is used to sequentially recognize targets in the image stream based on a preset feature library and construct a static model based on the recognized targets. The model arrangement unit is used to arrange static models in chronological order to obtain dynamic models. Once the target recognition process for any image is completed, the recognized features are recorded, and the feature is placed at the top of the feature library.

9. The image encryption system with pixel replacement according to claim 7, characterized in that, The replacement content determination module includes: The radius query unit is used to read the identified targets in each image and query the encrypted radius of the target in a preset encrypted radius library; the encrypted radius library contains target items and encrypted radius items; The influence region generation unit is used to construct a region centered on the target and based on the encryption radius to obtain the influence region of the target in the corresponding image. The union calculation unit is used to query the influence region of any target in all images, calculate the union of the influence regions, and use it as the encrypted region. An encrypted interval generation unit is used to synchronously record the maximum time span of images containing the influence area of ​​the target, as the encrypted interval; The cropping and replacement unit is used to crop the region stream corresponding to the encrypted region in the image stream, and determine the replacement content of the encrypted interval based on the region stream.

10. The image encryption system with pixel replacement according to claim 7, characterized in that, The replacement content fitting module includes: The query unit is used to select images sequentially and query the encrypted areas within the images. Fitting unit, used to fit the boundaries in the encrypted region; The output unit is used to output an image stream as an encrypted result after the boundaries of each image have been fitted.