WO2018210179A1 - 一种应用页面的处理方法、装置及存储介质 - Google Patents

一种应用页面的处理方法、装置及存储介质 Download PDF

Info

Publication number
WO2018210179A1
WO2018210179A1 PCT/CN2018/086397 CN2018086397W WO2018210179A1 WO 2018210179 A1 WO2018210179 A1 WO 2018210179A1 CN 2018086397 W CN2018086397 W CN 2018086397W WO 2018210179 A1 WO2018210179 A1 WO 2018210179A1
Authority
WO
WIPO (PCT)
Prior art keywords
page
image
display area
area
layer
Prior art date
Application number
PCT/CN2018/086397
Other languages
English (en)
French (fr)
Inventor
熊唯
Original Assignee
腾讯科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2018210179A1 publication Critical patent/WO2018210179A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Definitions

  • the present application relates to a screen capture processing technology, and in particular, to a method, an apparatus, and a storage medium for processing an application page.
  • the embodiment of the present application provides a method, a device, and a storage medium for processing an application page, which can at least solve the problem that the splicing occurs frequently when the screenshot is taken through the long screen function, and the screenshot is often repeated.
  • the first aspect of the present application provides a method for processing an application page, where the method includes:
  • a second aspect of the embodiments of the present application provides a processing device for an application page, where the device includes: a positioning unit configured to locate a page layer where the page display area is located in a layer of a display area of the application; And configured to perform image collection on the page layer in the display area when the page loaded in the page display area is updated; the extracting unit is configured to extract the page from the collected image.
  • the deduplication processing unit is configured to detect that there is a coincident area of the page images collected by two adjacent pages according to the location data of the page loaded in the page display area And performing deduplication processing on the collected page image according to the overlapping area;
  • the splicing unit is configured to perform splicing processing on the collected page image.
  • the positioning unit is further configured to: according to the identifier of the view control included in the display area of the application, search for a view control for controlling a page displayed in the page display area;
  • the area in which the display area of the application is distributed serves as the page display area.
  • the de-duplication processing unit is specifically configured to: when the operation received in the page display area is performed, update the entire content of the currently displayed page, and perform each operation in two adjacent operations. After collecting the first image and the second image, determining whether the content of the tail of the page has been displayed according to the operation in the page display area; determining that the page display area has been When the content of the tail of the page is displayed, comparing the height interval data of the page in the first image with the height interval data of the page in the second image, when there is coincident interval data, determining It is detected that there is a coincident area in the image of the page acquired two times.
  • the extracting unit is further configured to: before extracting the page image corresponding to the page display area in the page layer, detecting whether the first operation is received; if the first operation is received, based on The first operation determines a target sub-area in the page display area, and extracts an image corresponding to the target sub-area from the acquired image as a page image; if the first operation is not received, according to the page display area The page image is extracted from the acquired image.
  • a third aspect of the embodiments of the present application provides a processing device for an application page, the device comprising: a memory configured to store a computer program; and a processor connected to the memory, configured to implement the foregoing by executing the computer program
  • the processing method of the application page described in any one of the technical solutions.
  • a fourth aspect of the present application provides a storage medium, where the storage medium stores a computer program, and after the computer program is executed by the processor, the processing method of the application page according to any one of the foregoing technical solutions can be implemented.
  • a fifth aspect of the embodiments of the present application provides a processing method of an application page, where the method is performed by a terminal, where the terminal includes one or more processors and a memory, and one or more programs, where the One or more programs are stored in the memory, and the program can include one or more units each corresponding to a set of instructions, the one or more processors being configured to execute the instructions; the method comprising:
  • the collected page image is subjected to deduplication processing according to the overlapping area;
  • the page layer where the page display area is located is first located in the layer of the display area of the application; thus, when the image is collected, the page in the display area is The layer performs image acquisition, which can solve the problem that the existing screen capture technology simultaneously collects the page layer and other layers except the page layer, resulting in the unfinished picture being unclear; Obtaining, in the obtained image, a page image corresponding to the page display area in the page layer; and detecting, according to the location data of the page loaded in the page display area, the page images acquired two times before There is a coincident area, and the collected page image is de-duplicated according to the overlapping area; finally, the collected page image is spliced, so that the long screen function can be solved because the de-duplication processing is performed before splicing.
  • the form of the picture is obtained by the screenshot, instead of manually selecting some messages for forwarding, there is no problem of message leakage; further, since the last formed long picture is spliced, only the spliced
  • the image can be used without having to forward multiple independent images obtained by the screenshot separately, which reduces the number of operations manually forwarded by the user and improves the user experience.
  • FIG. 1 is a schematic diagram of a long screenshot obtained by the first long screen capture technology provided by the present application.
  • FIG. 2 is a schematic diagram of a long screenshot obtained by the second long screen capture technology provided by the present application.
  • FIG. 3 is a schematic flowchart of an implementation process of an application page according to an embodiment of the present disclosure
  • FIG. 4 is a schematic diagram 1 of a page layout of an application according to an embodiment of the present application.
  • FIG. 5 is a schematic diagram 2 of a page layout of an application according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic diagram of updating an entire content of a currently displayed page according to an operation received by the page display area according to an embodiment of the present application
  • FIG. 7 is a schematic diagram of updating part of content of a currently displayed page according to an operation received by the page display area according to an embodiment of the present application
  • FIG. 8 is a schematic diagram 1 of displaying a text message after translating a voice message into a text message according to an embodiment of the present application
  • FIG. 9 is a schematic diagram 2 of displaying a text message after translating a voice message into a text message according to an embodiment of the present application.
  • FIG. 10 is a schematic diagram of a picture obtained by splicing a page image according to an embodiment of the present application.
  • FIG. 11 is a schematic diagram of splicing an additional information image and a page image according to an embodiment of the present application.
  • FIG. 12 is a schematic flowchart of screen capture processing according to an embodiment of the present disclosure.
  • FIG. 13 is a schematic diagram of area division of a captured picture according to an embodiment of the present disclosure.
  • FIG. 14 is a schematic structural diagram 1 of a page processing apparatus of an application according to an embodiment of the present disclosure.
  • FIG. 15 is a schematic structural diagram 2 of a processing device of an application page according to an embodiment of the present disclosure.
  • the first long screen technology solution is: the manufacturer adds a system interface to call the application, determines that the application page has a scrollable area, records the position of each view scroll, and performs a screen capture operation if the height of the scrollable area itself is exceeded. , save the image and record the scrolling information, and finally, after the end of the scrolling, stitching according to all the screenshots and location information.
  • the shortcoming of this scheme is that the view is continuously scrolled, and the screenshot is continuously judged, and the efficiency is not high. If there is a content that does not want to be screenshotd in the scrollable area (such as occluding the content of the message in the message list), it will also be intercepted.
  • the unwanted screenshot content described herein is located at a different view level than the messages in the message list.
  • the unintended screenshot content described here refers to a picture, a text, a character, or the like that is occluded to a message in the application's message list.
  • FIG. 1 is a schematic diagram of a long screenshot obtained by the first long screen capture technology according to an embodiment of the present application.
  • the intercepted record of the QQ application related to Mr Chen is intercepted, and the obtained long screenshot is obtained.
  • the cm-show avatar will block part of the message content in the QQ application's chat record. If the long-screen image is forwarded to a third person, and the existence of the cm-show avatar, it will undoubtedly understand the third party.
  • the chat history between the sender and Mr Chen has an impact.
  • the second long screen technology solution is: the manufacturer adds a system interface to call the application, performs a page flip screen to scroll one page at a time, then takes a screenshot of the current page, and finally splicing all the screenshots.
  • This method is more efficient than the first method, but the problem is that the scrolling to the bottom of the in-app view is relatively large. If the view is scrolled to the bottom and the error is made, there will be errors or even errors in the stitching of the last page. Repeat the screenshot.
  • FIG. 2 is a schematic diagram of a long screenshot obtained by the second long screen capture technology according to an embodiment of the present application.
  • the chat record of the QQ application related to Mr Chen is intercepted, and the long screenshot image obtained from the screenshot is obtained.
  • the screenshot of the last page of the message shows an exception, and two messages (marked with a dashed box in Figure 2) are repeated. In this way, it affects the analysis of the chat record between the sender and Mr Chen by the third party.
  • the cm-show avatar will block part of the message content in the chat record of the QQ application, if the long screenshot image is forwarded to the third person, and the cm-show avatar The existence of this will undoubtedly affect the third party's understanding of the chat history between the sender and Mr Chen.
  • the manufacturer does not process the screenshot content during the screenshot process, and the voice message is also more important information. In the existing screenshots, the information cannot be obtained.
  • An embodiment of the present application provides a method for processing an application page, where the method is applied to a terminal side, as shown in FIG. 3, the method mainly includes:
  • Step 301 In the layer of the display area of the application, locate the page layer where the page display area is located.
  • the application may be an application installed on the terminal device.
  • a social class application is installed on the terminal, the social class application has a function of pushing and receiving a message; the social class application also has a screen capture function.
  • the application includes a communication application, such as an instant messaging application, a social application, and the like, and the application may further include a reading application, such as a news application.
  • a communication application such as an instant messaging application, a social application, and the like
  • the application may further include a reading application, such as a news application.
  • the application may also be other types of applications, which are not enumerated here.
  • the instant messaging application may include an application such as WeChat.
  • the social application may include applications such as Tencent QQ and Tencent Weibo.
  • the news application may include a news reading application such as Tencent News.
  • an additional information area is included; the additional information area is used to display additional information other than the page.
  • the additional information includes at least information such as menu bar information, toolbar information, title bar information, and the like.
  • the instant messaging application or the social application is a QQ application, and the additional information area is used to display a title bar and menu bar information of the QQ.
  • the reading class application is a novel application, and the additional information area is used to display a title bar and toolbar information of the novel.
  • the page layer may correspond to a plurality of areas, such as a page display area and an additional information area.
  • the page display area is a type of information for displaying an application, and the type of information is information displayed by the application on the layer by default.
  • the corresponding page layer permission displays the received or transmitted first type information on the layer, and the first type of information described herein includes Text messages, voice messages, picture messages, etc. It should be noted that the first type of information does not include the second type of information that occludes the first type of information in the page display area. For example, the second type of information includes a centimeter show message.
  • the application when the application is a reading application, its corresponding page layer permission displays a third type of information on the layer, and the third type of information described herein includes characters, symbols, pictures, and the like. It should be noted that the third type of information does not include fourth type information that occludes the third type of information displayed in the page display area, for example, the fourth type of information includes a suspension in the The avatar above the third type of information.
  • the method may further include:
  • Step 300 (not shown in FIG. 3): determining a page display area in the display area for updating a display page according to an operation according to a layout of a display area of the application.
  • the determining, according to the layout of the display area of the application, the page display area in the display area for updating the display page according to the operation including:
  • a page display area in the display area is determined according to layout information of the display area.
  • the display area of the application may be divided into a plurality of display areas, but at least one display area on the terminal screen is used as the page display area.
  • FIG. 4 is a schematic diagram of a page layout of an application according to an embodiment of the present invention. As can be seen from FIG. 4, the display area of the application displays all display areas of the application, that is, the A area and the B area are displayed on the full screen of the terminal. These three areas of the C area.
  • FIG. 5 is a schematic diagram of a page layout of an application according to an embodiment of the present invention.
  • a display area of an application displays a partial display area of the application, that is, only one area of the B area is displayed on the full screen of the terminal.
  • the page image P1 extracted under the layout shown in FIG. 5 may contain less than the content contained in P2 with respect to the page image P2 extracted under the layout shown in FIG. 4, of course, P1.
  • the content contained in it may be equal to the content contained in P2, but the font in P2 is larger than the font in P1.
  • the page display area may be an instant messaging application or a message display area of a social application, and the page display area can update the display page according to the operation.
  • the instant messaging application or the social application is a QQ application
  • the page display area is capable of updating a display page for displaying a QQ message upon receiving a sliding operation of the user for the message display area.
  • the page display area may also be an information display area for reading a class application, and the page display area can update the display page according to the operation.
  • the reading application is a novel application
  • the page display area is capable of updating a display page for displaying the content of the novel chapter upon receiving the sliding operation of the user.
  • determining, according to the layout of the display area of the application, the page display area in the display area for updating the display page according to the operation including:
  • the area in which the found view control is distributed in the display area of the application is used as the page display area.
  • the display area of the above application includes three areas A, B, and C as an example.
  • the application includes three view controls, which are respectively recorded as a, b, and c; then, according to the found view control identifier
  • the view control a represents the title bar area
  • the view control b represents the message bar area
  • the view control c represents the menu bar area
  • the B area can be determined as the page display area of the application.
  • Step 302 Perform image acquisition on the page layer in the display area when a page loaded in the page display area is updated.
  • the method before performing image collection on the page layer in the display area, the method further includes: positioning a layer located at a top of the page layer; The layer at the top of the layer sets the hidden properties.
  • the setting a hidden attribute for a layer located at the top of the page layer includes:
  • the relative position between the layer and the layer is described using the top and bottom, and the top layer refers to the layer that is not covered by other layers in the display area when the direction of the user's line of sight is referred to.
  • the top layer refers to the layer that is not covered by other layers in the display area when the direction of the user's line of sight is referred to.
  • the first layer and the second layer as an example, when the first layer is located at the top of the second layer, that is, from the perspective of the user, the second layer is blocked by the first layer.
  • layer A and layer B are recorded as the top layer, that is, in the figure.
  • the A1 area is the upper left corner of the screen
  • the content corresponding to the layer A in the A1 area is a picture
  • the content corresponding to the layer B in the A1 area is a piece of text
  • a segment of text corresponding to layer B in the A1 region will be obscured by the layer A corresponding to the image in the A1 region.
  • the user can only see the image; it can be understood that when the layer B is When placed on the top of layer A, the user can see a section of text corresponding to layer B in the A1 area. At this time, the picture corresponding to layer A in the A1 area will not be displayed.
  • the layer of the application may include multiple, for example, a first layer exists at the top of the page layer, where the first layer is used to assist in displaying the page in the application.
  • the information corresponding to the layer is displayed, the information corresponding to the first layer is displayed on the upper layer of the information of the page layer by using the first layer.
  • the layer located at the top of the page layer is not hidden, that is, if the first layer is not hidden, when the image is collected on the current display interface of the display area of the application,
  • the display information corresponding to the first layer will occlude the display information corresponding to the page layer, thereby causing the captured image to be unclear.
  • the layer corresponding to the cmxiu message is located on the upper layer of the layer corresponding to the QQ message. Therefore, in the message record of the QQ application, the cmxiu message sometimes occludes the QQ message.
  • the method before performing image collection on the display area of the application, the method further includes: determining whether there is content that needs to be hidden when the image is collected, and if so, hiding the content to be hidden; If not, an operation of performing image acquisition on the display area of the application is performed.
  • the hiding the content to be hidden includes: adjusting a level of the view layer where the content to be hidden is located, so that the level of the view layer where the content to be hidden is lower than the view layer of the message list. Level.
  • Step 303 Extract, from the collected image, a page image corresponding to the page display area in the page layer.
  • the page image corresponding to the page display area in the page layer is extracted from the collected image, including:
  • a page image is extracted from the acquired image according to the page display area.
  • the page layer corresponding to the page display area may be directly extracted from the collected image.
  • Page image Referring to FIG. 5, the collected image includes only the page display area of the application, that is, the B area, and the collected image can be used as the page image corresponding to the page display area.
  • the page display area and the additional information area need to be determined first, and then the extracted image is extracted from the collected image.
  • a page image corresponding to the page display area in the page layer may also be extracted.
  • the captured image includes an application page display area (ie, a B area), and an additional information area (ie, an A area and a C area). Then, it is necessary to extract the image from the collected image.
  • the page image corresponding to the page display area that is, the page image corresponding to the B area.
  • Step 304 When the location data of the page loaded in the page display area is detected, it is detected that there is a coincidence area of the page images collected two times, and the collected page image is subjected to deduplication processing according to the overlap area.
  • the collected page image is de-duplicated according to the overlapping area, so that a good non-coincidence can be provided for the subsequent stitching of the page image.
  • the detecting according to the location data of the page loaded in the page display area, detecting that there is a coincident area of the page images collected by two adjacent pages, including:
  • the first image and the second image are two adjacent screenshot images;
  • the terminal displays the page display area of the application and the additional information area in full screen
  • the first image and the second image are respectively displayed from the adjacent two screenshot images according to the layout of the display area.
  • FIG. 6 is a schematic diagram of updating the entire content of a currently displayed page according to an operation received by the page display area according to an embodiment of the present application.
  • the content displayed in the current page display area is recorded as the first One page, the first page has a message S1 at the top, and a message S10 at the bottom, as shown in the leftmost figure in FIG. 6; when the operation is received, the first page is updated to the second page, at the top
  • the message S11 has a message S20 at the bottom, as shown in the middle figure of FIG. 6; when the operation is received, the second page is updated to the third page, with the message S21 at the top and the message S30 at the bottom, as shown in FIG.
  • the rightmost figure is shown; and so on, updated. It can be seen that each time the update is made, the entire content of the current page is updated.
  • the position data refers to height data of a page with respect to a preset reference coordinate system.
  • the bottom of the terminal screen is the x-axis
  • the value on the y-axis represents the position data.
  • the position data corresponding to the first page is [0, y1)
  • the position data corresponding to the second page is [y1, 2y1)
  • the position data corresponding to the third page is [2y1, 3y1), and so on.
  • the collected page image is subjected to deduplication processing according to the overlapping area, and includes:
  • each time the update is performed all the display contents of the current page display area are updated, that is, the content updated by the page is determined by the height corresponding to the current page display area, and is updated in units of pages, such that until After determining that the last page has been screenshotd, only the image corresponding to the last page and the image corresponding to the second to last page are subjected to deduplication determination and deduplication processing.
  • the first image and the second image are determined. There is a coincident region [2y1-1, 2y1), and the first region [2y1-1, 2y1) in the first image needs to be removed; or [2y1-1, 2y1) in the second image is removed.
  • the detecting according to the location data of the page loaded in the information page display area, detecting that there are overlapping regions of the two captured images, including:
  • FIG. 7 is a schematic diagram of updating part of content of a currently displayed page according to an operation received by the page display area according to an embodiment of the present application.
  • the content displayed in the current page display area is recorded as the first One page, the first page has a message S1 at the top, and a message S10 at the bottom; when the operation is received, the first page is updated to the second page, the message S6 is at the top, and the message S15 is at the bottom;
  • the second page is updated to the third page, with a message S12 at the top, a message S21 at the bottom, and so on. It can be seen that each time an update is made, part of the current page is updated. That is to say, when the first page is screened, the first page image is obtained; from the second page, there are overlapping portions in the images intercepted by the two adjacent screens, and the deduplication processing operation is required.
  • the collected page image is subjected to deduplication processing according to the overlapping area, and includes:
  • the unit performs page turning, that is, from the second screen shot, deduplication processing is required until the image intercepted by the last screen is de-remarked and processed.
  • the location data corresponding to the first image is [S1, S10] and the location data corresponding to the second image is [S6, S15]
  • the first region [S6, S10] in the first image needs to be removed; or [S6, S10] in the second image is removed.
  • the detecting according to the location data of the page loaded in the page display area, detecting that there is a coincident area of the page images collected by two adjacent frames, including:
  • the different content corresponding to the page display area has different identifiers.
  • each instant messaging message has a different identifier in the background, and the background communication message is arranged in a specific arrangement order. , as in chronological order.
  • the identification of the page content in the two images can be used to determine whether the two are present. Coincident area.
  • the collected page image is subjected to deduplication processing according to the overlapping area, and includes:
  • the method for detecting whether there is a coincident area in the image of the page that is collected in the two times is not limited to the three modes given above, and may be detected by other means, and details are not described herein again.
  • the image capturing is performed on the display area of the application, and the page image is extracted from the collected image according to the page display area, including:
  • the page display area When detecting that the page display area includes a voice message, identifying the voice message as a text message and forming a text image;
  • a text image area for loading the text image is formed in the page display area according to a display area that the text image needs to occupy, and the text image is loaded in the text image area.
  • the display area that needs to be occupied according to the text image is formed in the page display area, and a text image area for loading the text image is formed, and the text image area is loaded in the text image area.
  • Text images including:
  • the page image is divided into two parts such that the first partial image contains the voice message, and the second partial image does not include the voice a message; and splicing the first partial image, the text image, and the second partial image into a new page image.
  • FIG. 8 is a schematic diagram 1 of displaying a text message after translating a voice message into a text message according to an embodiment of the present invention.
  • the length of the corresponding text message is less than
  • the text message is inserted into the middle area of the voice message and the message adjacent to the voice message, so that, during the screen capture, the content of the voice message can be displayed in a text message, and after receiving the stitching
  • the third party of the picture is able to understand the content of the voice message.
  • FIG. 9 is a schematic diagram 2 of displaying a text message after translating a voice message into a text message according to an embodiment of the present disclosure.
  • the length of the corresponding text message is greater than the pre-
  • the current page image is first divided into two parts, so that the first partial image contains the voice message, and the second partial image does not include the voice message; and the first partial image and the text message are corresponding.
  • the text image and the second partial image are spliced into a new page image, so that the content of the voice message can be displayed in a text message, and the third party receiving the spliced image can know the content of the voice message.
  • the multiple voice messages may be processed at the same time.
  • the text image corresponding to each voice message has the same size of the display area, for example, the occupied height is the same; the height here may be the height occupied by the voice message in the image,
  • the plurality of voice messages are identified as text messages, and the determined text images corresponding to each voice message are loaded into an area occupied by the corresponding voice message. Since the heights are the same, the plurality of voice messages are processed in parallel, and the processing efficiency is improved.
  • the length of the text message corresponding to each voice message is different.
  • the entire content of the text message forms a text image; when the length of the text message is greater than the preset length value, part of the content of the text message forms a text image.
  • the partial content of the text message may be a digest of the text message, or may be a partial message that is intercepted from the text message and meets a preset length value, and does not define a truncation starting position.
  • the multiple voice messages may be processed in sequence.
  • only how to display the first voice message completely is taken as an example.
  • the second voice message in the page display area is processed according to the manner of processing the first voice message, and so on.
  • the first voice message is first determined in the page display area, and the first line is The voice message is identified as a text message and forms a text image; the area occupied by the first voice message in the image is removed, between the first piece of voice message and the next piece of information of the first piece of voice message A region, inserted into the text image, and stitched into a new image.
  • the voice message is processed in sequence, all the content corresponding to the voice message can be displayed, and the user's recognition of the voice message is improved.
  • Step 305 Perform splicing processing on the collected page images.
  • the splicing process is performed on the collected page images, including:
  • the collected page images are spliced in order to form a spliced picture, and the spliced pictures are saved, and all the collected page images are deleted.
  • the spliced long picture can be obtained, so that the forwarding mode of forwarding multiple independent pictures is convenient for forwarding the picture, which saves the number of manual forwarding by the user. Since the captured page image is deleted, the memory resource is released in time, and the memory resource is saved.
  • the method further includes:
  • Performing splicing processing on the collected page images including:
  • the additional information image and the page image are spliced according to the relative positional relationship of the additional information area and the page display area.
  • FIG. 10 is a schematic diagram of a picture obtained by splicing the page image.
  • the obtained long screenshot picture only includes information corresponding to the page display area; compared with FIG. 1 and FIG. 2,
  • the obtained long screenshot picture there is no cm show avatar, and the user can obtain a voice message from the long screenshot picture.
  • FIG. 11 is a diagram showing the splicing of the additional information image and the page image.
  • the obtained long screenshot picture only includes information corresponding to the page display area, and includes information corresponding to the additional information area; in comparison with FIG. 1 and FIG. 2, in the obtained long screenshot picture, There is no cm-show avatar, and the user can get a voice message from the long screenshot image.
  • the page layer where the page display area is located is located in the layer of the display area of the application; thus, when the image is collected, the page view in the display area is performed.
  • Performing image acquisition on the layer can solve the problem that the existing screenshot technology and the other layers except the page layer are collected, resulting in the unfinished picture being unclear;
  • the coincident area is subjected to de-duplication processing on the collected page image according to the overlapping area; finally, the collected page image is spliced, so that the de-duplication processing is performed before splicing, and the long-screen screenshot function can be solved.
  • the splicing that occurs at the time often causes errors or even duplicates of the screenshot.
  • the form of the picture is obtained by the screenshot, instead of manually selecting some messages for forwarding, there is no problem of message leakage; further, since the last formed long picture is spliced, only the spliced
  • the image can be used without having to forward multiple independent images obtained by the screenshot separately, which reduces the number of operations manually forwarded by the user and improves the user experience.
  • FIG. 12 is a schematic flowchart of a screen capture process according to an embodiment of the present disclosure. As shown in FIG. 12, the process flow mainly includes:
  • Step 1201 The notification application starts the screen capture function. Before intercepting the screen, it is determined whether there is a second content that needs to be hidden when the screen capture is present, and when the second content is determined to be hidden, the second content is hidden.
  • the notification application when the second operation for instructing the application to enable the screen capture function is detected, the notification application is notified to start the screen capture function.
  • the second operation may be a triggering operation on the preset button issued by the user, and when the preset button receives the triggering operation, the application is instructed to enable the screen capture function.
  • the determining whether there is a second content that needs to be hidden when the screen capture is included includes:
  • the application looks up the view overlaid on the message list through the view hierarchy and hides the view overlaid on the message list.
  • the determining whether there is a second content that needs to be hidden when the screen is captured includes:
  • the hiding the second content comprises:
  • Step 1202 Before intercepting the screen, determine whether there is a third content to be converted when the screen is cut, and determine that the third content is converted and displayed when the third content exists.
  • the third content includes a voice message.
  • the determining whether there is a third content to be converted when the screen capture is performed includes:
  • the speech recognition system is a speech recognition system of the application, or a speech recognition system of other applications that the application can invoke.
  • Step 1203 Perform a screenshot on the current interface of the application, obtain a first picture, identify the first picture, and identify an additional information area and a page display area of the application.
  • the first captured picture is divided into three parts, a top title bar module, a bottom menu module, and an intermediate message module; wherein the area corresponding to the message module is regarded as an application page display area, and the title is The column module and the area corresponding to the menu module are considered as additional information areas of the application.
  • the title bar module is configured to display at least one object included in a title bar related to the application; the menu module is configured to display at least one object included in a menu bar related to the application.
  • Step 1204 In the process of scrolling the message list of the application, the message record of the page display area is screenshotd in units of pages.
  • the operation for scrolling the message list of the application may be a manual operation by a user or a program automatic operation.
  • the page records the message records of the page display area in units of pages, including:
  • the scrolling width is the view height of the page display area, it is determined to scroll a page, take a screenshot of the current content of the page display area, save a screenshot of each page, and so on, until the screenshot of the last page is saved.
  • the number of positions can be reduced and the number of times the content is saved can improve the efficiency of stitching pictures.
  • Step 1205 When the list is slid without content, the interface for providing scrolling to the bottom of the page display area will notify the application that the application has been slid to the last page, and determine whether the image corresponding to the last page needs to be cropped. The cropped image replaces the image corresponding to the last page.
  • the determining whether the picture corresponding to the last page needs to be cropped, and if necessary, replacing the picture corresponding to the last page with the picture obtained by the cropping including:
  • the overlapped content in the picture corresponding to the last page is deleted, the picture corresponding to the last page is deleted, and the last page corresponding to the overlapped content is saved. image.
  • Step 1206 splicing all the pictures to generate a long screen image containing the content of the additional information area and the content of the page display area.
  • the splicing of all the images includes:
  • the content of the page display area in all the pictures is spliced in order, and the total content of the content of the page display area is obtained;
  • the content of the additional information area is spliced with the total content of the page display area according to the additional information area in the first picture and the correspondence or distribution principle of the page display area.
  • the last long screen shots are:
  • the last long screen shots that are stitched out include:
  • Step 1207 Save the long screen image after the stitching.
  • the method further includes:
  • the third content refers to content that the user wants to not appear when the screen is screened.
  • the third operation is an operation issued by the user, such as drawing an area in the page display area, and the selected area needs to be hidden.
  • the technical solution in the embodiment of the present application can solve the convergence problem that often occurs when the screen captures the last screen, such as the overlap area of the last page and the page display area of the penultimate page, and can also solve the existing screen capture technology.
  • the problem that the finally obtained picture is unclear due to the unprocessed second content can also solve the problem that the second content such as the specific content of the voice message cannot be obtained.
  • FIG. 14 is a schematic structural diagram of a component of a processing device for an application page according to an embodiment of the present disclosure.
  • the device is applied to a terminal.
  • the device includes: a positioning unit 11 configured to be in a layer of a display area of an application.
  • the collecting unit 12 is configured to perform image collection on the page layer in the display area when the page loaded by the page display area is updated;
  • the extracting unit 13 And configured to extract, from the collected image, a page image corresponding to the page display area in the page layer;
  • the deduplication processing unit 14 is configured to: when the page is loaded according to the page display area The data is detected, and the overlapped area is detected by the image of the page collected by the two times, and the collected page image is subjected to de-duplication processing according to the overlapped area;
  • the splicing unit 15 is configured to perform splicing processing on the collected page image.
  • the device further includes: a first pre-processing unit 16 configured to locate the top of the page layer before the collecting unit 12 performs image collection on the page layer in the display area Layer; set hidden properties for layers at the top of the page layer.
  • a first pre-processing unit 16 configured to locate the top of the page layer before the collecting unit 12 performs image collection on the page layer in the display area Layer; set hidden properties for layers at the top of the page layer.
  • the positioning unit 11 is further configured to: determine, according to a layout of the display area of the application, a page display area for updating the display page according to the operation.
  • the positioning unit 11 is configured to: according to the identifier of the view control included in the display area of the application, search for a view control for controlling a page displayed in the page display area;
  • the view control is located in the area where the display area of the application is distributed as the page display area.
  • the deduplication processing unit 14 is specifically configured to: when the operation received in the page display area is performed, update the entire content of the currently displayed page, and be adjacent to the two times.
  • the first image and the second image are acquired after each operation of the operation, it is determined whether the content of the tail of the page has been displayed according to the operation in the page display area; determining the display area in the page
  • the content of the tail of the page has been displayed according to the operation, comparing the height interval data of the page in the first image with the height interval data of the page in the second image, when there is a coincidence In the interval data, it is determined that there is a coincident region in the image of the page acquired two times.
  • the de-duplication processing unit 14 is specifically configured to: when part of the content of the currently displayed page is updated according to an operation received in the information page display area each time, and adjacent to Comparing the height interval data of the page in the first image with the height interval data of the page in the second image when the first image and the second image are acquired after each operation of the two operations; When there is coincidence interval data, it is determined that there is a coincident region in the page images acquired by the two adjacent acquisitions.
  • the de-duplication processing unit 14 is specifically configured to: determine a first region corresponding to the coincidence interval data in the first image, and set a first region in the first image Removing; or determining that the coincidence interval data is in a corresponding second region in the second image and removing the second region in the second image.
  • the device further includes: a second pre-processing unit 17 configured to: when detecting that the page display area includes a voice message, identify the voice message as a text message and form a text image; according to the text image An occupied display area in which a text image area for loading the text image is formed, and the text image is loaded in the text image area.
  • a second pre-processing unit 17 configured to: when detecting that the page display area includes a voice message, identify the voice message as a text message and form a text image; according to the text image An occupied display area in which a text image area for loading the text image is formed, and the text image is loaded in the text image area.
  • the second pre-processing unit 17 is configured to: when the height of the display area that the text image needs to occupy is less than a preset height value, the voice message and the voice message are An area between adjacent next pieces of information, determined as a text image area; inserting the text image into the text image area; when a height of a display area that the text image needs to occupy is greater than or equal to a preset height value Separating the page image into two parts such that the first partial image contains the voice message, the second partial image does not include the voice message, and the first partial image, the text image, and the second portion The image is stitched into a new page image.
  • the positioning unit 11 is further configured to: determine, according to a layout of the display area of the application, an additional information area in the display area for displaying additional information other than the page;
  • the extracting unit 13 is further configured to: extract an additional information image from the collected image according to the additional information area;
  • the splicing unit 15 is further configured to: according to the relative information area and the relative of the page display area Positional relationship, splicing the additional information image and the page image.
  • the extracting unit 13 is further configured to: before extracting the page image corresponding to the page display area in the page layer, detecting whether the first operation is received; The operation determines a target sub-area in the page display area based on the first operation, and extracts an image corresponding to the target sub-area from the acquired image as a page image; if the first operation is not received, according to the The page display area extracts a page image from the acquired image.
  • the processing device or the processing device of the application page belongs to a central processing unit (CPU, Central Processing Unit), a microprocessor (MCU, a digital signal processing unit), a digital signal processor (DSP, Digital Signal Processing) or programmable Implementation of a logic device (PLC, Programmable Logic Controller).
  • CPU Central Processing Unit
  • MCU microprocessor
  • DSP Digital Signal Processing
  • PLC Programmable Logic Controller
  • the processing device of the application page in this embodiment may be disposed on the terminal side.
  • the processing unit can be implemented by an analog circuit that implements the functions described in the embodiments of the present application, or can be implemented by running the software of the functions described in the embodiments of the present application on the smart terminal.
  • the processing device of the application page in the embodiment can solve the connection problem that often occurs when the screen captures the last screen, such as the overlap between the last page and the page display area of the penultimate page, and can also solve the existing screen capture technology.
  • the problem that the last obtained picture is unclear due to the unprocessed second content may also solve the problem that the second content such as the specific content of the voice message cannot be obtained.
  • FIG. 15 is a schematic structural diagram of a processing device of an application page according to an embodiment of the present disclosure.
  • the processing device of the application page includes a memory 10 and a processor 20; wherein the memory 10 is used to store a computer.
  • the processor 20 is connected to the memory 10 for implementing the steps of the processing method of the application page provided by any one of the foregoing technical solutions by executing the computer program.
  • the memory 10 of this embodiment may be a storage structure including various storage media, for example, may include a storage medium such as a random storage medium, an institutional storage medium, a flash memory, or the like, and may be used for non-instantaneous storage of the computer program.
  • a storage medium such as a random storage medium, an institutional storage medium, a flash memory, or the like, and may be used for non-instantaneous storage of the computer program.
  • the processor 20 may be one of the foregoing CPU, MCU, DSP or PLC, and may also be a processing circuit, for example, Application Specific Integrated Circuits (ASIC), a computer program that can be stored by executing the memory 10. Do this.
  • ASIC Application Specific Integrated Circuits
  • the processor 20 and the memory 10 can be connected through a bus interface 30.
  • the bus interface 30 can include an integrated circuit IIC bus or the like, which can be used for connection inside the device.
  • the processing device of the application page may further include: a communication interface 40, which is operable to communicate with other electronic devices, for example, when the processing device of the application page pairs the captured page image and/or additional information. After the image splicing process is completed, the processing device of the application page may send the spliced long screen shot image to the other electronic device for communication through the communication interface 40.
  • the embodiment further provides a storage medium storing a computer program, and after the computer program is executed by the processor, the processing method of any one or more application pages can be implemented.
  • the computer storage medium may be various types of storage media, and may be preferably a non-transitory storage medium in this embodiment.
  • the computer program is configured to: in a layer of a display area of the application, locate a page layer where the page display area is located; when the page loaded by the page display area is updated, The page layer in the display area performs image collection; from the collected image, the page image corresponding to the page display area in the page layer is extracted; when the page display area is When the location data of the page is loaded, and the overlapped area of the page image collected by the two adjacent pages is detected, the collected page image is subjected to deduplication processing according to the overlapping area; and the collected page image is stitched.
  • the computer program is configured to: before the image collection of the page layer in the display area, locate a layer located at a top of the page layer; The top layer sets the hidden properties.
  • the computer program is configured to: according to an identifier of a view control included in a display area of the application, look up a view control for controlling a page displayed in the page display area; and the view control to be found An area distributed in a display area of the application as the page display area.
  • the computer program is configured to: when the operation received in the page display area is updated, update the entire content of the currently displayed page, and after each operation of two adjacent operations When collecting the first image and the second image, determining whether content of the tail of the page has been displayed according to the operation in the page display area; determining that the page display area has been according to the operation When displaying the content of the tail of the page, comparing the height interval data of the page in the first image with the height interval data of the page in the second image, when there is coincident interval data, the determination detects that There are overlapping areas of the page images acquired two times.
  • the computer program is configured to: when part of the content of the currently displayed page is updated according to an operation received every time in the information page display area, and each operation of two adjacent operations And after collecting the first image and the second image, comparing height interval data of the page in the first image with height interval data of the page in the second image; when there is coincident interval data, determining It is detected that there is a coincident area in the image of the page acquired two times.
  • the computer program is configured to: determine a first region corresponding to the coincidence interval data in the first image, and remove the first region in the first image; or Determining the coincidence interval data in a corresponding second region in the second image and removing the second region in the second image.
  • the computer program is configured to: when detecting that the page display area includes a voice message, identify the voice message as a text message and form a text image; according to the display area that the text image needs to occupy, The page display area forms a text image area for loading the text image, and loads the text image in the text image area.
  • the computer program is configured to: when the height of the display area that the text image needs to occupy is less than a preset height value, the voice message and a next message adjacent to the voice message An area between the text image area; inserting the text image into the text image area; when the height of the display area that the text image needs to occupy is greater than or equal to a preset height value, the page image is Dividing into two parts, the first partial image containing the voice message, the second partial image not including the voice message; and splicing the first partial image, the text image, and the second partial image into a new page image.
  • the computer program is configured to: determine, according to a layout of a display area of the application, an additional information area in the display area for displaying additional information other than the page; In the obtained image, an additional information image corresponding to the additional information area in the page layer is extracted.
  • the computer program is configured to: detect whether a first operation is received; and when the first operation is received, determine a target sub-area in the page display area based on the first operation; An image corresponding to the target sub-region is extracted from the image, and an image corresponding to the target sub-region is used as a page image.
  • the disclosed apparatus and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner such as: multiple units or components may be combined, or Can be integrated into another system, or some features can be ignored or not executed.
  • the coupling, or direct coupling, or communication connection of the components shown or discussed may be indirect coupling or communication connection through some interfaces, devices or units, and may be electrical, mechanical or other forms. of.
  • the units described above as separate components may or may not be physically separated, and the components displayed as the unit may or may not be physical units; they may be located in one place or distributed on multiple network units; Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may be separately used as one unit, or two or more units may be integrated into one unit; the above integration
  • the unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
  • the foregoing program may be stored in a computer readable storage medium, and when executed, the program includes The foregoing steps of the method embodiment; and the foregoing storage medium includes: a mobile storage device, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
  • ROM read-only memory
  • RAM random access memory
  • magnetic disk or an optical disk.
  • the above-described integrated unit of the present application may be stored in a computer readable storage medium if it is implemented in the form of a software function module and sold or used as a stand-alone product.
  • the technical solution of the embodiments of the present application may be embodied in the form of a software product in essence or in the form of a software product, which is stored in a storage medium and includes a plurality of instructions for making
  • a computer device which may be a personal computer, server, or network device, etc.) performs all or part of the methods described in various embodiments of the present application.
  • the technical solution of the embodiment of the present application locates a page layer where the page display area is located in a layer of the display area of the application; when the page loaded by the page display area is updated, the method in the display area is The page layer performs image collection; from the collected image, the page image corresponding to the page display area in the page layer is extracted; when the location data of the page loaded in the page display area is detected, the detection is performed.
  • the collected page image is de-duplicated according to the overlapping area; the collected page image is stitched; thus, at least the long screen function can be solved.
  • the splicing that occurs when the screenshot is taken often causes errors or even duplicates of the screenshot.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

一种应用页面的处理方法、装置及存储介质,其中,所述方法包括:在应用的显示区域的图层中,定位页面显示区域所处的页面图层(301);当所述页面显示区域加载的页面发生更新时,对所述显示区域中的所述页面图层进行图像采集(302);从所采集到的图像中,提取得到所述页面图层中与所述页面显示区域对应的页面图像(303);当根据所述页面显示区域中所加载页面的位置数据,检测到相邻两次所采集的页面图像存在重合区域时,对所采集的页面图像根据所述重合区域进行去重处理(304);对所采集的页面图像进行拼接处理(305)。

Description

一种应用页面的处理方法、装置及存储介质
相关申请的交叉引用
本申请基于申请号为201710349352.1、申请日为2017年05月17日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此以引入方式并入本申请。
技术领域
本申请涉及截屏处理技术,具体涉及一种应用页面的处理方法、装置及存储介质。
背景技术
目前,随着终端支持的应用种类越来越多,终端功能也越来越强大。在用户使用即时通讯应用、社交应用、阅读应用等应用的过程中,经常会需要将聊天记录或浏览到的新闻、小说等信息转发给他人。目前,主要通过三种途径转发,第一种是选择多条消息进行转发,但是这种途径会被过滤掉一些信息,比如红包消息无法转发;第二种途径是截图发送,现在大多数安卓(android)机型截图都只是截取当前页面,这样如果想截取多条消息就需要多次截图,转发多次截图图片,既需要频繁手动操作,又浪费系统内存资源;第三种途径是发送通过长截屏技术截取的图片,目前有部分厂商支持长截屏功能,但是截取的图片效果存在缺陷,比如,拼接处经常出现错误甚至重复截图。
发明内容
有鉴于此,本申请实施例提供一种应用页面的处理方法、装置及存储介质,至少能解决通过长截屏功能截图时出现的拼接处经常出现错误甚至重复截图的问题。
本申请本申请实施例第一方面提供了一种应用页面的处理方法,所述方法包括:
在应用的显示区域的图层中,定位页面显示区域所处的页面图层;当所述页面显示区域加载的页面发生更新时,对所述显示区域中的所述页面图层进行图像采集;从所采集到的图像中,提取得到所述页面图层中与所述页面显示区域对应的页面图像;当根据所述页面显示区域中所加载页面的位置数据,检测到相邻两次所采集的页面图像存在重合区域时,对所采集的页面图像根据所述重合区域进行去重处理;对所采集的页面图像进行 拼接处理。
本申请实施例第二方面提供了一种应用页面的处理装置,所述装置包括:定位单元,配置为在应用的显示区域的图层中,定位页面显示区域所处的页面图层;采集单元,配置为当所述页面显示区域加载的页面发生更新时,对所述显示区域中的所述页面图层进行图像采集;提取单元,配置为从所采集到的图像中,提取得到所述页面图层中与所述页面显示区域对应的页面图像;去重处理单元,配置为当根据所述页面显示区域中所加载页面的位置数据,检测到相邻两次所采集的页面图像存在重合区域,对所采集的页面图像根据所述重合区域进行去重处理;拼接单元,配置为对所采集的页面图像进行拼接处理。
上述方案中,所述定位单元,还配置为:根据所述应用的显示区域包括的视图控件的标识,查找用于控制在所述页面显示区域显示页面的视图控件;将查找出的视图控件在所述应用的显示区域所分布的区域,作为所述页面显示区域。
上述方案中,所述去重处理单元,具体配置为:当根据每次在所述页面显示区域接收到的操作,更新当前所显示页面的全部内容,并在相邻两次操作的每次操作后采集到第一图像和第二图像时,判断出在所述页面显示区域中是否已经根据所述操作而显示所述页面的尾部的内容;判断出在所述页面显示区域中已经根据所述操作而显示所述页面的尾部的内容时,比较所述第一图像中所述页面的高度区间数据,与所述第二图像中所述页面的高度区间数据,当存在重合区间数据时,判定检测到相邻两次所采集的页面图像存在重合区域。
上述方案中,所述提取单元,还配置为:在提取得到所述页面图层中与所述页面显示区域对应的页面图像之前,检测是否接收到第一操作;若接收到第一操作,基于所述第一操作确定所述页面显示区域中的目标子区域,从所采集图像中提取所述目标子区域对应的图像,作为页面图像;若未接收到第一操作,根据所述页面显示区域从所采集图像中提取页面图像。
本申请实施例第三方面提供了一种应用页面的处理装置,所述装置包括:存储器,配置为存储计算机程序;处理器,与所述存储器连接,配置为通过执行所述计算机程序,实现前述任意一个技术方案所述的应用页面的处理方法。
本申请实施例第四方面提供了一种存储介质,所述存储介质存储有计算机程序,所述计算机程序被处理器执行之后,能够实现前述任意一个技术方案所述的应用页面的处理方法。
本申请实施例第五方面提供了一种应用页面的处理方法,所述方法由终端执行,所述终端包括有一个或多个处理器以及存储器,以及一个或一个以上的程序,其中,所述一个或一个以上的程序存储于存储器中,所述程序可以包括一个或一个以上的每一个对应于一组指令的单元,所述一个 或多个处理器被配置为执行指令;所述方法包括:
在应用的显示区域的图层中,定位页面显示区域所处的页面图层;
当所述页面显示区域加载的页面发生更新时,对所述显示区域中的所述页面图层进行图像采集;
从所采集到的图像中,提取得到所述页面图层中与所述页面显示区域对应的页面图像;
当根据所述页面显示区域中所加载页面的位置数据,检测到相邻两次所采集的页面图像存在重合区域时,对所采集的页面图像根据所述重合区域进行去重处理;
对所采集的页面图像进行拼接处理。
采用本申请实施例所述技术方案,先在应用的显示区域的图层中,定位页面显示区域所处的页面图层;这样,在进行图像采集时,对所述显示区域中的所述页面图层进行图像采集,能够解决现有截屏技术中出现的同时采集所述页面图层和除所述页面图层之外的其他图层而导致最后截得的图片不清晰的问题;从所采集到的图像中,提取得到所述页面图层中与所述页面显示区域对应的页面图像;当根据所述页面显示区域中所加载页面的位置数据,检测到相邻两次所采集的页面图像存在重合区域,对所采集的页面图像根据所述重合区域进行去重处理;最后才对所采集的页面图像进行拼接处理,这样,由于在拼接之前进行了去重处理,能够解决通过长截屏功能截图时出现的拼接处经常出现错误甚至重复截图的问题。另外,由于采用通过截图获得图片的形式,而非手动选择一些消息进行转发,不会出现消息漏发的问题;再有,由于最后形成的是拼接得到的长的图片,仅需转发拼接后的图片即可,而无需将截图获得的多个独立的图片分别进行转发,减少了用户手动转发的操作次数,提升了用户的使用体验。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请提供的通过第一种长截屏技术获得的长截图示意图;
图2为本申请提供的通过第二种长截屏技术获得的长截图示意图;
图3为本申请实施例提供的一种应用页面的处理方法的实现流程示意图;
图4为本申请实施例提供的一种应用的页面布局示意图一;
图5为本申请实施例提供的一种应用的页面布局示意图二;
图6为本申请实施例提供的根据所述页面显示区域接收到的操作,更新当前所显示页面的全部内容的一种示意图;
图7为本申请实施例提供的根据所述页面显示区域接收到的操作,更新当前所显示页面的部分内容的一种示意图;
图8为本申请实施例提供的一种将语音消息翻译为文本消息后,显示文本消息的示意图一;
图9为本申请实施例提供的一种将语音消息翻译为文本消息后,显示文本消息的示意图二;
图10为本申请实施例提供的对页面图像进行拼接得到的图片的示意图;
图11为本申请实施例提供的对附加信息图像以及页面图像进行拼接得到的示意图;
图12为本申请实施例提供的截屏处理的流程示意图;
图13为本申请实施例提供的将截取图片进行区域划分的示意图;
图14为本申请实施例提供的应用的页面处理装置的组成结构示意图一;
图15为本申请实施例提供的应用页面的处理装置的组成结构示意图二。
具体实施方式
为了更好的解释本申请,下面先介绍两种长截屏技术方案。
第一种长截屏技术方案为:厂商增加系统接口对应用进行调用,判断应用页面内有可滚动区域,记录每次视图(view)滚动的位置,如果超过可滚动区域本身的高度就进行截屏操作,保存图片并记录滚动信息,最后在结束滚动后,根据所有截图和位置信息进行拼接。这种方案存在的缺陷是:视图不断进行滚动,就不断进行截图判断,效率不高,在可滚动区域内如果存在不想截图内容(如遮挡消息列表中的消息的内容),也会被截取。通常来说,这里所述的不想截图内容与所述消息列表中的消息位于不同的视图层。这里所述的不想截图内容是指对应用的消息列表中的消息存在遮挡的图片、文字、或字符等。
图1为本申请实施例提供的通过第一种长截屏技术获得的长截图示意图,从图1可以看出,截取的是与Mr Chen相关的QQ应用的聊天记录,而在所获得的长截图图片中,存在厘米秀头像,而厘米秀头像会挡住QQ应用的聊天记录中的部分消息内容,若将该长截图图片转发给第三人,而厘米秀头像的存在,无疑会对第三方理解发送方与Mr Chen之间的聊天记录造成影响。
第二种长截屏技术方案为:厂商增加系统接口对应用进行调用,进行翻页截屏每次滚动一页,然后对当前页面进行截图,最后将所有截图进行拼接。这种方法比第一种方法效率高,但是存在的问题是对应用内view滚动到底部依赖性比较大,如果对view是否滚动到底部判断失误,在最后一页的拼接处就会出现错误甚至重复截图。
图2为本申请实施例提供的通过第二种长截屏技术获得的长截图示意图,从图2可以看出,截取的是与Mr Chen相关的QQ应用的聊天记录, 从所获得的长截图图片中,可以看出,最后一页消息的截图显示异常,有两条消息(在图2中用虚线框标出)重复。这样,影响第三人对发送方与Mr Chen之间的聊天记录的分析。另外,在所获得的长截图图片中,也存在厘米秀头像,而厘米秀头像会挡住QQ应用的聊天记录中的部分消息内容,若将该长截图图片转发给第三人,而厘米秀头像的存在,无疑会对第三方理解发送方与Mr Chen之间的聊天记录造成影响。
另外,现在厂商在截图过程中都不会对截图内容做处理,而语音消息也是比较重要的信息,在现有的截图中都是无法获取信息的。
下面结合附图和具体实施例对本申请的技术方案进一步详细阐述。
本申请实施例提供一种应用页面的处理方法,所述方法应用于终端侧,如图3所示,所述方法主要包括:
步骤301:在应用的显示区域的图层中,定位页面显示区域所处的页面图层。
这里,所述应用可以是终端设备上已安装的应用。示例性地,终端上安装有社交类应用,所述社交类应用具有推送和接收消息的功能;所述社交类应用还具有截屏功能。
这里,所述应用包括通讯类应用,如即时通讯类应用、社交类应用等,所述应用还可包括阅读类应用,如新闻类应用。当然,所述应用还可以是其他类型的应用,在此不再列举。
示例性地,所述即时通讯类应用可包括微信等应用。这里,所述社交类应用可包括腾讯QQ、腾讯微博等应用。这里,所述新闻类应用可包括腾讯新闻等新闻资讯阅读应用。
其中,在所述显示区域中,除了所述页面显示区域之外,还包括附加信息区域;所述附加信息区域用于显示除所述页面之外的附加信息。这里,所述附加信息至少包括菜单栏信息、工具栏信息、标题栏信息等信息。示例性地,所述即时通讯类应用或社交类应用为QQ应用,所述附加信息区域用于显示QQ的标题栏和菜单栏信息。示例性地,所述阅读类应用为小说应用,所述附加信息区域用于显示小说的标题栏和工具栏信息。
这里,所述页面图层可对应多个区域,如页面显示区域、附加信息区域。
这里,所述页面显示区域,是用于显示应用的一类信息,且该类信息为应用默认的许可在该图层显示的信息。
示例性地,所述应用为即时通讯类应用或社交类应用时,其对应的页面图层许可在该图层显示接收到的或发送的第一类信息,这里所述的第一类信息包括文本消息、语音消息、图片消息等。需要说明的是,所述第一类信息不包括会对所述页面显示区域中的所述第一类信息造成遮挡的第二类信息,比如,所述第二类信息包括厘米秀消息。
示例性地,所述应用为阅读类应用时,其对应的页面图层许可在该图层显示第三类信息,这里所述的第三类信息包括文字、符号、图片等。需要说明的是,所述第三类信息不包括会对所述页面显示区域中显示的所述第三类信息造成遮挡的第四类信息,比如,所述第四类信息包括悬浮在所述第三类信息上方的头像。
可选地,在步骤301之前,所述方法还可包括:
步骤300(图3中未示出):根据应用的显示区域的布局,确定所述显示区域中用于根据操作更新显示页面的页面显示区域。
作为一种可选实施方式,所述根据应用的显示区域的布局,确定所述显示区域中用于根据操作更新显示页面的页面显示区域,包括:
解析应用的显示区域的布局信息;
根据显示区域的布局信息,确定所述显示区域中的页面显示区域。
这里,对于应用的显示区域来说,可能分为多块显示区域,但在终端屏幕上至少有一块显示区域作为页面显示区域。
假设,应用的显示区域分为A区域、B区域、C区域共三个区域,在终端屏幕上显示A区域、B区域、C区域;其中,A区域为标题栏区域,B区域为消息栏区域,C区域为菜单栏区域,那么,B区域将作为应用的页面显示区域,A区域和C区域将作为应用的附加信息区域。图4为本申请实施例提供的一种应用的页面布局示意图一,从图4可以看出,应用的显示区域显示该应用的全部的显示区域,即,终端全屏显示有A区域、B区域、C区域这三个区域。当然,为了更大范围地显示B区域,终端也可以全屏显示B区域。图5为本申请实施例提供的一种应用的页面布局示意图二,从图5可以看出,应用的显示区域显示该应用的部分显示区域,即,终端全屏仅显示B区域这一个区域。这样,图5所示布局下所提取的页面图像P1,相对于图4所示布局下所提取的页面图像P2来说,P1中所包含的内容可能小于P2中所包含的内容,当然,P1中所包含的内容可能等于P2中所包含的内容,但是P2中的字体相对于P1中的字体更大。
其中,所述页面显示区域可以是即时通讯类应用或社交类应用的消息显示区域,所述页面显示区域能根据操作更新显示页面。示例性地,所述即时通讯类应用或社交类应用为QQ应用,所述页面显示区域能够在接收到用户针对消息显示区域的滑动操作时,更新用于显示QQ消息的显示页面。
其中,所述页面显示区域还可以是用于阅读类应用的信息显示区域,所述页面显示区域能根据操作更新显示页面。示例性地,所述阅读类应用为小说应用,所述页面显示区域能够在接收到用户的滑动操作时,更新用于显示小说章节内容的显示页面。
作为一种可选的实施方式,所述根据应用的显示区域的布局,确定所述显示区域中用于根据操作更新显示页面的页面显示区域,包括:
根据所述应用的显示区域包括的视图控件的标识,查找用于控制在所述页面显示区域显示页面的视图控件;
将查找出的视图控件在所述应用的显示区域所分布的区域,作为所述页面显示区域。
仍以上述应用的显示区域包括A、B、C共三个区域为例,对应的,该应用包括三个视图控件,分别记为a、b、c;那么,根据查找到的视图控件标识与其对应区域的映射关系,视图控件a表示标题栏区域,视图控件b表示消息栏区域,视图控件c表示菜单栏区域,可以确定出B区域为该应用的页面显示区域。
步骤302:当所述页面显示区域加载的页面发生更新时,对所述显示区域中的所述页面图层进行图像采集。
作为一种可选的实施方式,对所述显示区域中的所述页面图层进行图像采集之前,所述方法还包括:定位位于所述页面图层顶部的图层;对位于所述页面图层顶部的图层设置隐藏属性。
这里,所述对位于所述页面图层顶部的图层设置隐藏属性,包括:
调整位于所述页面图层顶部的图层的层级,使位于所述页面图层顶部的图层的层级低于所述页面图层的层级。
这里,图层与图层之间的相对位置使用顶部与底部描述,顶部的图层是指以用户视线的方向为参照时,在显示区域中未被其他图层所覆盖的图层。以第一图层和第二图层为例,当第一图层位于第二图层的顶部时,即从用户的视角来看,第二图层被第一图层遮挡。
再以图层A和图层B为例,从用户的视角来看,图层A中的内容在显示区域中完全没有被图层B遮挡,则图层A记为顶部图层,即位于图层B顶部的图层;那么,对于除图层A之外的其他图层来说,例如图层B,是位于图层A的底部的图层。
再以图层A和图层B为例,A1区域为屏幕的左上角区域,图层A在A1区域对应的内容为一张图片,图层B在A1区域对应的内容为一段文字,那么,此情况下,图层B在A1区域对应的一段文字,将被图层A在A1区域对应的图片所遮挡,对于用户来说,用户只能看到该图片;可以理解,当将图层B置于图层A的顶部时,用户才能看到图层B在A1区域对应的一段文字,此时,图层A在A1区域对应的图片被设置将不会被显示。
具体地,所述应用的图层可能包括多个,比如,在所述页面图层的顶部存在第一图层,其中,所述第一图层,用于辅助在所述应用显示所述页面图层对应的信息时,通过所述第一图层,将所述第一图层对应的信息,显示于所述页面图层的信息的上层。此情况下,若不对位于所述页面图层顶部的图层,即若不对所述第一图层进行隐藏,那么,在对所述应用的显示区域的当前显示界面进行图像采集时,所述第一图层对应的显示信息将对所述页面图层对应的显示信息造成遮挡,进而导致所采集的图像不清晰。
举例来说,QQ应用中,厘米秀消息对应的图层位于QQ消息对应的图层的上层,因此,在QQ应用的消息记录中,厘米秀消息有时会对QQ消息造成遮挡。
也就是说,在对所述应用的显示区域进行图像采集之前,所述方法还包括:所述判断是否存在图像采集时需隐藏的内容,若存在,则对所述需隐藏的内容进行隐藏;若不存在,则执行对所述应用的显示区域进行图像采集的操作。这里,所述对所述需隐藏的内容进行隐藏,包括:调整所述需隐藏的内容所在视图层的层级,使所述需隐藏的内容所在视图层的层级低于所述消息列表所在视图层的层级。
步骤303:从所采集到的图像中,提取得到所述页面图层中与所述页面显示区域对应的页面图像。
作为一种实施方式,所述从所采集到的图像中,提取得到所述页面图层中与所述页面显示区域对应的页面图像,包括:
基于所述页面图层确定页面显示区域;
根据所述页面显示区域从所采集到的图像中提取页面图像。
示例性地,若终端屏幕上显示的应用的显示界面仅包括页面显示区域对应的信息,则可直接从所采集到的图像中,提取得到所述页面图层中与所述页面显示区域对应的页面图像。参照图5所示,所采集到的图像中仅包括应用的页面显示区域,即B区域,所采集到的图像即可作为所述页面显示区域对应的页面图像。
示例性地,若终端屏幕上显示的应用的显示界面包括页面显示区域以及附加信息区域对应的信息,则需要先确定页面显示区域以及附加信息区域,然后从所采集到的图像中,提取得到所述页面图层中与所述页面显示区域对应的页面图像。当然,此情况下,从所采集到的图像中,还可提取得到所述页面图层中与附加信息区域对应的附加信息图像。参照图4所示,所采集到的图像中包括应用的页面显示区域(即B区域),还有附加信息区域(即A区域和C区域),那么,需要从所采集到的图像提取出所述页面显示区域对应的页面图像,即B区域对应的页面图像。
步骤304:当根据所述页面显示区域中所加载页面的位置数据,检测到相邻两次所采集的页面图像存在重合区域,对所采集的页面图像根据所述重合区域进行去重处理。
也就是说,若检测到相邻两次所采集的页面图像存在重合区域,对所采集的页面图像根据所述重合区域进行去重处理,这样,能够为后续拼接页面图像时提供良好的无重合区域的图像做准备。
在第一种可选的实施方式中,所述根据所述页面显示区域中所加载页面的位置数据,检测到相邻两次所采集的页面图像存在重合区域,包括:
当根据每次在所述页面显示区域接收到的操作,更新当前所显示页面的全部内容,并在相邻两次操作的每次操作后采集到第一图像和第二图像 时,判断在所述页面显示区域中是否已经根据所述操作而显示所述页面的尾部的内容;
判断出在所述页面显示区域中已经根据所述操作而显示所述页面的尾部的内容时,比较所述第一图像中所述页面的高度区间数据,与所述第二图像中所述页面的高度区间数据,当存在重合区间数据时,判定检测到相邻两次所采集的页面图像存在重合区域。
就第一图像和第二图像举例来说,若终端全屏显示应用的页面显示区域,则所述第一图像和所述第二图像为相邻两次的截屏图像;
若终端全屏显示应用的页面显示区域以及附加信息区域,则所述第一图像和所述第二图像为按照显示区域的布局,从相邻两次的截屏图像中分别剪切得到的与页面显示区域对应的图像。
也就是说,每次进行更新时,更新的是当前页面显示区域的全部显示内容,即以也为单位进行翻页。
图6为本申请实施例提供的根据所述页面显示区域接收到的操作,更新当前所显示页面的全部内容的一种示意图,如图6所示,将当前页面显示区域显示的内容记为第一页,所述第一页的最顶部有消息S1,最底部有消息S10,如图6中最左边附图所示;接收到操作时,将第一页更新为第二页,最顶部有消息S11,最底部有消息S20,如图6中中间附图所示;接收到操作时,将第二页更新为第三页,最顶部有消息S21,最底部有消息S30,如图6中最右边附图所示;以此类推,进行更新。可见,每次更新时,更新的是当前页的全部内容。
这里,所述位置数据是指页面相对于预设参照坐标系的高度数据。例如,以终端屏幕的最下方为x轴,y轴上的值即表示所述位置数据。第一页对应的位置数据为[0,y1),第二页对应的位置数据为[y1,2y1),第三页对应的位置数据为[2y1,3y1),以此类推。
与上述第一种可选的实施方式对应,所述对所采集的页面图像根据所述重合区域进行去重处理,包括:
确定所述重合区间数据在所述第一图像中对应的第一区域,并将所述第一图像中的第一区域去除;或者
确定所述重合区间数据在所述第二图像中对应的第二区域,并将所述第二图像中的第二区域去除。
这里,无论是从第一图像还是第二图像中去除重合内容,都不影响后续在拼接的效果。
也就是说,每次进行更新时,更新的是当前页面显示区域的全部显示内容,即以当前页面显示区域所对应的高度来确定页面更新的内容,并且以页为单位进行更新,这样,直到确定已经对最后一页进行截图完毕后,仅需对最后一页对应的图像以及倒数第二页对应的图像进行去重判断以及去重处理。
举例来说,若第一图像对应的位置数据为[y1,2y1),第二图像对应的位置数据为[2y1-1,3y1-1),则判定所述第一图像与所述第二图像存在重合区域[2y1-1,2y1),需要将所述第一图像中的第一区域[2y1-1,2y1)去除;或者将所述第二图像中的[2y1-1,2y1)去除。
在第二种可选的实施方式中,所述根据所述信息页面显示区域中所加载页面的位置数据,检测到相邻两次所采集的图像存在重合区域,包括:
当根据每次在所述信息页面显示区域接收到的操作,更新当前所显示页面的部分内容,并在相邻两次操作的每次操作后采集到第一图像和第二图像时,
比较所述第一图像中所述页面的高度区间数据,与所述第二图像中所述页面的高度区间数据;
当存在重合区间数据时,判定检测到相邻两次所采集的页面图像存在重合区域。
也就是说,每次进行更新时,更新的是当前页的部分内容,而非全部内容。
图7为本申请实施例提供的根据所述页面显示区域接收到的操作,更新当前所显示页面的部分内容的一种示意图,如图7所示,将当前页面显示区域显示的内容记为第一页,所述第一页的最顶部有消息S1,最底部有消息S10;接收到操作时,将第一页更新为第二页,最顶部有消息S6,最底部有消息S15;接收到操作时,将第二页更新为第三页,最顶部有消息S12,最底部有消息S21,以此类推,进行更新。可见,每次更新时,更新的是当前页的部分内容。也就是说,对第一页截屏时,得到的是第一页图像;从第二页开始,相邻两次截屏截得的图像中存在重合部分,需要进行去重处理操作。
与上述第二种可选的实施方式对应地,所述对所采集的页面图像根据所述重合区域进行去重处理,包括:
确定所述重合区间数据在所述第一图像中对应的第一区域,并将所述第一图像中的第一区域去除;或者,
确定所述重合区间数据在所述第二图像中对应的第二区域,并将所述第二图像中的第二区域去除。
也就是说,每次进行更新时,更新的是当前页面显示区域的部分显示内容,即以也当前接收到的操作所对应的幅度大小来确定页面更新的内容,并且以当前接收到的操作为单位进行翻页,也就是说,从第2次截屏开始,就需要进行去重复处理,直到对最后一次截屏截到的图像进行去重检测和处理。
举例来说,若第一图像对应的位置数据为[S1,S10],第二图像对应的位置数据为[S6,S15],则判定所述第一图像与所述第二图像存在重合区域[S6,S10],需要将所述第一图像中的第一区域[S6,S10]去除;或者将所述 第二图像中的[S6,S10]去除。
在第三种可选的实施方式中,所述根据所述页面显示区域中所加载页面的位置数据,检测到相邻两次所采集的页面图像存在重合区域,包括:
当根据每次在所述页面显示区域接收到的操作,更新当前所显示页面的全部内容,并在相邻两次操作的每次操作后采集到第一图像和第二图像时,
比较所述第一图像中页面内容的标识,与所述第二图像中所述页面内容的标识;
当存在相同标识时,判定检测到相邻两次所采集的页面图像存在重合区域。
其中,在所述页面显示区域中,不同内容对应有不同的标识。以所述内容为即时通讯消息为例,所述页面显示区域中显示的内容为即时通讯消息时,每条即时通讯消息在后台都对应有不同的标识,后台对即时通讯消息按照特定排列顺序布局,如时间顺序。
也就是说,每次进行更新时,无论更新的是当前页面显示区域的全部显示内容,还是当前页面显示区域的部分显示内容,均可以通过两幅图像中页面内容的标识来判断二者是否存在重合区域。
与上述第三种可选的实施方式对应地,所述对所采集的页面图像根据所述重合区域进行去重处理,包括:
从后台读取重合区域中所包含的标识以及与所述标识对应的高度;
基于所述标识对应的高度确定在所述第二图像中对应的第二区域,并将所述第二图像中的第二区域去除;
基于所述标识对应的高度确定在所述第一图像中对应的第一区域,并将所述第一图像中的第一区域去除。
当然,检测相邻两次所采集到的页面图像是否存在重合区域的方法并不限于以上给出的这三种方式,还可以通过其他方式来检测,在此不再赘述。
在一实施例中,所述对所述应用的显示区域进行图像采集,并根据所述页面显示区域从所采集图像中提取页面图像,包括:
检测到页面显示区域包括语音消息时,将所述语音消息识别为文本消息并形成文本图像;
根据所述文本图像需要占用的显示区域,在所述页面显示区域形成用于加载所述文本图像的文本图像区域,并在所述文本图像区域中加载所述文本图像。
作为一种具体的实施方式,所述根据所述文本图像需要占用的显示区域,在所述页面显示区域形成用于加载所述文本图像的文本图像区域,并在所述文本图像区域中加载所述文本图像,包括:
当所述文本图像需要占用的显示区域的高度小于预设高度值时,将所 述语音消息以及与所述语音消息相邻的下一条信息之间的区域,确定为文本图像区域;将所述文本图像插入至所述文本图像区域;
当所述文本图像需要占用的显示区域的高度大于或等于预设高度值时,将所述页面图像分割成两部分,使第一部分图像包含所述语音消息,第二部分图像不包含所述语音消息;并将所述第一部分图像、所述文本图像、所述第二部分图像拼接为新的页面图像。
图8为本申请实施例提供的一种将语音消息翻译为文本消息后,显示文本消息的示意图一,如图8所示,由于语音消息的时长较短,相对应的文本消息的长度小于预设长度值时,将该文本消息插入至所述语音消息以及与所述语音消息相邻的消息的中间区域,这样,在截屏时,该语音消息的内容可以文本的消息得以展示,接收拼接后的图片的第三方,能够了解到该语音消息的内容。
图9为本申请实施例提供的一种将语音消息翻译为文本消息后,显示文本消息的示意图二,如图9所示,由于语音消息的时长较长,相对应的文本消息的长度大于预设长度值时,先对当前页面图像分割成两部分,使第一部分图像包含所述语音消息,第二部分图像不包含所述语音消息;并将所述第一部分图像、所述文本消息对应的文本图像、所述第二部分图像拼接成新的页面图像,这样,该语音消息的内容可以文本的消息得以展示,接收拼接后的图片的第三方,能够了解到该语音消息的内容。
需要说明的是,若检测到页面显示区域包括多条语音消息时,可同时对所述多条语音消息进行处理。作为一种可选实施方式,每条语音消息对应的文本图像,所需占用的显示区域的大小相同,例如占用的高度相同;这里的高度可以为语音消息在图像中所占用的高度,将所述多条语音消息识别为文本消息,并将所确定的每条语音消息对应的文本图像加载至对应语音消息所占区域。由于高度相同,从而并行处理所述多条语音消息,提高处理效率。
可以理解,每条语音消息对应的文本消息的长度不同。当文本消息的长度小于或等于预设长度值时,文本消息的全部内容形成文本图像;当文本消息的长度大于所述预设长度值时,文本消息的部分内容形成文本图像。这里,所述文本消息的部分内容,可以是所述文本消息的摘要,也可以是从所述文本消息中截取的满足预设长度值的部分消息,并不对截取起始位置进行限定。
需要说明的是,若检测到页面显示区域包括多条语音消息时,可依次对所述多条语音消息进行处理。这里,仅以如何完整显示第一条语音消息为例进行说明。对所述第一条语音消息处理完毕之后,再按照处理第一条语音消息的方式,对所述页面显示区域中的第二条语音消息进行处理,以此类推。
具体地,页面显示区域包括多条语音消息时,且所述多条语音消息对 应的文本消息较长时,先在所述页面显示区域中确定出第一条语音消息,将所述第一条语音消息识别为文本消息,并形成文本图像;将图像中所述第一语音消息所占区域去除,在所述第一条语音消息以及与所述第一条语音消息的下一条信息之间的区域,插入至所述文本图像,并拼接为新的图像。
由于依次处理语音消息,能够显示语音消息对应的全部内容,提高用户对语音消息的辨识性。
步骤305:对所采集的页面图像进行拼接处理。
作为一种实施方式,对所采集的页面图像进行拼接处理,包括:
对所采集的页面图像按照顺序进行拼接,形成拼接后的图片,并保存所述拼接后的图片,删除所有所采集的页面图像。
如此,能够获得拼接后的长图片,这样,相互对于转发多张独立的图片的转发方式来说,便于转发该图片,节省了用户的手动转发的次数。由于将所采集的页面图像删除,及时释放了内存资源,节省了内存资源。
在一实施例中,所述方法还包括:
根据所述应用的显示区域的布局,确定所述显示区域中用于显示除所述页面之外的附加信息的附加信息区域;
从所采集到的图像中,提取得到所述页面图层中与所述附加信息区域对应的附加信息图像;
所述对所采集的页面图像进行拼接处理,包括:
根据所述附加信息区域以及所述页面显示区域的相对位置关系,对所述附加信息图像以及所述页面图像进行拼接。
这样,能够使得应用的界面得以完整的展示。
图10示出了对所述页面图像进行拼接得到的图片的示意图,从图10可以看出,所获得的长截图图片仅包含页面显示区域对应的信息;相对于图1和图2来说,在所获得的长截图图片中,不存在厘米秀头像,且用户从该长截图图片中可以获取语音消息。
图11示出了对所述附加信息图像以及所述页面图像进行拼接得到的示意图。从图11可以看出,所获得的长截图图片仅包含页面显示区域对应的信息,还包括附加信息区域对应的信息;相对于图1和图2来说,在所获得的长截图图片中,不存在厘米秀头像,且用户从该长截图图片中可以获取语音消息。
本实施例所述技术方案中,先在应用的显示区域的图层中,定位页面显示区域所处的页面图层;这样,在进行图像采集时,对所述显示区域中的所述页面图层进行图像采集,能够解决现有截屏技术中出现的同时采集所述页面图层和除所述页面图层之外的其他图层而导致最后截得的图片不清晰的问题;从所采集到的图像中,提取得到所述页面图层中与所述页面显示区域对应的页面图像;当根据所述页面显示区域中所加载页面的位置 数据,检测到相邻两次所采集的页面图像存在重合区域,对所采集的页面图像根据所述重合区域进行去重处理;最后才对所采集的页面图像进行拼接处理,这样,由于在拼接之前进行了去重处理,能够解决通过长截屏功能截图时出现的拼接处经常出现错误甚至重复截图的问题。另外,由于采用通过截图获得图片的形式,而非手动选择一些消息进行转发,不会出现消息漏发的问题;再有,由于最后形成的是拼接得到的长的图片,仅需转发拼接后的图片即可,而无需将截图获得的多个独立的图片分别进行转发,减少了用户手动转发的操作次数,提升了用户的使用体验。
图12为本申请实施例提供的截屏处理的流程示意图,如图12所示,处理流程主要包括:
步骤1201:通知应用开始截屏功能,截取屏幕前,判断是否存在截屏时需隐藏的第二内容,确定存在所述第二内容时,对所述第二内容进行隐藏。
作为一种实施方式,检测到用于指示应用开启截屏功能的第二操作时,通知应用开始截屏功能。这里,所述第二操作可以是由用户发出的对预设按钮的触发操作,所述预设按钮接收到触发操作时,指示应用开启截屏功能。
作为一种实施方式,所述判断是否存在截屏时需隐藏的第二内容,包括:
应用通过视图(view)层级查找覆盖在消息列表上方的视图,并将覆盖在消息列表上方的视图进行隐藏。
这样,能够防止截图过程中多次出现并且会挡住消息的第二内容。
在一具体实施方式中,所述判断是否存在截屏时需隐藏的第二内容,包括:
通过视图层级查找是否有覆盖在所述应用的消息列表上方的视图;
将覆盖在消息列表上方的视图判定为截屏时需隐藏的第二内容;
相应地,所述对所述第二内容进行隐藏,包括:
调整所述第二内容所在视图层的层级,使所述第二内容所在视图层的层级低于所述消息列表所在视图层的层级。
步骤1202:截取屏幕前,判断是否存在截屏时需转换的第三内容,确定存在所述第三内容时,对所述第三内容进行转换,并显示。
这里,所述第三内容包括语音消息。
作为一种实施方式,所述判断是否存在截屏时需转换的第三内容,包括:
查询当前截取消息内容中有没有语音消息,如果有,通过语音识别系统将语音消息翻译为文本消息并将所述文本消息显示出来。
这里,所述语音识别系统是所述应用的语音识别系统,或是所述应用能够调用的其他应用的语音识别系统。
步骤1203:对所述应用的当前界面进行截图,获得第一张图片,对所述第一张图片进行识别,识别出所述应用的附加信息区域和页面显示区域。
如图13所示,将第一个截取的图片分成三个部分,顶部的标题栏模块、底部的菜单模块以及中间的消息模块;其中,消息模块对应的区域视为应用的页面显示区域,标题栏模块以及菜单模块对应的区域视为应用的附加信息区域。其中,所述标题栏模块用于显示与所述应用相关的标题栏所包含的至少一个对象;所述菜单模块用于显示与所述应用相关的菜单栏所包含的至少一个对象。
步骤1204:在滚动所述应用的消息列表的过程中,以页为单位对页面显示区域的消息记录进行截图。
这里,用于滚动所述应用的消息列表的操作,可以是用户手动操作,也可以是程序自动操作。
作为一种实施方式,所述以页为单位对页面显示区域的消息记录进行截图,包括:
在获得第一张图片之后,记录每次滚动的位置;
当滚动幅度为所述页面显示区域的视图高度时,判定滚动一页,对页面显示区域的当前内容进行截图,保存每一页的截图,以此类推,直至保存最后一页的截图。
这里,每次滑动一页可以减少位置判断和保存内容的次数,可以提高拼接图片的效率。
步骤1205:当列表滑动无内容时,用于提供滚动到页面显示区域底部的接口将通知所述应用已经滑动到最后一页,判断最后一页对应的图片是否需要裁剪,若需要裁剪,用经裁剪后得到的图片替换所述最后一页对应的图片。
作为一种实施方式,所述判断最后一页对应的图片是否需要裁剪,若需要,用经裁剪后得到的图片替换所述最后一页对应的图片,包括:
获取倒数第二页对应的图片以及最后一页对应的图片;
判断所述倒数第二页对应的图片以及所述最后一页对应的图片是否有重合的内容;
若存在重合的内容,将位于最后一页对应的图片中的所述重合的内容裁掉,删除所述最后一页对应的图片,并保存裁掉所述重合的内容后的最后一页对应的图片。
步骤1206:对所有的图片进行拼接,生成包含附加信息区域内容以及页面显示区域内容的长截屏图片。
作为一种实施方式,所述对所有的图片进行拼接,包括:
对所有图片中的页面显示区域的内容按照顺序进行拼接,得到页面显示区域内容的总内容;
根据第一张图片中的附加信息区域以及页面显示区域的对应关系或分 布原则,将所述附加信息区域的内容与所述页面显示区域的总内容进行拼接。
也就是说,最后拼接出的长截屏图片包括:
附加信息区域的内容+页面显示区域的内容。
仍然以如图13所示划分标准为例,最后拼接出的长截屏图片包括:
标题栏模块的内容+第一张图片中消息模块的内容+循环截取的消息模块的内容+最后一页经去重处理的消息模块的内容+菜单模块的内容。
步骤1207:保存拼接后的到的长截屏图片。
这样,得到了有关该应用的消息记录的长截屏图片。
可选地,所述对所述应用的当前界面进行截图之前,所述方法还包括:
检测是否接收到第三操作;
若接收到第三操作,基于所述第三操作确定截屏前需处理的位于应用的消息列表中的第三内容;
对所述第三内容做隐藏性处理或删除处理。
这里,所述第三内容是指用户想要在截屏时不出现的内容。所述第三操作是由用户发出的操作,如在页面显示区域画一块区域,被选中的区域则需要做隐藏性处理。
如此,能够解决现有技术中在截屏时存在不想截图内容也会被截取的问题,并且,根据用户的主动性,由用户来决定应该不被截图的内容,很好地保护了用户的隐私。
本申请实施例所书技术方案,能解决截屏截取到最后一屏时常出现的衔接问题,如最后一页与倒数第二页的页面显示区域存在重合区域,还能解决现有截屏技术中出现的因未处理第二内容而导致最后获得的图不清晰的问题,也能解决无法获取第二内容如语音消息的具体内容等问题。
图14为本申请实施例提供的应用页面的处理装置的组成结构示意图一,应用于终端,如图14所示,该装置包括:定位单元11,配置为在应用的显示区域的图层中,定位页面显示区域所处的页面图层;采集单元12,配置为当所述页面显示区域加载的页面发生更新时,对所述显示区域中的所述页面图层进行图像采集;提取单元13,配置为从所采集到的图像中,提取得到所述页面图层中与所述页面显示区域对应的页面图像;去重处理单元14,配置为当根据所述页面显示区域中所加载页面的位置数据,检测到相邻两次所采集的页面图像存在重合区域,对所采集的页面图像根据所述重合区域进行去重处理;拼接单元15,配置为对所采集的页面图像进行拼接处理。
可选地,所述装置还包括:第一预处理单元16,配置为在所述采集单元12对所述显示区域中的所述页面图层进行图像采集之前,定位位于所述页面图层顶部的图层;对位于所述页面图层顶部的图层设置隐藏属性。
在一实施例中,所述定位单元11,还配置为:根据应用的显示区域的 布局,确定所述显示区域中用于根据操作更新显示页面的页面显示区域。
作为一种具体实施方式,所述定位单元11,具体配置为:根据所述应用的显示区域包括的视图控件的标识,查找用于控制在所述页面显示区域显示页面的视图控件;将查找出的视图控件在所述应用的显示区域所分布的区域,作为所述页面显示区域。
作为一种可选实施方式,所述去重处理单元14,具体配置为:当根据每次在所述页面显示区域接收到的操作,更新当前所显示页面的全部内容,并在相邻两次操作的每次操作后采集到第一图像和第二图像时,判断出在所述页面显示区域中是否已经根据所述操作而显示所述页面的尾部的内容;判断出在所述页面显示区域中已经根据所述操作而显示所述页面的尾部的内容时,比较所述第一图像中所述页面的高度区间数据,与所述第二图像中所述页面的高度区间数据,当存在重合区间数据时,判定检测到相邻两次所采集的页面图像存在重合区域。
作为另一种可选实施方式,所述去重处理单元14,具体配置为:当根据每次在所述信息页面显示区域接收到的操作,更新当前所显示页面的部分内容,并在相邻两次操作的每次操作后采集到第一图像和第二图像时,比较所述第一图像中所述页面的高度区间数据,与所述第二图像中所述页面的高度区间数据;当存在重合区间数据时,判定检测到相邻两次所采集的页面图像存在重合区域。
作为一种具体实施方式,所述去重处理单元14,具体配置为:确定所述重合区间数据在所述第一图像中对应的第一区域,并将所述第一图像中的第一区域去除;或者确定所述重合区间数据在所述第二图像中对应的第二区域,并将所述第二图像中的第二区域去除。
可选地,所述装置还包括:第二预处理单元17,配置为:检测到页面显示区域包括语音消息时,将所述语音消息识别为文本消息并形成文本图像;根据所述文本图像需要占用的显示区域,在所述页面显示区域形成用于加载所述文本图像的文本图像区域,并在所述文本图像区域中加载所述文本图像。
作为一种具体实施方式,所述第二预处理单元17,具体配置为:当所述文本图像需要占用的显示区域的高度小于预设高度值时,将所述语音消息以及与所述语音消息相邻的下一条信息之间的区域,确定为文本图像区域;将所述文本图像插入至所述文本图像区域;当所述文本图像需要占用的显示区域的高度大于或等于预设高度值时,将所述页面图像分割成两部分,使第一部分图像包含所述语音消息,第二部分图像不包含所述语音消息;并将所述第一部分图像、所述文本图像、所述第二部分图像拼接为新的页面图像。
在一实施例中,所述定位单元11,还配置为:根据所述应用的显示区域的布局,确定所述显示区域中用于显示除所述页面之外的附加信息的附 加信息区域;所述提取单元13,还用于:根据所述附加信息区域从所采集的图像中提取附加信息图像;所述拼接单元15,还配置为:根据所述附加信息区域以及所述页面显示区域的相对位置关系,对所述附加信息图像以及所述页面图像进行拼接。
在一实施例中,所述提取单元13,还配置为:在提取得到所述页面图层中与所述页面显示区域对应的页面图像之前,检测是否接收到第一操作;若接收到第一操作,基于所述第一操作确定所述页面显示区域中的目标子区域,从所采集图像中提取所述目标子区域对应的图像,作为页面图像;若未接收到第一操作,根据所述页面显示区域从所采集图像中提取页面图像。
本领域技术人员应当理解,本实施例的应用页面的处理装置中各单元的功能,可参照前述应用页面的处理方法的相关描述而理解。
实际应用中,上述定位单元11、采集单元12、提取单元13、去重处理单元14、拼接单元15、第一预处理单元16、第二预处理单元17的具体结构均可可由所述应用页面的处理装置设备或应用页面的处理装置所属设备中的中央处理器(CPU,Central Processing Unit)、微处理器(MCU,Micro Controller Unit)、数字信号处理器(DSP,Digital Signal Processing)或可编程逻辑器件(PLC,Programmable Logic Controller)等实现。
本实施例所述应用页面的处理装置可设置于终端侧。
本领域技术人员应当理解,本申请实施例的应用页面的处理装置中各处理单元的功能,可参照前述应用页面的处理方法的相关描述而理解,本申请实施例的应用页面的处理装置中各处理单元,可通过实现本申请实施例所述的功能的模拟电路而实现,也可以通过执行本申请实施例所述的功能的软件在智能终端上的运行而实现。
本实施例所述应用页面的处理装置,能解决截屏截取到最后一屏时常出现的衔接问题,如最后一页与倒数第二页的页面显示区域存在重合区域,还能解决现有截屏技术中出现的因未处理第二内容而导致最后获得的图不清晰的问题,也能解决无法获取第二内容如语音消息的具体内容等问题。
图15为本申请实施例提供的应用页面的处理装置的组成结构示意图二,如图15所示,所述应用页面的处理装置包括存储器10、处理器20;其中,存储器10,用于存储计算机程序;处理器20,与所述存储器10连接,用于通过执行所述计算机程序,实现前述任意一个技术方案提供的应用页面的处理方法的步骤。
本实施例所述存储器10可为包括各种存储介质的存储结构,例如,可包括随机存储介质、制度存储介质、闪存等存储介质,可用于非瞬间的存储所述计算机程序。
所述处理器20可为前述的CPU、MCU、DSP或PLC中的一种,还可以是处理电路,例如,专用集成电路(ASIC,Application Specific Integrated  Circuits),可以通过执行存储器10存储的计算机程序实现上述操作。
在本实施例中所述处理器20和所述存储器10可通过总线接口30连接,在本实施例中所述总线接口30可包括:集成电路IIC总线等,可以用于设备内部的连接。
如图15所示,所述应用页面的处理装置还可包括:通信接口40,可用于与其他电子设备通信,例如,当所述应用页面的处理装置对所采集的页面图像和/或附加信息图像拼接处理完毕后,则所述应用页面的处理装置可以通过所述通信接口40将拼接得到的长截屏图片发送至所述其他电子设备通信。
这里需要指出的是:以上涉及应用页面的处理装置的硬件组成的描述,与上述方法描述是类似的,同方法的有益效果描述,不做赘述。对于本申请实施例中未披露的技术细节,请参照本申请方法实施例的描述。
本实施例还提供一种存储介质,所述存储介质存储有计算机程序,所述计算机程序被处理器执行之后,能够实现前述任意一项或多项应用页面的处理方法。
所述计算机存储介质可为各种类型的存储介质,在本实施例中可优选为非瞬间存储介质。
作为一种实施方式,所述计算机程序用于执行:在应用的显示区域的图层中,定位页面显示区域所处的页面图层;当所述页面显示区域加载的页面发生更新时,对所述显示区域中的所述页面图层进行图像采集;从所采集到的图像中,提取得到所述页面图层中与所述页面显示区域对应的页面图像;当根据所述页面显示区域中所加载页面的位置数据,检测到相邻两次所采集的页面图像存在重合区域时,对所采集的页面图像根据所述重合区域进行去重处理;对所采集的页面图像进行拼接处理。
作为一种实施方式,所述计算机程序用于执行:对所述显示区域中的所述页面图层进行图像采集之前,定位位于所述页面图层顶部的图层;对位于所述页面图层顶部的图层设置隐藏属性。
作为一种实施方式,所述计算机程序用于执行:根据所述应用的显示区域包括的视图控件的标识,查找用于控制在所述页面显示区域显示页面的视图控件;将查找出的视图控件在所述应用的显示区域所分布的区域,作为所述页面显示区域。
作为一种实施方式,所述计算机程序用于执行:当根据每次在所述页面显示区域接收到的操作,更新当前所显示页面的全部内容,并在相邻两次操作的每次操作后采集到第一图像和第二图像时,判断在所述页面显示区域中是否已经根据所述操作而显示所述页面的尾部的内容;判断出在所述页面显示区域中已经根据所述操作而显示所述页面的尾部的内容时,比较所述第一图像中所述页面的高度区间数据,与所述第二图像中所述页面的高度区间数据,当存在重合区间数据时,判定检测到相邻两次所采集的 页面图像存在重合区域。
作为一种实施方式,所述计算机程序用于执行:当根据每次在所述信息页面显示区域接收到的操作,更新当前所显示页面的部分内容,并在相邻两次操作的每次操作后采集到第一图像和第二图像时,比较所述第一图像中所述页面的高度区间数据,与所述第二图像中所述页面的高度区间数据;当存在重合区间数据时,判定检测到相邻两次所采集的页面图像存在重合区域。
作为一种实施方式,所述计算机程序用于执行:确定所述重合区间数据在所述第一图像中对应的第一区域,并将所述第一图像中的所述第一区域去除;或者确定所述重合区间数据在所述第二图像中对应的第二区域,并将所述第二图像中的所述第二区域去除。
作为一种实施方式,所述计算机程序用于执行:检测到页面显示区域包括语音消息时,将所述语音消息识别为文本消息并形成文本图像;根据所述文本图像需要占用的显示区域,在所述页面显示区域形成用于加载所述文本图像的文本图像区域,并在所述文本图像区域中加载所述文本图像。
作为一种实施方式,所述计算机程序用于执行:当所述文本图像需要占用的显示区域的高度小于预设高度值时,将所述语音消息以及与所述语音消息相邻的下一条信息之间的区域,确定为文本图像区域;将所述文本图像插入至所述文本图像区域;当所述文本图像需要占用的显示区域的高度大于或等于预设高度值时,将所述页面图像分割成两部分,使第一部分图像包含所述语音消息,第二部分图像不包含所述语音消息;并将所述第一部分图像、所述文本图像、所述第二部分图像拼接为新的页面图像。
作为一种实施方式,所述计算机程序用于执行:根据所述应用的显示区域的布局,确定所述显示区域中用于显示除所述页面之外的附加信息的附加信息区域;从所采集到的图像中,提取得到所述页面图层中与所述附加信息区域对应的附加信息图像。
作为一种实施方式,所述计算机程序用于执行:检测是否接收到第一操作;接收到第一操作时,基于所述第一操作确定所述页面显示区域中的目标子区域;从所采集图像中提取所述目标子区域对应的图像,将所述目标子区域对应的图像作为页面图像。
本领域技术人员应当理解,本实施例的存储介质中各程序的功能,可参照实施例所述的应用页面的处理方法的相关描述而理解。
在本申请所提供的几个实施例中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。以上所描述的设备实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,如:多个单元或组件可以结合,或可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的各组成部分相互之间的耦合、或直接耦合、或通信连接可以是通过一些接口,设备或单元 的间接耦合或通信连接,可以是电性的、机械的或其它形式的。
上述作为分离部件说明的单元可以是、或也可以不是物理上分开的,作为单元显示的部件可以是、或也可以不是物理单元;既可以位于一个地方,也可以分布到多个网络单元上;可以根据实际的需要选择其中的部分或全部单元来实现本实施例方案的目的。
另外,在本申请各实施例中的各功能单元可以全部集成在一个处理单元中,也可以是各单元分别单独作为一个单元,也可以两个或两个以上单元集成在一个单元中;上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:移动存储设备、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
或者,本申请上述集成的单元如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机、服务器、或者网络设备等)执行本申请各个实施例所述方法的全部或部分。
本申请实施例中记载的应用页面的处理方法及装置只以上述实施例为例,但不仅限于此,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。
以上所述,仅为本申请的具体实施方式,并非用于限定本申请的保护范围本申请本申请本申请本申请。
工业实用性
本申请实施例的技术方案在应用的显示区域的图层中,定位页面显示区域所处的页面图层;当所述页面显示区域加载的页面发生更新时,对所述显示区域中的所述页面图层进行图像采集;从所采集到的图像中,提取得到所述页面图层中与所述页面显示区域对应的页面图像;当根据所述页面显示区域中所加载页面的位置数据,检测到相邻两次所采集的页面图像存在重合区域时,对所采集的页面图像根据所述重合区域进行去重处理;对所采集的页面图像进行拼接处理;如此,至少能解决通过长截屏功能截 图时出现的拼接处经常出现错误甚至重复截图的问题。

Claims (32)

  1. 一种应用页面的处理方法,包括:
    在应用的显示区域的图层中,定位页面显示区域所处的页面图层;
    当所述页面显示区域加载的页面发生更新时,对所述显示区域中的所述页面图层进行图像采集;
    从所采集到的图像中,提取得到所述页面图层中与所述页面显示区域对应的页面图像;
    当根据所述页面显示区域中所加载页面的位置数据,检测到相邻两次所采集的页面图像存在重合区域时,对所采集的页面图像根据所述重合区域进行去重处理;
    对所采集的页面图像进行拼接处理。
  2. 根据权利要求1所述的方法,其中,所述方法还包括:
    对所述显示区域中的所述页面图层进行图像采集之前,定位位于所述页面图层顶部的图层;
    对位于所述页面图层顶部的图层设置隐藏属性。
  3. 根据权利要求1所述的方法,其中,所述方法还包括:
    根据所述应用的显示区域包括的视图控件的标识,查找用于控制在所述页面显示区域显示页面的视图控件;
    将查找出的视图控件在所述应用的显示区域所分布的区域,作为所述页面显示区域。
  4. 根据权利要求1所述的方法,其中,所述根据所述页面显示区域中所加载页面的位置数据,检测到相邻两次所采集的页面图像存在重合区域,包括:
    当根据每次在所述页面显示区域接收到的操作,更新当前所显示页面的全部内容,并在相邻两次操作的每次操作后采集到第一图像和第二图像时,
    判断在所述页面显示区域中是否已经根据所述操作而显示所述页面的尾部的内容;
    判断出在所述页面显示区域中已经根据所述操作而显示所述页面的尾部的内容时,比较所述第一图像中所述页面的高度区间数据,与所述第二图像中所述页面的高度区间数据,当存在重合区间数据时,判定检测到相邻两次所采集的页面图像存在重合区域。
  5. 根据权利要求1所述的方法,其中,所述根据所述信息页面显示区域中所加载页面的位置数据,检测到相邻两次所采集的图像存在重合区域,包括:
    当根据每次在所述信息页面显示区域接收到的操作,更新当前所显示页面的部分内容,并在相邻两次操作的每次操作后采集到第一图像和第二图像时,
    比较所述第一图像中所述页面的高度区间数据,与所述第二图像中所述页面的高度区间数据;
    当存在重合区间数据时,判定检测到相邻两次所采集的页面图像存在重合区域。
  6. 根据权利要求4或5所述的方法,其中,所述对所采集的页面图像根据所述重合区域进行去重处理,包括:
    确定所述重合区间数据在所述第一图像中对应的第一区域,并将所述第一图像中的所述第一区域去除;或者
    确定所述重合区间数据在所述第二图像中对应的第二区域,并将所述第二图像中的所述第二区域去除。
  7. 根据权利要求1所述的方法,其中,所述方法还包括:
    检测到页面显示区域包括语音消息时,将所述语音消息识别为文本消息并形成文本图像;
    根据所述文本图像需要占用的显示区域,在所述页面显示区域形成用于加载所述文本图像的文本图像区域,并在所述文本图像区域中加载所述文本图像。
  8. 根据权利要求7所述的方法,其中,所述根据所述文本图像需要占用的显示区域,在所述页面显示区域形成用于加载所述文本图像的文本图像区域,并在所述文本图像区域中加载所述文本图像,包括:
    当所述文本图像需要占用的显示区域的高度小于预设高度值时,将所述语音消息以及与所述语音消息相邻的下一条信息之间的区域,确定为文本图像区域;将所述文本图像插入至所述文本图像区域;
    当所述文本图像需要占用的显示区域的高度大于或等于预设高度值时,将所述页面图像分割成两部分,使第一部分图像包含所述语音消息,第二部分图像不包含所述语音消息;并将所述第一部分图像、所述文本图像、所述第二部分图像拼接为新的页面图像。
  9. 根据权利要求1所述的方法,其中,所述方法还包括:
    根据所述应用的显示区域的布局,确定所述显示区域中用于显示除所述页面之外的附加信息的附加信息区域;
    从所采集到的图像中,提取得到所述页面图层中与所述附加信息区域对应的附加信息图像;
    所述对所采集的页面图像进行拼接处理,包括:
    根据所述附加信息区域以及所述页面显示区域的相对位置关系,对所述附加信息图像以及所述页面图像进行拼接。
  10. 根据权利要求1所述的方法,其中,所述从所采集到的图像中,提取得到所述页面图层中与所述页面显示区域对应的页面图像,包括:
    检测是否接收到第一操作;
    接收到第一操作时,基于所述第一操作确定所述页面显示区域中的目 标子区域;
    从所采集图像中提取所述目标子区域对应的图像,将所述目标子区域对应的图像作为页面图像。
  11. 一种应用页面的处理装置,包括:
    定位单元,配置为在应用的显示区域的图层中,定位页面显示区域所处的页面图层;
    采集单元,配置为当所述页面显示区域加载的页面发生更新时,对所述显示区域中的所述页面图层进行图像采集;
    提取单元,配置为从所采集到的图像中,提取得到所述页面图层中与所述页面显示区域对应的页面图像;
    去重处理单元,配置为当根据所述页面显示区域中所加载页面的位置数据,检测到相邻两次所采集的页面图像存在重合区域,对所采集的页面图像根据所述重合区域进行去重处理;
    拼接单元,配置为对所采集的页面图像进行拼接处理。
  12. 根据权利要求11所述的装置,其中,所述装置还包括:
    第一预处理单元,配置为在所述采集单元对所述显示区域中的所述页面图层进行图像采集之前,定位位于所述页面图层顶部的图层;对位于所述页面图层顶部的图层设置隐藏属性。
  13. 根据权利要求11所述的装置,其中,所述定位单元,还配置为:
    根据所述应用的显示区域包括的视图控件的标识,查找用于控制在所述页面显示区域显示页面的视图控件;将查找出的视图控件在所述应用的显示区域所分布的区域,作为所述页面显示区域。
  14. 根据权利要求11所述的装置,其中,所述去重处理单元,还配置为:
    当根据每次在所述页面显示区域接收到的操作,更新当前所显示页面的全部内容,并在相邻两次操作的每次操作后采集到第一图像和第二图像时,判断在所述页面显示区域中是否已经根据所述操作而显示所述页面的尾部的内容;判断出在所述页面显示区域中已经根据所述操作而显示所述页面的尾部的内容时,比较所述第一图像中所述页面的高度区间数据,与所述第二图像中所述页面的高度区间数据,当存在重合区间数据时,判定检测到相邻两次所采集的页面图像存在重合区域。
  15. 根据权利要求11所述的装置,其中,所述去重处理单元,还配置为:
    当根据每次在所述信息页面显示区域接收到的操作,更新当前所显示页面的部分内容,并在相邻两次操作的每次操作后采集到第一图像和第二图像时,比较所述第一图像中所述页面的高度区间数据,与所述第二图像中所述页面的高度区间数据;当存在重合区间数据时,判定检测到相邻两次所采集的页面图像存在重合区域。
  16. 根据权利要求14或15所述的装置,其中,所述去重处理单元,还配置为:
    确定所述重合区间数据在所述第一图像中对应的第一区域,并将所述第一图像中的所述第一区域去除;或者
    确定所述重合区间数据在所述第二图像中对应的第二区域,并将所述第二图像中的所述第二区域去除。
  17. 根据权利要求11所述的装置,其中,所述装置还包括:第二预处理单元,配置为:
    检测到页面显示区域包括语音消息时,将所述语音消息识别为文本消息并形成文本图像;根据所述文本图像需要占用的显示区域,在所述页面显示区域形成用于加载所述文本图像的文本图像区域,并在所述文本图像区域中加载所述文本图像。
  18. 根据权利要求17所述的装置,其中,所述第二预处理单元,还配置为:
    当所述文本图像需要占用的显示区域的高度小于预设高度值时,将所述语音消息以及与所述语音消息相邻的下一条信息之间的区域,确定为文本图像区域;将所述文本图像插入至所述文本图像区域;
    当所述文本图像需要占用的显示区域的高度大于或等于预设高度值时,将所述页面图像分割成两部分,使第一部分图像包含所述语音消息,第二部分图像不包含所述语音消息;并将所述第一部分图像、所述文本图像、所述第二部分图像拼接为新的页面图像。
  19. 根据权利要求11所述的装置,其中,
    所述定位单元,还配置为:根据所述应用的显示区域的布局,确定所述显示区域中配置为显示除所述页面之外的附加信息的附加信息区域;
    所述提取单元,还配置为:从所采集到的图像中,提取得到所述页面图层中与所述附加信息区域对应的附加信息图像;
    所述拼接单元,还配置为:根据所述附加信息区域以及所述页面显示区域的相对位置关系,对所述附加信息图像以及所述页面图像进行拼接。
  20. 根据权利要求11所述的装置,其中,所述提取单元,还用于:检测是否接收到第一操作;接收到第一操作时,基于所述第一操作确定所述页面显示区域中的目标子区域;从所采集图像中提取所述目标子区域对应的图像,将所述目标子区域对应的图像作为页面图像。
  21. 一种应用页面的处理装置,包括:
    存储器,用于存储计算机程序;
    处理器,与所述存储器连接,用于通过执行所述计算机程序,实现权利要求1至10任一项所述的应用页面的处理方法。
  22. 一种存储介质,所述存储介质存储有计算机程序,所述计算机程序被处理器执行之后,能够实现权利要求1至10任一项所述的应用页面的 处理方法。
  23. 一种应用页面的处理方法,所述方法由终端执行,所述终端包括有一个或多个处理器以及存储器,以及一个或一个以上的程序,其中,所述一个或一个以上的程序存储于存储器中,所述程序可以包括一个或一个以上的每一个对应于一组指令的单元,所述一个或多个处理器被配置为执行指令;所述方法包括:
    在应用的显示区域的图层中,定位页面显示区域所处的页面图层;
    当所述页面显示区域加载的页面发生更新时,对所述显示区域中的所述页面图层进行图像采集;
    从所采集到的图像中,提取得到所述页面图层中与所述页面显示区域对应的页面图像;
    当根据所述页面显示区域中所加载页面的位置数据,检测到相邻两次所采集的页面图像存在重合区域时,对所采集的页面图像根据所述重合区域进行去重处理;
    对所采集的页面图像进行拼接处理。
  24. 根据权利要求23所述的方法,其中,所述方法还包括:
    对所述显示区域中的所述页面图层进行图像采集之前,定位位于所述页面图层顶部的图层;
    对位于所述页面图层顶部的图层设置隐藏属性。
  25. 根据权利要求23所述的方法,其特征在于其中,所述方法还包括:
    根据所述应用的显示区域包括的视图控件的标识,查找用于控制在所述页面显示区域显示页面的视图控件;
    将查找出的视图控件在所述应用的显示区域所分布的区域,作为所述页面显示区域。
  26. 根据权利要求23所述的方法,其中,所述根据所述页面显示区域中所加载页面的位置数据,检测到相邻两次所采集的页面图像存在重合区域,包括:
    当根据每次在所述页面显示区域接收到的操作,更新当前所显示页面的全部内容,并在相邻两次操作的每次操作后采集到第一图像和第二图像时,
    判断在所述页面显示区域中是否已经根据所述操作而显示所述页面的尾部的内容;
    判断出在所述页面显示区域中已经根据所述操作而显示所述页面的尾部的内容时,比较所述第一图像中所述页面的高度区间数据,与所述第二图像中所述页面的高度区间数据,当存在重合区间数据时,判定检测到相邻两次所采集的页面图像存在重合区域。
  27. 根据权利要求23所述的方法,其中,所述根据所述信息页面显示区域中所加载页面的位置数据,检测到相邻两次所采集的图像存在重合区 域,包括:
    当根据每次在所述信息页面显示区域接收到的操作,更新当前所显示页面的部分内容,并在相邻两次操作的每次操作后采集到第一图像和第二图像时,
    比较所述第一图像中所述页面的高度区间数据,与所述第二图像中所述页面的高度区间数据;
    当存在重合区间数据时,判定检测到相邻两次所采集的页面图像存在重合区域。
  28. 根据权利要求26或27所述的方法,其中,所述对所采集的页面图像根据所述重合区域进行去重处理,包括:
    确定所述重合区间数据在所述第一图像中对应的第一区域,并将所述第一图像中的所述第一区域去除;或者
    确定所述重合区间数据在所述第二图像中对应的第二区域,并将所述第二图像中的所述第二区域去除。
  29. 根据权利要求23所述的方法,其中,所述方法还包括:
    检测到页面显示区域包括语音消息时,将所述语音消息识别为文本消息并形成文本图像;
    根据所述文本图像需要占用的显示区域,在所述页面显示区域形成用于加载所述文本图像的文本图像区域,并在所述文本图像区域中加载所述文本图像。
  30. 根据权利要求29所述的方法,其中,所述根据所述文本图像需要占用的显示区域,在所述页面显示区域形成用于加载所述文本图像的文本图像区域,并在所述文本图像区域中加载所述文本图像,包括:
    当所述文本图像需要占用的显示区域的高度小于预设高度值时,将所述语音消息以及与所述语音消息相邻的下一条信息之间的区域,确定为文本图像区域;将所述文本图像插入至所述文本图像区域;
    当所述文本图像需要占用的显示区域的高度大于或等于预设高度值时,将所述页面图像分割成两部分,使第一部分图像包含所述语音消息,第二部分图像不包含所述语音消息;并将所述第一部分图像、所述文本图像、所述第二部分图像拼接为新的页面图像。
  31. 根据权利要求23所述的方法,其中,所述方法还包括:
    根据所述应用的显示区域的布局,确定所述显示区域中用于显示除所述页面之外的附加信息的附加信息区域;
    从所采集到的图像中,提取得到所述页面图层中与所述附加信息区域对应的附加信息图像;
    所述对所采集的页面图像进行拼接处理,包括:
    根据所述附加信息区域以及所述页面显示区域的相对位置关系,对所述附加信息图像以及所述页面图像进行拼接。
  32. 根据权利要求23所述的方法,其中,所述从所采集到的图像中,提取得到所述页面图层中与所述页面显示区域对应的页面图像,包括:
    检测是否接收到第一操作;
    接收到第一操作时,基于所述第一操作确定所述页面显示区域中的目标子区域;
    从所采集图像中提取所述目标子区域对应的图像,将所述目标子区域对应的图像作为页面图像。
PCT/CN2018/086397 2017-05-17 2018-05-10 一种应用页面的处理方法、装置及存储介质 WO2018210179A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710349352.1A CN108319484B (zh) 2017-05-17 2017-05-17 一种应用页面的处理方法、装置及存储介质
CN201710349352.1 2017-05-17

Publications (1)

Publication Number Publication Date
WO2018210179A1 true WO2018210179A1 (zh) 2018-11-22

Family

ID=62891449

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/086397 WO2018210179A1 (zh) 2017-05-17 2018-05-10 一种应用页面的处理方法、装置及存储介质

Country Status (2)

Country Link
CN (1) CN108319484B (zh)
WO (1) WO2018210179A1 (zh)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109271087A (zh) * 2018-09-10 2019-01-25 珠海格力电器股份有限公司 一种截图方法和装置
CN109710362B (zh) * 2018-12-26 2020-02-07 掌阅科技股份有限公司 截图处理方法、计算设备及计算机存储介质
CN110209324B (zh) * 2019-04-30 2020-11-10 维沃移动通信有限公司 一种显示方法及终端设备
CN110515610B (zh) * 2019-06-27 2021-01-29 华为技术有限公司 页面绘制的控制方法、装置及设备
CN110399748A (zh) * 2019-07-23 2019-11-01 中国建设银行股份有限公司 一种基于图像识别的截图方法和装置
CN111179862B (zh) * 2019-12-30 2021-05-28 掌阅科技股份有限公司 显示页面的刷新方法、阅读器及计算机存储介质
CN114373186A (zh) * 2022-01-11 2022-04-19 北京新学堂网络科技有限公司 一种社交软件信息交互方法、装置和介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160117085A1 (en) * 2013-04-04 2016-04-28 Jung Hwan Park Method and Device for Creating and Editing Object-Inserted Images
CN106127676A (zh) * 2016-06-17 2016-11-16 许之敏 一种快速截取及合成多屏幕长截图的方法
CN106251290A (zh) * 2016-07-26 2016-12-21 成都风来科技有限公司 一种连续多屏截图方法及其人机交互方式
CN106502507A (zh) * 2016-11-01 2017-03-15 上海传英信息技术有限公司 截屏方法和移动终端
CN106648281A (zh) * 2015-10-30 2017-05-10 腾讯科技(深圳)有限公司 一种截图方法及装置

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7631168B1 (en) * 2006-05-10 2009-12-08 The Math Works, Inc. Graphical interface for grouping concurrent computing units executing a concurrent computing process
CN102023852A (zh) * 2009-09-15 2011-04-20 深圳市巨龙科教高技术股份有限公司 一种截屏方法及系统
US20120185805A1 (en) * 2011-01-14 2012-07-19 Apple Inc. Presenting Visual Indicators of Hidden Objects
US20140189576A1 (en) * 2012-09-10 2014-07-03 Applitools Ltd. System and method for visual matching of application screenshots
CN105607792A (zh) * 2014-11-21 2016-05-25 南京酷派软件技术有限公司 一种分层截图的方法、装置及终端
CN106339636A (zh) * 2015-07-10 2017-01-18 阿里巴巴集团控股有限公司 隐藏设置方法及装置、应用程序内容处理方法及装置
CN105094617A (zh) * 2015-08-24 2015-11-25 北京锤子数码科技有限公司 一种截屏方法及装置
CN105653195B (zh) * 2016-01-29 2018-11-27 广东欧珀移动通信有限公司 截屏方法及移动终端
CN105760050A (zh) * 2016-02-04 2016-07-13 上海卓易科技股份有限公司 一种截图方法及装置
CN106406690A (zh) * 2016-08-25 2017-02-15 深圳市金立通信设备有限公司 一种通过截屏调整显示的方法及终端
CN106569700B (zh) * 2016-11-15 2020-09-25 珠海市魅族科技有限公司 一种截图方法以及截图装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160117085A1 (en) * 2013-04-04 2016-04-28 Jung Hwan Park Method and Device for Creating and Editing Object-Inserted Images
CN106648281A (zh) * 2015-10-30 2017-05-10 腾讯科技(深圳)有限公司 一种截图方法及装置
CN106127676A (zh) * 2016-06-17 2016-11-16 许之敏 一种快速截取及合成多屏幕长截图的方法
CN106251290A (zh) * 2016-07-26 2016-12-21 成都风来科技有限公司 一种连续多屏截图方法及其人机交互方式
CN106502507A (zh) * 2016-11-01 2017-03-15 上海传英信息技术有限公司 截屏方法和移动终端

Also Published As

Publication number Publication date
CN108319484A (zh) 2018-07-24
CN108319484B (zh) 2021-07-09

Similar Documents

Publication Publication Date Title
WO2018210179A1 (zh) 一种应用页面的处理方法、装置及存储介质
KR101472397B1 (ko) 휴대용 단말 및 노티피케이션 정보 처리 방법
US11921694B2 (en) Techniques for collapsing views of content items in a graphical user interface
US11003331B2 (en) Screen capturing method and terminal, and screenshot reading method and terminal
US20210056253A1 (en) Method and apparatus for generating image file
KR102024422B1 (ko) 파일 폴더 내의 파일을 오픈하기 위한 방법 및 단말기
CN106940621B (zh) 图片处理的方法和装置
EP2988208A1 (en) Application sharing method and device
WO2015043512A1 (zh) 一种图片管理方法和装置
US10810698B2 (en) Information processing method and client
JP2018116496A (ja) 差異検出装置及びプログラム
CN112199029B (zh) 双系统设备及其书写方法和交互智能平板
WO2022222672A1 (zh) 多内容并行显示的方法、装置、终端、介质及程序产品
WO2017008646A1 (zh) 一种在触控终端上选择多个目标的方法和设备
CN104410790A (zh) 一种信息处理方法及电子设备
WO2019119826A1 (zh) 图像处理方法及装置
JP6308309B2 (ja) 画像処理装置、画像処理方法および画像処理プログラム
WO2017012473A1 (zh) 一种提供对象信息的方法和设备
CN106851052B (zh) 一种控制方法及电子设备
CN104571812B (zh) 一种信息处理方法和电子设备
US9977621B2 (en) Multimedia data backup method, user terminal and synchronizer
CN110618975A (zh) 图像分享方法、装置以及电子设备
WO2016037410A1 (zh) 界面控制方法、装置及终端
WO2020057627A1 (zh) 一种引导开启应用程序的方法及设备
WO2020199469A1 (zh) 基于django框架的接口调用记录方法、装置、设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18802813

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18802813

Country of ref document: EP

Kind code of ref document: A1