Information processing method and device, electronic equipment and storage medium
Through layer combination and RGB value mapping relationship, information is written into the image, solving the problem of low image transmission efficiency and achieving the effect of improving information transmission efficiency under a fixed image size.
Patent Information
- Application Number
- CN202411115084.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-14
- Publication Date
- 2024-12-17
AI Technical Summary
In the prior art, due to the fixed image size during image transmission, the amount of text information is limited and the information transmission efficiency is low.
Through layer combination and RGB value mapping relationship, information is written into the image, and multi-layer information is transmitted using the image instead of directly transmitting information, improving information transmission efficiency.
It is realized that without changing the image size, the information transmission efficiency is improved, the amount of information carried by the image is increased, and the efficiency of information transmission is improved.
Smart Images

Figure CN119152080A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an information processing method, device, electronic device and storage medium. Background Art
[0002] With the development of information technology, information such as text and pictures can be transmitted through images. Usually, the size of an image is fixed, and the size of an image can include the length and width of the image, and the length and width of the image are in pixels. For example, the size of a general image can be 640*480, 1024*768, etc., where the units of 640 and 480 are both pixels.
[0003] When writing text into an image, the actual area of the text in the image is generally affected by the font type and the text size. That is, when the font type and the font size remain unchanged, the amount of text that can be written into an image is fixed.
[0004] From the above description, it can be seen that the amount of information that an image can carry is fixed. Without changing the image size, the amount of information transmitted by an image is small, resulting in low information transmission efficiency. Summary of the invention
[0005] The present application provides an information processing method, device, electronic device and storage medium, which can solve the technical problem of low information efficiency in single image transmission.
[0006] In a first aspect, the present application provides an information processing method, comprising:
[0007] Determining, according to the first information, the number of layers required for writing the first information into the first image;
[0008] Arrange and combine the number of the layers to determine the number of layer combinations;
[0009] Determine the RGB value of each layer combination according to the color level of each channel color in RGB;
[0010] Determining a layer identifier of the layer combination according to the RGB value of the layer combination;
[0011] Based on the layer identifier of the layer combination and the layer combination, based on the RGB value of each layer combination and the number of the layer combinations, a first mapping relationship between the layer identifier of the layer combination and the RGB value of the layer combination is constructed;
[0012] The first information is written into the first image according to the first mapping relationship.
[0013] In a second aspect, the present application provides an information processing method, comprising:
[0014] determining sub-information of each layer in the second image according to the second image and a second mapping relationship, wherein the second mapping relationship is used to represent a mapping relationship between a layer identifier of a layer combination and the layer combination;
[0015] Based on the sub-information of each of the layers, second information to be written into the second image is determined.
[0016] In a third aspect, the present application provides an information processing device, including:
[0017] A first determining unit, configured to determine, according to the first information, a layer required for writing the first information into the first image;
[0018] A layer combination unit, used for combining the layers to obtain a layer combination;
[0019] A second determining unit, used to determine the RGB value of the layer combination according to the color level of each channel color in RGB;
[0020] A third determining unit is used to determine the layer identifier of the layer combination according to the RGB value of the layer combination.
[0021] A relationship building unit, configured to build a first mapping relationship between the layer identifier and the layer combination based on the layer identifier of the layer combination and the layer combination;
[0022] An image writing unit is used to write the first information into the first image according to the first mapping relationship.
[0023] In a fourth aspect, the present application provides an information processing device, including:
[0024] A fifth determining unit, configured to determine sub-information of each layer in the second image according to the second image and a second mapping relationship, wherein the second mapping relationship is used to represent a mapping relationship between a layer identifier of a layer combination and the layer combination;
[0025] A sixth determining unit is used to determine the second information to be written into the second image based on the sub-information of each of the layers.
[0026] In a fifth aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;
[0027] The memory stores computer-executable instructions;
[0028] The processor executes the computer-executable instructions stored in the memory to implement the information processing method as shown in the first aspect or various possibilities of the first aspect.
[0029] In a sixth aspect, the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the information processing method as shown in the first aspect or various possibilities of the first aspect.
[0030] The technical solution provided by the present application can determine the layer required for writing the first information into the first image according to the first information, thereby combining the layers to obtain a layer combination, and the layer combination can refer to the combination of different first information. Afterwards, according to the color level of each channel color in RGB, the RGB value of the layer combination is determined, and the color setting of each layer combination is completed in a targeted manner, and then the RBG value of each layer combination can be associated with the layer combination. Afterwards, according to the RGB value of the layer combination, the layer identifier of the layer combination is determined, and the layer identifier of each layer combination can refer to the layer combination. Afterwards, a first mapping relationship can be constructed based on the layer identifier of the layer combination and the layer combination, and the association between the layer combination and the layer identifier is represented by the first mapping relationship. Afterwards, the first information can be written into the first image according to the first mapping relationship, and the first information can be transmitted using the first image. There is no need to perform direct transmission of the first information, and the transmission of the first information can be completed only through the first image. The transmission efficiency of information can be effectively improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0032] Figure 1 An example diagram of image writing provided by an embodiment of the present application;
[0033] Figure 2 An example diagram of an information processing system provided in an embodiment of the present application;
[0034] Figure 3 A flow chart of an information processing method provided in an embodiment of the present application;
[0035] Figure 4 An example diagram of an application of an information processing method provided in an embodiment of the present application;
[0036] Figure 5 An example diagram of a first image provided in an embodiment of the present application;
[0037] Figure 6 An example diagram of another first image provided in an embodiment of the present application;
[0038] Figure 7 Another flow chart of an information processing method provided in an embodiment of the present application;
[0039] Figure 8 An example diagram of an application of an information processing method provided in an embodiment of the present application;
[0040] Fig. 9 A schematic diagram of the structure of an embodiment of an information processing device provided in an embodiment of the present application;
[0041] Fig.10 A structural diagram of another embodiment of an information processing device provided in an embodiment of the present application;
[0042] Fig.11 The hardware structure block diagram of an electronic device shown in an embodiment of the present application.
[0043] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0044] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0045] The technical solution of the present application can be applied to information transmission scenarios. By combining layers and determining the RGB values and layer identifiers of each layer combination, a first mapping relationship is constructed through layer identifiers and layer combinations, so that the first mapping relationship can participate in the process of writing the first information into the first image. By transmitting the first image instead of the first information, more first information can be transmitted in the image at one time, effectively improving the efficiency of information transmission.
[0046] In the related art, when using images to transmit text, images are generally used for information transmission. For example, text can generally be written into an image, and the image with the written text is transmitted to the target terminal. The target terminal can recognize the text in the image through a text recognition algorithm. When writing text into an image, it is generally affected by the font, font size, and image size. However, once the font, font size, and image size are fixed, the number of characters that can be written into the image is fixed. Figure 1 An example of image writing is shown, where the image size is 50 pixels in width 10 and 50 pixels in height 102, that is, the image size is 50*50. Assuming that a character occupies a 5*5 pixel area, a maximum of 25 characters can be written into an image. Therefore, the number of characters that an image can carry is certain. Without modifying the image size, the amount of information transmitted by an image is small, resulting in low information transmission efficiency.
[0047] In order to solve the above technical problems, it is considered to use a layer combination method to compress N images into one image. However, if the pixels of each of the N images are directly superimposed, subsequent decoding is difficult, and N images cannot be decoded from the compressed image. In order to solve the technical problems existing in the simultaneous compression of multiple images, the present application can determine the layer required for writing the first information into the first image according to the first information, so as to combine the layers to obtain a layer combination, and the layer combination can refer to the combination of different first information. Afterwards, according to the color level of each channel color in RGB, the RGB value of the layer combination is determined, and the color setting of each layer combination is completed in a targeted manner, so that the RBG value of each layer combination can be associated with the layer combination. Afterwards, according to the RGB value of the layer combination, the layer identifier of the layer combination is determined, and the layer identifier of each layer combination can refer to the layer combination. Afterwards, a first mapping relationship can be constructed based on the layer identifier of the layer combination and the layer combination, and the association between the layer combination and the layer identifier is represented by the first mapping relationship. Afterwards, the first information can be written into the first image according to the first mapping relationship, so as to realize the transmission of the first information using the first image, without the need to perform direct transmission of the first information, and the transmission of the first information can be completed only through the first image. It can effectively improve the efficiency of information transmission.
[0048] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0049] The information processing method provided in the present application can be executed by an electronic device, which can be a terminal or a server. The terminal can include a mobile phone, a notebook device, an intelligent interactive device, an intelligent wearable device, and a vehicle-mounted terminal, etc. The server can be an independent physical server, a server cluster composed of multiple servers, or a cloud server capable of cloud computing.
[0050] like Figure 2 FIG. 1 is an example diagram of an information processing system provided by an embodiment of the present application. Figure 2The information processing system shown may include a source terminal 10 and a target terminal 20 .
[0051] The source terminal 10 can be configured with the information processing method of the present application, write the first information into the first image according to the first mapping relationship, and send the first image and the first mapping relationship to the target terminal 20.
[0052] The target terminal 20 can determine the sub-information of each layer in the second image based on the second image and the second mapping relationship, where the second mapping relationship is used to represent the mapping relationship between the layer identifier of the layer combination and the RGB value of the layer combination; based on the sub-information of each layer, determine the second information written into the second image.
[0053] Each source terminal 10 transmits the sub-information first image and the first mapping relationship to the target terminal 20 at one time, so that the target terminal 20 can obtain the second information that the terminal wants to transmit according to the second image and the second mapping relationship sent by one of the terminals. This effectively increases the amount of information transmitted in a single image and improves the efficiency of information transmission.
[0054] Figure 3 The flowchart of an information processing method provided in an embodiment of the present application can be configured as an information processing device, which can be located in a source terminal. The above method can include the following steps:
[0055] S301. Determine, according to first information, a layer required for writing the first information into a first image.
[0056] Optionally, the first information may be information that the source terminal needs to send to the target terminal. The first information may specifically include sub-information corresponding to one or more layers. The layer corresponding to the first information may refer to the layer corresponding to one or more images where the first information is located. That is, the layers required for the first information may include one or more, and the information of the first information in each layer may be referred to as sub-information of the first information in each layer.
[0057] For example, assume that the first information includes information in image 1, image 2, and image 3. The layers required for writing the first information into the first image include: layer 1 corresponding to image 1, layer 2 corresponding to image 2, and layer 3 corresponding to image 3.
[0058] For example, assuming that the first information includes information in an image, in this case, the image corresponding to the first information is a layer.
[0059] Optionally, the first information may include one or more layers, and step 301 may include: determining at least one layer required for writing at least one first information into the first image according to at least one first information, wherein the first information may correspond to one or more layers.
[0060] Optionally, the first information may be multimedia content such as text, pictures, characters, images, etc. carried in the image.
[0061] Furthermore, before executing step 301, the method may further include:
[0062] In response to a trigger operation performed by a user through a transmission control on an information transmission page, obtaining first information input by a user;
[0063] The technical solution of the present disclosure can collect the first information in real time by interacting with the user, so that the first information input by the user can be transmitted in large quantities at one time through the first image, thereby improving the efficiency of information transmission.
[0064] S302: Combine the layers to obtain a layer combination.
[0065] Optionally, step 302 may include: combining at least one layer to obtain at least one layer combination. Taking n layers as an example, N layers may be combined to obtain at least one layer combination, where n is a positive integer and the calculation formula of the layer combination is: C(n,m)=n! / (nm)! *m! , where m is the number of superimposed layers. Further, the layer combination step may specifically include: selecting one or more layers from at least one layer to combine, and obtaining a layer combination formed by the one or more layers selected this time.
[0066] Furthermore, the step of combining layers can be performed multiple times to obtain multiple layer combinations.
[0067] Furthermore, an enumeration algorithm or an exhaustive algorithm may be used to combine at least one layer to obtain at least one layer combination. Specifically, the at least one layer combination obtained after the combination is completed may include all possible combinations of N layers.
[0068] By performing layer combination through an enumeration algorithm or an exhaustive algorithm, the complete implementation of the layer combination can be achieved, and writing failure or information omission caused by the non-existence of the layer combination when writing the first information into the first image can be avoided.
[0069] Alternatively, taking n as 4 as an example, the layer combinations when m=1, m=2, m=3, and m=4 are calculated respectively, and then the sum is obtained to obtain all the layer combinations.
[0070] If 1 layer is superimposed, there are 4 combinations of layers.
[0071] If two layers are superimposed, using the formula C(4,2)=4! / (4-2)!*2!, we can calculate that there are 6 combinations of layers.
[0072] If three layers are superimposed, using the formula C(4,3)=4! / (4-3)!*3!, we can calculate that there are 4 combinations of layers.
[0073] How many combinations are there if 4 layers are stacked (m=4)? Using the formula C(4,4)=4! / (4-4)! *4!, we can calculate that there is 1 combination of layers. Therefore, there are 4+6+4+1=15 combinations of all the layers.
[0074] S303: Determine the RGB value of the layer combination according to the color level of each channel color in RGB.
[0075] Optionally, RGB refers to a color space of three channel colors R, G, and B, wherein the value range of R (Red) is (0-255), the value range of G (Green) is (0-255), and the value range of B (Blue) is (0-255).
[0076] In some embodiments, the RGB value of a layer combination may refer to a numerical value formed by the values selected for the layer combination in the R channel, the G channel, and the B channel. For example, if the R value is 13, the G value is 48, and the B value is 125, then the RGB value is 013048125. The RGB value of each layer combination is unique, that is, the RGB values of different layer combinations are different.
[0077] In some embodiments, step 303 may include: determining the target color level of each color channel according to the color level of each channel color in RGB, determining the target value corresponding to each color channel at its target color level according to the pixel value range corresponding to the target color level of each color channel, and determining the target value of the R color channel, the target value of the G color channel, and the target value of the B color channel as the RGB value of the layer combination.
[0078] S304: Determine a layer identifier of the layer combination according to the RGB value of the layer combination.
[0079] Optionally, step 304 may include: concatenating the target values corresponding to each channel color to obtain a layer identifier of each layer combination.
[0080] In some embodiments, the target values corresponding to the three channel colors are spliced to obtain the layer identifier corresponding to the layer combination. In the process of generating the layer identifier, the target value of each channel color can be padded with the same number of characters. For example, each channel color uses three characters to represent the corresponding target value. When the target value is not 3 characters, 0 can be used in front of the target value to padded. For example, 10 can be padded to 010. For example, the RGB value of layer combination 1 is: R(10)G(20)B(40), and the layer identifier obtained by layer combination 1 is "010020040".
[0081] S305: Based on the layer identifier of the layer combination and the layer combination, construct a first mapping relationship between the layer identifier and the layer combination.
[0082] Optionally, a layer combination may include one or more layers. The first mapping relationship may include a mapping relationship between a layer identifier of each layer combination and an RGB value of the layer combination.
[0083] For example, assuming that a layer combination includes layer 1, layer 2 and layer 3, the RGB value of the layer combination is "010020040", the RGB value of layer 1, the RGB value of layer 2 and the RGB value of layer 3 can be concatenated to obtain the layer identifier of the layer combination, and a mapping relationship is established between the layer identifier of the layer combination and "010020040".
[0084] S306: Write the first information into the first image according to the first mapping relationship.
[0085] Optionally, the first information is written into the first image in units of pixels according to the first mapping relationship. Specifically, the layer combination corresponding to each pixel of the first information in the first image may be determined, and the RGB value of the layer combination corresponding to each pixel may be drawn into the first image.
[0086] In the embodiment of the present application, the layer required for writing the first information into the first image is first determined, and then the layers are combined to obtain a layer combination. Then, RGB values and layer identifiers are set for each layer combination, thereby establishing an association relationship between the RGB values and layer identifiers of the layer combination, so that the first mapping relationship is obtained by associating the RGB values and layer identifiers of each layer combination. The first information can be written into the first image using RGB values and layer identifiers, which effectively improves the information carrying capacity of the first image and improves the efficiency of information transmission.
[0087] As an optional implementation, before determining the RGB value of the layer combination according to the color level of each channel color in RGB, the method further includes:
[0088] The value range of each channel color is divided according to the preset value to obtain the color level corresponding to each channel color.
[0089] Optionally, the color level corresponding to each channel color may include one or more. Specifically, the color level of each channel color may refer to the color level obtained by dividing the value of each channel color. Each color level corresponds to a color level range. The color level range may refer to the pixel value range corresponding to the channel color at a certain level.
[0090] For example, each channel color can be divided into 1 level with every 15 color values (this value is variable, but must be an integer multiple of 5), and the three channel colors of R, G, and B can be divided into 17 levels (255 / 15=17). For example: the 1-15 color values of R are the pixel value range of level 1, 16-30 are the pixel value range of level 2, and so on, 238-255 are the pixel value range of level 17. Of course, each pixel value range can be represented by its level identifier, which can make it easier to reference the pixel value ranges of each level.
[0091] After completing the level division of each channel color, the corresponding target pixel value range can be determined for each layer combination in the three channel colors, and then a value is selected from the target pixel value range of each channel color as the target value. For example, assuming R is level 2, any color value can be selected from the color values of 16-30, such as 18 as the target value of R.
[0092] Since three channel colors are used, each channel color corresponds to the total number of corresponding monochrome levels, and the total number of monochrome levels is the number of pixel value ranges of multiple pixel value ranges of each channel color. At this time, the total number of color levels of the layer combination can include: the total number of monochrome levels of R * the total number of monochrome levels of G * the total number of monochrome levels of B. Taking the total number of single-layer levels of RGB as 17 as an example, the total number of three-color levels can be 17*17*17=4913.
[0093] In the embodiment of the present application, by dividing the range for each color layer, and then selecting the color values for the three channel colors, the range selection can be performed first and then the value selection can be performed from the range. Through color grading, in the process of selecting RGB values for each layer combination, the color range selection can be performed first, and then the specific color selection can be performed. It can avoid the phenomenon that the color distinction is difficult due to the color values of the three color layers of the two layer combinations being too similar, making the information compression and decompression process more accurate.
[0094] In an optional implementation, determining the layer identifier of the layer combination according to the RGB value of the layer combination may include:
[0095] If the layer combination includes one layer, the RGB value of the layer is determined as the layer identifier of the layer combination;
[0096] If the layer combination includes more than two layers, the RGB values of all the layers in the layer combination are concatenated, and the concatenated RGB value is determined as the layer identifier of the layer combination.
[0097] Optionally, for a single layer in a layer combination, each layer may be set with an RGB value, that is, for a scene containing only one layer, the RBG value of the layer is the layer identifier of the layer combination.
[0098] Optionally, after obtaining the layer identifier of each layer combination, a first mapping relationship may be constructed according to the RGB value and layer identifier of each layer combination, which may specifically include converting the layer identifier and RGB value corresponding to each layer combination into the association information of each layer combination according to a preset association format.
[0099] The associated information may include: the RGB value of the layer combination + the concatenation of the RGB values of all layers in the layer combination.
[0100] Taking four layer combinations as an example, examples of first-order mapping relationships corresponding to each layer combination are described in detail.
[0101] For example, the RGB value of Layer Combination 1 is: R(10)G(20)B(40)
[0102] The RGB value of layer combination 2 is: R(20)G(40)B(40)
[0103] The RGB value of layer combination 3 is: R(40)G(120)B(140)
[0104] The RGB value of layer combination 4 is: R(140)G(20)B(10)
[0105] The RGB value of layer combination 5 is: R(240)G(220)B(240)
[0106] The RGB values of layer combination 6 are: R(40)G(20)B(70)
[0107] Until the RGB value of layer combination 15 is: R(210)G(220)B(240).
[0108] The layer combinations 1-15 are not illustrated one by one here, and the color values of the three channels of some layer combinations are not shown.
[0109] Assume that layer combination 1 includes Figure 5 Layer combination 1 and layer combination 2 include Figure 5Layer combination 2 and layer combination 3 include Figure 5 Layer combination of the middle 3 layers, layer combination 3 includes Figure 5 Layer combination of 3 layers, layer combination 4 includes Figure 5 Layer 1 and 2 have their own layer combinations, and layer combination 6 includes Figure 5 The layer combinations of layer 1 and layer 3 are included in the layer combination 15, until the layer combination 15 includes the layer combinations of layer 1, layer 2, layer 3 and layer 4.
[0110] The color values of the three channels are concatenated as RGB values. Each color value occupies three character bits, and the insufficient character bits are padded with zeros.
[0111] The RGB value of Layer Combination 1 is "010020040", and the RGB value of Layer 1 is also "010020040".
[0112] The RGB value of Layer Combination 2 is "020040040", and the RGB value of Layer 2 is also "020040040".
[0113] The RGB value of layer combination 3 is "040120140", and the RGB value of layer 3 is also "040120140".
[0114] The RGB value of layer combination 4 is "140020010", and the RGB value of layer 4 is also "140020010".
[0115] The RGB value of layer combination 5 is "240220240". Layer combination 5 includes layers 1 and 2, respectively. Therefore, the RGB value "010020040" of layer 1 and the RGB value "020040040" of layer 2 can be concatenated to form the layer identifier of layer combination 5, that is, the layer identifier "240220240+010020040" of layer 5 can be combined with the RGB value "020040040" of layer 5 to form the associated information of layer combination 5. For example, the associated information can be expressed by the equation: 240220240=010020040+020040040.
[0116] Correspondingly, the RGB value of layer combination 6 is "040020070". Layer combination 6 includes the layer combinations of layer 1 and layer 3, so the RGB value "010020040" of layer 1 and the RGB value "040120140" of layer 3 can be concatenated to form the layer identifier of layer combination 6, that is, the layer identifier "040020070+010020040" of layer 6 can be combined with the RGB value "040120140" of layer 6 to form the association information of layer combination 6. For example, the association information can be expressed by the equation: 040020070=010020040+040120140.
[0117] Accordingly, the RGB value of layer combination 15 is "210220240". Layer combination 15 contains the layer combinations of layers 1, 2, 3 and 4, and the RGB value of layer 1 "010020040", the RGB value of layer 2 "020040040", the RGB value of layer 3 "040120140" and the RGB value of layer 4 "140020010" are concatenated to form the layer identification of combination 15. The associated information of combination 15 can be used using the equation:
[0118] 210220240=010020040+020040040+040120140+140020010. Among them, "210220240" is the RGB value of combination 15, and "010020040+020040040+040120140+140020010" is the layer identifier of combination 15.
[0119] Optionally, the first mapping relationship may include association information corresponding to at least one layer combination. The association information may include the RGB value of each layer combination and the RGB value corresponding to each layer of each layer combination.
[0120] Furthermore, the association information corresponding to at least one layer combination may be spliced to obtain a first mapping relationship. The association information obtained in the above example is spliced to obtain the first mapping relationship, for example:
[0121] 010020040,020040040,040120140,140020010,240220240=010020040+020040040,040020070=010020040+040120140,……210220240=010020040+020040040+040120140+140020010.
[0122] In the technical solution disclosed in the present invention, for a layer combination including a single layer, the RGB value of the layer combination can be directly determined as the layer identifier of the layer combination; for a layer combination including multiple layers, the RGB values corresponding to each single layer in the layer combination can be determined as the layer identifier, so that the layer identifier has different layer identifier setting methods according to the number of layers, so that the first mapping relationship can include both the layer identifier of the layer combination and the layers of each layer combination, thereby realizing effective mapping of the first mapping relationship using the layer identifier.
[0123] Further, based on any of the above embodiments, writing the first information into the first image according to the first mapping relationship includes:
[0124] Determine, according to the first information, sub-information corresponding to each layer in the layer required for the first information;
[0125] According to the sub-information corresponding to each layer, determine the RGB value of the layer combination corresponding to each pixel in each layer;
[0126] The first information is written into the first image according to the RGB value of the layer combination corresponding to each pixel point in each layer and the first mapping relationship.
[0127] Optionally, the first information may require multiple layers, and the information corresponding to each layer of the first information may be sub-information corresponding to each layer of the first information. The first information may include sub-information corresponding to multiple layers respectively.
[0128] Optionally, determining the RGB value of the layer combination corresponding to each pixel in each layer according to the sub-information corresponding to each layer may include: for a first pixel (the first pixel is, for example, any pixel or each pixel in the first image), obtaining a first layer in multiple layers having sub-information at the first pixel, determining the first layer combination corresponding to the first pixel according to the first layer having sub-information at the first pixel, querying the RGB value corresponding to the first layer combination in the first mapping relationship, and determining the RGB value of the first layer combination as the RGB value of the first pixel in the first image. The RGB value corresponding to each first pixel may be drawn into the first image.
[0129] The first layer having sub-information at the first pixel point among the multiple layers may mean that, for any layer, if the layer has sub-information at the first pixel point, the layer is determined to be the first layer, and if the layer does not have sub-information at the first pixel point, the layer is determined not to be the first layer.
[0130] The existence of sub-information of the first layer at the first pixel point may specifically mean that the sub-information corresponding to the first layer is not empty at the same pixel position of the first pixel point. If the sub-information corresponding to the first layer is empty at the first pixel point, it is determined that the sub-information of the first layer does not exist at the same pixel position of the first pixel point. Taking the first pixel point as (1,20) as an example, if the pixel value of the first layer at (1,20) is 20, then the first layer at (1,20) is not empty; if the pixel value of the first layer at (1,20) is 0, then the first layer at (1,20) is empty.
[0131] For each pixel, the RGB value corresponding to the layer combination associated with each pixel can be drawn on each pixel, and the first image can be obtained after all the pixels are drawn.
[0132] In the embodiment of the present application, when writing the first information into the first image, the sub-information corresponding to each layer in the layer required by the first information can be determined first, and then the RGB value of the layer combination corresponding to each pixel in each layer can be determined based on the sub-information corresponding to each layer, so as to obtain the layer combination corresponding to each pixel and establish the association between the pixel and the layer combination. Then, the first information can be written into the first image based on the RGB value of the layer combination corresponding to each pixel in each layer and the first mapping relationship, so that the RGB value of the layer combination corresponding to each pixel is drawn into the first image, so as to accurately write the first information and improve the first image so that more information is carried.
[0133] Further, based on any of the above embodiments, writing the first information into the first image according to the RGB value of each pixel in each layer and the first mapping relationship includes:
[0134] Determine a layer identifier for each pixel in each layer according to the first mapping relationship and the RGB value of the layer combination corresponding to each pixel in each layer;
[0135] The first information is written into the first image according to the layer identifier of each pixel in each layer.
[0136] Optionally, writing the first information into the first image according to the layer identifier of each pixel in each layer may include: determining the layer combination corresponding to the layer identifier corresponding to each pixel according to the layer identifier of each pixel in each layer to obtain the RGB value of the layer combination of each pixel; determining the first image corresponding to the first information according to the RGB value of the layer combination of each pixel. In order to facilitate understanding of the technical solution of the present application, Figure 4 This is an example diagram of an information processing method shown in the present application.
[0137] Assume there are 4 Figure 1In the illustrated layers, the first information may include sub-information carried by four layers respectively, and the image size of each layer is still 50*50. Each layer can be written with 25 characters. The hierarchical order of the four layers is from bottom to top, with the bottom layer being layer 1 and the top layer being layer 4. Of course, this hierarchical order is only exemplary.
[0138] like Figure 4 As shown, the first character of the 4th layer is written as "H" 401, the first character of the 3rd layer is written as "V" 402, the first character of the 2nd layer is written as "L" 403, and the first character of the 3rd layer is written as "A" 404.
[0139] By exhaustively combining the four layers, we can get 15 layer combinations. Use 1, 2, 3, and 4 to represent the level of each layer. The following is a detailed description of the layer combination example.
[0140] If there is a layer superposition, there are 4 layer combinations: 1 layer, 2 layers, 3 layers and 4 layers.
[0141] If two layers are superimposed, there are 6 layer combinations: 1 and 2, 1 and 3, 1 and 4, 2 and 3, 2 and 4, 3 and 4.
[0142] If there are three layers superimposed, there are four layer combinations: 123, 124, 234, and 134.
[0143] If there are four layers superimposed, there is 1 layer combination.
[0144] In summary, the number of layer combinations is: 4+6+4+1=15 layer combinations.
[0145] Each layer combination sets a corresponding RGB value, and the first mapping relationship may include the RGB value corresponding to each layer combination and a layer identifier.
[0146] Therefore, it is assumed that a layer with the same size as the image of the combination of the four layers is established. The 5*5th pixel in the upper left corner of the layer can be used as the writing area of "H" 401, "V" 402, "L" 403 and "A" 404. In order to distinguish whether the pixel carries the first information, such as Figure 4 As shown, it is assumed that the first pixel point carrying the sub-information of the first information is black, and the second pixel point not carrying the sub-information is white.
[0147] Exemplarily, the relevant scheme is described in detail by taking the pixel point corresponding to the pixel coordinate (1,1) as the first pixel point. Specifically, the pixel point 4011 with the pixel coordinate (1,1) of the first pixel point can be read from the 4th layer, the pixel point 4021 with the pixel coordinate (1,1) of the first pixel point can be read from the 3rd layer, the pixel point 4031 with the pixel coordinate (1,1) of the first pixel point can be read from the 2nd layer, and the pixel point 4041 with the pixel coordinate (1,1) of the first pixel point can be read from the 1st layer.
[0148] Among pixel 4011, pixel 4021, pixel 4031 and pixel 4041, only pixel 4021 is the first pixel carrying sub-information. The layer combination where the first pixel 4021 is located is the third layer, so the third layer is determined to be the layer combination corresponding to the first pixel (1,1). The layer combination is associated with RGB value 1, so RGB value 1 is rendered to the pixel coordinate (1,1) of the first pixel.
[0149] Exemplarily, the pixel point corresponding to the pixel coordinate (5, 4) is another first pixel point as an example, and the relevant scheme is described again. Specifically, the pixel point 4012 with the same pixel coordinate (5, 4) as the first pixel point can be read from the 4th layer layer combination, the pixel point 4022 with the same pixel coordinate (5, 4) as the first pixel point can be read from the 3rd layer layer combination, the pixel point 4032 with the same pixel coordinate (5, 4) as the first pixel point can be read from the 2nd layer layer combination, and the pixel point 4042 with the same pixel coordinate (5, 4) as the first pixel point can be read from the 1st layer layer combination.
[0150] Among pixel 4012, pixel 4022, pixel 4032 and pixel 4042, pixel 4032 and pixel 4042 are the first pixel points carrying sub-information. The layer combination where the first pixel 4032 is located is layer 2, and the layer combination where the first pixel 4042 is located is layer 1, so layer 2 and layer 1 are determined as the target layer combination corresponding to the first pixel (5, 4). The layer combination is associated with RGB value 2, so RGB value 3 is rendered to the pixel coordinates (5, 4) of the first pixel point.
[0151] certainly, Figure 4 The 402 shown in the figure is the writing area of the first character in the first image. The writing methods of other writing areas can refer to the above description and will not be repeated here.
[0152] Further, based on any of the above embodiments, when the source terminal executes the information processing method, the information processing method further includes the following steps:
[0153] The first mapping relationship and the first image are sent to a target terminal, so that the target terminal acquires the first information carried in the first image according to the first mapping relationship.
[0154] Optionally, sending the first mapping relationship and the first image to the target terminal may include: sending the first mapping relationship to the target terminal through a first sending mode, and sending the first image to the target terminal through a second sending mode. The first sending mode may, for example, refer to any one of image transmission, plug-in transmission, or storage address transmission, which is not particularly limited in this embodiment. The second sending mode may, for example, refer to a channel transmission mode or a data transmission mode. Specifically, the first image may be converted into a data message, and the data message may be sent to the target terminal.
[0155] Optionally, sending the first mapping relationship to the target terminal includes:
[0156] The first mapping relationship is written into the first image, and the first image is sent to the target terminal.
[0157] Alternatively, the first mapping relationship is encoded into a plug-in, and the plug-in is sent to the target terminal, so that the target terminal reads the first mapping relationship from the plug-in.
[0158] Alternatively, the first mapping relationship is stored in a predetermined storage space, and a read address of the storage space is provided to the target terminal, so that the target terminal reads the first mapping relationship from the storage space.
[0159] Optionally, sending the first mapping relationship to the target terminal further includes: encrypting the first mapping relationship to obtain an encrypted first mapping relationship, and sending the encrypted first mapping relationship to the target terminal.
[0160] Optionally, writing the first mapping relationship into the first image and sending the first image to the target terminal may include: writing the first mapping relationship into a first area of the first image, and a second area of the first image is used to carry the first information. For the specific writing embodiment, reference may be made to the description of the relevant embodiment, which will not be repeated here.
[0161] Optionally, encoding the first mapping relationship into a plug-in may include: editing and packaging the first mapping relationship to obtain a plug-in after packaging, wherein the plug-in has a calling interface. The plug-in may refer to an SDK (Software Development Kit).
[0162] Optionally, the reserved storage space may refer to any one of a reserved physical hard disk storage space and a cloud storage space.
[0163] In the technical solution of the present disclosure, a method of transmitting color level information by means of images, plug-ins or storage is provided, which can enrich the transmission methods of the first mapping relationship and improve the transmission success rate of the first mapping relationship.
[0164] As described above, the first image can be used to carry the first information. The area of the first layer carrying the first information is variable. Figure 5 As shown in the example of a first image, the edge portion 501 of the first image 500 is drawn with lace, and the middle portion area can be used to carry the first information. Therefore, it is necessary to first determine the area 502 in the first image used to carry the first information.
[0165] Furthermore, before executing step 306, the method may further include:
[0166] At least one information bearing area in the first image that meets the information bearing condition is identified, and the number of the at least one information bearing area is greater than or equal to the number of images in the N layer combinations. The N layer combinations are layer combinations corresponding to each sub-information of the first information.
[0167] An information bearing area is allocated to each layer combination to obtain information bearing areas corresponding to N layer combinations respectively, and the sub-information carried by the layer combination is located in the information bearing area allocated to it.
[0168] Combining at least one layer combination in the same information bearing area to obtain at least one layer combination;
[0169] Based on the area color of each information bearing area, the RGB value of at least one layer combination in each information bearing area is determined.
[0170] It should be noted that the information bearing area of the present application may include one or more. The corresponding relationship between the information bearing area and the layer combination may be a one-to-one, one-to-many or many-to-one relationship.
[0171] When the information bearing area includes one, different layer combinations can be allocated to the one information bearing area.
[0172] Figure 5 The middle part 501 is an information carrying area.
[0173] In order to enable the information of at least one layer combination in the same information bearing area to be loaded according to the technical solution of the present disclosure, the image shape and size of the at least one layer combination can be adjusted to be the same as the information bearing area where it is located.
[0174] Furthermore, in the case where there is only one information bearing area, if N layer combinations are allocated to the same information bearing area, and the information bearing area is smaller than the image size of the layer combination, the layer combination is reduced, and the reduction strategy is that the size and shape of the reduced layer combination are the same as the size and shape of the information bearing area. Furthermore, a blank area image can be generated according to the size and shape of each information bearing area, the font in the layer combination is reduced, and the reduced font is written into the blank area image to obtain a new layer combination.
[0175] Furthermore, in the case where there is only one information bearing area, if N layer combinations are assigned to the same information bearing area, and the information bearing area is smaller than the image size of the layer combination, the image information of the layer combination is cropped to obtain a local image with the same size and shape as the information bearing area, and the local image is used as a new layer combination.
[0176] In addition, the information bearing area may include multiple ones. Figure 6 Another example of a first image is shown, and the first image may be a pie chart, in which the annular area is divided into several annular areas, namely information bearing areas 601-605. At this time, each information bearing area may carry one or N layer combinations, and the layer combination may only have sub-information in the image area corresponding to the information bearing area. Taking the information bearing area 601 as an example, for the layer combination 607, sub-information may be set in the area 606 of the same shape and size as the information bearing area 601. Of course, the information bearing area 601 may be assigned one or N layer combinations, and no further limitation is made here.
[0177] Optionally, if there are multiple information carrying areas and a layer combination is divided into the multiple information carrying areas, and the multiple information carrying areas do not overlap, the layer combination can be cropped according to the respective sizes and shapes of the multiple information carrying areas to obtain a new layer combination corresponding to each information carrying area.
[0178] Optionally, if there are multiple information carrying areas, and a layer combination is divided into the multiple information carrying areas, and the multiple information carrying areas do not overlap, it is also possible to identify text information in the layer combination, and divide the text information according to the number of areas of the multiple information carrying areas, obtain the text sub-information to be transmitted by each information carrying area, write the text sub-information to be transmitted by each information carrying area into the corresponding information carrying area, and obtain the first image.
[0179] Optionally, the multiple first pixel points participating in information carrying in the first image may be pixel points in each information carrying area of at least one information carrying area in the first image.
[0180] Furthermore, determining multiple first pixel points participating in information carrying in the first image may include: based on at least one information carrying area in the first image, determining all pixel points located in at least one information carrying area as first pixel points, and obtaining multiple first pixel points participating in information carrying in the first image.
[0181] In the technical solution disclosed in the present invention, before the first image carries the respective sub-information of N layer combinations, the area that can carry the sub-information can be identified from the first image, and at least one information-carrying area corresponding to the first image can be obtained, so as to realize the division of the information-carrying area in the first image. Afterwards, a corresponding information-carrying area can be allocated to each layer combination, so that each information-carrying area can carry one or N layer combinations, so as to realize batch multiplexing of the information-carrying area, improve the utilization rate of the first image, and further improve the information carrying capacity of the first image.
[0182] Further, based on the area color of each information bearing area, determining the RGB value of at least one layer combination in each information bearing area includes:
[0183] The regional color of each information bearing area is read, and the regional color includes the regional color values corresponding to the three channel colors respectively.
[0184] According to the color adjustment threshold, the color values of the regions corresponding to the three channel colors of each layer combination are adjusted to obtain the target color values corresponding to the three channel colors of each layer combination.
[0185] Based on the target color values corresponding to the three channel colors of each layer combination, the RGB value of each layer combination is determined.
[0186] Optionally, the color adjustment threshold can be set according to usage requirements, and the color adjustment threshold can include color thresholds of M channel colors, where M is a positive integer greater than or equal to 1 and less than or equal to 3. That is, M can be 1, 2, or 3. For example, when M is 1, the color adjustment threshold includes the color threshold of one channel color among the three channel colors.
[0187] Exemplarily, assuming that the color adjustment threshold includes the color threshold of the G channel color among the three channel colors, and the color threshold is 2, the color value of the G channel color in the regional color of the information carrying area can be adjusted by two values. Specifically, it can be added by 2 or subtracted by 2 without exceeding the channel color value range. This embodiment does not impose too many restrictions on this.
[0188] That is, assuming that the RGB value of the regional color of the information carrying area is (255, 255, 255), after adjustment according to the color threshold 2 of the G channel color, the RGB value of a layer combination in the information carrying area is (255, 253, 255).
[0189] In the technical solution disclosed in the present invention, when determining the respective RGB values of at least one layer combination in each information-bearing area, corresponding RGB values can be set for each layer combination in the information-bearing area according to the regional color of the information-bearing area, so that the transmission color of each layer combination is close to the information-bearing area, and the change of the corresponding RGB value of each layer combination has a small effect on the color in the information-bearing area, and the human eye is not sensitive to the color change in the information-bearing area, so as to achieve the reuse of at least one information-bearing area in the existing first image to carry the respective sub-information of N layer combinations, thereby improving the image with richer information and improving the efficiency of information transmission.
[0190] Figure 7 The flowchart of an information processing method provided in an embodiment of the present application can be configured as an information processing device, which can be located in a target terminal. The above method can include the following steps:
[0191] S701. Determine sub-information of each layer in the second image according to a second image and a second mapping relationship, where the second mapping relationship is used to represent a mapping relationship between a layer identifier of a layer combination and the layer combination.
[0192] Optionally, before step 701, the method may further include: receiving first images and first mapping relationships sent by each source terminal. The second image is any one of the first images. The second mapping relationship is any one of the first mapping relationships.
[0193] Optionally, step 701 may include: determining, according to the second mapping information, a layer identifier associated with the RGB value corresponding to each pixel in the second image. According to the layer identifier associated with each pixel in the second image, determining the layer associated with each pixel, determining the RGB value of the layer associated with each pixel as the RGB value of the layer at the same position of the pixel, and determining the sub-information carried by each layer according to the RGB value of each pixel of each layer.
[0194] Specifically, the image corresponding to each layer can be drawn according to the RGB value of each pixel of each layer, and the image of each layer can be subjected to text recognition processing to obtain the sub-information carried by each layer. The text recognition processing can be a known text recognition algorithm, which is not limited in this embodiment.
[0195] S702: Determine second information to be written into a second image based on the sub-information of each layer.
[0196] Optionally, step 701 may include: splicing the sub-information of each layer to obtain second information corresponding to the second image.
[0197] Optionally, step 701 may further include: performing semantic recognition processing on the sub-information of each layer to obtain second information corresponding to the second image.
[0198] In the technical solution disclosed in the present invention, the target terminal can receive the first mapping relationship and the second image sent by the source terminal, parse the second image according to the first mapping relationship, obtain the sub-information carried by each layer, and realize the transmission of sub-information corresponding to multiple layers using one second image, thereby improving the information transmission efficiency of the second image.
[0199] In an embodiment, determining the sub-information of each layer in the second image according to the second image and the second mapping relationship may include:
[0200] Determine a layer identifier for each pixel in the second image according to the RGB value of each pixel and the second mapping relationship;
[0201] Determine the layer corresponding to each pixel and the RGB value of the pixel in the layer with the same position information as the pixel according to the layer identifier;
[0202] The sub-information of each layer is determined according to the RGB value of each pixel in each layer.
[0203] When the first information in the first image is obtained by using the second mapping relationship, the layer identifier associated with the RGB value drawn by each pixel in the first image can be determined by the first mapping relationship. The RGB value of the pixel in each layer with the same position information as the pixel is determined by the RGB value of each layer in the layer identifier.
[0204] Optionally, determining the sub-information of each layer according to the RGB value of each pixel in each layer may include: drawing the layer with the RGB value of each pixel in each layer to obtain the sub-information of each layer.
[0205] Specifically, for a pixel point, the layer identifier associated with the RGB value of the pixel point is obtained, and several first layers corresponding to the pixel point are determined through the layer identifier (taking the first layer as an example for explanation), and the RGB value of the first layer is drawn at the pixel position of the pixel point in the first layer until the traversal of each pixel point is completed.
[0206] In the technical solution disclosed in the present invention, for the second image, the RGB value of each pixel in the second image can be determined first, and then the second mapping relationship can be queried to obtain the layer identifier corresponding to the RGB value of each pixel. The layer identifier can be used to determine the specific combination of the corresponding layers, and then the layer corresponding to each pixel can be obtained. Therefore, the RGB value of the pixel in the layer with the same position information as the pixel can be reversely determined, and the mapping from the RGB value of the second image and the layer combination is realized, and then the RGB of each layer at the same pixel coordinate is obtained, so as to realize the mapping from the first image to the sub-information corresponding to multiple layers respectively. The first information formed by the sub-information of each layer is restored from the first image through the mapping link, so that one image can transmit multiple sub-information at one time, which effectively improves the efficiency of information transmission.
[0207] Figure 8 An example diagram of information processing provided in an embodiment of the present application. Figure 8 First, two first pixel points (1, 1) and (4, 4) of the first character in the first image are shown, wherein the RGB value read from one first pixel point (1, 1) is 1, and the RGB value read from the other first pixel point (4, 4) is 2.
[0208] From the first mapping relationship, a layer combination a associated with the RGB value 1 can be queried, and the layer combination a includes layer 3.
[0209] From the first mapping relationship, a layer combination b associated with the RGB value 2 of another first pixel point can be queried, and the layer combination b includes layer 1 and layer 2.
[0210] In addition, the RGB value of layer 1, the RGB value of layer 2, the RGB value of layer 3, and the RGB value of layer 4 may also be read through the first mapping relationship.
[0211] For a first pixel point (1, 1), the RGB value of layer 3 can be drawn at the same coordinate position (1, 1) as the first pixel point, such as Figure 8 The pixel point 802 shown. The first pixel point (1, 1) corresponds to layer 1, layer 2, and layer 4 at the same coordinate position (1, 1) as the first pixel point, but is not drawn. Figure 8 Pixel 801, pixel 803 and pixel 804 are shown in FIG.
[0212] For another first pixel point (4, 4), the RGB values of each layer can be drawn at the same coordinate position (4, 4) as the first pixel point in the corresponding layer 2 and layer 1, such as Fig.10805 and 806 shown. The other layers corresponding to the first pixel point (4, 4), that is, the coordinate position (1, 1) of layer 3 and layer 4 with the same coordinate position as the first pixel point is not drawn, as shown in FIG. Figure 8 Pixel 807 and pixel 808 are shown in FIG.
[0213] If every pixel point in the first image is completely drawn, respective layer combinations of layers 1 to 4 can be obtained.
[0214] Fig. 9 900 is a schematic diagram of the structure of an information processing device provided in an embodiment of the present application. The information processing device can execute the above information processing method. The information processing device 900 may include:
[0215] The first determining unit 901 is used to determine, according to the first information, a layer required for writing the first information into the first image.
[0216] The layer combination unit 902 is used to combine the layers to obtain a layer combination.
[0217] The second determining unit 903 is used to determine the RGB value of the layer combination according to the color level of each channel color in RGB.
[0218] The third determining unit 904 is used to determine the layer identifier of the layer combination according to the RGB value of the layer combination.
[0219] The relationship building unit 905 is used to build a first mapping relationship between the layer identifier and the layer combination based on the layer identifier of the layer combination and the layer combination.
[0220] The image writing unit 906 is configured to write the first information into the first image according to the first mapping relationship.
[0221] As an embodiment, it also includes:
[0222] The level division unit is used to divide the value range of each channel color according to a preset value to obtain the color level corresponding to each channel color.
[0223] As yet another embodiment, the third determining unit includes:
[0224] A first determining module, configured to determine the RGB value of the layer as a layer identifier of the layer combination if the layer combination includes one layer;
[0225] The second determining module is used for, if the layer combination includes more than two layers, concatenating the RGB values of all the layers in the layer combination, and determining the concatenated RGB value as the layer identifier of the layer combination.
[0226] As yet another embodiment, the image writing unit includes:
[0227] A third determining module, used to determine, according to the first information, sub-information corresponding to each layer in the layer required by the first information;
[0228] A fourth determination module is used to determine the RGB value of the layer combination corresponding to each pixel point in each layer according to the sub-information corresponding to each layer;
[0229] The information writing module is used to write the first information into the first image according to the RGB value of the layer combination corresponding to each pixel point in each layer and the first mapping relationship.
[0230] As yet another embodiment, the information writing module includes:
[0231] An identification determination module, used to determine the layer identification of each pixel in each layer according to the first mapping relationship and the RGB value of the layer combination corresponding to each pixel in each layer;
[0232] The writing processing module is used to write the first information into the first image according to the layer identifier of each pixel in each layer.
[0233] Fig.10 1 is a schematic diagram of the structure of an information processing device provided in an embodiment of the present application. The information processing device can execute the above information processing method. The information processing device 100 may include:
[0234] A fifth determining unit 1001 is used to determine sub-information of each layer in the second image according to the second image and a second mapping relationship, where the second mapping relationship is used to represent a mapping relationship between a layer identifier of a layer combination and the layer combination;
[0235] The sixth determining unit 1002 is used to determine the second information to be written into the second image based on the sub-information of each layer.
[0236] As an embodiment, the fifth determining unit includes:
[0237] An identification acquisition module, used to determine a layer identification of each pixel point in the second image according to the RGB value of each pixel point and the second mapping relationship;
[0238] A pixel mapping module is used to determine the layer corresponding to each pixel point and the RGB value of the pixel point with the same position information as the pixel point in the layer according to the layer identifier;
[0239] The information determination module is used to determine the sub-information of each layer according to the RGB value of each pixel in each layer.
[0240] The information processing device in this embodiment can be used to execute the above-mentioned information processing method. For the specific contents or steps executed by each unit, module and sub-module, reference can be made to the embodiment of the above-mentioned method, which will not be repeated here.
[0241] Fig.11 This is a hardware structure block diagram of an electronic device according to an exemplary embodiment. The electronic device can be a source terminal or a target device involved in this application. The electronic device can be any type of device such as a mobile phone, a computer, a digital broadcast terminal, a message transceiver device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, a smart home appliance, a wearable device, etc.
[0242] The electronic device 1100 may include one or more of the following components: a processing component 1102 , a memory 1104 , a power component 1106 , a multimedia component 1108 , an audio component 1110 , an input / output (I / O) interface 1112 , a sensor component 1114 , and a communication component 1116 .
[0243] The processing component 1102 generally controls the overall operation of the device 1100, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 1102 may include one or more processors 1120 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 1102 may include one or more modules to facilitate interaction between the processing component 1102 and other components. For example, the processing component 1102 may include a multimedia module to facilitate interaction between the multimedia component 1108 and the processing component 1102.
[0244] The memory 1104 is configured to store various types of data to support the operation of the device 1100. Examples of such data include instructions for any application or method operating on the device 1100, contact data, phone book data, messages, pictures, videos, etc. The memory 1104 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0245] The power supply component 1106 provides power to the various components of the device 1100. The power supply component 1106 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 1100.
[0246] The multimedia component 1108 includes a screen that provides an output interface between the device 1100 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1108 includes a front camera and / or a rear camera. When the device 1100 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0247] The audio component 1110 is configured to output and / or input audio signals. For example, the audio component 1110 includes a microphone (MIC), and when the device 1100 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 1104 or sent via the communication component 1116. In some embodiments, the audio component 1310 also includes a speaker for outputting audio signals.
[0248] I / O interface 1112 provides an interface between processing component 1102 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0249] The sensor assembly 1114 includes one or more sensors for providing various aspects of status assessment for the device 1100. For example, the sensor assembly 1114 can detect the open / closed state of the electronic device 1100, the relative positioning of components, such as the display and keypad of the electronic device 1100, and the sensor assembly 1114 can also detect the position change of the electronic device 1100 or a component of the electronic device 1100, the presence or absence of user contact with the electronic device 1100, the orientation or acceleration / deceleration of the electronic device 1100, and the temperature change of the electronic device 1100. The sensor assembly 1114 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 1114 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1114 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0250] The communication component 1116 is configured to facilitate wired or wireless communication between the electronic device 1100 and other devices. The electronic device 1100 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1116 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1116 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0251] In an exemplary embodiment, the electronic device 1100 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0252] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1104 including instructions, and the instructions can be executed by the processor 1120 of the device 1100 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0253] The present application also provides a computer program product, including a computer program, which performs the above-mentioned information processing method when executed by a processor.
[0254] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0255] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. An information processing method, characterized in that: include: Determining, according to the first information, a layer required for writing the first information into the first image; Combining the layers to obtain a layer combination; Determine the RGB value of the layer combination according to the color level of each channel color in RGB; Determining a layer identifier of the layer combination according to the RGB value of the layer combination; Based on the layer identifier of the layer combination and the layer combination, construct a first mapping relationship between the layer identifier and the layer combination; The first information is written into the first image according to the first mapping relationship.
2. The method according to claim 1, characterized in that Before determining the RGB value of the layer combination according to the color level of each channel color in RGB, the method further includes: The value range of each channel color is divided according to the preset value to obtain the color level corresponding to each channel color.
3. The method according to claim 1, characterized in that Determining the layer identifier of the layer combination according to the RGB value of the layer combination includes: If the layer combination includes one layer, determining the RGB value of the layer as the layer identifier of the layer combination; If the layer combination includes more than two layers, the RGB values of all the layers in the layer combination are spliced, and the spliced RGB value is determined as the layer identifier of the layer combination.
4. The method according to claim 3, characterized in that Writing the first information into the first image according to the first mapping relationship includes: Determine, according to the first information, sub-information corresponding to each layer in the layers required by the first information; Determine the RGB value of the layer combination corresponding to each pixel in each layer according to the sub-information corresponding to each layer; The first information is written into the first image according to the RGB value of the layer combination corresponding to each pixel in each of the layers and the first mapping relationship.
5. The method according to claim 4, characterized in that Writing the first information into the first image according to the RGB value of each pixel in each layer and the first mapping relationship comprises: Determine a layer identifier of each pixel in each layer according to the first mapping relationship and the RGB value of the layer combination corresponding to each pixel in each layer; The first information is written into the first image according to the layer identifier of each pixel in each layer.
6. An information processing method, characterized in that: include: determining sub-information of each layer in the second image according to the second image and a second mapping relationship, wherein the second mapping relationship is used to represent a mapping relationship between a layer identifier of a layer combination and the layer combination; Based on the sub-information of each of the layers, second information to be written into the second image is determined.
7. The method according to claim 6, characterized in that The determining, according to the second image and the second mapping relationship, the sub-information of each layer in the second image includes: Determine a layer identifier of each pixel in the second image according to the RGB value of each pixel and the second mapping relationship; Determine the layer corresponding to each pixel and the RGB value of the pixel in the layer with the same position information as the pixel according to the layer identifier; The sub-information of each layer is determined according to the RGB value of each pixel in each layer.
8. An information processing device, characterized in that: include: A first determining unit, configured to determine, according to the first information, a layer required for writing the first information into the first image; A layer combination unit, used for combining the layers to obtain a layer combination; A second determining unit, used to determine the RGB value of the layer combination according to the color level of each channel color in RGB; A third determining unit is used to determine the layer identifier of the layer combination according to the RGB value of the layer combination. A relationship building unit, configured to build a first mapping relationship between the layer identifier and the layer combination based on the layer identifier of the layer combination and the layer combination; An image writing unit is used to write the first information into the first image according to the first mapping relationship.
9. An information processing device, characterized in that: include: A fifth determining unit, configured to determine sub-information of each layer in the second image according to the second image and a second mapping relationship, wherein the second mapping relationship is used to represent a mapping relationship between a layer identifier of a layer combination and the layer combination; A sixth determining unit is used to determine the second information to be written into the second image based on the sub-information of each of the layers.
10. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the information processing method according to any one of claims 1-5 or 6-7.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the information processing method according to any one of claims 1 to 5 or 6 to 7.
