Multi‑Objective Region Encryption Algorithm Based on Adaptive Mechanism

: The advancement of information technology has led to the widespread application of re‑ mote measurement systems, where information in the form of images or videos, serving as mea‑ surement results, is transmitted over networks. However, this transmission is highly susceptible to attacks, tampering


Introduction
In recent years, with the development of science and technology and the widespread application of remote measurement systems, the problem of researchers having to complete instrument calibration tasks on site has been solved, greatly improving the efficiency of both factories and researchers.However, there are risks such as leakage, illegal theft, and tampering during the transmission of instrument images.Therefore, it is necessary to encrypt the instrument image data in order to protect its security [1,2].In recent years, many scholars have proposed numerous encryption algorithms for image encryption problems [3][4][5][6][7].Chaos theory is an evolutionary theory about a system transitioning from an ordered state to a disordered state.It analyzes irregular and unpredictable phenomena and their processes.It has characteristics such as sensitivity to initial conditions, randomness, and ergodicity [8], which can generate random chaotic sequences.Therefore, it is widely used in the field of image encryption [9][10][11][12][13][14]. Chen et al. [15] combined chaotic systems with compressive sensing, used SHA-3 to calculate the hash value of the preprocessed image, and designed a new mathematical model to calculate the key.The RSA algorithm encrypts the key, with no extra transmission.The experimental results show that the method can resist known plaintext attack and chosen plaintext attack.Wang et al. [16] proposed a ize efficient encryption of each extracted region of interest under the condition of limited encryption resources.
The rest of this article is organized as follows.Section 2 introduces the improved polygon segmentation algorithm, encryption resource allocation algorithm, and chaotic fusion XOR encryption algorithm.Section 3 introduces the encryption and decryption process, and Section 4 gives the experimental process and result analysis.

Improved Polygon Segmentation Algorithm
In order to solve the problem of rational encryption and decryption of multi-target objects, especially for the overlapping region of multiple targets, which can save a lot of CPU resource overhead, segmentation of detected irregularities is required.In this paper, the segmentation algorithm proposed by David Eppstein [29] is improved.The positions of overlapping parts of multi-target object images in the instrumentation image are united to form an irregular polygon.The irregular polygon has concave points, which provide important information about the internal structure of the polygon and can guide the segmentation algorithm in determining suitable segmentation locations.Therefore, the polygon is segmented into rectangles by searching for concave points, and after finding the concave points of the polygon, each concave point is used as a starting point for segmentation until the segmentation is complete.
During the segmentation process, there is an inevitable relationship between the position of the concave points and the direction of segmentation.If segmentation is performed in an arbitrary direction, it may result in a polygon being split into two polygons, necessitating an additional step to match the concave points of the two new polygons.Therefore, the best approach is to ensure that each segmentation results in one rectangle and one polygon.To achieve this segmentation method, it is necessary to determine the positional relationship between the current concave point and all concave points before each segmentation.If the current concave point is on the far left or right (the smallest or largest x-value), vertical segmentation can ensure that the result is one rectangle and one polygon (with the final result being two rectangles).If the current concave point is at the bottom or top (the smallest or largest y-value), horizontal segmentation can also achieve the aforementioned segmentation result.To simplify the aforementioned comparison process, a fixed-direction segmentation method can be adopted, which allows for the concave points to be sorted according to certain rules in advance, and then segmented in the specified direction.Sorting all concave points according to the rules where the smaller the x-value, the higher the priority, and the larger the y-value, the higher the priority, with x-priority being greater than y-priority, can meet all the vertical segmentation needs of the concave points.Similarly, sorting all concave points according to the rules where the larger the y-value, the higher the priority, and the smaller the x-value, the higher the priority, with y-priority being greater than x-priority, can meet all the horizontal segmentation needs of the concave points.This paper adopts a fixed-direction vertical segmentation scheme.
The implementation of the algorithm consists of three steps, which are uniting polygons, finding concave points, and segmenting and outputting rectangles.The pseudo-code of the algorithm is shown in Algorithm 1, and the result of the algorithm is shown in Figure 1.

Encryption Resource Allocation Algorithm
The image from the instrument has the characteristics of high clarity, large volume, and high resolution.It is easy to encounter a shortage of encryption resources when encrypting it.In order to alleviate the pressure of resource scarcity, this paper proposes an adaptive multi-object region encryption algorithm for instrument images.Firstly, prioritize the detected multi-object regions.Taking three levels of priority as an example (level 1 is high, level 3 is low), set a threshold for CPU utilization.If the CPU utilization is less than or equal to threshold 0, it indicates that there are sufficient encryption resources and there is no need to adjust the sampling rate of the multi-target regions; if the CPU utilization is between threshold 0 and threshold 1, it means that the CPU usage is light at this time, so reduce the sampling rate of the region with priority level 3; if the CPU utilization is greater than threshold 1 but less than threshold 2, it means that moderate use by the CPU occurs at this time.Reduce the sampling rate of region images with priority levels 2 and 3. When CPU utilization exceeds threshold 2, it indicates severe use by the system and tightness in encryption resources.Lower the sampling rate for all priority area images.The pseudocode for the algorithm can be seen in Algorithm 2.     In addition to class_priority [2] adjust the sampling rate encryption, other fidelity encryption using yolo_res -> cpu_box_list 6.
Suppose that the size of the original color image P is M × N × 3, and the complete encryption process consists of the following steps.
Step 1: Calculate the hash value of the plain image by the SHA-512 algorithm, divide it into six groups, each a group of 20 hexadecimal data points, and generate the key formula as follows: where key i0 is the initial value of the key, i = 1, 2, . . ., 6 , pri(P) is the priority of the plain image.
Step 2: Convert the color image into a one-dimensional array, the length of which is 3(M × N), input keys 1 2 into the PWLCM chaotic system iteratively to obtain a chaotic sequence D. In this paper, t = 500, and chaotic sequence D is used to sort the one-dimensional array and realize the scrambling of pixel values.
Step 3: Use the remaining four keys and the Chen hyperchaotic system to generate four pseudo-random sequences E, F, G, and H of size t + 3(M × N).In order to avoid transient effects, the first t values are discarded here, and the XOR operation is performed on one-dimensional pixels using chaotic sequence E to change the pixel values and realize the diffusion of pixels.The operation is as follows: Step 4: Divide the one-dimensional array after XOR into R, G, and B channels.Chaotic sequences F(: MN),F(MN : 2MN), and F(2MN : 3MN) were used to select DNA coding rules for each pixel value in the R, G, and B channels, respectively.In this paper, the first four encoding rules are adopted for encoding, and the last four encoding rules are adopted for decoding.The selection rules are as follows: Step 5: Convert each pixel in R, G, and B channels into a DNA base sequence and realize pixel diffusion through the DNA XOR operation.The chaotic sequence G determines the XOR object of each pixel.There are eight kinds of XOR objects for each pixel value to choose from.The selection rules and steps for DNA operation XOR are as follows: Step 6: Transform the base sequence into pixel values according to the last four coding rules of the DNA coding table.The chaotic sequence H determines the selection of decoding rules.The formula is as follows: The detailed steps are shown in Algorithm 3. Decryption is the opposite process, so the algorithm is the inverse of Algorithm 3. The main steps are as follows: Step 1: Obtain the key required for decryption.There are six keys in total.Input key 1 and key 2 into the PWLCM chaotic system for [t + 3(M × N)] iterations and discard the first t times to obtain the chaotic sequence D. Input the remaining four keys into the Chen hyperchaotic system for [t + 3(M × N)] iterations and discard the first t times to obtain the four chaotic sequences E, F, G, and H.
Step 2: Chaotic sequence H is used to encode the three-channel pixel values of R, G, and B of the ciphertext image, respectively.The encoding rules used in decryption are the last four, and the rules are selected as follows in Formula (5).The chaotic sequence G is used to determine the object of each pixel's XOR, so there are also eight kinds of XOR objects to choose from for each pixel value.The selection rule and the DNA operation XOR operation method are shown in Formula (4).Chaotic sequence F is used to select DNA decoding rules for each pixel value in the R, G, and B channels.During decryption, the last four encoding rules are adopted for encoding and the first four encoding rules for decoding.The decoding rules are shown in Formula (3).Chaotic sequence E is used to perform XOR operations on pixels to realize the diffusion of pixels.The calculation method is shown in Formula (2).
Step 3: Use chaotic sequence D to sort the one-dimensional array and realize the scrambling of pixel values.Finally, the decrypted plaintext is obtained by merging R, G, and B channel data.hash = SHA-512(P) 2.

Adaptive Mechanism Encryption Process
The multi-object region of interest encryption algorithm for an adaptive instrument image mainly includes three parts: segmentation of overlapping region image, allocation of encryption resources, chaotic fusion or encryption algorithm.
Step 1: Identify the multi-target objects in the input image through yolov8, read the CPU utilization, and determine the objects that need to reduce the sampling rate according to the CPU utilization threshold and the priority of the multi-target objects.
Step 2: Algorithm 1 was used to combine the positions of the multi-object graphics output by yolov8 into polygons, output the single area separately, and divide the overlapping area into a rectangular list.Algorithm 2 determines the image that needs to be adjusted.It dynamically adjusts the sampling rate for the encryption category according to the preset threshold based on the current CPU usage.When the CPU usage is high, it downsamples and encrypts the target category of low priority based on the dynamic adjustment policy to ensure stable and fast system running.
Step 3: The Chaotic Fusion XOR Encryption algorithm (Algorithm 3) encrypts the rectangular list generated in Step 2.
Step 4: Combined with Step 2 and Step 3, the ciphertext of the image that does not need to adjust the sampling rate is directly written to the area of interest.For the image that needs to adjust the sampling rate, the ciphertext sampling rate is adjusted back to the original size and then written to the area of interest.At the same time, the real ciphertext is stored in the area of the adjusted sampling rate.
Step 5: In order to ensure the security of the real ciphertext location of the key, the location of the region of interest, and the location of the adjusted sampling rate of some images, this paper uses the LSB algorithm [31] to concatenate the information of the key, the location of the region of interest, and the location of the adjusted sampling rate in the encrypted picture after steganography for decryption.The flowchart of the encryption process is shown in Figure 2, and the encryption algorithm is shown in Algorithm 4.

Adaptive Mechanism Decryption Process
The decryption process is the opposite process, which mainly includes LSB steganography reading, ciphertext decryption, and decrypting data write back (data save).
Step 1: LSB is used to read the steganographic key and the position of the region of

Adaptive Mechanism Decryption Process
The decryption process is the opposite process, which mainly includes LSB steganography reading, ciphertext decryption, and decrypting data write back (data save).
Step 1: LSB is used to read the steganographic key and the position of the region of interest [x, y, w, h] in ciphertext and adjust the real ciphertext position of some images [x, y, w1, h1] in the sampling rate.[x, y, w1, h1] is the encrypted data storage area, while [x, y, w, h] is the original encrypted data storage location (decrypted data should also be stored in this area).
Step 2: Read the data in the [x, y, w1, h1] field and decrypt it using the key.Obtain the decrypted image data.
Step 3: If w1 = w and h1 = h, the decrypted data are stored in the [x, y, w, h] region of the image; otherwise, the decrypted data are resized to h × w and then stored in the [x, y, w, h] region of the image.The decryption algorithm is shown in Algorithm 5. read_box,read_key = LSB_read(Cipher) // Read the steganographic key and the location of the encryption region from the ciphertext 2.
for i = 0 to len(read_box end if 10. Save out_img to the region [x, y, w, h] of the image Cipher 11. end for

Experiment
The security and efficiency of the proposed algorithm are evaluated in this section.Experimental conditions are shown in Table 1.

Experimental Process
In this paper, the CPU utilization thresholds are set as follows: threshold 1 = 30%, threshold 2 = 50%, and threshold 3 = 70%.The priority of multi-target objects is instruments, people, and billboards.The dataset used in this document is a private dataset, and the YOLOv8 model used in the experiment is multi_encode.onnx.To demonstrate the effectiveness of the adaptive mechanism encryption, we conducted experiments on images from the dataset under different CPU utilization conditions.Taking image1 in Figure 3 as an example, the experimental process is shown in Figure 4. threshold 2 = 50%, and threshold 3 = 70%.The priority of multi-target objects is instruments, people, and billboards.The dataset used in this document is a private dataset, and the YOLOv8 model used in the experiment is multi_encode.onnx.To demonstrate the effectiveness of the adaptive mechanism encryption, we conducted experiments on images from the dataset under different CPU utilization conditions.Taking image1 in Figure 3 as an example, the experimental process is shown in Figure 4.The experiment takes the input image from image1 in Figure 3, and after detection by YOLOv8, outputs the detection box with the category in the following format: [class number, x, y, w, h], where the category numbers are as follows: 0: billboards, 1: instrument, and 2: people.The detection results are shown in Figure 4A(b).Subsequently, the CPU utilization rate is read and compared with the preset threshold to determine whether different categories need to be downsampled and encrypted, with the output format being [Is the sampling rate adjusted?, x, y, w, h], where 0 indicates downsampling and 1 indicates preservation of fidelity.After that, the encryption area is fused and segmented, inheriting the attribute of whether to preserve fidelity.This is divided into two steps.First, the multirectangle fusion and segmentation are carried out to obtain all the regions of interest for encryption: [x, y, w, h], as shown in Figure 4A(c).Then, the segmentation results are compared with the segmentation input data.If the segmented small rectangle intersects with the area that needs to be encrypted with fidelity preservation, then this small block is the area for fidelity preservation encryption; otherwise, it needs to be downsampled, obtaining the position of the image that needs to be encrypted with adjusted sampling rate: [x, y, w1, h1].By comparing w1 with w and h1 with h, it is determined whether downsampling encryption is needed.Moreover, this has the advantage that after encryption, [x, y, w, h] can serve as the source area for the actual encrypted data, and [x, y, w1, h1] can serve as the storage area for the actual encrypted data after encryption.Subsequently, the encryption process is carried out, reading the encryption area [x, y, w, h].If w is equal to w1 and h is equal to h1, then encrypt directly, and save the encrypted data to the [x, y, w1, h1] position.If not equal, resize the data to w1 × h1 for encryption and save the encrypted data to the [x, y, w1, h1] position.It should be noted that if w1 ̸ = w or h1 ̸ = h, multiple saves are needed to ensure that the information in the area [x, y, w, h] of the original image is completely covered and refreshed, and the area [x, y, w1, h1] contains complete encrypted data.Subsequently, the key, the position of the region of interest, and the position of the image that needs to be encrypted with the adjusted sampling rate are steganographically written into the picture for decryption, as shown in Figure 4A(d).
During the decryption process, first read the key, the position of the region of interest [x, y, w, h], and the position of the image that needs to be decrypted with the adjusted sampling rate [x, y, w1, h1].After reading the [x, y, w1, h1] area of the picture, decrypt it using the key.After decryption, determine whether w = w1 and h = h1.If the condition is met, directly save the decrypted data to the [x, y, w, h] area of the picture.If not, resize the decrypted data to w × h, and then save the data to the [x, y, w, h] area.Encrypt and decrypt the image in environments with CPU utilization rates of 25%, 35%, 55%, and 75%.The decrypted images are shown in Figure 4A(e-h).The experiment takes the input image from image1 in Figure 3, and after detection by YOLOv8, outputs the detection box with the category in the following format: [class number, x, y, w, h], where the category numbers are as follows: 0: billboards, 1: instrument, and 2: people.The detection results are shown in Figure 4A(b).Subsequently, the CPU utilization rate is read and compared with the preset threshold to determine whether different categories need to be downsampled and encrypted, with the output format being [Is the sampling rate adjusted?, x, y, w, h], where 0 indicates downsampling and 1 indicates preservation of fidelity.After that, the encryption area is fused and segmented, inheriting the attribute of whether to preserve fidelity.This is divided into two steps.First, the multi-rectangle fusion and segmentation are carried out to obtain all the regions of interest for encryption: [x, y, w, h], as shown in Figure 4A(c).Then, the segmentation results are compared with the segmentation input data.If the segmented small rectangle intersects with the area that needs to be encrypted with fidelity preservation, then this small block is the area for fidelity preservation encryption; otherwise, it needs to be downsampled, obtaining the position of the image that needs to be encrypted with adjusted sampling rate: [x, y, w1, h1].By comparing w1 with w and h1 with h, it is determined whether downsampling encryption is needed.Moreover, this has the advantage that after encryption, [x, y, w, h] can serve as the source area for the actual encrypted data, and [x, y, w1, h1] can serve as the storage area for the actual encrypted data after encryption.Subsequently, the encryption process is carried out, reading the encryption area [x, y, w, h].If w is equal to w1 and h is equal to h1, then encrypt directly, and save the encrypted data to the [x, y, w1, h1] position.If not equal, resize the data to w1×h1 for According to Figure 4, it is evident that when the current CPU utilization rate is less than threshold 1, no targets need downsampling encryption.When the current CPU utilization rate is greater than threshold 1 and less than threshold 2, only the lowest-priority 'brand' category is downsampled.When the current CPU utilization rate is greater than threshold 2 and less than threshold 3, only the highest-priority 'instrument' category is not downsampled.When the current CPU utilization rate is greater than threshold 3, all categories are downsampled.

Experimental Results
The key length for modern computers should exceed 2 100 in order to withstand exhaustive attacks [32].The encryption algorithm proposed in this paper utilizes a total of six keys, and complies with the IEEE floating point standard, resulting in a calculation accuracy of 10 −15 .As a result, the key space of the algorithm is (10 15 ) 6 = 10 90 , which exceeds 2 100 and thus provides robust resistance against various attack methods.
In order to withstand brute force attacks, a robust encryption algorithm should exhibit high sensitivity to the key.Even a slight change in the key for plaintext encryption should result in significant changes in the ciphertext.The evaluation indexes used are the number of pixels change rate (NPCR) and (UACI).The closer these values are to 99.6094% and 33.4635% [33], the greater the key sensitivity.Taking image2 in Figure 3 as an example, with regions of interest (ROIs) being people, clock, and board, respectively, changing one of the keys results in a specific change rate, as shown in Table 2 from experimental results.When decrypting the ciphertext, an attacker is unable to decipher it, even with any alteration to the key value.In our experiment, altering one of the keys resulted in a difference of 10 −15 between the pre-change and post-change keys.Figure 5 illustrates decryption after randomly changing one of image 1's keys while maintaining a change rate below threshold CPU utilization.

Experimental Results
The key length for modern computers should exceed 2 100 in order to withstand exhaustive attacks [32].The encryption algorithm proposed in this paper utilizes a total of six keys, and complies with the IEEE floating point standard, resulting in a calculation accuracy of 10 −15 .As a result, the key space of the algorithm is (10 15 ) 6 = 10 90 , which exceeds 2 100 and thus provides robust resistance against various attack methods.
In order to withstand brute force attacks, a robust encryption algorithm should exhibit high sensitivity to the key.Even a slight change in the key for plaintext encryption should result in significant changes in the ciphertext.The evaluation indexes used are the number of pixels change rate (NPCR) and (UACI).The closer these values are to 99.6094% and 33.4635% [33], the greater the key sensitivity.Taking image2 in Figure 3 as an example, with regions of interest (ROIs) being people, clock, and board, respectively, changing one of the keys results in a specific change rate, as shown in Table 2 from experimental results.When decrypting the ciphertext, an attacker is unable to decipher it, even with any alteration to the key value.In our experiment, altering one of the keys resulted in a difference of 10 −15 between the pre-change and post-change keys.Figure 5  Secondly, the histogram of the image can visualize the statistical information of the image, which reflects the pixel intensity and distribution pattern of the image.In order to prevent the attacker from finding the relationship between the ciphertext and the plaintext image to break the encryption algorithm, the histogram of the encrypted ciphertext must be homogeneous and completely different from the histogram of the plaintext image.Figure 6 shows the histograms of three different ROI images in image2 in Figure 3 and the histograms of their ciphertexts.
The stronger the correlation between adjacent pixels of an image, the greater the possibility of information leakage.Therefore, the correlation of ciphertext images in horizontal, vertical, and diagonal directions should be as close to 0 as possible, so as to better prevent information leakage [34].Assuming the image size is M, the correlation coefficient of its adjacent pixels is calculated as follows: x i ,x i ,y i are adjacent pixels.A total of 3000 pairs of adjacent pixels are randomly selected in the ROI part of image 3, and their correlation coefficients are calculated in the horizontal, vertical, and diagonal directions, respectively.Table 3 shows that the algorithm is robust to statistical attacks.Table 4 shows the results of comparative experiments using Lena and Peppers with other algorithms.
image, which reflects the pixel intensity and distribution pattern of the image.In order to prevent the attacker from finding the relationship between the ciphertext and the plaintext image to break the encryption algorithm, the histogram of the encrypted ciphertext must be homogeneous and completely different from the histogram of the plaintext image.Figure 6 shows the histograms of three different ROI images in image2 in Figure 3 and the histograms of their ciphertexts.The stronger the correlation between adjacent pixels of an image, the greater the possibility of information leakage.Therefore, the correlation of ciphertext images in horizontal, vertical, and diagonal directions should be as close to 0 as possible, so as to better prevent information leakage [34].Assuming the image size is M, the correlation coefficient of its adjacent pixels is calculated as follows:  −0.001 0.0025 −0.0067 Ref. [14] 0.001045 0.001042 0.000325 ours −0.0170 −0.0200 −0.0047 Finally, the encryption efficiency is crucial to the encryption of instrument images, so in order to verify the effectiveness of the encryption scheme of adaptive instrument images, the time used to adjust the encryption resources according to CPU utilization and not adjust the encryption resources by using this algorithm was tested, as shown in Table 5.In order to verify the feasibility of the proposed encryption algorithm, the image "Lena" (256 × 256 pixels) is taken as an example.The algorithm was compared with the algorithms in Table 6 using this algorithm with a CPU utilization of about 50%, and the results show the effectiveness of the encryption algorithm in this paper.Finally, we compare our algorithm with the current advanced similar algorithms, and the results are listed in Table 7.  Finally, we compare our algorithm with the current advanced similar algorithms, and the results are listed in Table 7.

Conclusions
Overall, the adaptive multi-object region encryption algorithm proposed in this paper effectively addresses the issue of dynamic encryption of multi-object images under limited encryption resources by fully utilizing available resources.The proposed encryption resource allocation algorithm determines the categories that need to adjust the sampling rate based on CPU utilization and the priority of the multi-target objects.The improved segmentation algorithm solves the problem of reasonable encryption and decryption for multi-target objects, especially in overlapping regions of multiple targets, significantly reducing CPU resource overhead.Finally, to ensure the security of the keys and other information, the LSB steganography algorithm is used to embed important information, such as keys and the locations of the regions of interest into the ciphertext.Experimental results demonstrate that this scheme is highly efficient and secure.

Data Availability Statement:
The data that support the findings of this article are not publicly avail-" represents yes, "__" represents no).

Adaptive Scrambling
Ref. [ Finally, we compare our algorithm with the current advanced similar algorithm the results are listed in Table 7.

Conclusions
Overall, the adaptive multi-object region encryption algorithm proposed in th per effectively addresses the issue of dynamic encryption of multi-object images limited encryption resources by fully utilizing available resources.The proposed e tion resource allocation algorithm determines the categories that need to adjust th pling rate based on CPU utilization and the priority of the multi-target objects.T proved segmentation algorithm solves the problem of reasonable encryption and d tion for multi-target objects, especially in overlapping regions of multiple targets, s cantly reducing CPU resource overhead.Finally, to ensure the security of the key other information, the LSB steganography algorithm is used to embed important mation, such as keys and the locations of the regions of interest into the ciphertext.imental results demonstrate that this scheme is highly efficient and secure.Finally, we compare our algorithm with the current advanced similar algorithms, and the results are listed in Table 7.

Conclusions
Overall, the adaptive multi-object region encryption algorithm proposed in this paper effectively addresses the issue of dynamic encryption of multi-object images under limited encryption resources by fully utilizing available resources.The proposed encryption resource allocation algorithm determines the categories that need to adjust the sampling rate based on CPU utilization and the priority of the multi-target objects.The improved segmentation algorithm solves the problem of reasonable encryption and decryption for multi-target objects, especially in overlapping regions of multiple targets, significantly reducing CPU resource overhead.Finally, to ensure the security of the keys and other information, the LSB steganography algorithm is used to embed important information, such as keys and the locations of the regions of interest into the ciphertext.Experimental results demonstrate that this scheme is highly efficient and secure.

Conclusions
Overall, the adaptive multi-object region encryption algorithm proposed in this paer effectively addresses the issue of dynamic encryption of multi-object images under mited encryption resources by fully utilizing available resources.The proposed encrypon resource allocation algorithm determines the categories that need to adjust the samling rate based on CPU utilization and the priority of the multi-target objects.The imroved segmentation algorithm solves the problem of reasonable encryption and decrypon for multi-target objects, especially in overlapping regions of multiple targets, signifiantly reducing CPU resource overhead.Finally, to ensure the security of the keys and ther information, the LSB steganography algorithm is used to embed important inforation, such as keys and the locations of the regions of interest into the ciphertext.Experental results demonstrate that this scheme is highly efficient and secure.
uthor Contributions: Conceptualization, J.W. and Z.L.; methodology, X.X. and B.G.; software, J.W.;  Finally, we compare our algorithm with the current advanced similar algorithms, and the results are listed in Table 7.

Conclusions
Overall, the adaptive multi-object region encryption algorithm proposed in this paper effectively addresses the issue of dynamic encryption of multi-object images under limited encryption resources by fully utilizing available resources.The proposed encryption resource allocation algorithm determines the categories that need to adjust the sampling rate based on CPU utilization and the priority of the multi-target objects.The improved segmentation algorithm solves the problem of reasonable encryption and decryption for multi-target objects, especially in overlapping regions of multiple targets, significantly reducing CPU resource overhead.Finally, to ensure the security of the keys and other information, the LSB steganography algorithm is used to embed important information, such as keys and the locations of the regions of interest into the ciphertext.Experimental results demonstrate that this scheme is highly efficient and secure.

Conclusions
Overall, the adaptive multi-object region encryption algorithm proposed in this paper effectively addresses the issue of dynamic encryption of multi-object images under limited encryption resources by fully utilizing available resources.The proposed encryption resource allocation algorithm determines the categories that need to adjust the sampling rate based on CPU utilization and the priority of the multi-target objects.The improved segmentation algorithm solves the problem of reasonable encryption and decryption for multi-target objects, especially in overlapping regions of multiple targets, significantly reducing CPU resource overhead.Finally, to ensure the security of the keys and other information, the LSB steganography algorithm is used to embed important information, such = [Look for the dimples of the polygon ploy for ploy in input_box] // Finding concave vertices 17.Dimples_list = [Sort the points in Dimples for Dimples in Dimples_list] 18. for i = 0 to (len(input_box)) do 19.for j = 0 to (len(Dimples_list[i])) do 20.Vertical_lines = A vertical straight line passing through Dimples_list[i][j] 21. intersections = Vertical_lines the intersection of the line and the polygon input_box[i] 22. for k = 0 to (len(intersections))do 23.Dividing_line = The line segment starts from Dimples_list[i][j] and ends at intersections[k]

Figure 1 .
Figure 1.Improved segmentation algorithm example (symbols (×) represent the concave positions of polygons.Each color in input represents the detection result of yolov8, different colors in union

Algorithm 3 :
Chaotic fusion XOR encryption algorithm Input: Plain Image P Output: Cipher Image C Key generation 1.

Algorithm 4 :Figure 2 .
Figure 2. Process of encryption and decryption by adaptive mechanism.

Figure 2 .
Figure 2. Process of encryption and decryption by adaptive mechanism.

Algorithm 5 :
Adaptive encryption algorithm decryption process Input: Cipher image Output: Plain image 1.

Figure 4 .
Figure 4. (A): (a) represents the input image.(b) is the detection result image of YOLOv8.(c) is a schematic diagram of the polygon segmentation step.(d) is the encrypted image.(e-h) are the decrypted images after encrypting the image under CPU usage rates of 25%, 35%, 55%, and 75%, respectively (The meaning of "xxx 器仪仪表有限公司" on all billboards in Figure 4A is "xxx Instruments and Meters Co., Ltd").(B): (a-c) are from Figure 4A(a).(d-f) are from Figure 4A(e).(g-i) are from Figure 4A(f).(j-l) are from Figure 4A(g).(m-o) are from Figure 4A(h).Experimental process.Figure 4A is the key output diagram in the overall experimental process, and Figure 4B is a local magnification of Figure 4A, used to demonstrate the adaptive downsampling encryption under different CPU utilization rates (The phrase "仪表有" on all billboards in Figure 4B is a selected small part of "xxx 器仪仪表有限公司").

Figure 4 .
Figure 4. (A): (a) represents the input image.is the detection result image of YOLOv8.(c) is a schematic diagram of the polygon segmentation step.(d) is the encrypted image.(e-h) are the decrypted images after encrypting the image under CPU usage rates of 25%, 35%, 55%, and 75%, respectively (The meaning of "xxx器仪仪表有限公司" on all billboards in Figure 4A is "xxx Instruments and Meters Co., Ltd").(B): (a-c) are from Figure 4A(a).(d-f) are from Figure 4A(e).(g-i) are from Figure 4A(f).(j-l) are from Figure 4A(g).(m-o) are from Figure 4A(h).Experimental process.Figure 4A is the key output diagram in the overall experimental process, and Figure 4B is a local magnification of Figure 4A, used to demonstrate the adaptive downsampling encryption under different CPU utilization rates (The phrase "仪表有" on all billboards in Figure 4B is a selected small part of "xxx器仪仪表有限公司").

Figure 6 .
Figure 6.Histogram analysis.(The phrase "仪器仪表有限公司" on the billboards in Figure (i) means "xxx Instruments and Meters Co., Ltd.").(a,e,i) are the original image, (b,f,j) are the original image histogram information, (c,g,k) are the original image, the image of encrypted cryptograph, (d,h,l) are the cipher image histogram information.

Figure 6 .
Figure 6.Histogram analysis.(The phrase "仪器仪表有限公司" on the billboards in Figure (i) means "xxx Instruments and Meters Co., Ltd.").(a,e,i) are the original image, (b,f,j) are the original image histogram information, (c,g,k) are the original image, the image of encrypted cryptograph, (d,h,l) are the cipher image histogram information.

Author
Contributions: Conceptualization, J.W. and Z.L.; methodology, X.X. and B.G.; software, J.W.; validation, J.W. and B.G.; formal analysis, Z.L. and C.P.; investigation, B.G. and C.P.; resources, X.X.; data curation, J.W.; writing-original draft preparation, J.W.; writing-review and editing, B.G. and Z.L.; visualization, B.G.; supervision, X.X.; project administration, Z.L.; funding acquisition, X.X.All authors have read and agreed to the published version of the manuscript.Funding: We gratefully acknowledge the financial support provided by the National Key Research and Development Plan of China under Grant 2022YFF0604704 and by the National Key Research and Development Plan of China under Grant 2021YFF0600100.

Table 5 .
Adaptive mechanism encryption and decryption time (The following are the times taken for encryption and decryption of four regions of interest ex-tracted from Figure1under different conditions).

Table 6 .
Encryption time comparison of other algorithms.

Table 7 .
The proposed work is compared with the latest algorithms ("

Table 6 .
Encryption time comparison of other algorithms.

Table 7 .
The proposed work is compared with the latest algorithms ("✓" represents yes, "__" represents no).

Table 6 .
Encryption time comparison of other algorithms.

Table 7 .
The proposed work is compared with the latest algorithms ("✓" represents yes, "__ resents no).

Table 6 .
Encryption time comparison of other algorithms.

Table 7 .
The proposed work is compared with the latest algorithms ("✓" represents yes, "__" represents no).
Finally, we compare our algorithm with the current advanced similar algorithms, and e results are listed in Table7.The proposed work is compared with the latest algorithms ("✓" represents yes, "__" repsents no).

Table 6 .
Encryption time comparison of other algorithms.

Table 7 .
The proposed work is compared with the latest algorithms ("✓" represents yes, "__" represents no).