A method of image processing, an electronic device, and a storage medium

CN122952104APending Publication Date: 2026-10-20HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510468819.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-14
Publication Date
2026-10-20

AI Technical Summary

Technical Problem

[0004]本申请实施例提供了一种图像处理的方法、电子设备及存储介质,可以解决现有的图像处理技术,在为图像添加页面的访问链接时,需要采用占用可视空间的二维码的方式实现,降低了截图中页面内容的可视度以及有效内容的占比的问题

Benefits of technology

[0107]上述各个方面的有益效果可以互相参考,在此不再赘述。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure HDA0005360670960000011
    Figure HDA0005360670960000011
  • Figure HDA0005360670960000021
    Figure HDA0005360670960000021
  • Figure HDA0005360670960000031
    Figure HDA0005360670960000031
Patent Text Reader

Abstract

This application relates to the field of data processing technology and provides an image processing method, apparatus, electronic device, and storage medium. The method includes: displaying a first page; and in response to a first operation for triggering a screenshot, acquiring a second screenshot, wherein the second screenshot is obtained by adjusting the first pixel value of a first pixel of a first screenshot corresponding to the first page based on a first bit sequence corresponding to an access link of the first page. In this embodiment, the access link information can be implicitly carried in the screenshot by adjusting the pixel value of the pixels within the screenshot, without relying on a QR code that occupies a visible area. That is, the above-mentioned method of carrying the access link is invisible to the user, thereby increasing the proportion of effective content in the screenshot and maintaining the visibility of the first page content in the screenshot.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of data processing technology, and in particular relates to an image processing method, electronic device and storage medium. Background Technology

[0002] Images, as one of the main carriers of existing multimedia data, are used in all aspects of daily life and work. For example, when users browse content that interests them, they can share or record the content by taking a screenshot. In order to improve the ability for users to retrieve the page corresponding to the screenshot later, existing image processing technology generally adds a QR code image corresponding to the page to the screenshot when the user takes a screenshot of a page. That is, the screenshot includes the content of the page and the added QR code content, so that users can jump to the page later by scanning the QR code.

[0003] However, the QR code occupies part of the display area, which affects the proportion of effective content in the screenshot, reduces the visibility of the page content in the screenshot, and in some scenarios, the QR code may even obscure part of the content in the screenshot, thus affecting the user experience. Summary of the Invention

[0004] This application provides an image processing method, electronic device, and storage medium that can solve the problem that existing image processing technologies require the use of QR codes that occupy visible space when adding page access links to images, which reduces the visibility of page content and the proportion of effective content in the screenshot.

[0005] In a first aspect, embodiments of this application provide an image processing method, including:

[0006] Display the first page;

[0007] In response to a first operation for triggering a screenshot, a second screenshot is obtained, wherein the second screenshot is obtained by adjusting the first pixel value of the first pixel of the first screenshot corresponding to the first page according to the first bit sequence corresponding to the access link of the first page.

[0008] The embodiments of this application have the following beneficial effects: When a first operation is received to take a screenshot of the first page currently displayed on an electronic device, a first screenshot corresponding to the first page and an access link corresponding to the first page can be obtained. Based on the characters contained in the access link, a first bit sequence corresponding to the access link is generated. The first pixel value of the first pixel in the first screenshot is adjusted according to the first bit sequence, thereby obtaining a second screenshot with the access link embedded, so as to achieve the purpose of implicitly embedding the access link in the second screenshot. In the embodiments of this application, the first pixel value of the first screenshot can be adjusted according to the first bit sequence of the access link, so as to implicitly carry the information of the access link in the screenshot without occupying the visible area of ​​the screenshot. That is, the above-mentioned embedded access link is invisible to the user, thereby increasing the proportion of effective content in the screenshot and maintaining the visibility of the content of the first page in the screenshot.

[0009] In one possible implementation of the first aspect, the second screenshot includes a plurality of first image regions; each of the plurality of first image regions carries a bit value corresponding to a bit in the first bit sequence.

[0010] This method divides the screenshot into different first image regions and carries the corresponding bit values ​​in each first image region, which makes the carried bit values ​​more resistant to interference.

[0011] In one possible implementation, the first image region can be divided according to a preset number of rows and columns, thereby improving the consistency of the number of different screenshots.

[0012] In one possible implementation, the first image region can be divided according to a preset region size, so that the region size of the first image region obtained from different screenshots is the same.

[0013] In one possible implementation of the first aspect, the binary code corresponding to each second pixel in the first image region of the second screenshot has a preset bit value that is the bit value carried by the first image region.

[0014] This method converts pixel values ​​into binary codes and uses preset bit positions to carry the corresponding bit values, thereby embedding the bit values ​​into each pixel in the image area and improving the concealment of the carried bit values.

[0015] In one possible implementation of the first aspect, the first image region corresponds to a bit distribution pattern; the bit distribution pattern is used to determine the preset bit of the binary code corresponding to each second pixel in the first image region.

[0016] This method determines the bits that carry the bit value by using a preset bit distribution pattern, which can improve the flexibility of preset bit selection.

[0017] In some implementations, the aforementioned bit distribution pattern can be recorded in the metadata of the screenshot.

[0018] In one possible implementation of the first aspect, acquiring the second screenshot in response to the first operation for triggering the screenshot includes:

[0019] In response to the first operation, the first screenshot is obtained;

[0020] Based on the bit values ​​that the first image region needs to carry, the first pixel values ​​of the first pixels in each of the first image regions of the first screenshot are adjusted to obtain the second screenshot.

[0021] This method allows the pixel values ​​of different first image regions to be carried according to the bit values ​​of each bit in the first bit sequence, thereby enabling the second screenshot to carry the complete first bit sequence.

[0022] In one possible implementation of the first aspect, adjusting the first pixel value of the first pixel in each of the first image regions of the first screenshot according to the bit value to be carried by the first image region to obtain the second screenshot specifically includes:

[0023] For any of the first image regions, the value of the binary encoding corresponding to the grayscale value of the first pixel in the first image region of the first screenshot in the first channel is set as the bit value that the first image region needs to carry.

[0024] This method can carry the bit values ​​that the image area needs to carry through all pixel values ​​in the first image area via a preset first channel, thereby improving the reliability and robustness of the carried bit values.

[0025] In one possible implementation of the first aspect, after setting the value of the binary encoding corresponding to the grayscale value of the first pixel in the first image region of the first screenshot in the preset bit position for any first image region, the method further includes:

[0026] For any first pixel in any first image region, based on the adjusted grayscale value of the first channel, color equalization processing is performed on the grayscale value of the first pixel in the second channel; the second channel is any channel other than the first channel.

[0027] This method can adjust the grayscale value of the first channel corresponding to the bit value, and then perform color compensation on the grayscale values ​​of other channels through color equalization, which can reduce the color deviation of the entire image and thus improve the concealment of bit embedding.

[0028] In one possible implementation of the first aspect, the binary code corresponding to each second pixel in the first image area of ​​the second screenshot is the grayscale value of each second pixel in the first image area of ​​the second screenshot in the first channel.

[0029] In one possible implementation of the first aspect, the preset bit is the second or third bit in the binary encoding, moving from the low bit to the high bit order. By using the second or third bit value in the binary encoding as the bit carrying the bit value, it is possible to improve the resistance to compression and quantization while reducing the impact on the original image's color.

[0030] In one possible implementation of the first aspect, the first bit sequence is obtained by redundantly encoding the original sequence corresponding to the access link; the original sequence is determined based on the Huffman encoding of each character in the access link.

[0031] This method can determine the binary representation of each character in the access sequence through the Huffman coding table, which can reduce the average number of bits occupied by each character in the bit sequence, thereby increasing the amount of data that can be carried in the screenshot; on the other hand, generating the first bit sequence through redundant coding can also improve the robustness of the entire first bit sequence.

[0032] In one possible implementation of the first aspect, acquiring the second screenshot in response to the first operation for triggering the screenshot includes:

[0033] In response to the first operation, the original screenshot is displayed;

[0034] In response to the editing operation, the original screenshot is edited to obtain the first screenshot.

[0035] This method can determine whether the user needs to edit the screenshot after it is taken, and then embed the first bit sequence into the first screenshot after the editing is completed, thereby reducing unnecessary encoding operations.

[0036] In one possible implementation of the first aspect, the second screenshot carries a first identifier; when the first identifier is a first value, it indicates that the second screenshot carries information about the access link.

[0037] This method uses the second screenshot to carry the first identifier. It can first identify whether the value of the first identifier is the first value to determine whether to perform subsequent identification operations. It can determine the pixel value and bit value operation only when it is determined that the second screenshot carries an access link. This can reduce unnecessary parsing operations and reduce resource utilization.

[0038] In one possible implementation of the first aspect, the second screenshot includes a first channel and a second channel; the pixel values ​​in the first channel of the second screenshot are obtained by adjusting the pixel values ​​in the first channel of the first screenshot according to the second bit sequence corresponding to the first identifier; the pixel values ​​in the second channel of the second screenshot are obtained by adjusting the pixel values ​​in the second channel of the first screenshot according to the first bit sequence corresponding to the access link of the first page; the first channel and the second channel are different channels; the first identifier is used to indicate whether the second screenshot carries an access link.

[0039] This method embeds the first identifier and access link into the second screenshot by adjusting the pixel values ​​of different channels. This implicitly carries the first identifier and access link within the screenshot, without occupying the visible area. In other words, the embedded access link is invisible to the user, thus increasing the proportion of effective content within the screenshot while maintaining the visibility of the first page content. Furthermore, by implementing hierarchical encoding through different channel pixel values, subsequent analysis can be performed by first parsing the first pixel value of the first channel. Only when the access link is identified in the screenshot based on the determined first identifier will subsequent parsing operations be executed. This improves image parsing efficiency, reduces unnecessary parsing operations, and minimizes the consumption of device computing resources.

[0040] In some implementations, the first channel mentioned above is the red channel, and the second channel mentioned above is the blue channel.

[0041] In some implementations, the first channel is a luminance channel, and the second channel is any hue channel.

[0042] In a second aspect, an image processing apparatus includes:

[0043] The display unit is used to display the first page;

[0044] The screenshot acquisition unit is used to acquire a second screenshot in response to a first operation that triggers a screenshot. The second screenshot is obtained by adjusting the first pixel value of the first pixel of the first screenshot corresponding to the first page according to the first bit sequence corresponding to the access link of the first page.

[0045] In one possible implementation of the second aspect, the second screenshot includes a plurality of first image regions; each of the plurality of first image regions carries a bit value corresponding to a bit in the first bit sequence.

[0046] In one possible implementation of the second aspect, the binary code corresponding to each second pixel in the first image region of the second screenshot has a preset bit value that is the bit value carried by the first image region.

[0047] In one possible implementation of the second aspect, the first image region corresponds to a bit distribution pattern; the bit distribution pattern is used to determine the preset bit of the binary code corresponding to each second pixel in the first image region.

[0048] In one possible implementation of the second aspect, the screenshot acquisition unit includes:

[0049] The first screenshot acquisition unit is used to acquire the first screenshot in response to the first operation;

[0050] A pixel adjustment unit is used to adjust the first pixel value of the first pixel in each of the first image regions of the first screenshot according to the bit value that the first image region needs to carry, so as to obtain the second screenshot.

[0051] In one possible implementation of the second aspect, the pixel adjustment unit is specifically used to: for any first image region, set the value of the binary encoding corresponding to the grayscale value of the first pixel in the first image region of the first screenshot in the preset bit position as the bit value that the first image region needs to carry.

[0052] In one possible implementation of the second aspect, the apparatus further includes:

[0053] A color equalization unit is used to perform color equalization processing on the grayscale value of any first pixel in any first image region in a second channel based on the adjusted grayscale value of the first channel; the second channel is any channel other than the first channel.

[0054] In one possible implementation of the second aspect, the binary code corresponding to each second pixel in the first image area of ​​the second screenshot is the grayscale value of each second pixel in the first image area of ​​the second screenshot in the first channel.

[0055] In one possible implementation of the second aspect, the preset bit is the second or third bit in the binary encoding in the order from low bit to high bit.

[0056] In one possible implementation of the second aspect, the first bit sequence is obtained by redundantly encoding the original sequence corresponding to the access link; the original sequence is determined based on the Huffman encoding of each character in the access link.

[0057] In one possible implementation of the second aspect, the screenshot acquisition unit includes:

[0058] The original screenshot acquisition unit is used to display the original screenshot in response to the first operation;

[0059] An editing unit is used to perform image editing on the original screenshot in response to an editing operation, thereby obtaining the first screenshot.

[0060] In one possible implementation of the second aspect, the second screenshot carries a first identifier; when the first identifier is a first value, it indicates that the second screenshot carries information about the access link.

[0061] In one possible implementation of the second aspect, the second screenshot includes a first channel and a second channel; the pixel values ​​in the first channel of the second screenshot are obtained by adjusting the pixel values ​​in the first channel of the first screenshot according to the second bit sequence corresponding to the first identifier; the pixel values ​​in the second channel of the second screenshot are obtained by adjusting the pixel values ​​in the second channel of the first screenshot according to the first bit sequence corresponding to the access link of the first page; the first channel and the second channel are different channels; the first identifier is used to indicate whether the second screenshot carries an access link.

[0062] Thirdly, embodiments of this application provide an image processing method, including:

[0063] In response to the second operation on the third screenshot, the first page corresponding to the access link carried by the third screenshot is displayed; the first bit sequence corresponding to the access link is carried in the third pixel value of the third pixel of the third screenshot.

[0064] Implementing the embodiments of this application has the following beneficial effects: Since the third pixel value of the third pixel in the third screenshot carries the first bit sequence of the access link corresponding to the first page, that is, the third screenshot carries the access link, when the second operation corresponding to the third screenshot is received, the access link can be parsed and the corresponding first page can be displayed, thereby achieving the purpose of waking up the first page through the third screenshot. Compared with existing screenshot technology, since the third pixel value of the third pixel in the third screenshot carries the first bit sequence of the access link corresponding to the first page, the access link carried by the third screenshot is not in a visible state, thereby improving the visibility of the effective content in the first page in the third screenshot and reducing the occupation of the visible area due to the access link.

[0065] In one possible implementation of the third aspect, the response to the second operation of the third screenshot, displaying the first page corresponding to the access link carried by the third screenshot, includes:

[0066] Determine the bit values ​​carried by each first image region in the third screenshot;

[0067] The access link is obtained from the first bit sequence determined based on the bit values ​​carried by all the first image regions.

[0068] In one possible implementation of the third aspect, determining the bit values ​​corresponding to each first image region in the third screenshot includes:

[0069] For any of the first image regions, the binary code corresponding to the grayscale value of each third pixel in the first image region of the third screenshot on the first channel is determined respectively;

[0070] Count the first number of each binary code that is 0 in the preset bit position and the second number that is 1 in the preset bit position;

[0071] If the first number is greater than the second number, then the bit value carried by the first image region is determined to be 0;

[0072] If the second number is greater than the first number, then the bit value carried by the first image region is determined to be 1.

[0073] In one possible implementation of the third aspect, the preset bit is the second or third bit in the binary encoding in the order from low bit to high bit.

[0074] In one possible implementation of the third aspect, before counting the first number with a preset bit of 0 and the second number with a preset bit of 1 in each of the binary codes, the method further includes:

[0075] Based on the bit distribution pattern corresponding to the first image region, the preset bit corresponding to each of the third pixels in the first image region is determined.

[0076] In one possible implementation of the third aspect, the response to the second operation of the third screenshot, displaying the first page corresponding to the access link carried by the third screenshot, includes:

[0077] In response to the second operation, if the first identifier carried by the third screenshot is identified as a first value, the first page is displayed.

[0078] In one possible implementation of the third aspect, the response to the second operation of the third screenshot, displaying the first page corresponding to the access link carried by the third screenshot, includes:

[0079] In response to the second operation on the third screenshot in the first application, the first page is displayed in the second application; the first application and the second application are different applications.

[0080] In one possible implementation of the third aspect, the second operation includes one of the following: a click operation, a long press operation, and a drag operation to drag the third screenshot to the smart assistant.

[0081] In one possible implementation of the third aspect, the third screenshot is an image that is the same as or different from the second screenshot; the second screenshot is obtained by adjusting the first pixel values ​​of the first pixels of multiple first image regions within the first screenshot corresponding to the first page according to the first bit sequence.

[0082] In one possible implementation of the third aspect, the third screenshot is obtained by compressing the second screenshot.

[0083] Fourthly, this application provides an image processing apparatus, comprising:

[0084] A page display unit is used to respond to a second operation on the third screenshot and display a first page corresponding to the access link carried by the third screenshot; the first bit sequence corresponding to the access link is carried in the third pixel value of the third pixel of the third screenshot.

[0085] In one possible implementation of the fourth aspect, the page display unit includes:

[0086] A bit value determination unit is used to determine the bit value carried by each first image region in the third screenshot;

[0087] The access link determination unit is used to obtain the access link based on the first bit sequence determined by the bit values ​​carried by all the first image regions.

[0088] In one possible implementation of the fourth aspect, the bit value determination unit includes:

[0089] A binary encoding determination unit is used to determine, for any first image region, the binary encoding corresponding to the grayscale value of each third pixel in the first image region of the third screenshot on the first channel;

[0090] A counting unit is used to count the first number of each binary code when the preset bit is 0 and the second number when the preset bit is 1;

[0091] The first value determination unit is used to determine that the bit value carried by the first image region is 0 if the first number is greater than the second number.

[0092] The second value determination unit is used to determine that the bit value carried by the first image region is 1 if the second number is greater than the first number.

[0093] In one possible implementation of the fourth aspect, the preset bit is the second or third bit in the binary encoding in the order from low bit to high bit.

[0094] In one possible implementation of the fourth aspect, the apparatus further includes:

[0095] The distribution pattern determination unit is used to determine the preset bit position corresponding to each of the third pixels in the first image region based on the bit distribution pattern corresponding to the first image region.

[0096] In one possible implementation of the fourth aspect, the page display unit includes:

[0097] An identifier determination unit is configured to, in response to the second operation, display the first page when it is recognized that the first identifier carried by the third screenshot is a first value.

[0098] In one possible implementation of the fourth aspect, the page display unit includes:

[0099] A page adjustment unit is configured to display the first page in a second application in response to the second operation of the first application on the third screenshot; the first application and the second application are different applications.

[0100] In one possible implementation of the fourth aspect, the second operation includes one of the following: a click operation, a long press operation, and a drag operation to drag the third screenshot to the smart assistant.

[0101] In one possible implementation of the fourth aspect, the third screenshot is an image that is the same as or different from the second screenshot; the second screenshot is obtained by adjusting the first pixel values ​​of the first pixels of multiple first image regions within the first screenshot corresponding to the first page according to the first bit sequence.

[0102] In one possible implementation of the fourth aspect, the third screenshot is obtained by compressing the second screenshot.

[0103] Fifthly, embodiments of this application provide an electronic device, including: a memory, a processor, and a program stored in the memory, wherein the processor executes the program to implement the steps of the image processing method described in any of the first aspects and / or the steps of the image processing method described in any of the third aspects.

[0104] In a sixth aspect, embodiments of this application provide a readable storage medium storing a program that, when executed by a processor, implements the steps of the image processing method described in any of the first aspects and / or the steps of the image processing method described in any of the third aspects.

[0105] In a seventh aspect, embodiments of this application provide a program product that, when run on a device, causes the device to perform the steps of the image processing method described in any one of the first aspects and / or the steps of the image processing method described in any one of the third aspects.

[0106] Other implementations can refer to the aforementioned aspects and will not be elaborated further.

[0107] The beneficial effects of the above aspects can be referenced from each other, and will not be elaborated further here. Attached Figure Description

[0108] Figure 1 This is an illustration of existing content sharing methods using screenshots;

[0109] Figure 2 This is a schematic diagram of the stages of an image processing method provided in an embodiment of this application;

[0110] Figure 3 This is a schematic diagram illustrating a scenario where both stages are implemented on the same electronic device, according to an embodiment of this application.

[0111] Figure 4 This is a schematic diagram illustrating a scenario where two stages are implemented on different electronic devices, according to an embodiment of this application.

[0112] Figure 5 This is a flowchart illustrating the implementation of an image processing method in the image encoding stage according to an embodiment of this application;

[0113] Figure 6 This is a schematic diagram of the conversion of the first bit sequence provided in an embodiment of this application;

[0114] Figure 7 This is a schematic diagram illustrating a specific implementation of S502.1 provided in an embodiment of this application;

[0115] Figure 8 This is a schematic diagram obtained from a screenshot provided in an embodiment of this application;

[0116] Figure 9 This is a schematic diagram of image region division provided in an embodiment of this application;

[0117] Figure 10 This is a schematic diagram illustrating the determination of bit values ​​carried by each first image region according to an embodiment of this application;

[0118] Figure 11 This is a schematic diagram illustrating the adjustment of grayscale values ​​based on bit values ​​according to an embodiment of this application;

[0119] Figure 12 This is a schematic diagram illustrating the bit distribution pattern provided in an embodiment of this application, which determines the bits that need to be adjusted in the binary code corresponding to each first pixel;

[0120] Figure 13 This is a flowchart illustrating the implementation of S502.2 provided in another embodiment of this application;

[0121] Figure 14 This is a comparative diagram of the standard RGB dot matrix structure and the diamond dot matrix structure.

[0122] Figure 15 This is a schematic diagram of color balance provided in an embodiment of this application;

[0123] Figure 16 This is a flowchart illustrating the implementation of an image processing method in the image decoding stage according to an embodiment of this application.

[0124] Figure 17 This is a schematic diagram of the first application scenario of the third screenshot provided in an embodiment of this application;

[0125] Figure 18 This is a schematic diagram of the second scenario in the third screenshot provided in an embodiment of this application;

[0126] Figure 19This is a schematic diagram illustrating the implementation of determining the bit values ​​carried by each image region according to an embodiment of this application;

[0127] Figure 20 This is a schematic diagram showing the first page provided in an embodiment of this application;

[0128] Figure 21 This is a schematic diagram of the overall process of information embedding and information parsing provided in an embodiment of this application;

[0129] Figure 22 This is a structural block diagram of an image processing apparatus provided in an embodiment of this application;

[0130] Figure 23 This is a structural block diagram of another image processing apparatus provided in the embodiments of this application;

[0131] Figure 24 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0132] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0133] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0134] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0135] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."

[0136] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0137] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0138] Images, as one of the main carriers of existing multimedia data, are used in all aspects of daily life and work. For example, when a user browses content of interest, they can share or record the content by taking a screenshot. Figure 1 This illustrates an existing method of content sharing via screenshots. See also... Figure 1 As shown, terminal 11 displays the purchase page for product A. The user of terminal 11 wants to share the purchase link for product A with the user of terminal 12. Therefore, a screenshot operation can be initiated. In response to the user's screenshot operation, the shopping application can generate a QR code based on the purchase link on the purchase page and add the QR code to the screenshot of the purchase page, thus obtaining the screenshot. Figure 13 By intercepting Figure 13 As you can see, it includes an area 131 for displaying the purchase page and an area 132 for displaying the QR code. Without obscuring the purchase page area 131, a blank border area 133 is added, thus ensuring that the text is clear and concise. Figure 13 On the page, the area of ​​region 131 is severely compressed, which reduces the visibility of effective content on the purchase page. Users often need to zoom in on the image to see the relevant content.

[0139] Terminal 11 received the intercept Figure 13 Then, the above-mentioned segments can be... Figure 13 Send to terminal 12, terminal 12 receives the intercept Figure 13 Afterwards, it can be saved locally and intercepted by identification. Figure 13 The purchase page is displayed on terminal 12 using the QR code, such as page 14, thus enabling the sharing of product A between two users.

[0140] However, sharing content by adding a QR code to the screenshot reduces the area of ​​effective content in the screenshot, meaning the visibility of the effective content is lower. It also reduces the uniformity and aesthetics of the overall screenshot, thus affecting the user experience.

[0141] Example 1:

[0142] To address the issue that adding page access links to images in image processing technology requires the use of QR codes that occupy visible space, reducing the visibility of page content and the proportion of effective content in the screenshot, this application provides an image processing method. This method adjusts the first pixel value of the first pixel within the first screenshot based on the first bit sequence corresponding to the access link of the first page. This implicitly carries the access link information within the screenshot, without relying on a QR code that occupies visible area. In other words, the method of carrying the access link is invisible to the user, thereby increasing the proportion of effective content within the screenshot while maintaining the visibility of the first page content.

[0143] The aforementioned image processing method can be specifically applied to electronic devices, including smartphones, tablets, laptops, desktop computers, and other interactive devices. These electronic devices may include interactive modules such as touchscreens, keyboards, and mice to respond to user-initiated interactive operations, enabling screenshotting or redirection of specific pages.

[0144] In this embodiment, the image processing method described above may specifically include two stages, for example, Figure 2 A schematic diagram illustrating the stages of an image processing method according to an embodiment of this application is shown. See also Figure 2 As shown, the image processing method provided in this application embodiment may include a stage 1 of image encoding for a screenshot of a specific page, and a stage 2 of image recognition for a screenshot with an access link added.

[0145] In Phase 1, the electronic device can obtain a screenshot of the page to be shared (i.e., the first screenshot) and an access link for the page to be shared. By adjusting the first pixel value of the first pixel in the first screenshot, the access link is embedded into the screenshot, resulting in a screenshot with the access link embedded (i.e., the second screenshot). The electronic device can store the second screenshot or send it to other electronic devices.

[0146] In phase 2, the electronic device can acquire a third screenshot carrying an access link. This third screenshot can be either the stored second screenshot or a compressed version of the second screenshot. The electronic device uses the third pixel value of each third pixel in the third screenshot to determine the access link embedded within it, thereby displaying the page corresponding to that access link locally to achieve content sharing.

[0147] It should be noted that the above two stages are two independent stages. That is, the two stages can be implemented on the same electronic device or on two different electronic devices, depending on the actual application scenario.

[0148] For example, Figure 3 This illustration shows a scenario where both stages, according to an embodiment of this application, are implemented on the same electronic device. See also... Figure 3 As shown in (a), the electronic device is specifically a smartphone. Users can browse online products through a shopping app installed on the smartphone, for example, opening a product page, i.e., page 31. At this point, the user has the intention to buy the product but is undecided. Therefore, they can take a screenshot to record the page containing the product they wish to purchase, such as... Figure 3 As shown in (b), after taking a screenshot, the smartphone can generate a corresponding prompt box 32 to inform the user that the screenshot operation for the page has been completed, and will prompt the user whether they need to save the screenshot 33. If the user agrees to save the screenshot, they can click the save control 34. In response to the user clicking the save control 34, the electronic device can save the screenshot to the local image library. Since the electronic device has already embedded the page access link into the screenshot 33 when the user initiates the screenshot operation, the user can open the image library if they decide to purchase the aforementioned product later. Figure 3 In step (c), by dragging screenshot 33 stored in the gallery to the smartphone assistant, the embedded access link is parsed, and after obtaining the access link from the screenshot, the product page is displayed again locally, thus obtaining the following... Figure 3 Page 35 of (d) in the middle.

[0149] Example number 1, Figure 4 This illustration shows a scenario where two stages, according to an embodiment of this application, are implemented on different electronic devices. See also... Figure 4 As shown in (a), a user A can view a product page, such as page 41, on their local smartphone. The user can obtain a screenshot 42 of page 41 by taking a screenshot. This screenshot 42 is a screenshot with an access link embedded using the image processing method provided in this embodiment. During an online communication between user A and another user (such as user B), as shown... Figure 4 As shown in (b), a screenshot 42 with an embedded access link can be sent to user B. User B can receive the screenshot 42 via their smartphone, as shown in (b). Figure 4 As shown in (c), user B can drag screenshot 42 to the smart assistant. By recognizing the access link embedded in screenshot 42, the smart assistant can display the shared product page on user B's smartphone, thus obtaining the following... Figure 4 Page 43 is shown in (d) of the document. It should be noted that, since the screenshot 42 may be compressed when transmitted between different electronic devices, the screenshot 42 stored on user A's smartphone and the screenshot 42 received on user B's smartphone may be the same image or different images.

[0150] To further illustrate the implementation of the image processing method provided in this application, the specific implementation flow of the above two stages (i.e., the image encoding stage and the image decoding stage) is described in detail below:

[0151] Phase 1: Encoding phase of embedding access links into screenshots

[0152] For example, Figure 5 This diagram illustrates a flowchart of an image processing method according to an embodiment of this application, specifically in the image encoding stage. See also... Figure 5 As shown, this image processing method is specifically used to generate a screenshot that embeds an access link in an invisible and unobtrusive manner. Specifically, the image processing method includes the following steps:

[0153] In S501, the first page is displayed.

[0154] In this embodiment, the electronic device may have an application installed, within which a corresponding page, namely the first page mentioned above, can be opened. For example, a shopping application may open a product purchase page, a video application may open a video playback page, and a music application may open an audio playback page, etc. Different applications may correspond to different pages, and the type of page is not limited here.

[0155] In S502, in response to a first operation for triggering a screenshot, a second screenshot is obtained, wherein the second screenshot is obtained by adjusting the first pixel value of the first pixel of the first screenshot corresponding to the first page according to the first bit sequence corresponding to the access link of the first page.

[0156] In some implementations, the above S502 can be further divided into two steps: obtaining the first screenshot and encoding the first screenshot to obtain the second screenshot. Specifically, the two detailed steps can be described as follows:

[0157] In S502.1, in response to the first operation used to trigger the screenshot, the first screenshot corresponding to the first page and the access link of the first page are obtained.

[0158] In this embodiment, when a user needs to share or save a page, they can initiate a first operation on the electronic device to trigger a screenshot. This first operation can be a screenshot of the first page. The first operation can be clicking a physical button on the electronic device, or clicking a combination of two or more physical buttons. If the electronic device is equipped with a touchscreen, the first operation can be a preset touch gesture, such as tapping the touchscreen with a knuckle.

[0159] In this embodiment, after receiving the first operation initiated by the user, the electronic device can determine the screenshot corresponding to the currently displayed page, i.e., the first screenshot. This first screenshot is a screenshot of the access link to be embedded.

[0160] In this embodiment, when the electronic device responds to the first operation, in addition to obtaining a screenshot of the current page, it can also obtain an access link for the current page. This access link can be a Uniform Resource Locator (URL) for the page currently displayed by the electronic device, or it can be a network address for that page. The specific representation of the access link can be set according to different applications and scenarios, and is not limited here.

[0161] In this embodiment, after obtaining the access link corresponding to the currently displayed page, the electronic device can convert the access link into a corresponding bit sequence (i.e., the first bit sequence), which is a string represented in binary.

[0162] In one possible implementation, the access link can be converted into the first bit sequence by obtaining the first bit sequence based on the ASCII codes corresponding to each character in the access link.

[0163] For example, Figure 6 A schematic diagram illustrating the conversion of a first bit sequence according to an embodiment of this application is shown. See also Figure 6 As shown, the URL corresponding to a certain access link is www.vmall.com. The ASCII code for the character "w" is 119 in decimal, which can be represented as "01110111" in binary. The ASCII code for the character "." is 46 in decimal, which can be represented as "00101110" in binary. And so on, the above URL can be converted into a bit sequence consisting of 0s and 1s.

[0164] In one possible implementation, to improve the robustness of the access link while reducing the number of bits it occupies, the generation of the first bit sequence corresponding to the access link may include the following steps:

[0165] Step 1: Obtain the original sequence based on the Huffman encoding of each character in the access link.

[0166] In this embodiment, access links are generally represented by character formats. However, the characters in access links mainly include alphanumeric characters, common punctuation characters such as "." and " / ". Common characters appear frequently in access links, while other characters, such as "【" and "{", do not appear. If ASCII codes are used to encode each character in the access links, the encoding of most characters will not be used, thus introducing a lot of redundancy into the 8-bit encoding. Based on the above reasons, the electronic device can collect a large number of page links from existing web pages and determine the Huffman code corresponding to each character based on the probability of occurrence of each character in the collected page links, thus constructing a corresponding Huffman code table.

[0167] In this embodiment, after obtaining the access link corresponding to the first page, the electronic device can obtain the binary code corresponding to each character by querying the Huffman coding table based on the characters contained in the access link, and sort them according to the binary codes corresponding to each character to obtain the original sequence. Compared with encoding characters using ASCII code, where each ASCII character requires 8 bits, Huffman coding uses an average of 5.04 bits for all characters, which is a 5 / 8 bit compression ratio. The information that each first screenshot can hold can be increased by 8 / 5 = 160%, thus increasing the amount of information that can be embedded in the first screenshot.

[0168] Optionally, the protocol identifier used by the access link is generally "http" or "https". Therefore, in order to further compress the number of bits in the original sequence, the protocol identifier of "http: / / " can be represented by "0000" as its binary code; while the protocol identifier of "https: / / " can be represented by "0001" as its binary code; the remaining bits can be reserved for other protocol identifiers, such as "ftp: / / ", thereby reducing the number of bits occupied when the access link is converted into binary code, and thus carrying more information when embedding the bit sequence in the subsequent first screenshot.

[0169] Step 2: Import the original sequence into a preset redundancy coding algorithm to obtain the first bit sequence corresponding to the access link.

[0170] In this embodiment, after encoding each character in the access link to obtain the corresponding original sequence, the electronic device can use a preset redundancy encoding algorithm to perform redundant encoding on the original sequence to improve the robustness during transmission, thereby improving the accuracy of subsequent restoration of the access link. The original sequence with added check bits is then identified as the first bit sequence corresponding to the access link.

[0171] In one possible implementation, the aforementioned redundancy coding algorithm can be: a channel polarization-based coding algorithm, such as Polar coding; it can also be low-density parity-check (LDPC) coding and convolutional coding. The specific redundancy coding method used can be determined according to the actual situation and is not limited here. Since, in practical use, as the original bit error rate increases, the error correction capability of the bit sequence obtained by Polar coding is stronger than that obtained by LDPC coding and convolutional coding, this embodiment of the application can perform redundant coding on the original sequence using the Polar coding algorithm when generating the first bit sequence.

[0172] In this embodiment, each character in the access link is converted into its corresponding binary code using Huffman coding. Since Huffman coding determines the code length of each character based on its frequency of occurrence, it can reduce the number of bits after the access link is converted into binary. Furthermore, by adding correction bits through a redundant coding algorithm while saving bit overhead, the robustness of the generated bit sequence can be improved, thereby improving the accuracy of subsequent decoding of the access link.

[0173] In one possible implementation, after initiating a screenshot of the current page, the electronic device can also edit the screenshot and recognize the edited image as the first screenshot. For example, Figure 7 The diagram illustrates a specific implementation of S502.1 according to an embodiment of this application. See [link / reference]. Figure 7 As shown, in this embodiment, after the electronic device responds to the first operation initiated by the user, the user can edit the screenshot, specifically including the following steps:

[0174] In S701, in response to the first operation, the original screenshot corresponding to the first page is displayed.

[0175] In this embodiment, after the user initiates the first operation (i.e., a screenshot operation), the electronic device can obtain the content displayed on the current screen of the electronic device, that is, obtain the original screenshot corresponding to the first page, and display the original screenshot. For example, Figure 8 This illustration shows a screenshot obtained according to an embodiment of this application. See also Figure 8As shown in (a), after initiating a screenshot operation, the electronic device can obtain a screenshot of the current page and generate a screenshot success prompt box 81. This prompt box 81 can display a thumbnail of the screenshot, as well as a save control 82 and an edit control 83. If the electronic device detects that the user clicks the save control 82, it recognizes that the user does not need to edit the screenshot obtained by the screenshot operation; that is, the original screenshot obtained is the first screenshot subsequently obtained. Therefore, an access link can be embedded into the first screenshot. Conversely, if the electronic device detects that the user clicks the edit control 83, it recognizes that the user needs to edit the screenshot. In this case, a corresponding screenshot editing interface can be generated, and the original screenshot can be displayed in the screenshot editing interface, such as... Figure 8 As shown in (b), users can initiate editing operations on the original screenshot in this screenshot editing interface.

[0176] The method for obtaining the bit sequence corresponding to the access link can be found in the relevant description of the above embodiments, and will not be repeated here.

[0177] In S702, in response to an editing operation, the original screenshot is edited to obtain the first screenshot.

[0178] In this embodiment, the electronic device can display an editing interface for the original screenshot, allowing the user to edit it. This editing can include cropping, rotating, drawing, adding text, etc. The specific editing content can be set according to the user's actual usage and is not limited here. As described above... Figure 8 As shown in (b), users can click the cropping control 84 to adjust the content to be retained in the screenshot, such as... Figure 8 The screenshot shown in (c) can be clicked after editing to indicate that the content editing operation has been completed. In response to the user's click on the completed control 85, the electronic device will determine the edited screenshot as the first screenshot and embed the page access link into the first screenshot.

[0179] In this embodiment of the application, when the user needs to edit the screenshot, the access link can be embedded after the user has finished editing. This avoids repeatedly performing the link embedding operation and also prevents the information of the embedded access link from being changed due to the user's editing operation, thereby improving the accuracy of the access link embedded in the screenshot.

[0180] In S502.2, based on the first bit sequence corresponding to the access link, the first pixel value of the first pixel in the first screenshot is adjusted to obtain the second screenshot.

[0181] In this embodiment, after determining that an access link needs to be embedded in the first screenshot, the electronic device can perform image encoding on the first screenshot to embed the first bit sequence of the access link into the first pixel of the first screenshot. Specifically, this is achieved by changing the first pixel value of the first pixel. The process of embedding the first bit sequence can include the following steps: region division, pixel value reading, and bit value adjustment. The implementation process of these three steps is described in detail below:

[0182] Step 1: Region Division

[0183] In this embodiment, the electronic device can divide the first screenshot into multiple image regions. These multiple image regions include a first image region that needs to carry the bit value of one bit in the first bit sequence corresponding to the access link. Optionally, the multiple image regions may also include image regions that do not need to carry the bit value of the first bit sequence, i.e., second image regions.

[0184] In some implementations, all image regions obtained from the first screenshot are the aforementioned first image regions. For example, if the first screenshot is divided into M*N image regions, then all M*N image regions can be used to carry the bit values ​​in the first bit sequence corresponding to the access link. For example, Figure 9 A schematic diagram illustrating the division of an image region according to an embodiment of this application is shown. See also... Figure 9 As shown in (a), the number of image regions contained in the first screenshot is the same as the number of bits in the first bit sequence. For example, if the length of the first bit sequence is 80 bits, then the first screenshot can be divided into 80 image regions.

[0185] In some implementations, a portion of the image region in the first screenshot can be used as the first image region. For example, if the number of bits in the first bit sequence is less than M*N, that is, the number of image regions obtained by the above division is greater than the number of bits in the first bit sequence, then a portion of the image regions can be selected from the M*N image regions as the first image region.

[0186] See Figure 9 As shown in (b), the number of image regions contained in the first screenshot is greater than the number of bits in the bit sequence. For example, if the size of the first bit sequence is 80 bits and the first screenshot is divided into 90 image regions, then 80 of the image regions can be selected as the first image regions, and the remaining 10 image regions can be selected as the second image regions.

[0187] See Figure 9As shown in (c), the number of image regions contained in the first screenshot is greater than the number of bits in the first bit sequence. In this case, a first image region for carrying the bit values ​​in the first bit sequence can be determined from the multiple image regions using a preset region distribution pattern. For example, if the first screenshot includes 9 image regions and the bit sequence includes 4 bits, then a first image region for carrying the 4 bits needs to be determined from the 9 image regions. The electronic device can determine the second image region in the first row, i.e., region 91, as the first image region using the preset region distribution pattern. Similarly, the first image region in the second row, i.e., image region 92, is also the first image region, and so on. Four first image regions can be determined from the first screenshot. The region distribution patterns corresponding to different images can be the same or different, depending on the actual situation. Optionally, the above region distribution pattern can be stored in the metadata (MetaData) of the first screenshot.

[0188] The relationship between the number of first image regions and the number of bits in the first bit sequence can be determined based on the actual situation. For example, in scenarios where the reliability and robustness of access links need to be improved, the number of pixels contained in each first image region needs to be increased, which can reduce the number of first image regions to improve the accuracy of subsequent bit value restoration; in scenarios where the number of bits carried by the screenshot needs to be increased, the number of pixels contained in each first image region can be reduced, thereby dividing more first image regions to carry access links with more characters.

[0189] In one possible implementation, if the number of bits in the first bit sequence is greater than the number of first image regions obtained by dividing the first screenshot, then two or more channels can be selected as channels for embedding the first bit sequence. For example, the first screenshot includes three channels: a red channel, a blue channel, and a green channel, each corresponding to a grayscale value. The first screenshot can be divided into 100 image regions, while the number of bits in the first bit sequence corresponding to the aforementioned access link is 150, meaning that on average, each image region needs to carry 1.5 bits of information. Since the first screenshot includes 3 channels, and each channel of an image region in the first screenshot can carry 1 bit, an image region can carry a maximum of 3 bits of information. Based on this, the grayscale values ​​of all image regions in the red channel can be selected to carry 100 bits of bit value in the bit sequence, and the grayscale values ​​of the first 50 image regions in the blue channel can be selected to carry the remaining 50 bits of bit value in the bit sequence. Thus, even when the number of bits in the first bit sequence is greater than the number of image regions, the first bit sequence of the access link can still be fully carried, increasing the embeddable length of the access link and thereby expanding the applicability of the solution.

[0190] In one possible implementation, the electronic device can divide the first screenshot into regions based on a preset number of rows and columns. For example, if the electronic device limits the number of rows and columns to M and N, where M and N are both positive integers, then the electronic device can divide the first screenshot into regions based on these numbers to obtain M*N image regions. Several image regions are then selected from these M*N regions to carry the bits of the first bit sequence. By segmenting the image in this way, first screenshots of different sizes can be divided into the same number of image regions, improving the uniformity of the number of image regions.

[0191] In one possible implementation, the electronic device can define the area of ​​each image region, i.e., specify the number of pixels occupied by the length and the number of pixels occupied by the width of each image region. The electronic device can divide the first screenshot into multiple image regions based on these unit areas. For example, if the area of ​​a unit region is a*b pixels, where a and b are both positive integers, and the image size of the first screenshot is L*H pixels, where L and H are both positive integers, then dividing the first screenshot into regions based on these unit areas will yield (L*H) / (a*b) image regions. Several image regions can then be selected from these (L*H) / (a*b) image regions as the first image region. By segmenting the first screenshot in this way, the image regions obtained from multiple screenshots with different canvas sizes can be of the same size, thereby improving the uniformity of image regions between different screenshots.

[0192] Step 2: Pixel value reading

[0193] In this embodiment, after determining the first image region in the first screenshot, the electronic device can obtain the first pixel value corresponding to each first pixel within the first image region. This first pixel value can include grayscale values ​​in multiple channels, or it can be the grayscale value in a preset channel (such as the first channel).

[0194] In some implementations, the electronic device can obtain the grayscale value of each first pixel in the first image region on a preset first channel. Subsequently, the grayscale value of the first channel can be adjusted according to the bit value associated with the first image region, so as to achieve the purpose of carrying the bit value of the corresponding bit in the first bit sequence through the first image region.

[0195] In some possible implementations, the first pixel value may specifically include grayscale values ​​of one or more channels, that is, each channel may correspond to a grayscale value.

[0196] In one possible implementation, the aforementioned first screenshot can specifically be an RGB image, containing a red channel, a green channel, and a blue channel, each corresponding to a grayscale value. The electronic device can select at least one of these three channels as the channel whose grayscale value needs to be adjusted. For example, selecting the red channel allows adjustment of the grayscale value of all first pixels within the first image area in the red channel, meaning the grayscale value of the red channel is used to carry the bit value of one bit in the first bit sequence.

[0197] In some implementations, the first channel can be the blue channel, since the blue channel is the most opaque channel in an RGB image, thus ensuring that the overall color deviation of the image is small after carrying the bit values.

[0198] In some implementations, the first channel can be the red channel. Since the red channel is the channel with both concealment and robustness in the RGB image, that is, the concealment is lower than the blue channel, but the robustness is better than the blue channel, it can reduce color deviation while also improving the robustness of the carried bit value.

[0199] In one possible implementation, the first screenshot can be a color HSB image, which includes a hue channel, a saturation channel, and a brightness channel. Alternatively, the first screenshot can be a cyan-magenta-yellow-black CMYK image, which includes a cyan channel, a magenta channel, a yellow channel, and a black channel. The specific number and type of channels included in the first screenshot can be determined based on the image format of the first screenshot, and are not limited here.

[0200] Step 3: Bit value adjustment

[0201] In this embodiment, each first image region in the first screenshot is used to carry the bit value of a bit in the first bit sequence. That is, each first image region can determine the corresponding bit from the first bit sequence, and adjust the first pixel value of the first pixel in the first image region using the bit value corresponding to that bit. For example, Figure 10 This diagram illustrates the determination of bit values ​​for each first image region according to an embodiment of this application. See also... Figure 10As shown, the first bit sequence corresponding to a certain access link is [0110…1101]. The value of its highest bit (i.e., the first bit in the first bit sequence) is 0. Therefore, the first image region of the first screenshot corresponds to the first bit in the first bit sequence, and the value of this first bit is 0. The value of the second highest bit (i.e., the second bit in the first bit sequence) is 1. Therefore, the value of the first image region corresponding to the second screenshot is 1. And so on, the first image region corresponding to each bit in the first bit sequence and the bit value corresponding to each first image region can be determined.

[0202] In this embodiment, the electronic device can adjust the first pixel value of the first pixel in the first image region according to the bit value of the bit corresponding to each first image region. In some implementations, the gray value of the first pixel in the first channel can be adjusted to carry the bit value of a specific bit in the bit sequence. Subsequently, the bit value of the corresponding bit can be restored by the first pixel value of all the first pixels in the first image region to realize the embedding and parsing of information.

[0203] In one possible implementation, the method of adjusting the grayscale value of each first pixel in the first image region in the first channel can be as follows: based on the bit value corresponding to the first image region, set the value of the binary code corresponding to the grayscale value of each first pixel in the first image region in the first channel at a preset bit position, so that the value of the binary code corresponding to each second pixel in the first image region in the adjusted second screenshot is the same at the preset bit position.

[0204] In one possible implementation, the binary code corresponding to each second pixel in the adjusted second screenshot has the same value at a preset bit position as the bit value corresponding to the first image region where the second pixel is located. The binary code is obtained by converting the grayscale value of the second pixel in the first channel.

[0205] For example, Figure 11 This diagram illustrates an embodiment of the present application that provides for adjusting grayscale values ​​based on bit values. See also... Figure 11 As shown in (a) of the figure, the first image region within the first screenshot may include at least four pixels, namely pixel 1 to pixel 4. The gray values ​​of the above four pixels in the preset first channel (i.e., the channel whose gray value needs to be adjusted) are 10, 21, 144 and 111, respectively. The conversion of the above four gray values ​​into binary codes can be found in Table 1.

[0206] Pixel encoding Grayscale value (decimal) Grayscale values ​​(binary encoding) The value of the second bit Pixel 1 10 0000 1010 1 Pixel 2 21 0001 0101 0 Pixel 3 144 10010000 0 Pixel 4 111 01101111 1

[0207] Table 1

[0208] Referring to Table 1, the second bit is the second bit in the binary encoding sequence from the low bit to the high bit. When adjusting the second bit of the above four pixels, the electronic device can set the bit value of the second bit to the bit value corresponding to the first image region. For example, if the bit value corresponding to the first image region is 1, then the bit values ​​of the second bits corresponding to the above four pixels can all be adjusted to 1. The grayscale values ​​corresponding to each second pixel in the second screenshot can be found in Table 1. Figure 11 As shown in (b), pixel 1 has the same second bit value (1) as the corresponding bit value in its image region. Therefore, its adjusted binary code remains the same as before, 0000 1010, meaning its grayscale value remains unchanged. The decimal grayscale value before and after the adjustment is 10. Similarly, the decimal grayscale value of pixel 4 also remains unchanged at 111. However, since the second bit value of the binary codes for pixels 2 and 3 is 0, which is different from the corresponding bit value in their image regions, the adjusted binary code for pixel 2 is 0001 0111, meaning its decimal grayscale value changes from 21 to 23. Similarly, the decimal grayscale value of pixel 4 changes from 144 to 146. Other pixels in this image region can also be adjusted in the same way, which will not be elaborated further here.

[0209] In one possible implementation, the binary code corresponding to each second pixel in the second screenshot obtained by the above adjustment has a value at a preset bit position that is different from the bit value corresponding to the first image region where the second pixel is located. For example, the value of the preset bit position is the inverse of the bit value corresponding to the first image region. Continuing with... Figure 11 Taking an example, the grayscale value of pixel 1 in a certain channel is 10 in decimal representation, and the corresponding binary code is 00001010. The value of its second bit is 1. Since the bit value corresponding to the first image area is 1, the corresponding inverse code is 0. Therefore, the value of the second bit of the above binary code can be adjusted to 0, that is, the grayscale value of pixel 1 in the second screenshot after adjustment is 8 in decimal representation.

[0210] In one possible implementation, the preset bit for adjusting the binary code can be either the second or third bit in the binary code. The second bit refers to the second bit in the binary code from the low bit to the high bit direction; the third bit refers to the third bit in the binary code from the low bit to the high bit direction.

[0211] During image transmission, compression may occur, for example, compressing an image from 8-bit color mode to 6-bit color mode. In this case, the lower-order bits are merged, while the higher-order bits are retained. This results in distortion of the lower-order bits, while the higher-order bits remain unchanged. Therefore, when selecting the preset bit position for adjustment, a higher bit position provides stronger anti-interference capabilities, but also results in greater color deviation before and after adjustment. To balance anti-interference capabilities carried by the bit information with minimizing color deviation, the second or third bit in the binary encoding corresponding to the grayscale value can be selected for numerical adjustment.

[0212] In one possible implementation, the first image region can correspond to a pattern used to determine the preset bit distribution corresponding to each pixel, i.e., a bit distribution pattern. The electronic device can determine the number of bits to be adjusted for each first pixel in the first image region based on the aforementioned bit distribution pattern. For example, Figure 12 This illustration shows a bit distribution pattern provided in an embodiment of this application, illustrating how to determine the bits to be adjusted in the binary code corresponding to each first pixel. See also... Figure 12 As shown, the bit distribution pattern corresponding to the first image region is pattern 121, and one of the first image regions in the first screenshot is region 122. Region 122 contains multiple pixels, such as pixel 123 and pixel 124. By overlapping pattern 121 and region 122, the bit position corresponding to each pixel in region 122 can be determined. Thus, the preset bit position corresponding to pixel 123 can be determined as the second bit position, and the preset bit position corresponding to pixel 124 can be determined as the third bit position. Therefore, based on the bit distribution image, the preset bit position to be adjusted for each first pixel can be determined, which can improve the flexibility of bit position selection and allow the bit distribution pattern to be adjusted according to the actual scene.

[0213] Optionally, the bit distribution pattern can be stored in the metadata of the second screenshot so that when decoding the access link of the second screenshot later, the corresponding bit distribution pattern can be obtained by reading the metadata, and then the corresponding access link can be decoded.

[0214] In this embodiment, the electronic device can adjust the first pixel value of the first pixel of each first image region in the first screenshot in the manner described above, until each first image region carries the bit value of the corresponding bit in the first bit sequence, so as to obtain the second screenshot.

[0215] In one possible implementation, the first screenshot includes a first channel and a second channel. The first channel is the channel among the multiple channels of the first screenshot that needs to carry bit values; the second channel is any other channel in the first screenshot besides the first channel. For example, if the first screenshot is an RGB image, the electronic device can convert the RGB image into a YCrCb image, which includes a luminance (Y) channel and two chrominance (Cr and Cb) channels. Since the luminance channel has better anti-interference capabilities, the Y channel can be used as the channel that needs to carry the bit values ​​of the first bit sequence. Therefore, the first channel is the Y channel, while the Cr and Cb channels are the second channels.

[0216] Adjusting the grayscale value of the first pixel in the first channel based on the bit values ​​in the bit sequence can cause color deviation in the screenshot. To reduce color shift caused by embedding access links, electronic devices can adjust the grayscale value of the first pixel in the second channel using a color balance algorithm. This improves the concealment of the embedded access link, reduces the probability of it being detected by the human eye, and thus achieves the embedding of access links while maintaining the aesthetics of the screenshot. For example, Figure 13 A flowchart illustrating the implementation of S502 according to another embodiment of this application is shown. See also Figure 13 As shown, the above S502.2 may specifically include the following steps:

[0217] In S1301, for any first image region, the value of the binary encoding corresponding to the grayscale value of the first pixel in the first image region of the first screenshot in the first channel is set as the bit value that the first image region needs to carry.

[0218] In this embodiment, the method of adjusting the grayscale value of each pixel in the first channel can refer to the description above. For example, the value of the preset bit in the binary code corresponding to the grayscale value can be adjusted. The specific implementation method can be found in the description above, and will not be repeated here.

[0219] In S1302, for any first pixel in any first image region, based on the adjusted gray value of the first channel, color equalization processing is performed on the gray value of the first pixel in the second channel; the second channel is any channel other than the first channel.

[0220] In this embodiment, in addition to adjusting the grayscale value of each first pixel in the first channel, the electronic device can also adjust the grayscale value of each first pixel in other channels (i.e., the second channel) according to the color equalization algorithm, so that the color before the grayscale value adjustment is similar to the color after color equalization, thereby reducing the visual perception of color adjustment.

[0221] In one possible implementation, the arrangement of each pixel in the display module of the electronic device is a diamond dot matrix structure. For example, Figure 14 A comparative diagram showing the standard RGB dot matrix structure and the diamond dot matrix structure is provided. See also... Figure 14 As shown, in a standard RGB pixel matrix structure, each RGB pixel has the same number of three channels, which are evenly distributed. In a diamond pixel matrix structure, a pixel can include four channels: one red channel, one blue channel, and two green channels. The two green channels can include the G1 and G2 channels. Optionally, the first channel can be the blue channel, and the second channel can be the red channel, or it can be either the G1 or G2 channel, or all three channels, depending on the specific requirements.

[0222] For example, Figure 15 A schematic diagram of color balance provided in one embodiment of this application is shown. See also... Figure 15 As shown, the RGB values ​​of a certain pixel 01 are 120, 155, and 128, respectively, and their corresponding binary codes are [01111000], [10011011], and [10000000]. The third bit of the B channel is encoded according to the bit value 1 corresponding to this pixel, changing from [10000000] to [10000100]. The corresponding decimal value changes from 128 to 132. Since the blue channel value is increased, the color becomes somewhat darker. Through a color equalization algorithm, the values ​​of the R and G channels need to be reduced. For example, the R channel value is changed from 120 to 118, and the G channel value is changed from 155 to 154. Therefore, the corresponding binary codes are adjusted to [0110110] and [10011010].

[0223] In this embodiment, after embedding the first bit sequence into the first channel of the first image region, the electronic device can also adjust the grayscale values ​​of other channels according to the color balance algorithm to reduce the color deviation caused by information embedding and achieve seamless adjustment for the user.

[0224] In this embodiment, after the electronic device completes the adjustment operation of the first pixel value of the first pixel in each first image region of the first screenshot, it can obtain the first screenshot after adjusting the first pixel value, that is, obtain the aforementioned second screenshot. The second screenshot is a screenshot carrying the first bit sequence corresponding to the access link. The access link can be restored by parsing the second screenshot. It should be noted that, unlike existing watermarking technologies, which generally embed access links through readable strings or machine-readable QR codes, this embodiment uses the first pixel value of the first pixel in the first screenshot based on the bit values ​​in the first bit sequence to make the embedded access link invisible and impossible to read directly by scanning, thereby improving the concealment of the embedded information.

[0225] In one possible implementation, to reduce unnecessary parsing operations, the second screenshot may also carry a first identifier, which indicates whether the screenshot contains an access link. If the first identifier is a first value, it means that the second screenshot contains access link information; conversely, if the first identifier is a second value, it means that the second screenshot does not contain an access link. When performing subsequent operations on the screenshot, the value of the first identifier can be read first to determine whether an access link restoration operation needs to be performed.

[0226] Optionally, the first value can be 1, the second value can be 0, or other values, depending on the actual situation.

[0227] In one possible implementation, the aforementioned first identifier can be recorded in the metadata of the second screenshot.

[0228] In one possible implementation, the first screenshot includes a first channel and a second channel. The electronic device can use the first channel to carry the bit values ​​of the first bit sequence corresponding to the access link, and the second channel can carry the bit values ​​of the second bit sequence corresponding to the first identifier, thereby achieving the purpose of partition embedding. Specifically, the implementation process can be as follows: based on the second bit sequence corresponding to the first identifier, adjust the grayscale value of each first pixel in the first screenshot in the second channel; based on the first bit sequence corresponding to the access link, adjust the grayscale value of each first pixel in the first screenshot in the first channel. The specific method of adjusting grayscale values ​​according to the bit sequence can be found in the description above, and will not be repeated here.

[0229] In subsequent analysis, the second channel of the second screenshot can be analyzed first to determine whether the first identifier is the first value. If the first identifier is the first value, then the first channel can be analyzed, thereby reducing unnecessary analysis operations and improving the efficiency of subsequent image analysis.

[0230] In one possible implementation, the aforementioned metadata also records the partitioning method, such as partitioning based on a preset number of rows and columns, or partitioning based on a preset region size.

[0231] As can be seen from the above, in this embodiment of the application, when a first operation to take a screenshot of the first page currently displayed on the electronic device is received, a first screenshot corresponding to the first page and an access link corresponding to the first page can be obtained. Based on the characters contained in the access link, a first bit sequence corresponding to the access link is generated. The first pixel value of the first pixel in the first screenshot is adjusted according to the first bit sequence, thereby obtaining a second screenshot with the access link embedded, so as to achieve the purpose of implicitly embedding the access link in the second screenshot. In this embodiment of the application, the first pixel value of the first screenshot can be adjusted according to the first bit sequence of the access link, so as to implicitly carry the information of the access link in the screenshot, without occupying the visible area of ​​the screenshot. That is, the above-mentioned embedded access link is invisible to the user, thereby increasing the proportion of effective content in the screenshot and maintaining the visibility of the content of the first page in the screenshot.

[0232] Phase 2: Decoding screenshots containing embedded access links

[0233] For example, Figure 16 This diagram illustrates a flowchart of an image processing method according to an embodiment of this application, specifically the image decoding stage. See also... Figure 16 As shown, this image processing method is specifically used for decoding screenshots that embed access links in an invisible and unobtrusive manner. Specifically, the image processing method includes the following steps:

[0234] In S1601, in response to the second operation for the third screenshot, the first page corresponding to the access link carried by the third screenshot is displayed; the first bit sequence corresponding to the access link is carried in the third pixel value of the third pixel of the third screenshot.

[0235] In this embodiment, the third screenshot is a screenshot carrying the access link corresponding to the first page, wherein the first bit sequence is carried by the third pixel value of the third pixel in the third screenshot. The electronic device can display the third screenshot in the interface corresponding to the first application, and then the user can initiate an image decoding operation on the third screenshot in the interface of the first application, that is, the second operation mentioned above, to achieve the purpose of displaying the first page through the screenshot.

[0236] For example, Figure 17 This illustration shows a schematic diagram of a first application scenario illustrated in the third screenshot provided in an embodiment of this application. See also... Figure 17 As shown in (a), after a user takes a screenshot of a webpage, the screenshot can be stored in the local gallery. The user can then open the gallery application on their electronic device and view the images in the image list interface (e.g., ...). Figure 17 Interface 171 displays thumbnails of stored images. Interface 171 also displays a screenshot 172 of a webpage, which includes a link to the webpage. Users can click on screenshot 172 to preview it and obtain the desired results. Figure 17 The interface shown in (b) is shown in the image.

[0237] In some implementations, when a user clicks on screenshot 172, a decoding operation can be triggered on screenshot 172, and it can be determined whether screenshot 172 contains an access link. If screenshot 172 contains an access link, the corresponding page redirection control can be displayed, such as... Figure 17 As shown in (b) above, control 173 allows users to access the corresponding interface by clicking on it, such as... Figure 17 The interface shown in (d) is shown in the image.

[0238] In some implementations, when a user clicks on screenshot 172, i.e., initiates a preview operation on screenshot 172, if screenshot 172 carries an access link, the corresponding web page can be directly displayed, such as... Figure 17 The interface shown in (d) is such that, in this case, the second operation described above can be a preview operation for screenshot 172.

[0239] In some implementations, users can also long-press screenshot 172 to bring up the corresponding operation menu 174, such as... Figure 17 As shown in (c), if the screenshot 172 contains an access link, the above operation menu 174 may include a page jump control 175, and the user can directly jump to the corresponding page by clicking the above page jump control 175.

[0240] For example, Figure 18 This illustration shows a schematic diagram of a second scenario in a third screenshot provided in an embodiment of this application. See also... Figure 18As shown in (a), users can communicate with other users through a chat application, as in interface 181. Other users send screenshots carrying access links via their terminals, as in screenshot 182 in interface 181. Since screenshot 182 carries an access link, a specified action can be initiated on screenshot 182 to redirect to the page corresponding to the access link. The specified action can include the following three types:

[0241] Method 1: Drag and drop the screenshot to the smart assistant

[0242] Users can select screenshot 182 as the drag-and-drop object in the chat interface and drag it to the key area that activates the smart assistant, such as... Figure 18 Area 183, shown in (a) above, is the bottom area. When the user drags screenshot 182 to area 183, the smart assistant will be activated, such as... Figure 18 As shown in (b), the interactive interface 184 of the smart assistant is displayed on the chat interface, and when the screenshot 182 is detected to carry an access link, the corresponding jump control 185 can be displayed to prompt the user whether to jump to the interface corresponding to the access link.

[0243] Method 2: Long press to trigger

[0244] Users can also long-press to bring up the operation menu 186 for screenshot 182, such as... Figure 18 As shown in (c), when the user long-presses screenshot 182, a parsing operation for screenshot 182 is triggered. This involves determining whether the first identifier in screenshot 182 is a first value, i.e., whether it carries an access link. If an access link is detected (e.g., when the first identifier in the metadata of screenshot 182 is a first value, or when the first identifier is determined to be a first value by analyzing the grayscale value of the second pixel in the second channel of the second screenshot), a page navigation control 187 can be displayed in the operation menu 186. The process of parsing the access link from screenshot 182 can be completed within the time interval between the display of the operation menu 186 and the user clicking the page navigation control 187. This eliminates the need to complete the access link parsing operation when the operation menu 186 is displayed, thereby reducing the waiting time required for the operation menu 186 to be displayed and improving the smoothness of the user operation.

[0245] Method 3: Click to trigger

[0246] Similar to the preview method triggered in the photo album, users can preview screenshot 182 in the chat application by clicking on screenshot 182, thus obtaining the following result. Figure 18As shown in (d) of the interface, during the user's preview of screenshot 182, the electronic device can parse the screenshot 182 to determine whether it carries an access link. If it carries an access link, the corresponding page jump control 188 can be displayed in the preview interface. The user can click the control 188 to jump to the corresponding page.

[0247] It should be noted that in other applications that can receive or preview images, the image parsing operation can also be triggered through any of the above methods. If an access link is obtained after parsing, the user will be redirected to the corresponding page. For specific implementation details, please refer to the above description, which will not be repeated here.

[0248] In some implementations, the aforementioned third screenshot can be a second screenshot generated through stage 1, for example... Figure 17 In the application scenario shown, screenshot 172 is a screenshot stored in the gallery. This screenshot 172 can be a screenshot taken by the user while browsing other pages and stored in the gallery. In this case, the screenshot 172 is the screenshot generated by the above-mentioned stage 1, that is, the third screenshot is the second screenshot.

[0249] In some implementations, the third screenshot mentioned above can be an image obtained based on the second screenshot. Continuing with... Figure 17 Taking the application scenario as an example, the screenshot 172 above can be received from other terminals, such as receiving and storing it in the gallery via Bluetooth module, or receiving and saving it in the local gallery via a chat application. Because image errors can occur during inter-device transmission, such as changes in pixel values ​​before and after transmission, the third screenshot is not the same as the second screenshot; it is the image obtained after the second screenshot has been transmitted between devices.

[0250] In some possible implementations, during the use of the second screenshot, such as when the second screenshot is sent to other devices or when other applications obtain the second screenshot from the local gallery, the image can be compressed. In this case, the third screenshot can be a screenshot obtained by compressing the second screenshot, for example, by compressing the resolution of the second screenshot to obtain the third screenshot.

[0251] In some implementations, the third screenshot may contain metadata, which carries a first identifier indicating whether the third screenshot carries an access link. Specifically, a first identifier of a first value indicates that the third screenshot carries an access link; a second identifier of a second value indicates that the third screenshot does not carry an access link. In this case, when the electronic device responds to the user's second action, it can identify whether the first identifier in the third screenshot's metadata is a first value. If the first identifier is a first value, the operation of determining the access link based on the third pixel value of the third pixel in the third screenshot can be performed; otherwise, if the first identifier is a second value, the subsequent operation of determining the access link is unnecessary.

[0252] In some implementations, the first value can be 1 and the second value can be 0.

[0253] In this embodiment of the application, before performing the parsing operation of the third screenshot, the first identifier in the metadata of the third screenshot can be read first, and the parsing operation of the third screenshot can be performed only when the first identifier is a first value. This can reduce unnecessary parsing operations, thereby improving the response speed of the second operation, saving the resource consumption of electronic devices, and improving resource utilization.

[0254] In this embodiment, when the electronic device performs image parsing on the third screenshot, the parsing process corresponds one-to-one with the process of embedding the first bit sequence of the access link into the first screenshot. Specifically, it can include the following steps: region division, pixel value reading, and bit value determination. The following describes in detail how the above three steps are implemented during the decoding process:

[0255] Step 1: Region Division

[0256] For example, Figure 19 This illustration shows a schematic diagram of an embodiment of the present application for determining the bit values ​​carried by each first image region. See also Figure 19 As shown, similar to the process of embedding the access link, when decoding the third screenshot, the electronic device can divide the third screenshot into image regions to obtain multiple image regions. For example, image 191 can be divided into image region 192 and image region 193. Each image region in the third screenshot carries the bit value of a bit in the first bit sequence corresponding to the access link; that is, all image regions in the third screenshot are first image regions. Alternatively, some image regions in the third screenshot may carry the bit value of a bit in the first bit sequence corresponding to the access link; that is, image regions carrying bit values ​​are first image regions, and image regions not carrying bit values ​​are second image regions.

[0257] In this embodiment, the electronic device can divide the third screenshot into regions according to a preset division method. For example, the preset division method limits the number of regions contained in each row and the number of regions contained in each column. For instance, if each screenshot can be divided into M*N image regions, that is, each row contains M image regions and each column contains N image regions, then the third screenshot can be divided into M*N image regions according to the above division method. Alternatively, the preset division method can limit the size of each image region, such as the number of pixels contained in each image region. The electronic device can divide the third screenshot into multiple image regions with the same size as the specified region. The image regions obtained from different screenshots have the same size, thereby improving the consistency of image region format between different screenshots. For the specific division method of the third screenshot, please refer to the division method of the first screenshot in stage 1, which will not be repeated here.

[0258] Step 2: Pixel value reading

[0259] In this embodiment, the electronic device can determine the first bit sequence it carries based on the pixel value of the third pixel in the third screenshot. In some implementations, each first image region of the third screenshot is used to carry the bit value of one bit. In this case, the electronic device can determine the bit value carried by the first image region based on the third pixel value of the third pixel in the first image region.

[0260] In some implementations, the electronic device can determine at least one channel, i.e., the first channel, from multiple channels of the third screenshot. For example, if the third screenshot is an RGB image and the channel carrying the bit values ​​is the B channel, then the grayscale value of each third pixel in any first image region of the third screenshot in the B channel can be read to determine its carried bit value. Continuing... Figure 19 Taking this as an example, the electronic device can read the grayscale value of each pixel in the image area 192 in the preset first channel, and obtain a grayscale value matrix 194.

[0261] In one possible implementation, after determining the grayscale value of each third pixel in the first image region corresponding to the first channel, the electronic device can convert the grayscale value into the corresponding binary code and read the bit value of a preset special bit in the binary code. For example, if the grayscale value of a pixel in the grayscale matrix 194 is represented as 133 in decimal, its binary code is [10000100]. The bit carrying the bit value is the third bit, and its value is 1. Each grayscale value in the grayscale matrix 194 is processed in the above manner to obtain the bit matrix 195. The electronic device can determine the bit value carried by the first image region based on the bit matrix 195.

[0262] The aforementioned preset bit can be the second and / or third bit in the binary encoding sequence from low bit to high bit.

[0263] In one possible implementation, the above method for determining the preset bit position can be: determining the preset bit position corresponding to each pixel based on the preset bit position distribution pattern.

[0264] Step 3: Bit value determination

[0265] In this embodiment, after determining the grayscale value of each third pixel in the first image region corresponding to the first channel, the electronic device can determine the bit value carried by the first image region based on the grayscale values ​​of all third pixels in the first image region in the first channel. For example, the grayscale values ​​of all third pixels in the first image region in the first channel are imported into a preset bit value determination algorithm to calculate the bit value carried by the first image region.

[0266] In one possible implementation, the electronic device can determine the bit value carried by the first image region based on the binary encoding corresponding to the grayscale values ​​of all third pixels within the first image region in the first channel. Specifically, the electronic device can count the number of different values ​​of the binary encoding corresponding to all third pixels within the first image region at a preset bit position, that is, count the first number where the preset bit position is 0 and the second number where the preset bit position is 1, and determine the bit value corresponding to the first image region based on the size relationship between the first number and the second number.

[0267] Specifically, if the first number is greater than the second number, the bit value carried by the first image region is identified as 0; if the second number is greater than the first number, the bit value carried by the first image region is identified as 1.

[0268] Continue with Figure 19 Taking an example, the bit matrix 195 described above is a matrix representing the values ​​of the third bit of the binary code corresponding to each pixel within image region 192. This image region contains 9 pixels, of which 8 have a third bit value of 1 and 1 has a third bit value of 0, meaning the maximum number of values ​​is 1. Therefore, it can be identified that image region 192 carries a bit value of 1. The same method can be used to determine the bit values ​​carried by each first image region for other image regions.

[0269] In this embodiment of the application, since the pixel values ​​of some pixels may change during transmission, for example, if a transmission error occurs, the value of the bit adjusted according to the bit value will also change. In order to improve the reliability of the restored bit value, the electronic device can determine the bit value carried by the first image area according to the bit value of all third pixels in the first image area at the preset bit position, and select the value with a larger number of pixels as its carried bit value, so as to improve the anti-interference ability of the bit value during transmission, thereby improving the reliability of the subsequent restored access link.

[0270] In this embodiment, the electronic device can obtain the access link corresponding to the first page based on the bit values ​​carried by multiple first image regions.

[0271] In this embodiment, the electronic device can determine the bit values ​​carried by each first image region in the third screenshot, and then arrange each bit value in sequence according to the encoding order of each first image region to obtain the first bit sequence. The process of generating the first bit sequence according to the bit values ​​is the same as the method of embedding each bit value in the first bit sequence into the first image region of the encoding sequence. For details, please refer to the relevant description in stage 1, which will not be repeated here.

[0272] In this embodiment, the electronic device can determine the encoding rule corresponding to the first bit sequence. For example, if it is determined that the first bit sequence is obtained by encoding each character using ASCII code, the first bit sequence can be restored to an access link represented by characters according to the ASCII code table. Alternatively, if the first bit sequence is obtained by encoding each character using Huffman coding, the first bit sequence can be restored to an access link represented by characters according to the Huffman coding table.

[0273] In one possible implementation, if the first bit sequence is obtained by processing a redundancy coding algorithm, the redundancy of the first bit sequence can be checked according to the decoding algorithm corresponding to the redundancy coding algorithm, thereby restoring the first bit sequence to the corresponding original sequence. Then, the original sequence can be restored to the access link represented by characters according to the corresponding encoding table (such as the ASCII code table or the Huffman code table).

[0274] In this embodiment, the electronic device can display the first page corresponding to the access link.

[0275] In this embodiment, the electronic device can access a link to display a first page corresponding to that link. This first page can be displayed in the first application currently running in the foreground of the electronic device, or in another application besides the first application; the specific display method can be determined based on the actual situation.

[0276] In some implementations, after determining the access link in the third screenshot, a redirect control corresponding to the access link can be displayed in the first application, such as... Figure 17 Control 173 in (b) and such Figure 17 If the user clicks on the jump control 175 in (c) of the second application, the first page corresponding to the access link can be displayed.

[0277] For example, Figure 20 This illustration shows a schematic diagram of a first page provided in one embodiment of this application. See also: Figure 20 As shown in (a), the electronic device receives screenshot 201 sent by user A in the chat application. The owner of the electronic device, i.e., user B, can drag screenshot 201 to the smart assistant. The electronic device displays the corresponding jump control 202 in the smart assistant interface. After the user clicks the jump control 202, if the chat application can call the browser component, the corresponding web page can be displayed within the chat application through the browser component, such as... Figure 20 The interface shown in (b) has a link to a shopping page. Users can view the shopping page within the chat application interface and view the purchase page corresponding to the access link within the page.

[0278] In some implementations, when a user needs to navigate to the first page corresponding to an access link, the electronic device can run a second application in the foreground and display the first page corresponding to the access link within the second application. Here, the second application is the application associated with the first page. Continuing with... Figure 20 Taking this as an example, if the electronic device detects that the user clicks the aforementioned jump control 202, it can launch the online shopping application corresponding to the product page and display the product page in the online shopping application. Figure 20 As shown in (c) in the figure.

[0279] As can be seen from the above, in this embodiment, since the third pixel value of the third pixel in the third screenshot carries the first bit sequence of the access link corresponding to the first page, that is, the third screenshot carries the access link, when the second operation corresponding to the third screenshot is received, the access link can be parsed and the corresponding first page can be displayed, thereby achieving the purpose of waking up the first page through the third screenshot. Compared with existing screenshot technology, since the third pixel value of the third pixel in the third screenshot carries the first bit sequence of the access link corresponding to the first page, the access link carried by the third screenshot is not in a visible state, thereby improving the visibility of the effective content in the first page in the third screenshot and reducing the occupation of the visible area due to the access link.

[0280] For example, Figure 21This diagram illustrates the overall flow of the information embedding and information parsing processes provided in an embodiment of this application. See also... Figure 21 As shown, the electronic device can respond to the user's first action, obtain a screenshot and the access link to the corresponding first page, and perform the following steps:

[0281] Step 1.1: Source coding, which converts the access link into binary, for example, by using a Huffman coding table to convert the above access into the original sequence.

[0282] Step 1.2: Channel coding. The original sequence is redundantly encoded using a redundancy coding algorithm to obtain the first bit sequence.

[0283] Step 1.3: Color gamut conversion, which can convert the screenshot to a preset image format, such as converting all images to YCrCb format or all images to RGB format.

[0284] Step 1.4: Bit encoding: Encode the first image region in the screenshot, including: image segmentation, for example, dividing the first screenshot into M*N first image regions, and embedding each first bit value of the first bit sequence to improve the anti-scaling capability of the first bit value.

[0285] Alternatively, the first screenshot can be divided into multiple first image regions, each containing k*k pixels, to improve the consistency of image regions between different screenshots.

[0286] Step 1.6: Obtain a screenshot of the embedded information.

[0287] Electronic devices can share screenshots to other devices or store them locally so that when viewing the screenshots locally later, they can quickly jump to the corresponding page.

[0288] Step 2.1: Color gamut conversion. Electronic devices can perform color gamut conversion on screenshots, converting them into images of preset formats, such as YCrCb format or RGB format, and determining the channels for embedding information.

[0289] Step 2.2: Bit Decoding: Determine the corresponding first bit sequence based on the pixel values ​​in the first image region of the screenshot.

[0290] Step 2.3: Channel decoding: The second bit sequence is calibrated and error-corrected to obtain the error-corrected sequence.

[0291] Step 2.4: Source decoding: Based on a preset decoding table, such as a Huffman coding table, the characters of the error-corrected sequence are restored to obtain the corresponding access link, and the page is redirected according to the access link.

[0292] Example 2:

[0293] Corresponding to the implementation flow of stage 1 in the image processing method of Embodiment 1 above, Figure 22 This diagram illustrates a structural block diagram of an image processing apparatus provided in an embodiment of this application. For ease of explanation, only the parts relevant to the embodiments of this application are shown.

[0294] See Figure 22 As shown, the image processing apparatus described above includes:

[0295] Display unit 221 is used to display the first page;

[0296] The screenshot acquisition unit 222 is used to acquire a second screenshot in response to a first operation that triggers a screenshot. The second screenshot is obtained by adjusting the first pixel value of the first pixel of the first screenshot corresponding to the first page according to the first bit sequence corresponding to the access link of the first page.

[0297] Optionally, the second screenshot includes a plurality of first image regions; each of the plurality of first image regions carries a bit value corresponding to a bit in the first bit sequence.

[0298] Optionally, the binary code corresponding to each second pixel in the first image area of ​​the second screenshot has a preset bit value that is the bit value carried by the first image area.

[0299] Optionally, the first image region corresponds to a bit distribution pattern; the bit distribution pattern is used to determine the preset bit of the binary code corresponding to each second pixel in the first image region.

[0300] Optionally, the screenshot acquisition unit 222 includes:

[0301] The first screenshot acquisition unit is used to acquire the first screenshot in response to the first operation;

[0302] A pixel adjustment unit is used to adjust the first pixel value of the first pixel in each of the first image regions of the first screenshot according to the bit value that the first image region needs to carry, so as to obtain the second screenshot.

[0303] Optionally, the pixel adjustment unit is specifically used to: for any first image region, set the value of the binary encoding of the grayscale value of the first pixel in the first image region of the first screenshot in the preset bit position as the bit value that the first image region needs to carry.

[0304] Optionally, the device further includes:

[0305] A color equalization unit is used to perform color equalization processing on the grayscale value of any first pixel in any first image region in a second channel based on the adjusted grayscale value of the first channel; the second channel is any channel other than the first channel.

[0306] Optionally, the binary code corresponding to each second pixel in the first image area of ​​the second screenshot is the grayscale value of each second pixel in the first image area of ​​the second screenshot in the first channel.

[0307] Optionally, the preset bit is the second or third bit in the binary encoding from the low bit to the high bit order.

[0308] Optionally, the first bit sequence is obtained by redundant encoding of the original sequence corresponding to the access link; the original sequence is determined based on the Huffman encoding of each character in the access link.

[0309] Optionally, the screenshot acquisition unit 222 includes:

[0310] The original screenshot acquisition unit is used to display the original screenshot in response to the first operation;

[0311] An editing unit is used to perform image editing on the original screenshot in response to an editing operation, thereby obtaining the first screenshot.

[0312] Optionally, the second screenshot carries a first identifier; when the first identifier is a first value, it indicates that the second screenshot carries the information of the access link.

[0313] Optionally, the second screenshot includes a first channel and a second channel; the pixel values ​​in the first channel of the second screenshot are obtained by adjusting the pixel values ​​in the first channel of the first screenshot according to the second bit sequence corresponding to the first identifier; the pixel values ​​in the second channel of the second screenshot are obtained by adjusting the pixel values ​​in the second channel of the first screenshot according to the first bit sequence corresponding to the access link of the first page; the first channel and the second channel are different channels; the first identifier is used to indicate whether the second screenshot carries an access link.

[0314] Example 3:

[0315] Corresponding to the implementation flow of stage 2 in the image processing method of Embodiment 1 above, Figure 23 This diagram illustrates a structural block diagram of an image processing apparatus provided in an embodiment of this application. For ease of explanation, only the parts relevant to the embodiments of this application are shown.

[0316] See Figure 23 As shown, the image processing apparatus described above includes:

[0317] The page display unit 231 is used to respond to the second operation on the third screenshot and display the first page corresponding to the access link carried by the third screenshot; the first bit sequence corresponding to the access link is carried in the third pixel value of the third pixel of the third screenshot.

[0318] Optionally, the page display unit 231 includes:

[0319] A bit value determination unit is used to determine the bit value carried by each first image region in the third screenshot;

[0320] The access link determination unit is used to obtain the access link based on the first bit sequence determined by the bit values ​​carried by all the first image regions.

[0321] Optionally, the bit value determination unit includes:

[0322] A binary encoding determination unit is used to determine, for any first image region, the binary encoding corresponding to the grayscale value of each third pixel in the first image region of the third screenshot on the first channel;

[0323] A counting unit is used to count the first number of each binary code when the preset bit is 0 and the second number when the preset bit is 1;

[0324] The first value determination unit is used to determine that the bit value carried by the first image region is 0 if the first number is greater than the second number.

[0325] The second value determination unit is used to determine that the bit value carried by the first image region is 1 if the second number is greater than the first number.

[0326] Optionally, the preset bit is the second or third bit in the binary encoding from the low bit to the high bit order.

[0327] Optionally, the device further includes:

[0328] The distribution pattern determination unit is used to determine the preset bit position corresponding to each of the third pixels in the first image region based on the bit distribution pattern corresponding to the first image region.

[0329] Optionally, the page display unit 231 includes:

[0330] An identifier determination unit is configured to, in response to the second operation, display the first page when it is recognized that the first identifier carried by the third screenshot is a first value.

[0331] Optionally, the page display unit 231 includes:

[0332] A page adjustment unit is configured to display the first page in a second application in response to the second operation of the first application on the third screenshot; the first application and the second application are different applications.

[0333] Optionally, the second operation includes one of the following: a click operation, a long press operation, and a drag operation to drag the third screenshot to the smart assistant.

[0334] Optionally, the third screenshot is an image that is the same as or different from the second screenshot; the second screenshot is obtained by adjusting the first pixel values ​​of the first pixels of multiple first image regions in the first screenshot corresponding to the first page according to the first bit sequence.

[0335] Optionally, the third screenshot is obtained by compressing the second screenshot.

[0336] Figure 24 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 24 As shown, the electronic device 24 of this embodiment includes: at least one processor 240 ( Figure 24 Only one processor is shown in the diagram, and the number of processors may match the actual number of chips included in the electronic device in the embodiment. Memory 241 and program 242 stored in memory 241 and executable on at least one processor 240, wherein the processor 240 executes program 242 to implement the steps in any of the above-described image processing method embodiments.

[0337] The electronic device 24 may be a smartphone, tablet computer, laptop computer, desktop computer, etc. This electronic device may include, but is not limited to, a processor 240 and a memory 241. Those skilled in the art will understand that... Figure 24 This is merely an example of electronic device 24 and does not constitute a limitation on electronic device 24. It may include more or fewer components than shown, or combine certain components, or different components. For example, it may also include input / output electronic devices, network access electronic devices, etc.

[0338] The processor 240 may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0339] In some embodiments, the memory 241 may be an internal storage unit of the electronic device 24, such as a hard disk or memory of the electronic device 24. In other embodiments, the memory 241 may be an external storage device of the electronic device 24, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the electronic device 24. Furthermore, the memory 241 may include both internal storage units and external storage devices of the electronic device 24. The memory 241 is used to store the operating system, applications, bootloader, data, and other programs, such as program code. The memory 241 can also be used to temporarily store data that has been output or will be output.

[0340] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.

[0341] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0342] This application also provides an electronic device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, wherein the processor executes the computer program to implement the steps in any of the above method embodiments.

[0343] This application also provides a readable storage medium storing a program that, when executed by a processor, implements the steps described in the various method embodiments above.

[0344] This application provides a program product that, when run on an electronic device, enables the electronic device to perform the steps described in the various method embodiments above.

[0345] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to a photographic device / electronic device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.

[0346] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0347] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. An image processing method, characterized in that, include: Display the first page; In response to a first operation for triggering a screenshot, a second screenshot is obtained, wherein the second screenshot is obtained by adjusting the first pixel value of the first pixel of the first screenshot corresponding to the first page according to the first bit sequence corresponding to the access link of the first page.

2. The method according to claim 1, characterized in that, The second screenshot includes multiple first image regions; each of the multiple first image regions carries a bit value corresponding to a bit in the first bit sequence.

3. The method according to claim 2, characterized in that, The binary code corresponding to each second pixel in the first image area of ​​the second screenshot has a preset bit value that is the bit value carried by the first image area.

4. The method according to claim 3, characterized in that, The first image region corresponds to a bit distribution pattern; the bit distribution pattern is used to determine the preset bit of the binary code corresponding to each second pixel in the first image region.

5. The method according to claim 3, characterized in that, The step of obtaining a second screenshot in response to a first operation for triggering a screenshot includes: In response to the first operation, the first screenshot is obtained; Based on the bit values ​​that the first image region needs to carry, the first pixel values ​​of the first pixels in each of the first image regions of the first screenshot are adjusted to obtain the second screenshot.

6. The method according to claim 5, characterized in that, The step of adjusting the first pixel value of the first pixel in each of the first image regions of the first screenshot according to the bit value that the first image region needs to carry, in order to obtain the second screenshot, specifically includes: For any of the first image regions, the value of the binary encoding corresponding to the grayscale value of the first pixel in the first image region of the first screenshot in the first channel is set as the bit value that the first image region needs to carry.

7. The method according to claim 6, characterized in that, After setting the value of the binary encoding corresponding to the grayscale value of the first pixel in the first image region of the first screenshot in the first image region to the value of the preset bit position for any first image region, the method further includes: For any first pixel in any first image region, based on the grayscale value of the first pixel after adjustment in the first channel, color equalization processing is performed on the grayscale value of the first pixel in the second channel; the second channel is any channel other than the first channel.

8. The method according to any one of claims 3-7, characterized in that, The binary code corresponding to each second pixel in the first image area of ​​the second screenshot is the grayscale value of each second pixel in the first image area of ​​the second screenshot in the first channel.

9. The method according to any one of claims 3-8, characterized in that, The preset bit is the second or third bit in the binary encoding from the low bit to the high bit order.

10. The method according to any one of claims 1-9, characterized in that, The first bit sequence is obtained by redundancy encoding of the original sequence corresponding to the access link; the original sequence is determined based on the Huffman encoding of each character in the access link.

11. The method according to any one of claims 1-10, characterized in that, The step of obtaining a second screenshot in response to a first operation for triggering a screenshot includes: In response to the first operation, the original screenshot is displayed; In response to the editing operation, the original screenshot is edited to obtain the first screenshot.

12. The method according to any one of claims 1-11, characterized in that, The second screenshot carries a first identifier; when the first identifier is a first value, it indicates that the second screenshot carries the information of the access link.

13. The method according to any one of claims 1-12, characterized in that, The second screenshot includes a first channel and a second channel; the pixel values ​​in the first channel of the second screenshot are obtained by adjusting the pixel values ​​in the first channel of the first screenshot according to the second bit sequence corresponding to the first identifier; the pixel values ​​in the second channel of the second screenshot are obtained by adjusting the pixel values ​​in the second channel of the first screenshot according to the first bit sequence corresponding to the access link of the first page; the first channel and the second channel are different channels; The first identifier is used to indicate whether the second screenshot carries an access link.

14. An image processing method, characterized in that, include: In response to the second operation on the third screenshot, the first page corresponding to the access link carried by the third screenshot is displayed; the first bit sequence corresponding to the access link is carried in the third pixel value of the third pixel of the third screenshot.

15. The method according to claim 14, characterized in that, The response to the second operation of the third screenshot displays the first page corresponding to the access link carried in the third screenshot, including: Determine the bit values ​​carried by each first image region in the third screenshot; The access link is obtained from the first bit sequence determined based on the bit values ​​carried by all the first image regions.

16. The method according to claim 15, characterized in that, The step of determining the bit values ​​corresponding to each first image region in the third screenshot includes: For any first image region, determine the binary code corresponding to the grayscale value of each third pixel in the first image region of the third screenshot on the first channel; Count the first number of each binary code that is 0 in the preset bit position and the second number that is 1 in the preset bit position; If the first number is greater than the second number, then the bit value carried by the first image region is determined to be 0; If the second number is greater than the first number, then the bit value carried by the first image region is determined to be 1.

17. The method according to claim 16, characterized in that, The preset bit is the second or third bit in the binary encoding from the low bit to the high bit order.

18. The method according to claim 17, characterized in that, Before counting the first number with a preset bit of 0 and the second number with a preset bit of 1 in each of the binary codes, the method further includes: Based on the bit distribution pattern corresponding to the first image region, the preset bit corresponding to each of the third pixels in the first image region is determined.

19. The method according to any one of claims 14-18, characterized in that, The response to the second operation of the third screenshot displays the first page corresponding to the access link carried in the third screenshot, including: In response to the second operation, if the first identifier carried by the third screenshot is identified as a first value, the first page is displayed.

20. The method according to any one of claims 14-19, characterized in that, The response to the second operation of the third screenshot displays the first page corresponding to the access link carried in the third screenshot, including: In response to the second operation of the third screenshot in the first application, the first page is displayed in the second application; the first application and the second application are different applications.

21. The method according to any one of claims 14-20, characterized in that, The second operation includes one of the following: a click operation, a long press operation, and a drag operation to drag the third screenshot to the smart assistant.

22. The method according to any one of claims 14-21, characterized in that, The third screenshot is an image that is the same as or different from the second screenshot; the second screenshot is obtained by adjusting the first pixel value of the first pixel of multiple first image regions in the first screenshot corresponding to the first page according to the first bit sequence.

23. The method according to claim 22, characterized in that, The third screenshot is obtained by compressing the second screenshot.

24. An electronic device, characterized in that, The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method as claimed in any one of claims 1 to 13, or to implement the steps of the method as claimed in any one of claims 14 to 23.

25. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it performs the steps of the method as claimed in any one of claims 1 to 13, or implements the steps of the method as claimed in any one of claims 14 to 23.