SMS encryption method and system based on 5G technology

By analyzing the P frame and B frame image information content in IPB structure frames in video short messages, and combining the inter-frame information volume, different levels of encryption processing are performed, and the cracking difficulty caused by only I-frame encryption in the prior art is solved. The problem has improved the encryption and confidentiality of video text messages.

CN118972836BActive Publication Date: 2025-01-03深圳众投互联信息技术有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411448667.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2025-01-03
Estimated Expiration
2044-10-17

AI Technical Summary

Technical Problem

The existing video SMS encryption method only selectively encrypts I frames, and cannot encrypt different levels of encryption according to the inter-frame information, resulting in low cracking difficulties.

Method used

By analyzing the information content of P-frame images and B-frame images in IPB structure frames in video short messages, and combining the inter-frame information volume, different levels of encryption are performed. The specific method includes comparing the P-frame image and the B-frame image with the reference frame, determining the information content, and performing grading processing of encryption levels based on the information content.

Benefits of technology

It improves the encryption level of video text messages, enhances confidentiality, and avoids the problem of insufficient security when only I-frame encryption is performed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118972836B_ABST
    Figure CN118972836B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of communication encryption technology, and in particular to a method and system for encrypting short messages based on 5G technology. The method divides the video information of a video short message to be sent into an IPB frame structure to obtain a P frame image and a B frame image; respectively, the P frame image and the corresponding reference frame, the B frame image and the corresponding reference frame, determine the information content in different frame images; combine the information content of different frame images to obtain the inter-frame information volume of the video information of the video short message; perform different levels of encryption on the video short messages corresponding to different sizes of inter-frame information volumes. The present invention avoids the problem of low confidentiality in selectively encrypting only the I frame image, and improves the encryption degree of the video information of the video short message.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication encryption technology, and in particular to a text message encryption method and system based on 5G technology. Background Art

[0002] With the rapid development of mobile Internet and Internet of Things, data security and privacy protection have become particularly important. Especially in the field of multimedia communication such as video SMS and video communication, the demand for the security and confidentiality of video SMS data is growing. As the latest communication technology, 5G has the characteristics of high speed, low latency, and large number of connections. Various communication methods based on 5G technology are being rapidly promoted and applied around the world. In today's society where communication methods are so convenient and fast, the demand for the security and confidentiality of video SMS data is even more important.

[0003] The traditional encryption strategy for video SMS data is selective encryption. The selective encryption of video SMS data is based on the video IPB frame structure. The most representative encryption method is to only encrypt the I frame in the frame structure. Only the I frame in the frame structure is encrypted because the I frame plays a key role in video encoding. They contain all the information required for inter-frame encoding and can independently decode the complete picture. However, if only the I frame in the IPB structure frame is encrypted without performing encryption analysis on the inter-frame information, the video SMS data cannot be encrypted at different levels according to the inter-frame information, and there will be a problem of low cracking difficulty. Summary of the invention

[0004] In order to solve the technical problem that only the I frame in the frame structure is encrypted and no encryption analysis is performed on the inter-frame information, the purpose of the present invention is to provide a method and system for encrypting short messages based on 5G technology. The technical solutions adopted are as follows:

[0005] In the first aspect, an embodiment of the present invention provides a text message encryption method based on 5G technology, the method comprising: dividing the video information of the video text message to be sent into an IPB frame structure to obtain a P frame image and a B frame image; comparing the P frame image with the corresponding reference frame to determine the information content in the P frame image; comparing the B frame image with the corresponding reference frame to determine the information content in the B frame image; combining the information content of the P frame image and the B frame image to obtain the inter-frame information amount of the video information of the video text message; performing different levels of encryption on the video text messages corresponding to different sizes of inter-frame information amounts.

[0006] The richer the information content in the IPB structure frame, the more encryption is needed. Therefore, the information content of the P frame image and the B frame image relative to the reference frame is analyzed respectively. When the information content is more, it reflects that the amount of information carried by the current frame image is larger, and the current frame image needs to be encrypted more, and the corresponding inter-frame information amount is larger. Different levels of encryption are used for different inter-frame information amounts.

[0007] In a possible implementation, the comparing the P frame image and the corresponding reference frame to determine the information content in the P frame image includes: obtaining image blocks in the P frame image and matching image blocks in the corresponding reference frame; performing residual analysis on the image blocks in the P frame image and the matching image blocks in the corresponding reference frame to obtain residual images of each image block in the P frame image; determining the information change amount of the image block corresponding to the residual image according to the residual value of each pixel in the residual image; analyzing the performance consistency of the matching image blocks matching the image blocks in the P frame image in different directions to determine the information representation degree of the matching image blocks; and combining the information change amount of the image blocks in the P frame image and the information representation degree of the matching image blocks in the corresponding reference frame to obtain the information content of the P frame image.

[0008] The consistency of performance in different directions may be determined by combining the consistency of performance in the horizontal and vertical directions, or by combining the consistency of performance in specific directions set by the user, or by other methods, which is not limited in this application.

[0009] In a possible implementation, determining the information change amount of the image block corresponding to the residual image according to the residual value of each pixel in the residual image includes: analyzing the overall level of the residual value of each image block in the residual image to determine the information change amount of the image block corresponding to the residual image.

[0010] The reference frame of a P-frame image can be the previous frame image or the previous two frames image. When there is only one reference frame, only the information content of the P-frame image and the previous reference frame is calculated as the information content of the P-frame image. When the previous two frames are used as reference frames, the average of the signal content of the P-frame image and the previous two frames reference value is calculated as the information content of the P-frame image.

[0011] In a possible implementation, determining the amount of information change of an image block corresponding to the residual image based on the residual value of each pixel in the residual image also includes: for each pixel in the residual image corresponding to the image block, calculating the average residual difference value and the minimum residual difference value between each pixel and the pixels in the neighborhood; using the negative correlation mapping value of the product value of the average residual difference value and the minimum residual difference value as the residual weight of the pixel; and using the residual weight of each pixel as the weight value, weighted averaging the residual value of each pixel to obtain the amount of information change of the image block corresponding to the residual image.

[0012] In a possible implementation, analyzing the performance consistency of a matching image block that matches an image block in a P frame image in different directions to determine the information representation degree of the matching image block includes: obtaining a grayscale difference in a horizontal direction of the matching image block that matches the image block; obtaining a grayscale difference in a vertical direction of the matching image block that matches the image block; and determining the information representation degree of the matching image block in combination with the grayscale differences in the horizontal and vertical directions.

[0013] In a possible implementation, the combining the information change amount of the image block in the P frame image and the information representation degree of the matching image block in the corresponding reference frame to obtain the information content of the P frame image includes: taking the normalized value of the ratio of the information change amount of the image block to the information representation degree of the matching image block in the corresponding reference frame as the real information amount of the image block; and analyzing the average information amount of the real information amount of each image block in the P frame image to obtain the information content of the P frame image.

[0014] In a possible implementation, comparing the B frame image with the corresponding reference frame to determine the information content in the B frame image includes: for the B frame image, determining the information distribution direction value of the matching image block according to the performance consistency of the matching image block matching the image block in the B frame image in different directions; determining the residual information amount of the image block by combining the real information amount of the image block in the B frame image and the image blocks in the two previous and next reference frames and the information distribution direction value of the matching image block; and analyzing the average information amount of the residual information amount of each image block in the B frame image to obtain the information content in the B frame image.

[0015] In a possible implementation, the combining of the real information amount of the image block in the B frame image and the image block in the two preceding and following reference frames and the information distribution direction value of the matching image block to determine the residual information amount of the image block includes: taking the average information amount of the real information amount of the image block in the B frame image and the two preceding and following reference frames as the weight value; combining the difference in the real information amount of the image block in the B frame image and the two preceding and following reference frames, and the difference in the information distribution direction value of the B frame image and the matching image block in the two preceding and following reference frames to determine the original information amount; and weighting the original information amount by the weight value to obtain the residual information amount of the image block.

[0016] In a possible implementation, combining the information content of the P frame image and the B frame image to obtain the inter-frame information amount of the video information of the video message includes: calculating the average content of the information content of the P frame image and the B frame image to obtain the inter-frame information amount of the video information of the video message.

[0017] In the second aspect, a short message encryption system based on 5G technology is provided, and the system includes the following modules:

[0018] A frame structure division module is used to divide the video information of the video SMS to be sent into an IPB frame structure to obtain a P frame image and a B frame image;

[0019] A first determination module, used for comparing the P frame image with a corresponding reference frame to determine the information content in the P frame image;

[0020] A second determination module is used to compare the B frame image with the corresponding reference frame to determine the information content in the B frame image;

[0021] An inter-frame determination module, used for combining the information content of the P frame image and the B frame image to obtain the inter-frame information content of the video information of the video message;

[0022] The SMS encryption module is used to perform different levels of encryption on video SMS messages corresponding to different sizes of inter-frame information.

[0023] In a third aspect, an embodiment of the present invention provides an electronic device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, various possible embodiments of the first aspect are implemented.

[0024] In a fourth aspect, an embodiment of the present invention provides a computer program product, which includes: a computer program code, which, when executed on a computer, enables the computer to execute the method in the first aspect or any possible implementation of the first aspect.

[0025] In a fifth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, enables the computer to execute various possible implementations of the first aspect.

[0026] The embodiments of the present invention have at least the following beneficial effects:

[0027] The present invention relates to the technical field of communication encryption. By analyzing the characteristic expressions of different regions in P frame images and B frame images in IPB structure frames in video information, the information content is quantified, and the size of the information content in different frame images is determined, so as to calculate the amount of information between frames according to the size of the information content in different frame images, and encrypt the video information of a video short message to be sent to different degrees and levels in combination with the amount of information between frames, thereby avoiding the problem of weak confidentiality in selectively encrypting only I frame images and improving the encryption degree of the video information of the video short message. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0029] Figure 1 A method flow chart of a text message encryption method based on 5G technology provided by an embodiment of the present invention;

[0030] Figure 2 A result schematic diagram of an IPB structure frame provided by an embodiment of the present invention;

[0031] Figure 3 A method flow chart of a method for obtaining information content in a P frame image provided by an embodiment of the present invention;

[0032] Figure 4 A method flow chart of a method for obtaining information content in a B frame image provided by an embodiment of the present invention;

[0033] Figure 5 A schematic diagram of the structure of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0034] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined purpose of the invention, the text message encryption method and system based on 5G technology proposed by the present invention, its specific implementation method, structure, characteristics and effects are described in detail as follows in combination with the accompanying drawings and preferred embodiments.

[0035] Before introducing the specific solutions provided by the embodiments of the present application, some of the uses in the present application are explained to facilitate understanding by those skilled in the art, and the uses in the present application are not limited.

[0036] (1) Inter-frame compression: Inter-frame compression is also called time compression. It is based on the fact that the two consecutive frames of many videos or animations have a great correlation. That is, there is redundant information between the adjacent frames of continuous videos. Compression is implemented by comparing the data between different frames on the time axis to further improve the compression ratio. In video, inter-frame compression is to compress the B frames and P frames in the GOP image group. The I frame is a key frame and uses intra-frame compression technology; the P frame is a forward reference frame. When compressed, it only refers to the previously processed frames; the B frame is a bidirectional reference frame. When compressed, it refers to both the previous frame and the frame after it.

[0037] (2) Motion estimation in inter-frame prediction is to find the best corresponding block of the currently coded block in the coded image. Assuming P is the current coded frame, Pr is the reference frame, and the current coded block is B, then the motion estimation is to find the block Br in Pr with the smallest subtraction residual from B. Br is the best matching block of B. The coded block here is recorded as an image block in the subsequent embodiments, and the best matching block is recorded as a matching image block in the subsequent embodiments.

[0038] In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0039] Among them, in the description of the embodiments of the present invention, unless otherwise specified, " / " means or, for example, A / B can mean A or B: "and / or" in the text is only a way to describe the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present invention, "multiple" refers to two or more than two.

[0040] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features.

[0041] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0042] The embodiments of the present invention are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided by the embodiments of the present invention are also applicable to similar technical problems.

[0043] The specific scheme of the SMS encryption method and system based on 5G technology provided by the present invention is described in detail below with reference to the accompanying drawings.

[0044] See also Figure 1 , which shows a flowchart of a method for encrypting short messages based on 5G technology provided by an embodiment of the present invention, the method comprising the following steps:

[0045] Step S100 , dividing the video information of the video short message to be sent into an IPB frame structure to obtain a P frame image and a B frame image.

[0046] Collect video information of the video SMS to be sent.

[0047] The initial I frame and P frame frequencies are set, and the IPB frame structure is divided in the video data of the original video message to obtain I frame images, P frame images and B frame images. In the embodiment of the present invention, the I frame frequency is set to 1 / 8, and the P frame frequency is set to 1 / 16. The original video data is divided into IPB frame structures according to the set frequencies to obtain several IPB structure frames: ;in, It is the first IPB frame; It is the second IPB frame; The nth IPB frame; It is the Nth IPB frame.

[0048] In each IPB structure frame, the first frame is the I frame of the IPB structure frame, followed by several P frames, and the rest are B frames. Figure 2 , Figure 2 Schematic diagram of the result of IPB structure frame, where I is an I frame image, B is a B frame image, and P is a P frame image.

[0049] Among them, when the IPB frame structure is used to process video data, the I frame is compressed within the frame to save the complete data; the P frame is motion predicted with the previous I frame or P frame, that is, the image area is matched with the previous I frame or P frame, and then the residual value and motion vector of the matching area are saved; the B frame is image area matched with the previous I frame or P frame image and the next I frame or P frame image, and the average residual results of each area in the B frame in the previous and next reference frames and the respective motion vectors are saved. The previous and next reference frames of the B frame are the I frame and the P frame.

[0050] In the acquired IPB structure frame, obtain the P frame in the n-frame IPB structure frame And B frame in n frame IPB structure frame .

[0051] For the P frame in n IPB frames , get the previous I frame image or P frame image as the reference frame , get P frame The matching image blocks kc and motion vectors of each image block in the reference frame The matching image block is the best matching block corresponding to the current image block in the reference frame image; the motion vector reflects the relative position between the current image block and the best matching block in its reference frame.

[0052] For B frames in n IPB frames , get the previous I frame image or P frame image as the previous reference frame , the next I frame or P frame image is the next reference frame , get the B frame Each image block Matching image patches in the previous reference frame and motion vector And the matching image block kr and motion vector in the later reference frame .

[0053] Step S200 , comparing the P frame image with the corresponding reference frame to determine the information content in the P frame image.

[0054] In the video information of the video message, when the change amount of each area block in the IPB structure frame and the matching block in the PB frame is greater than that in the reference frame, the richer the information content is, the more serious the consequences after cracking are, and the more encryption is needed; the more consistent the matching vectors of each area block in the P frame and the B frame are with the matching vectors in the reference frame, the more consistent the inter-frame motion is, the lower the difficulty of cracking is, and the more encryption is needed. Therefore, the present invention analyzes the information content of the P frame image and the B frame image relative to the reference frame respectively. When the information content is more, it reflects that the amount of information carried by the current frame image is greater, and the current frame image needs to be encrypted more.

[0055] Therefore, we first compare the P-frame image with the corresponding reference frame to determine the information content in the P-frame image. Among them, since the P-frame image records the changes relative to the previous frame and adopts the forward prediction coding method, the reference frame corresponding to the corresponding P-frame image is the previous frame image. The number of reference frames is at most 2, and they are all forward. The P-frame image can refer to the previous I-frame image or P-frame image for encoding. Therefore, when the number of reference frames is 1, the P-frame image is compared with the only reference frame to obtain the information content in the P-frame image; when the number of reference frames is 2, the P-frame image is compared with the two reference frames respectively to determine the average of the information content of the P-frame image and the two reference frames as the information content in the P-frame image.

[0056] Step S300 , comparing the B frame image with the corresponding reference frame to determine the information content in the B frame image.

[0057] Since the I frame is a key frame and an internal coding frame in the IPB structure frame, it can be regarded as a complete image and can be used as a reference point for random access. In IPB coding, the I frame does not need to refer to other frames for coding, but independently encodes the blocks within the image. For the I frame image, which must be compressed, there is no need to analyze the I frame image. Therefore, after analyzing and comparing the P frame image, the B frame image and the corresponding reference frame are compared to determine the information content in the B frame image. The B frame image adopts a bidirectional prediction coding method. The B frame records the difference between the current frame and the previous and next I frames or P frames, so it is necessary to analyze the previous reference frame and the next reference frame of the B frame respectively to determine the information content in the B frame image.

[0058] Step S400, combining the information contents of the P frame image and the B frame image to obtain the inter-frame information volume of the video information of the video message.

[0059] The information content of P-frame images and B-frame images reflects the real amount of information in the frame images in the IPB structure frame during the compression process, where the frame images here do not include I frames, that is, non-I frame images. The greater the real amount of information of P-frame images and B-frame images in the IPB structure frame, the richer the information contained in the non-I frame in the IPB structure frame, and the weaker the security of encrypting only the I frame, the more it is necessary to encrypt its inter-frame information. Therefore, the information content of P-frame images and B-frame images is analyzed to determine the amount of inter-frame information.

[0060] The average information content of the P frame image and the B frame image is calculated to obtain the inter-frame information content of the video information of the video message. In some embodiments, the average information content of the P frame image and the B frame image is used to obtain the inter-frame information content of the video information of the video message.

[0061] Step S500, encrypting video messages corresponding to different sizes of inter-frame information at different levels.

[0062] When the overall inter-frame information volume in the IPB structure frame is larger, it is considered that the inter-frame information content in the structure frame is higher, and the inter-frame information memory should be encrypted more. Different levels of encryption are implemented for video messages corresponding to different inter-frame information volumes.

[0063] First, the I frame image of each IPB structure frame is encrypted using a key.

[0064] Then, the normalized value of the calculated inter-frame information amount of the IPB structure frame is graded. It should be noted that the inter-frame information amount is normalized to facilitate the determination of the encryption ratio thereof. Please refer to Table 1, which is a table for assigning different encryption ratios to video short messages according to the size of the inter-frame information amount.

[0065]

[0066] Table 1

[0067] Sort the image frames in the IPB structure frame from large to small according to the information content, multiply the total number of structure frames NI by the encryption ratio P and round them up to get the number of frames to be encrypted W=Round(NI×P), and encrypt the residual information of the first W non-I frames sorted in order of information content from large to small using the key. The Round function is used to round the value.

[0068] In some embodiments, the information content in the P frame image is determined by comparing the P frame image with the corresponding reference frame, that is, the above step S200 can be performed by Figure 3 The steps shown achieve:

[0069] Step S210: acquiring an image block in a P frame image and a matching image block in a corresponding reference frame.

[0070] Specifically, the steps of obtaining image blocks and matching image blocks are steps in the IPB structure frame. For example, a frame of image can be divided into several parts according to specific circumstances, and each part is an image block. For example, an area of ​​16×16 pixels can be used as an image block, and smaller image blocks can be divided, and their sizes can be 4×4, 8×8, 8×16, etc. Then, further, find the best corresponding image block t2 of the current image block t1 in the reference frame as the matching image block t2 of the current image block t1; the size of the image block and the matching image block are consistent. Among them, the search for matching image blocks can be performed by a global search algorithm or a fast search algorithm. It should be noted that the method of obtaining image blocks in P frame images and matching image blocks in corresponding reference frames through motion estimation is a well-known technology for those skilled in the art and will not be repeated here.

[0071] Step S220 , performing residual analysis on the image blocks in the P frame image and the matching image blocks in the corresponding reference frame to obtain a residual image of each image block in the P frame image.

[0072] Through residual calculation, the information difference between the image block and the matching image block can be compared. When the difference between the image block and the matching image block is large, the amount of information contained in the currently analyzed image block is relatively large. Each point in the residual image represents the grayscale change of the image block and the matching image block kl. The larger the overall value in the residual image, the greater the information change in the image block relative to the matching image block kl, and the higher the information content in the image block of the P frame image. It should be noted that the residual value in the inter-frame compression of the IPB structure frame refers to the change value of the pixel points in the different parts between the frames. It can also be understood that the residual value of each pixel point in the residual image is the pixel difference value of the pixel points in the two adjacent frames of the image. It is a well-known technology for those skilled in the art and will not be repeated here. Among them, the pixel difference value takes the absolute value.

[0073] Therefore, the residual of each image block in the P frame image and the matching image block in the corresponding reference frame is calculated to obtain the residual image of each image block. It should be noted that each image block has its own corresponding residual image, and the size of the residual image is consistent with the size of the corresponding image block.

[0074] Step S230 , determining the information change amount of the image block corresponding to the residual image according to the residual value of each pixel in the residual image.

[0075] After obtaining the residual image, the greater the change in the residual value of the image block in the residual image, the greater the information difference between the image block and the matching image block, and the greater the information change of the image block corresponding to the corresponding residual image. The residual calculation is mainly used to examine the rationality of the model assumptions and the reliability of the data. Then, according to the residual value of each pixel in the residual image, the information change of the image block corresponding to the residual image is further determined. Specifically: the overall level of the residual value of each image block in the residual image is analyzed to determine the information change of the image block corresponding to the residual image.

[0076] In one embodiment of the present invention, for any image block in the residual image, the overall level of the residual value of the image block can be reflected by the average value of the residual value in the image block, that is, the average value of the residual value in the image block is used as the information change of the image block.

[0077] In another embodiment of the present invention, the overall level of the residual value of the image block may also be reflected by the sum of the residual values ​​in the image block, that is, the sum of the residual values ​​in the image block is used as the information change amount of the image block.

[0078] Furthermore, after obtaining the residual image, since noise is unavoidable in two adjacent frames of video, and the noise area is expressed as independent pixels in the residual image, the more independent the pixel is, the more likely it is that the local change is caused by noise; the real information change in the video image is often continuous, so the more independent the residual value of each point in the residual image of the image block is, the more likely it is that the local change corresponding to the residual value is caused by noise, and it is not that the real information has changed, so it is given a lower weight, which reflects the referenceability of the residual value. The smaller the weight, the more independent the residual value, and the smaller the referenceability of the residual value. On the basis of determining the information change of the image block by the residual value, the weighting of the residual value is realized, that is, the distribution of the residual value of each point in the image block is analyzed, and the residual weight that can adjust the residual value of the pixel is determined. When the information change of the image block is determined by combining the residual weight and the residual value, the referenceability is higher than that of determining the information change of the image block only by the residual value.

[0079] In a preferred embodiment of the present invention, the distribution of residual values ​​in the residual image is first analyzed to obtain the residual weight of each pixel in the residual image; then, the information change amount of the corresponding image block in the residual image is determined by combining the residual weight and the residual value. Specifically:

[0080] When obtaining the information variation, the residual image is first analyzed to obtain the residual weight of each pixel in the residual image; the residual weight is used to characterize the distribution of the residual value in the neighborhood of each pixel in the residual image.

[0081] Because of the influence of noise or other factors, there is a certain error in the case of determining the difference in information content between the image block and the matching image block only through the residual value in the residual image. Therefore, the residual weight for adjusting the residual value can be determined by combining and analyzing the residual values ​​of the pixels around the pixel. The difference between the residual value of the pixel and the pixels in the surrounding neighborhood is obtained respectively, which is recorded as the residual difference. The larger the average residual difference between the pixel and the pixels in the surrounding neighborhood, the larger the residual difference between the pixel and the pixels in the surrounding neighborhood; and the smallest residual difference is screened out. The larger the smallest residual difference, the lower the similarity between the pixel and the pixels in the surrounding neighborhood, and the more likely the residual value of the pixel is caused by noise, the smaller the corresponding residual weight.

[0082] In some embodiments, the method for obtaining the residual weight of each pixel in the residual image is: for each pixel in the residual image corresponding to the image block, the average residual difference and the minimum residual difference between each pixel and the pixels in the neighborhood are calculated; and the negative correlation mapping value of the product of the average residual difference and the minimum residual difference is used as the residual weight of the pixel.

[0083] In the embodiment of the present invention, the pixels in the neighborhood corresponding to each pixel point are the pixels in four neighborhoods.

[0084] In other embodiments, pixel points within eight neighborhoods may also be used, and the size of the neighborhood range may be adjusted by the implementer according to actual conditions.

[0085] In the embodiment of the present invention, the negative correlation mapping value can be realized by an exponential function with a natural constant as the base and a negative independent variable as the exponent, or by calculating the inverse.

[0086] Taking the mth pixel as an example, the residual weight of the mth pixel is The calculation formula is: ; Wherein, exp is an exponential function with the natural constant e as the base; is the average residual difference between the mth pixel in the residual image and the pixels in the neighborhood; is the minimum residual difference between the mth pixel in the residual image and the pixels in the neighborhood; | | is the absolute value sign.

[0087] After obtaining the residual weight of each pixel in the residual image, the residual value of the pixel in the residual image is corrected by the residual weight to obtain the information change amount of the image block corresponding to the residual image.

[0088] In some embodiments, the residual weight of each pixel is used as a weight value, and the residual value of each pixel is weighted and averaged to obtain the information change amount of the image block corresponding to the residual image. The more independent the residual value of the pixel is, the more likely the pixel is a noise point, and the corresponding residual weight is relatively smaller. The residual value is weighted by the residual weight to obtain the information change amount. The larger the information change amount, the more information is contained in the image block corresponding to the residual image.

[0089] Taking the kth residual image as an example, the information change of the image block corresponding to the kth residual image is The calculation formula is: ;in, is the residual weight of the m-th pixel; is the residual value of the mth pixel; M is the number of pixels in the kth residual image.

[0090] Step S240 , analyzing the performance consistency of the matching image block that matches the image block in the P frame image in different directions, and determining the information representation degree of the matching image block.

[0091] The more consistent the image performance of the image block in the matching image block kl in the reference frame, the smaller the information representation degree of the matching image block. At this time, the residual value in the residual image can better represent the real information of the video message. Therefore, it is also necessary to calculate the information representation degree in the matching image block kl.

[0092] Since the changes in pixel values ​​in the image are inconsistent when considered from different directions, the consistency of the performance of the matching image blocks in different directions is analyzed to determine the information representation of the matching image blocks.

[0093] First, the grayscale difference in the horizontal direction of the matching image block that matches the image block is obtained. Specifically: in the matching image block, the grayscale difference between each pixel and its adjacent pixel on the right is first obtained, and the average grayscale difference cgl between all pixels in the matching image block and the adjacent pixel on the right is calculated as the grayscale difference in the horizontal direction.

[0094] Then, the grayscale difference in the vertical direction of the matching image block that matches the image block is obtained. Specifically: in the matching image block, the grayscale difference between each pixel and its lower adjacent pixel is obtained, and the average grayscale difference cgv between all pixels in the matching image block and their lower adjacent pixels is calculated as the grayscale difference in the vertical direction.

[0095] Finally, the information representation of the matching image block is determined by combining the grayscale differences in the horizontal and vertical directions. The larger the value of the information representation, the more consistent the grayscale performance in the matching image block. The sum h1 of the grayscale differences in the horizontal and vertical directions and the absolute value c1 of the grayscale differences in the horizontal and vertical directions are calculated respectively; the sum h1 of the grayscale differences is used as the numerator, the absolute value c1 of the grayscale differences is used as the denominator, and the anti-zero coefficient c is added to the denominator to obtain the information representation of the matching image block. In the embodiment of the present invention, the anti-zero coefficient c is used to prevent the denominator of the fraction from being zero, and the value of the anti-zero coefficient c can be 1.

[0096] Taking the matching image block kl as an example, the information representation degree of the matching image block kl is The calculation formula is: .

[0097] Step S250 , combining the information variation of the image block in the P frame image and the information representation degree of the matching image block in the corresponding reference frame to obtain the information content of the P frame image.

[0098] The greater the information representation of the matching image block, the more consistent the grayscale performance within the matching image block; first, the real information amount of each image block is determined separately, and then the real information amount of each image block is integrated to obtain the information content of the final P frame image. The information content of the P frame image represents the real information amount of the residual image of the image block.

[0099] In some embodiments, a normalized value of the ratio of the information variation of the image block to the information representation degree of the matching image block in the corresponding reference frame is used as the real information amount of the image block.

[0100] The average information amount of the real information amount of each image block in the P frame image is analyzed to obtain the information content of the P frame image. Specifically: the average information amount of the real information amount of each image block in the P frame image is used as the information content RHF of the P frame image.

[0101] In some embodiments, the information content in the B frame image is determined by comparing the B frame image with the corresponding reference frame, that is, the above step S300 can be performed by Figure 4 The steps shown achieve:

[0102] Step S310 , for a B frame image, according to the performance consistency of a matching image block that matches an image block in the B frame image in different directions, determine the information distribution direction value of the matching image block.

[0103] Since the B frame is bidirectionally predicted, there is a reference frame before and after the B frame. The matching image blocks of the image block in the B frame in the previous and next reference frames are denoted as kl and kr respectively. The image block in the B frame is respectively subjected to residual calculation with the matching image blocks kl and kr, and the obtained residual images are denoted as kl' and kr' respectively.

[0104] First, for any reference frame corresponding to the B frame image, such as the previous reference frame corresponding to the B frame image, the information distribution direction value of the matching image block that matches the image block in the subsequent previous reference frame is performed.

[0105] Since the pixel value changes in the image are inconsistent when considered from different directions, the performance consistency of the matching image block in different directions is analyzed to determine the information representation degree of the matching image block. The performance consistency of the matching image block matching the image block in the B frame image in different directions is analyzed. In the embodiment of the present invention, the information distribution direction in the matching image is reflected by the ratio of the average grayscale difference in the two horizontal directions and the vertical direction.

[0106] Step 1: According to the method of step S240, the grayscale difference in the horizontal direction of the matching image block that matches the image block is obtained. Specifically: in the matching image block, the grayscale difference between each pixel and its adjacent pixel on the right is first obtained, and the average grayscale difference cgl' between all pixels in the matching image block and the adjacent pixel on the right is calculated as the grayscale difference in the horizontal direction.

[0107] Step 2: Obtain the grayscale difference in the vertical direction of the matching image block that matches the image block. Specifically: in the matching image block, obtain the grayscale difference between each pixel and its lower adjacent pixel, and calculate the average grayscale difference cgv' between all pixels in the matching image block and their lower adjacent pixels as the grayscale difference in the vertical direction.

[0108] Step three: take the grayscale difference in the horizontal direction as the numerator, take the grayscale difference in the vertical direction as the denominator, and use the ratio formed by the numerator and the denominator as the information distribution direction value of the matching image block.

[0109] Similarly, the information distribution direction value of the matching image block in the subsequent reference frame corresponding to the B frame image is determined according to the method of steps 1 to 3 above.

[0110] Step S320 , combining the real information amount of the image blocks in the B frame image and the two preceding and succeeding reference frames and the information distribution direction value of the matching image blocks, to determine the residual information amount of the image block.

[0111] Since the B frame image in the IPB structure frame has a reference frame before and after, the greater the difference between the main information distribution directions in the reference frames before and after the B frame image, the greater the change in the information distribution direction before and after the B frame image, and the more information the B frame contains; the greater the difference in the actual information amount between kl' and kr', the more information the B frame contains.

[0112] Therefore, further, the residual information amount of the image block is determined according to the real information amount of the image block and the information distribution direction value of the matching image block. In the embodiment of the present invention, the average information amount of the real information amount of the image block in the B frame image and the two reference frames before and after is used as the weight value; the original information amount is determined by combining the difference in the real information amount of the image block in the B frame image and the two reference frames before and after, and the difference in the information distribution direction value of the B frame image and the matching image block in the two reference frames before and after; the original information amount is weighted by the weight value to obtain the residual information amount of the image block.

[0113] The actual information amount of the image blocks corresponding to the residual images kl' and kr' is determined according to the method of step S250.

[0114] In some embodiments, the weight value is an average value ZS' of the actual information amount of the image blocks in the B frame image and the two preceding and succeeding reference frames.

[0115] In some embodiments, the method for obtaining the original amount of information is: calculating the absolute value of the difference between the actual amount of information of the B frame image and the corresponding image blocks in the two previous and next reference frames as the information difference; calculating the absolute value of the difference between the information distribution direction values ​​of the B frame image and the corresponding matching image blocks in the two previous and next reference frames as the distribution difference; and taking the negative correlation mapping value of the product of the information difference and the distribution difference as the original amount of information YS of the image block.

[0116] In some embodiments, the calculation formula for the original information amount of the kth image block is: ; Wherein, Norm is the normalization function; is the real information amount of the image block corresponding to the residual image kl'; is the real information amount of the image block corresponding to the residual image kr'; is the information distribution direction value of the matching image block corresponding to the residual image kl'; is the information distribution direction value of the matching image block corresponding to the residual image kr'; c is the anti-zero coefficient.

[0117] In some embodiments, the original information amount may be a normalized value of the inverse of the product of the information difference and the distribution difference. In some embodiments, the original information amount may also be an exponential function value with a natural constant as the base and the inverse of the product of the information difference and the distribution difference as the exponent.

[0118] Finally, the original information amount is weighted by the weight value to obtain the residual information amount of the image block; that is, the weight value and the original information amount are multiplied, and the product obtained is used as the residual information amount CL of the image block.

[0119] Taking the residual region of the k-th image block in the B-frame image as an example, the calculation formula of the residual information amount of the k-th image block in the B-frame image is: CL=ZS'×YS.

[0120] Step S330 , analyzing the average amount of residual information of each image block in the B frame image to obtain the information content in the B frame image.

[0121] In order to avoid the situation where the information amount of individual image blocks is extremely large or small, the average information amount of the residual information amount of each image block in the B frame image is analyzed as the information content in the B frame image. In some embodiments, the average information amount of the residual information amount of each image block in the B frame image is used as the information content in the B frame image.

[0122] An embodiment of the present invention provides a short message encryption system based on 5G technology, the system comprising:

[0123] A frame structure division module is used to divide the video information of the video SMS to be sent into an IPB frame structure to obtain a P frame image and a B frame image;

[0124] A first determination module, used for comparing the P frame image with a corresponding reference frame to determine the information content in the P frame image;

[0125] A second determination module is used to compare the B frame image with the corresponding reference frame to determine the information content in the B frame image;

[0126] An inter-frame determination module, used for combining the information content of the P frame image and the B frame image to obtain the inter-frame information content of the video information of the video message;

[0127] The SMS encryption module is used to perform different levels of encryption on video SMS messages corresponding to different sizes of inter-frame information.

[0128] Optionally, the transmission medium may be a wired link, such as but not limited to coaxial cable, optical fiber, and digital subscriber line, or a wireless link, such as but not limited to Wireless Fidelity (WIFI), Bluetooth, and mobile device network.

[0129] It should be noted that: the device provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device is divided into different functional modules to complete all or part of the functions described above. In addition, the shopping guide device provided in the above embodiment and the image extension method embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0130] Figure 5 is a schematic diagram of the structure of a computer device provided by an embodiment of the present invention. Figure 5 As shown, the computer device 600 includes: a memory 610, a processor 620, and a computer program 630 stored in the memory 610 and running on the processor 620, wherein when the processor 620 executes the computer program 630, the computer device can execute any of the SMS encryption methods based on 5G technology introduced above.

[0131] In addition, an embodiment of the present invention also protects a device, which may include a memory and a processor, wherein the memory stores an executable program code, and the processor is used to call and execute the executable program code to execute the SMS encryption method based on 5G technology provided by an embodiment of the present invention.

[0132] The embodiment of the present invention can divide the functional modules of the device according to the above method example. For example, each functional module can be corresponded, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0133] In the case of dividing each module according to each function, the device may also include a signal uploading module, a determining module, an adjusting module, etc. It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, which will not be repeated here.

[0134] It should be understood that the device provided in the embodiment of the present invention is used to execute the above-mentioned SMS encryption method based on 5G technology, and therefore can achieve the same effect as the above-mentioned implementation method.

[0135] In the case of an integrated unit, the device may include a processing module and a storage module. When the device is applied to a device, the processing module may be used to control and manage the actions of the device. The storage module may be used to support the device to execute mutual program codes, etc. The processing module may be a processor or a controller, which may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of the present invention. The processor may also be a combination that implements a computing function, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module may be a memory.

[0136] In addition, the device provided in an embodiment of the present invention may specifically be a chip, a component or a module, and the chip may include a connected processor and a memory; wherein the memory is used to store instructions, and when the processor calls and executes the instructions, the chip can execute the SMS encryption method based on 5G technology provided in the above embodiment.

[0137] An embodiment of the present invention also provides a computer-readable storage medium, which stores a computer program code. When the computer program code runs on a computer, the computer executes the above-mentioned related method steps to implement the SMS encryption method based on 5G technology provided in the above embodiment.

[0138] An embodiment of the present invention also provides a computer program product. When the computer program product runs on a computer, it enables the computer to execute the above-mentioned related steps to implement the SMS encryption method based on 5G technology provided in the above embodiment.

[0139] Among them, the device, computer-readable storage medium, computer program product or chip provided in the embodiments of the present invention are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here. Through the description of the above implementation methods, technicians in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In the embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways.

[0140] The device embodiments described above are merely illustrative. For example, the division of modules or units is only a logical function division. There may be other divisions in actual implementation. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection of devices or units, which may be electrical, mechanical or other forms.

[0141] It should also be noted that, in this article, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0142] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0143] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

[0144] The above contents are only specific implementation modes of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be covered within the protection scope of the present invention.

Claims

1. A SMS encryption method based on 5G technology, characterized in that: The method comprises the following steps: Divide the video information of the video SMS to be sent into an IPB frame structure to obtain a P frame image and a B frame image; Compare the P frame image with the corresponding reference frame to determine the information content in the P frame image; Compare the B frame image with the corresponding reference frame to determine the information content in the B frame image; Combining the information content of the P frame image and the B frame image, the inter-frame information content of the video information of the video message is obtained; Different levels of encryption are applied to video messages corresponding to different sizes of inter-frame information; Among them, comparing the P frame image with the corresponding reference frame to determine the information content in the P frame image includes: obtaining image blocks in the P frame image and matching image blocks in the corresponding reference frame; performing residual analysis on the image blocks in the P frame image and the matching image blocks in the corresponding reference frame to obtain residual images of each image block in the P frame image; determining the information change amount of the image block corresponding to the residual image according to the residual value of each pixel point in the residual image; analyzing the performance consistency of the matching image blocks matching the image blocks in the P frame image in different directions to determine the information representation degree of the matching image blocks; combining the information change amount of the image blocks in the P frame image and the information representation degree of the matching image blocks in the corresponding reference frame to obtain the information content of the P frame image; Wherein, according to the residual value of each pixel in the residual image, determining the information change amount of the image block corresponding to the residual image includes: for each pixel in the residual image corresponding to the image block, calculating the average residual difference value and the minimum residual difference value of each pixel with the pixels in the neighborhood; using the negative correlation mapping value of the product value of the average residual difference value and the minimum residual difference value as the residual weight of the pixel; using the residual weight of each pixel as the weight value, weighted averaging the residual value of each pixel, and obtaining the information change amount of the image block corresponding to the residual image; Among them, analyzing the performance consistency of the matching image block that matches the image block in the P frame image in different directions to determine the information representation degree of the matching image block includes: obtaining the grayscale difference of the matching image block that matches the image block in the horizontal direction; obtaining the grayscale difference of the matching image block that matches the image block in the vertical direction; combining the grayscale differences in the horizontal direction and the vertical direction to determine the information representation degree of the matching image block.

2. The SMS encryption method based on 5G technology according to claim 1 is characterized in that: The step of determining the information change amount of the image block corresponding to the residual image according to the residual value of each pixel in the residual image includes: The overall level of the residual value of each image block in the residual image is analyzed to determine the information change amount of the image block corresponding to the residual image.

3. The SMS encryption method based on 5G technology according to claim 1 is characterized in that: The combining the information change amount of the image block in the P frame image and the information representation degree of the matching image block in the corresponding reference frame to obtain the information content of the P frame image includes: Taking the normalized value of the ratio of the information change amount of the image block to the information representation degree of the matching image block in the corresponding reference frame as the real information amount of the image block; The average information content of the real information content of each image block in the P frame image is analyzed to obtain the information content of the P frame image.

4. The SMS encryption method based on 5G technology according to claim 1 is characterized in that: The comparing the B frame image with the corresponding reference frame to determine the information content in the B frame image includes: For a B-frame image, according to the performance consistency of a matching image block that matches an image block in the B-frame image in different directions, an information distribution direction value of the matching image block is determined; The residual information amount of the image block is determined by combining the real information amount of the image block in the B frame image and the two previous and next reference frames and the information distribution direction value of the matching image block; The average information content of the residual information of each image block in the B frame image is analyzed to obtain the information content in the B frame image.

5. The SMS encryption method based on 5G technology according to claim 4 is characterized in that: The method of combining the real information amount of the image blocks in the B frame image and the two preceding and succeeding reference frames and the information distribution direction value of the matching image blocks to determine the residual information amount of the image blocks includes: The average amount of real information of the image blocks in the B frame image and the two previous and next reference frames is used as the weight value; The original information amount is determined by combining the difference in the actual information amount of the image blocks in the B frame image and the two previous and next reference frames, and the difference in the information distribution direction value of the matching image blocks in the B frame image and the two previous and next reference frames; The original information amount is weighted by the weight value to obtain the residual information amount of the image block.

6. The SMS encryption method based on 5G technology according to claim 4 is characterized in that: The combining of the information contents of the P frame image and the B frame image to obtain the inter-frame information amount of the video information of the video message includes: The average information content of the P frame image and the B frame image is calculated to obtain the inter-frame information content of the video information of the video message.

7. A short message encryption system based on 5G technology, characterized in that: The system is used to implement a text message encryption method based on 5G technology as described in any one of claims 1-6, and the system includes the following modules: A frame structure division module is used to divide the video information of the video SMS to be sent into an IPB frame structure to obtain a P frame image and a B frame image; A first determination module, used for comparing the P frame image with a corresponding reference frame to determine the information content in the P frame image; A second determination module is used to compare the B frame image with the corresponding reference frame to determine the information content in the B frame image; An inter-frame determination module, used for combining the information content of the P frame image and the B frame image to obtain the inter-frame information content of the video information of the video message; The SMS encryption module is used to perform different levels of encryption on video SMS messages corresponding to different sizes of inter-frame information.