CN110795097B - Page processing method and device, computer equipment and storage medium - Google Patents

Page processing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN110795097B
CN110795097B CN201911067271.8A CN201911067271A CN110795097B CN 110795097 B CN110795097 B CN 110795097B CN 201911067271 A CN201911067271 A CN 201911067271A CN 110795097 B CN110795097 B CN 110795097B
Authority
CN
China
Prior art keywords
target
comment window
window image
page
target comment
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201911067271.8A
Other languages
Chinese (zh)
Other versions
CN110795097A (en
Inventor
刘平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201911067271.8A priority Critical patent/CN110795097B/en
Publication of CN110795097A publication Critical patent/CN110795097A/en
Application granted granted Critical
Publication of CN110795097B publication Critical patent/CN110795097B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces

Abstract

The embodiment of the application discloses a page processing method, a page processing device, computer equipment and a storage medium, wherein the method comprises the following steps: acquiring a target comment window image belonging to a first process; acquiring a target application page belonging to a second process; the second process belongs to a display resource exclusive process; adding the target comment window image to the second process; in the second process, the target comment window image and the target application page are overlapped to be a page to be displayed; and displaying the page to be displayed. By the method and the device, the efficiency of the terminal for transmitting information to the user can be improved.

Description

Page processing method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a page processing method and apparatus, a computer device, and a storage medium.
Background
In recent years, a large number of live game platforms appear on the internet, and the appearance of the platforms enables the live game to be rapidly developed, so that the live game has become an emerging industry with a large scale. The game anchor shows the electronic competition level to the audience through the live broadcast platform, and the audience not only can watch the electronic competition process, but also can send the commenting caption (namely the barrage) to interact with the anchor.
Since electronic sports, especially MOBA (Multiplayer Online Battle Arena) type electronic games have a high requirement on game frame rate, in order to ensure that a game process does not cause stutter, the game process monopolizes all display resources of the terminal, and the terminal cannot display a popup page during the game process of operating the display resources monopolizing the display resources. If the user wants to check the bullet screen sent by the audience, only the game page is closed, and then the bullet screen page is opened for checking.
Therefore, if the terminal receives a new bullet screen in the game running process, the game page needs to be closed first, and then the bullet screen page is started to display the new bullet screen to the user, so that the efficiency of the terminal for transmitting information to the user is low.
Disclosure of Invention
The embodiment of the application provides a page processing method, a page processing device and related equipment, which can improve the efficiency of transmitting information to a user by a terminal.
An aspect of the present application provides a page processing method, including:
acquiring a target comment window image belonging to a first process;
acquiring a target application page belonging to a second process; the second process belongs to a display resource exclusive process;
adding the target comment window image to the second process;
in the second process, the target comment window image and the target application page are overlapped to be a page to be displayed;
and displaying the page to be displayed.
Wherein the target comment window image includes a window mode switching identifier;
the method further comprises the following steps:
in the second process, responding to the trigger operation aiming at the window mode switching identifier to obtain a window switching message; the window switching message comprises a target display mode for a target comment window; the target comment window is a window corresponding to the target comment window image in the first process;
transmitting the window switch message from the second process back to the first process over a first process channel;
in the first process, the display mode of the target comment window is adjusted from the original display mode to the target display mode.
Wherein, in the second process, in response to the trigger operation for the window mode switching identifier, acquiring a window switching message includes:
in the second process, responding to the trigger operation aiming at the page to be displayed, and acquiring at least one trigger message;
and extracting the trigger message corresponding to the window mode switching identifier from the at least one trigger message according to the position coordinate corresponding to each trigger message, wherein the trigger message is used as the window switching message.
Wherein, still include:
acquiring the display attribute of the target comment window image, and packaging the display attribute into a drawing command;
serializing the drawing command to generate a command byte stream of the drawing command;
transmitting the command byte stream from the first process to the second process over a second process channel.
Wherein, still include:
when the second process is detected to be operated, acquiring an interception dynamic link library, and sending the interception dynamic link library from the first process to a dynamic link library directory of the second process;
and operating the intercepting dynamic link library to establish the first process channel and the second process channel.
The target comment window image is stored in a process shared memory;
the obtaining of the display attribute of the target comment window image includes:
acquiring a display size to be adjusted corresponding to the display mode of the target comment window, acquiring the resolution of a terminal screen, adjusting the display size to be adjusted according to the resolution of the terminal screen, and generating a display size;
acquiring the position offset and the memory occupation length of the target comment window image in the process shared memory;
and acquiring a window position parameter of the target comment window, and combining the window position parameter, the display size, the position offset and the memory occupation length into a display attribute of the target comment window image.
Wherein the adding the target comment window image to the second process comprises:
in the second process, performing deserialization processing on the command byte stream to generate the drawing command;
and reading the target comment window image from the process shared memory to the second process according to the position offset and the memory occupation length in the drawing command.
Wherein, in the second process, overlaying the target comment window image and the target application page as a page to be displayed includes:
in the second process, creating an image sprite object containing the target comment window image;
drawing the page sprite object according to the display size in the drawing command to generate a target window image drawing object;
acquiring a target application page drawing object corresponding to the target application page;
and according to the window position parameter in the drawing command, overlapping the target window image drawing object and the target application page drawing object into the page to be displayed.
Wherein, still include:
in the first process, capturing a comment window image according to a first frequency;
storing the captured comment window image to a first cache in the first process; the obtaining of the target comment window image belonging to the first process includes:
reading the target comment window image from the first cache;
storing the target comment window image to a process shared memory;
the method further comprises the following steps:
acquiring an application page according to a second frequency, and storing the acquired application page to a second cache in the second process; the acquiring the target application page belonging to the second process includes: and reading the target application page from the second cache.
Wherein the first frequency is less than the second frequency;
the reading the target comment window image from the first cache includes:
if the non-rendered comment window image exists in the first cache, reading the target comment window image from the non-rendered comment window image in the first cache; the target comment window image is a comment window image having a minimum generation timestamp among the non-rendered comment window images in the first cache;
if the non-rendered comment window image does not exist in the first cache, reading the target comment window image from the rendered comment window image in the first cache; the target comment window image is a comment window image having a maximum generation timestamp among the comment window images that have been rendered in the first cache.
Wherein the reading the target application page from the second cache comprises:
reading the target application page from the non-rendered application page in the second cache; the target application page is an application page having a smallest generation timestamp among the application pages not rendered in the second cache.
Another aspect of the embodiments of the present application provides a page processing apparatus, including:
the first acquisition module is used for acquiring a target comment window image belonging to a first process;
the second acquisition module is used for acquiring a target application page belonging to a second process; the second process belongs to a display resource exclusive process;
an adding module, configured to add the target comment window image to the second process;
the superposition module is used for superposing the target comment window image and the target application page into a page to be displayed in the second process;
and the display module is used for displaying the page to be displayed.
Wherein the target comment window image includes a window mode switching identifier;
the method further comprises the following steps:
a third obtaining module, configured to respond to a trigger operation for the window mode switching identifier in the second process, and obtain a window switching message; the window switching message comprises a target display mode for a target comment window; the target comment window is a window corresponding to the target comment window image in the first process;
and the transmission module is used for transmitting the window switching message from the second process back to the first process through a first process channel, and in the first process, the display mode of the target comment window is adjusted from an original display mode to the target display mode.
The third obtaining module is specifically configured to, in the second process, respond to a trigger operation for the page to be displayed, obtain at least one trigger message, and extract, according to a position coordinate corresponding to each trigger message, a trigger message corresponding to the window mode switching identifier from the at least one trigger message, as the window switching message.
Wherein, still include:
the fourth acquisition module is used for acquiring the display attribute of the target comment window image;
and the packaging module is used for packaging the display attribute into a drawing command, carrying out serialization processing on the drawing command, generating a command byte stream of the drawing command, and transmitting the command byte stream from the first process to the second process through a second process channel.
Wherein, still include:
and the creating module is used for acquiring an interception dynamic link library when the second process is detected to be operated, sending the interception dynamic link library from the first process to a dynamic link library catalogue of the second process, operating the interception dynamic link library and creating the first process channel and the second process channel.
The target comment window image is stored in a process shared memory;
the fourth obtaining module is specifically configured to obtain a display size to be adjusted corresponding to the display mode of the target comment window, obtain a terminal screen resolution, adjust the display size to be adjusted according to the terminal screen resolution, generate a display size, generate the display size, obtain a position offset and a memory occupied length of the target comment window image in the process shared memory, obtain a window position parameter of the target comment window, and combine the window position parameter, the display size, the position offset, and the memory occupied length as a display attribute of the target comment window image.
The adding module is specifically configured to perform deserialization processing on the command byte stream in the second process to generate the drawing command, and read the target comment window image from the process shared memory to the second process according to the position offset and the memory occupied length in the drawing command.
The superimposing module is specifically configured to create, in the second process, an image sprite object including the target comment window image, draw the page sprite object according to the display size in the drawing command, generate a target window image drawing object, acquire a target application page drawing object corresponding to the target application page, and superimpose the target window image drawing object and the target application page drawing object into the page to be displayed according to the window position parameter in the drawing command.
Wherein, still include:
the first grabbing module is used for grabbing the comment window image according to a first frequency in the first process and storing the grabbed comment window image to a first cache in the first process;
the first obtaining module includes:
a first reading unit, configured to read the target comment window image from the first cache;
the storage unit is used for storing the target comment window image to a process shared memory;
the device further comprises:
the second grabbing module is used for acquiring the application page according to a second frequency and storing the acquired application page to a second cache in the second process;
the second obtaining module includes:
and the second reading unit is used for reading the target application page from the second cache.
Wherein the first frequency is less than the second frequency;
the first reading unit includes:
the first reading subunit is configured to, if an unrendered comment window image exists in the first cache, read the target comment window image from the unrendered comment window image in the first cache; the target comment window image is a comment window image having a minimum generation timestamp among the non-rendered comment window images in the first cache;
the second reading subunit is configured to, if no unrendered comment window image exists in the first cache, read the target comment window image from the rendered comment window image in the first cache; the target comment window image is a comment window image having a maximum generation timestamp among the comment window images that have been rendered in the first cache.
The second reading unit is specifically configured to read the target application page from the non-rendered application pages in the second cache; the target application page is an application page having a smallest generation timestamp among the application pages not rendered in the second cache.
Another aspect of the embodiments of the present application provides a computer device, including a memory and a processor, where the memory stores a computer program, and the computer program, when executed by the processor, causes the processor to execute the method according to one aspect of the embodiments of the present application.
Another aspect of the embodiments of the present application provides a computer storage medium storing a computer program, the computer program comprising program instructions that, when executed by a processor, perform a method as in one aspect of the embodiments of the present application.
The comment window image belonging to the first process is obtained, the application page belonging to the second process with exclusive display resources is obtained, the comment window image belonging to the first process is added to the second process, the comment window image and the application page are overlapped into the page to be displayed in the second process, and the display resources can be called to display the page to be displayed. According to the method, the window image of the first process can be added into the second process and displayed together with the application page of the second process through communication between the two processes, the content of the two pages can be displayed for the user at the same time without closing the page of the second process and then starting the page of the second process, the number of interaction times between the terminal and the user can be reduced, and the efficiency of displaying information to the user by the terminal is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1-fig. 3 are schematic views of a page processing scenario provided by an embodiment of the present invention;
fig. 4 is a schematic flowchart of a page processing method according to an embodiment of the present application;
FIG. 5 is a schematic diagram illustrating a determination of a page to be displayed according to an embodiment of the present application;
fig. 6 is a schematic flowchart of another page processing method provided in the embodiment of the present application;
FIG. 7 is a diagram illustrating the overall architecture of a page processing system according to an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of a page processing apparatus according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Please refer to fig. 1 to fig. 3, which are schematic views of a scene of page processing provided in an embodiment of the present application, where the page processing related to the present application may be applied to live broadcast software, and the live broadcast software to which the page processing is applied may be installed in a Windows operating system platform. The application scenario of the application is as follows: the anchor can also synchronously watch the barrage sent by the audience in the process of playing the game exclusive of the display card live, and the following description takes the terminal device 10a as an example to explain how the terminal device 10a displays the barrage in the process of running the game exclusive of the display card.
The terminal device 10a may be a mobile phone, a tablet computer, a notebook computer, a palm computer, a Mobile Internet Device (MID), a wearable device (e.g., a smart watch, a smart bracelet, etc.), or the like.
As shown in fig. 1, a user starts live broadcast software in a terminal device 10a to start live broadcast, and runs a process (called a live broadcast process) corresponding to the live broadcast software inside the terminal device 10a, where the live broadcast process of the live broadcast software is as follows: the live broadcast process captures a screen of the terminal device 10a and sends the captured screen data to the live broadcast server, so that the viewer can view the content displayed on the screen of the terminal device 10a by logging in the live broadcast software.
The terminal device 10a displays the bullet screen setting page 20a, and the user can set bullet screen attributes on the bullet screen setting page 20a, as can be seen from fig. 1, the set attributes include: whether to start a full-screen game barrage, a barrage mode, background transparency and character transparency.
The full-screen game is that when the game runs in the foreground, all the display card resources in the terminal device 10a are occupied, so that the fluency of the game can be ensured, and the full-screen game popup screen can be that when the full-screen game runs, the popup screen in the live broadcast process can be displayed together.
The bullet screen mode corresponds to the size of a bullet screen window, the bullet screen window refers to a window displaying a bullet screen, and the bigger the bullet screen window is, the more bullet screens can be directly displayed in the window (namely on the premise of not dragging a scroll bar); the window size of the bullet screen window in the large anchor mode is larger than that of the bullet screen window in the simplified mode.
The background transparency refers to the transparency of the background image of the bullet screen window, and the background image of the bullet screen window can be a black image.
The text transparency refers to the transparency of the bullet screen, in order to increase the contrast between the background images of the bullet screen and the bullet screen window, a user can conveniently read the bullet screen in the bullet screen window, and the color of the bullet screen can be white by default.
After the user sets the bullet screen attribute, the selected game page 20B is displayed in the terminal device 10a, the user can select a game to be live broadcast in the selected game page 20B, and as can be seen from the page 20B, the user selects the game a as a game to be live broadcast from the games a, B and C, and the game a belongs to a full-screen game. When the user clicks the "start live broadcast" button, the terminal device 10a executes the game a, and a process (referred to as a game process) corresponding to the game a is executed inside the terminal device 10 a. At this point, the game process runs in the foreground, while the live process runs in the background.
The 3 games presented in the page 20b may be locally installed games that the live software has traversed by traversing the local files of the terminal device 10 a; or may be a created game process that the player software has traversed by traversing the task manager of the terminal device 10 a.
The user may also not select any locally installed game (e.g., the user wants the live game to be a webgame, which is also a full screen game), and the user may close the game page 20 b. And then, the website of the webpage game is accessed to carry out live broadcast of the webpage game.
When the live broadcast process monitors that the game process belongs to a process for monopolizing the display card resource and the game process runs in the foreground, the live broadcast process injects an interception dynamic link library into the game process, and the interception dynamic link library can establish a communication channel between the live broadcast process and the game process. Generally speaking, processes cannot communicate with each other due to the closeness of the processes, but because of the existence of the intercepting dynamic link library, two-way communication between the live process and the game process can be realized.
As shown in fig. 2, the live broadcast process may receive the barrage (for example, the barrage of a, the barrage of B, the barrage of C, the barrage of D, and the barrage of F) sent by the viewer in the background and push the received barrage to the barrage window, but since the game process runs in the foreground to monopolize the video card resource, the barrage window cannot be displayed on the screen of the terminal device 10a at this time.
The live broadcast process captures a screen of the bullet screen window, obtains an image 20c of the bullet screen window (referred to as a window image 20c, where the window image 20c includes the bullet screen), and stores the window image 20c in the shared memory. And packaging the storage address into a drawing command, and sending the drawing command to the game process through a communication channel between the live broadcast process and the game process.
The game process can acquire the window image 20c from the shared memory by reading the storage address in the drawing command. The game process superimposes the game page 20d and the window image 20c at this time to generate a superimposed page 20e, the game process calls the display card resource, and the superimposed page 20e is displayed on the screen of the terminal device 10a, at this time, the user can see both the game page and the bullet screen.
At any moment, the bullet screen window is captured to obtain the window image, and then the window image and the game page are displayed in an overlapping mode, so that the bullet screen is displayed on the premise that the game process monopolizes the display card resource.
Since the bullet screen and the game are dynamic processes, the above processes can be executed multiple times in 1 second (for example, 60 times in 1 second), and the bullet screen and the game are dynamic and continuous for the user.
As shown in fig. 2, if the user clicks the "mode switching" identifier in the window image 20c in the overlay page 20e, the game process may acquire a corresponding switching message, and send the switching message back to the live process through a communication channel between the live process and the game process. And after receiving the message, the live broadcast process switches the bullet screen mode of the bullet screen window from the large anchor mode to the simplified mode, wherein the window size of the bullet screen window in the simplified mode is smaller than that of the bullet screen window in the large anchor mode.
As shown in fig. 3, the live broadcast process captures a screen of the bullet screen window after adjusting the bullet screen mode (the bullet screen window after adjusting the bullet screen mode includes a bullet screen of a small F and a bullet screen of a small G), obtains an image 20F of the bullet screen window (referred to as a window image 20F, it can be known that the size of the bullet screen window is reduced, and the size of the window image 20F at this time is smaller than that of the window image 20c in the medium-large main broadcast mode), and similarly stores the window image 20F in the shared memory in the live broadcast process. And packaging the storage address into a drawing command, and sending the drawing command to the game process through a communication channel between the live broadcast process and the game process.
The game process can acquire the window image 20f from the shared memory by reading the storage address in the drawing command. The game process superimposes the game page 20g and the window image 20f at this time to generate a superimposed page 20h, and the game process calls the display card resource to display the superimposed page 20h on the screen of the terminal device 10 a.
Subsequently, the window image can be continuously acquired (certainly, the size of the subsequently acquired window image is smaller because the bullet screen mode at this time is the simplified mode), and then the window image and the game page are displayed in a superposed manner, so that the bullet screen is displayed on the premise that the game process monopolizes the display card resource, and thus, the smoothness of the game can be ensured, and the displayability of the bullet screen is also ensured.
Specific processes of acquiring the target comment window image (the window image 20c and the window image 20f in the above-described embodiment), acquiring the target application page (the game page 20d and the game page 20g in the above-described embodiment), and overlaying the target comment window image and the target application page as the page to be displayed (the overlay page 20e and the overlay page 20h in the above-described embodiment) may be referred to the following embodiments corresponding to fig. 4 to 7.
Please refer to fig. 4, which is a flowchart illustrating a page processing method according to an embodiment of the present application, where the page processing method includes the following steps:
step S101, acquiring a target comment window image belonging to a first process, and acquiring a target application page belonging to a second process; the second process belongs to a display resource exclusive process.
Specifically, two processes are executed in a terminal device (such as the terminal device 10a in the embodiment corresponding to fig. 1 to 3 described above), which are referred to as a first process (such as the live process in the embodiment corresponding to fig. 1 to 3 described above) and a second process (such as the game process in the embodiment corresponding to fig. 1 to 3 described above), and the second process is a process executed in the foreground.
The first process includes a target comment window (such as the barrage window in the embodiments corresponding to fig. 1-3 described above), where the target comment window is used to present the received business information, the business information may be comment information and/or reward information, and both the comment information and the reward information may include text, images, and/or links.
The second process belongs to a process exclusive to display resources (for example, display card resources), for example, a process running a full-screen game is a process exclusive to display resources, because frames are not dropped only if the game process monopolizes all display resources, and a user does not feel that the game is stuck, when the second process runs as a foreground process, a screen of the terminal device can only display data of the second process.
The system creates the precedence order of the first process and the second process without limitation, when the first process detects that the second process is operated, or when the first process detects that the second process is operated and is operated in a foreground, the first process acquires the intercepted dynamic link library graphics-hook.dll, and injects the intercepted dynamic link library graphics-hook.dll into the dynamic link library directory in the second process. The intercepting dynamic link library graphics-hook.dll can comprise a hook function (namely a hook function), and can realize two-way communication between a first process and a second process by establishing 2 process channels during running of the intercepting dynamic link library graphics-hook.dll, wherein the two process channels are called a first process channel and a second process channel, and the first process channel is used for transmitting data from the second process to the first process; the second process channel is for transferring data from the first process to the second process.
The following embodiments are described taking one comment window image (target comment window image) and one application page (target application page) as examples:
the first process may capture a screen of the target comment window according to the first frequency, and images generated by the screen capture are both referred to as comment window images (such as the window image 20c and the window image 20f in the corresponding embodiments of fig. 1 to fig. 3 described above), where the comment window images may belong to bitmap data, that is, values of any pixel in the image are marked with one bit, so that the storage space may be saved.
The first process may invoke the gram interface under the QT (a C + + graphical user interface application development framework) framework to capture the comment window image.
And the first process stores all the comment window images into a first cache, wherein the first cache belongs to the first process.
And the first process reads the target comment window image from the comment window image in the first cache, and stores the read target comment window image in the process shared memory.
The second process acquires the application page belonging to the second process according to the second frequency, and stores the acquired application page to a second cache in the second process, so that it can be known that the application page is necessarily a full-screen page because the second process belongs to a process with exclusive display resources, and the full-screen page means that the page can fill up the whole screen of the terminal device, in other words, the size of the full-screen page is equal to the screen size of the terminal device. And the second process reads the target application page from the application pages in the second cache.
Reading the target comment window image and the target application page for subsequent superposition and subsequent rendering display.
First, how to read the target comment window image from the first cache will be described below:
the comment window images in the first cache all carry corresponding generation timestamps and rendering labels, the generation timestamps are used for marking generation time information of the comment window images, and the rendering labels are used for marking whether the comment window images are rendered by display resources, namely whether the comment window images are displayed on a screen of the terminal device (or whether the comment window images are displayed on the screen).
The method comprises the steps that a first process detects whether a comment window image which is not rendered exists in a first cache or not according to a rendering label carried by the comment window image, and if the comment window image which is not rendered exists, the comment window image with the minimum generation timestamp is read from the non-rendered comment window image to serve as a target comment window image;
if the unrendered comment window images do not exist, all comment window images in the first cache are rendered, and the first process reads the comment window image with the maximum generation timestamp from the rendered comment window images to serve as the target comment window image.
In brief, if the first cache has unrendered comment window images, the oldest unrendered comment window image is selected as a target comment window image;
if all the comment window images in the first cache are rendered, the latest rendered comment window image is selected as the target comment window image.
For example, the first cache stores: the comment window image generation method comprises a comment window image 1, a comment window image 2 and a comment window image 3, wherein the generation timestamp of the comment window image 1 is smaller than that of the comment window image 2, and the generation timestamp of the comment window image 2 is smaller than that of the comment window image 3.
If the comment window image 1 is rendered, but neither the comment window image 2 nor the comment window image 3 is rendered, the first process may take the comment window image 2 as a target comment window image;
if all the above 3 comment window images have been rendered, the first process may take the comment window image 3 as a target comment window image.
How to read the target application page from the second cache is described as follows:
similarly, the application pages in the second cache all carry corresponding generation timestamps and rendering tags, the generation timestamps are used for marking the generation time information of the application pages, and the rendering tags are used for marking whether the application pages are rendered by the display resources, that is, whether the application pages are displayed on the screen of the terminal device.
And the second process determines the application pages which are not rendered according to the rendering labels carried by the application pages, and reads the application page with the minimum generation timestamp from the application pages which are not rendered as a target application page.
It should be noted that the rendering frequency of the second process may be the same as the second frequency, that is, the second process obtains one application page and renders one application page; the rendering frequency may also be less than the second frequency, as long as it is ensured that the target application page can be read from the second cache when the second process needs to render and display the application page.
The first frequency and the second frequency can be the same, and in order to reduce the storage space, the first frequency can also be smaller than the second frequency, so that when the second process needs to render and display, the target comment window image can be read from the first cache.
Step S102, adding the target comment window image to the second process.
Specifically, it can be known from the foregoing that the target comment window image read by the first process is stored in the process shared memory.
The first process obtains the position offset and the memory occupation length of the target comment window image in the process shared memory, the starting position of the target comment window image in the shared memory can be determined according to the position offset, and the ending position of the target comment window image in the shared memory can be determined according to the memory occupation length.
The first process determines a display mode (e.g., the bullet-screen mode in the embodiment corresponding to fig. 1-3) of the target comment window, which is used to determine the size of the target comment window, but of course, the display mode directly determines the size of the target comment window image since the target comment window image is captured by the target comment window.
The first process obtains a display size corresponding to a display mode of the current target comment window (the current display mode is the original display mode), which is called a display size to be adjusted. The first process obtains the screen resolution of the terminal device (called terminal screen resolution), adjusts the display size to be adjusted according to the terminal screen resolution, and generates the display size.
The first process performs adaptive contraction according to different resolutions, so that when the target comment window image subjected to adaptive contraction is displayed on a screen of the terminal device, the target comment window image is more matched with the resolution of the terminal.
The first process obtains a position parameter (referred to as a window position parameter) of the target comment window, which may be determined by a user in a setting page (such as the bullet screen setting page 20a in the corresponding embodiment of fig. 1 to 3 described above) by sliding a position flag in the setting page.
And combining the acquired position offset, the memory occupation length, the display size and the window position parameter into a display attribute of the target comment window image by the first process, wherein the display attribute is used for acquiring the target comment window image by the subsequent second process and drawing the target comment window image according to the display attribute.
The first process packages the display attributes into a drawing command, then carries out serialization processing on the drawing command to generate a command byte stream of the drawing command, wherein the serialization processing is to convert variables (the display attributes of the target comment window image are the variables) into the byte stream, so that the variables can be transmitted among the processes.
The first process transmits the converted command byte stream from the first process to the second process over the second process channel.
And after receiving the command byte stream, the intercepting dynamic link library graphics-hook.dll in the second process performs deserialization processing on the command byte stream to generate a drawing command, wherein the deserialization processing is to convert the byte stream back into a variable, so that the intercepting dynamic link library graphics-hook.dll can read the display attribute of the target comment window image.
It can be known that the drawing commands include: position offset, memory occupation length, display size and window position parameters.
And intercepting the dynamic link library graphics-hook.dll, and reading the target comment window image from the process shared memory to the second process according to the position offset and the memory occupied length in the drawing command.
Up to this point, the target comment window image belonging to the first process is added to the second process.
Optionally, in the present application, a second process channel is used to transmit the drawing command, and the process shared memory stores the target comment window image, so that the target comment window image of the first process can be added to the second process, because the storage space occupied by the target comment window image is far larger than the storage space occupied by the drawing command, and the process channel is a valuable communication resource, the above-described manner is only used.
Optionally, the drawing command and the target comment window image may be transmitted from the first process to the second process through the second process channel, in which case, the drawing command no longer needs to include the position offset and the memory occupation length.
Step S103, in the second process, the target comment window image and the target application page are superposed into a page to be displayed.
Specifically, for the second process, rendering the upper screen by all application pages requires notifying the system to call the Present function to display the application pages in the screen.
And the second process sends a first notification message for calling the Present function to the system, wherein the first notification message also carries the storage address of the target application page belonging to the second process, and the first notification message is used for indicating the system to call the Present function so as to drive the display resource to render and display the target application page stored in the storage address in the first notification message.
And intercepting the dynamic link library graphics-hook.dll in the second process can intercept the first notification message, read a target application page through a storage address in the first notification message, and superimpose the read target application page and a target comment window image into a page to be displayed.
How to overlay the target application page and the target comment window image into a page to be displayed is explained as follows: in the bottom layer of the terminal device, the operation on the page is the operation on the drawing object.
First, a sprite corresponding to a target comment window image is created using a built-in function D3dxcreate in D3D (Direct3D, display program interface), called an image sprite object:
D3DXCreateSprite(g_pDevice,&g_pSprite);
wherein g _ pDevice is the puck pointer:
LPD3DXSPRITE g_pSprite=nullptr;
and g _ psprivate is an address pointer storing the target comment window image.
The Begin function, Draw function and End function in D3D are called to Draw the image sprite object as the drawing object of the target comment window image (referred to as the target window image drawing object).
When the Draw function is called, intercepting the dynamic link library graphics-hook.dll still transmits the display size in the drawing command to the Draw function as a function parameter, which indicates the drawing size of the drawing object of the target window image.
According to the window position parameter in the drawing command, superposing the target window image drawing object and the target application page drawing object into a page to be displayed (such as the superposed page 20e and the superposed page 20h in the embodiment corresponding to fig. 1-3); and for the page to be displayed, the target window image drawing object is positioned below, and the target application page drawing object is positioned above.
And intercepting a dynamic link library graph-hook.dll and sending a second notification message for calling the Present function to the system, wherein the second notification message carries the storage address of the page to be displayed, and the second notification message is used for indicating the system to call the Present function so as to drive the display resource to render and display the page to be displayed stored in the storage address in the second notification message.
And step S104, displaying the page to be displayed.
Specifically, after receiving the second notification message, the system calls a Present function, and transmits a page to be displayed as a function parameter to the Present function, the Present function drives the display resource to render and display the page to be displayed, that is, the page to be displayed is displayed in the screen of the terminal device, because the target application page is a full-screen page, and the size of the target application page is not changed when the target application page is superimposed, the page to be displayed in the screen is also a full-screen page.
The above process may be regarded as a target comment window image and a target application page to be displayed, which are output and displayed at time t, and may continue to read a next target comment window image from the first cache and a next target application page from the second cache in the above manner, and output a next page to be displayed at time t + 1. The frequency of the above process may be 1 second 60 times.
The target comment window may include a first comment window for displaying comment information and a second reward information window for displaying reward information (in a live scene, the reward information may be prompt information of a gift given to a main broadcast by a viewer, for example, the reward information may be "× × × × sent by an airplane"), and then the corresponding target comment window image includes a first comment window image and a second reward information window image; when the target comment window image and the target application page are overlaid to be displayed, the target application page, the first comment window image and the second reward information window image are overlaid together to be displayed, so that information in a plurality of windows belonging to the first process can be displayed in the target application page belonging to the second process.
Please refer to fig. 5, which is a schematic diagram of determining a page to be displayed according to an embodiment of the present application, where a target comment window belonging to a first process includes a bullet screen window and a reward window, and the first process captures a screen of the bullet screen window and can obtain a bullet screen window image 30 a; the first process screens the bonus window and a bonus window image 30b can be captured. The bullet screen window image 30a and the bonus window image 30b are sent to the second process through the process shared memory, wherein a specific process of sending the bullet screen window image 30a and the bonus window image 30b to the second process may refer to steps S101 to S103 in the embodiment corresponding to fig. 4. In the second process, the game page 30c, the barrage window image 30a and the bonus window image 30b are superimposed to form a page to be displayed 30d, and as can be seen from the figure, the page to be displayed not only displays the game page of the second process, but also displays the content in the barrage window and the content in the bonus window in the first process.
By means of the communication between the two processes, the window image of the first process can be added into the second process and displayed together with the application page of the second process, the content of the two pages can be displayed to the user at the same time without exiting the current display page, the number of interaction times between the terminal and the user can be reduced, and the efficiency of displaying the message content to the user by the terminal is improved.
Please refer to fig. 6, which is a schematic flow chart of another page processing method provided in the embodiment of the present application, where the page processing method may include the following steps:
step S201, acquiring a target comment window image belonging to a first process, and acquiring a target application page belonging to a second process; the second process belongs to a display resource exclusive process.
Step S202, add the target comment window image to the second process.
Step S203, in the second process, overlapping the target comment window image and the target application page into a page to be displayed, and displaying the page to be displayed.
The specific processes of step S201 to step S203 may refer to step S101 to step S104 in the embodiment corresponding to fig. 4.
Step S204, in the second process, responding to the trigger operation aiming at the window mode switching identifier, and acquiring a window switching message; the window switching message comprises a target display mode for a target comment window; the target comment window is a window corresponding to the target comment window image in the first process.
Specifically, the target comment window includes a window mode switching identifier, where the switching identifier is used to switch a display mode of the target comment window, for example, the display mode may be a large anchor mode or a condensed mode, and the window sizes of the target comment windows corresponding to different display modes are different.
Because the target comment window image is obtained by capturing the target comment window, the target comment window image also includes a window mode switching identifier.
If the user triggers the window mode switching identifier in the target comment window image in the page to be displayed (for example, the user triggers the window mode switching identifier through a mouse), the system responds to the triggering operation of the user on the window mode switching identifier to generate a window switching message, and the window switching message belongs to the second process. The window switching message belongs to a trigger message, and for the second process, all the trigger messages need to inform the system to call the windowProc function to respond.
And the second process sends a third notification message for calling a windows Proc function to the system, wherein the third notification message stores the storage address of the window switching message, the windows Proc function is a callback function of the second process and is used for processing all the trigger messages and making corresponding responses, and the window switching message also belongs to the trigger messages. And intercepting the third notification message by intercepting the dynamic link library graphics-hook.dll, and acquiring the window switching message by using the storage address in the third notification message.
It should be noted that, for any trigger operation of a page to be displayed by a user, the system generates a trigger message (the window switching message also belongs to the trigger message), and the graphics-hook.dll determines the window switching message by detecting a position coordinate in the trigger message, which includes the specific processes:
the system responds to at least one trigger operation of a user on a page to be displayed, the system correspondingly generates at least one trigger message, the at least one trigger message belongs to a second process, and each trigger message carries a position coordinate and is used for representing a corresponding trigger position. And the second process generates a third notification message for calling the windows Proc function for each trigger message, wherein the third notification message carries the storage address of the trigger message. And the second process sends the third notification messages to the system, intercepts all the third notification messages by a dynamic link library graphics-hook.dll, intercepts a plurality of trigger messages according to the storage addresses in the trigger messages in the third notification messages, and determines the trigger message corresponding to the user trigger window mode switching identifier as a window switching message according to the position coordinate in each trigger message.
Subsequently, intercepting the dynamically linked library graphics-hook.dll needs to forward all third notification messages except the third notification message corresponding to the window trigger message to the system, so that the system calls the windows function to make a response to the rest of the trigger messages.
The windows proc function and the Present function belong to a DirectX Api (multimedia programming interface).
Step S205, the window switching message is transmitted back from the second process to the first process through a first process channel, and in the first process, the display mode of the target comment window is adjusted from the original display mode to the target display mode.
Specifically, intercepting the dynamic link library graphics-hook.dll transmits the window switching message from the second process back to the first process through the first process channel, and after receiving the window switching message, the first process adjusts the display mode of the target comment window in the first process from the original display mode to the target display mode according to the target display mode in the window switching message, wherein the original display mode is a mode before the original display mode is not adjusted to the target display mode.
The creation process of the first process channel can refer to step S101 in the corresponding implementation of fig. 4.
As can be seen from the foregoing, before the display mode of the target comment window is not adjusted from the original display mode to the target display mode, the sizes of the intercepted comment window images are all the window sizes corresponding to the original display mode.
And after the display mode of the target comment window is adjusted from the original display mode to the target display mode, when the comment window image of the target comment window is subsequently intercepted again, the size of the intercepted comment window image is the same as the size corresponding to the target display mode.
As can be seen from the above, in the present application, there are 2 roles for intercepting the hook function in the dynamically linked library graphics-hook.dll: (1) establishing two-way communication between a first process and a second process; (2) before the system does not call the system function, the hook function captures the message, and the hook first obtains the control right of the system function, and the hook function can process (change) the execution behavior of the function.
Referring to fig. 7, which is an overall architecture diagram of page processing provided in an embodiment of the present application, a live broadcast software captures a game process corresponding to a full-screen game currently running in a terminal device, and injects an intercept dynamic link library graphics-hook.dll to the game process, where the intercept dynamic link library graphics-hook.dll includes a capture function, a drawing function, a callback function, a windows proc processing function, and an acquire Fps (frames per second). When the game process runs as a foreground, a dynamic link library graphics-hook.dll in the live broadcast software can capture a target comment window in the live broadcast software, obtain a target comment window image, and store the target comment window image in a shared memory. The live broadcast software packages the display attribute of the target comment window image into a drawing command, and the live broadcast software serves as a progress channel server and sends the drawing command to a progress channel client (namely a game progress). And intercepting a dynamic link library graphics-hook.dll, reading a target comment window image from a shared memory through a drawing command, intercepting a notification message for calling a Present function, drawing the target comment window image and a game page into a page to be displayed in an overlapping manner, and calling the Present function to display the page to be displayed.
When a user clicks a window mode switching identifier in a target comment window image in a page to be displayed, a second process obtains a mode switching message, a dynamic link library graphics-hook.dll intercepts and calls a notification message of a callback function windows proc function, and the window mode switching message is sent to live broadcast software from a game process through a first process channel so that the live broadcast software can adjust the display mode (the display mode is also the display size) of the target comment window, wherein a process channel server of the first process channel is the game process, and a process channel client of the first process channel is the live broadcast software.
Dll can acquire the FPS (Frames Per Second transmission) in the game process to determine the frequency of capturing the target comment window image and use the frequency for background monitoring.
Further, please refer to fig. 8, which is a schematic structural diagram of a page processing apparatus according to an embodiment of the present application. As shown in fig. 8, the page processing apparatus 1 may be applied to the terminal device in the above embodiments corresponding to fig. 4 to fig. 7, and the page processing apparatus 1 may include: a first acquisition module 11, a second acquisition module 12, an addition module 13, a superposition module 14 and a display module 15.
The first obtaining module 11 is configured to obtain a target comment window image belonging to a first process;
a second obtaining module 12, configured to obtain a target application page belonging to a second process; the second process belongs to a display resource exclusive process;
an adding module 13, configured to add the target comment window image to the second process;
the superposition module 14 is configured to superpose the target comment window image and the target application page as a to-be-displayed page in the second process;
the display module 15 is configured to display the page to be displayed;
the adding module 13 is specifically configured to perform deserialization on the command byte stream in the second process to generate the drawing command, and read the target comment window image from the process shared memory to the second process according to the position offset and the memory occupied length in the drawing command.
The superimposing module 14 is specifically configured to create, in the second process, an image sprite object including the target comment window image, draw the page sprite object according to the display size in the drawing command, generate a target window image drawing object, acquire a target application page drawing object corresponding to the target application page, and superimpose the target window image drawing object and the target application page drawing object into the page to be displayed according to the window position parameter in the drawing command.
For specific functional implementation manners of the first obtaining module 11, the second obtaining module 12, the adding module 13, the superimposing module 14, and the displaying module 15, reference may be made to steps S101 to S104 in the embodiment corresponding to fig. 4, which is not described herein again.
Referring to fig. 8, the target comment window image includes a window mode switching flag;
the page processing apparatus 1 may include: the system comprises a first acquisition module 11, a second acquisition module 12, an adding module 13, a superposition module 14 and a display module 15; the method can also comprise the following steps: a third acquisition module 16 and a transmission module 17.
A third obtaining module 16, configured to, in the second process, respond to a trigger operation for the window mode switching identifier to obtain a window switching message; the window switching message comprises a target display mode for a target comment window; the target comment window is a window corresponding to the target comment window image in the first process;
a transmission module 17, configured to transmit the window switching message from the second process back to the first process through a first process channel, where in the first process, a display mode of the target comment window is adjusted from an original display mode to the target display mode;
the third obtaining module 16 is specifically configured to, in the second process, respond to the trigger operation for the page to be displayed, obtain at least one trigger message, and extract, according to the position coordinate corresponding to each trigger message, the trigger message corresponding to the window mode switching identifier from the at least one trigger message, as the window switching message.
The specific processes of the third obtaining module 16 and the transmission module 17 can refer to steps S204 to S205 in the embodiment corresponding to fig. 6.
Referring to fig. 8, the page processing apparatus 1 may include: the system comprises a first acquisition module 11, a second acquisition module 12, an adding module 13, a superposition module 14 and a display module 15; the method can also comprise the following steps: a fourth acquisition module 18, an encapsulation module 19 and a creation module 20.
A fourth obtaining module 18, configured to obtain a display attribute of the target comment window image;
the encapsulating module 19 is configured to encapsulate the display attribute into a drawing command, perform serialization processing on the drawing command, generate a command byte stream of the drawing command, and transmit the command byte stream from the first process to the second process through a second process channel;
a creating module 20, configured to, when it is detected that the second process is executed, obtain an intercepted dynamic link library, send the intercepted dynamic link library from the first process to a dynamic link library directory of the second process, execute the intercepted dynamic link library, and create the first process channel and the second process channel;
the target comment window image is stored in a process shared memory;
the fourth obtaining module 18 is specifically configured to obtain a display size to be adjusted corresponding to the display mode of the target comment window, obtain a terminal screen resolution, adjust the display size to be adjusted according to the terminal screen resolution, generate a display size, obtain a position offset and a memory occupied length of the target comment window image in the process shared memory, obtain a window position parameter of the target comment window, and combine the window position parameter, the display size, the position offset, and the memory occupied length into a display attribute of the target comment window image.
The specific processes of the fourth obtaining module 18, the encapsulating module 19 and the creating module 20 can refer to steps S101 to S103 in the embodiment corresponding to fig. 4.
Referring to fig. 8, the page processing apparatus 1 may include: the system comprises a first acquisition module 11, a second acquisition module 12, an adding module 13, a superposition module 14 and a display module 15; the method can also comprise the following steps: a first gripper module 21.
The first grabbing module 21 is configured to grab a comment window image according to a first frequency in the first process, and store the grabbed comment window image in a first cache in the first process;
the first obtaining module 11 may include: a first reading unit 111 and a storage unit 112.
A first reading unit 111 configured to read the target comment window image from the first cache;
the storage unit 112 is configured to store the target comment window image in a process shared memory;
the page processing apparatus 1 may further include: a second grasping module 22.
The second fetching module 22 is configured to obtain an application page according to a second frequency, and store the obtained application page to a second cache in the second process;
the second obtaining module 12 may include: the second reading unit 121.
A second reading unit 121, configured to read the target application page from the second cache;
a second reading unit 121, configured to read the target application page from the non-rendered application pages in the second cache; the target application page is an application page having a smallest generation timestamp among the application pages not rendered in the second cache.
The specific processes of the first capture module 21 and the second capture module 22 can refer to step S101 in the corresponding embodiment of fig. 4.
Referring to fig. 8, the first frequency is smaller than the second frequency;
the first reading unit 111 may include: a first reading sub-unit 1111 and a second reading sub-unit 1112.
The first reading subunit 1111 is configured to, if an unrendered comment window image exists in the first cache, read the target comment window image from the unrendered comment window image in the first cache; the target comment window image is a comment window image having a minimum generation timestamp among the non-rendered comment window images in the first cache;
a second reading subunit 1112, configured to, if there is no unrendered comment window image in the first cache, read the target comment window image from the rendered comment window image in the first cache; the target comment window image is a comment window image having a maximum generation timestamp among the comment window images that have been rendered in the first cache.
The specific processes of the first reading sub-unit 1111 and the second reading sub-unit 1112 can refer to step S101 in the embodiment corresponding to fig. 4.
Further, please refer to fig. 9, which is a schematic structural diagram of a computer device according to an embodiment of the present invention. The terminal device in the embodiments corresponding to fig. 4 to fig. 7 may be a computer device 1000, and as shown in fig. 9, the computer device 1000 may include: a user interface 1002, a processor 1004, an encoder 1006, and a memory 1008. Signal receiver 1016 is used to receive or transmit data via cellular interface 1010, WIFI interface 1012. The encoder 1006 encodes the received data into a computer-processed data format. The memory 1008 has stored therein a computer program by which the processor 1004 is arranged to perform the steps of any of the method embodiments described above. The memory 1008 may include volatile memory (e.g., dynamic random access memory DRAM) and may also include non-volatile memory (e.g., one time programmable read only memory OTPROM). In some instances, the memory 1008 can further include memory located remotely from the processor 1004, which can be connected to the computer device 1000 via a network. The user interface 1002 may include: a keyboard 1018, and a display 1020.
In the computer device 1000 shown in fig. 9, the processor 1004 may be configured to call the memory 1008 to store a computer program to implement:
acquiring a target comment window image belonging to a first process;
acquiring a target application page belonging to a second process; the second process belongs to a display resource exclusive process;
adding the target comment window image to the second process;
in the second process, the target comment window image and the target application page are overlapped to be a page to be displayed;
and displaying the page to be displayed.
It should be understood that the computer device 1000 described in the embodiment of the present invention may perform the description of the page processing method in the embodiment corresponding to fig. 4 to fig. 7, and may also perform the description of the page processing apparatus 1 in the embodiment corresponding to fig. 8, which is not described herein again. In addition, the beneficial effects of the same method are not described in detail.
Further, here, it is to be noted that: an embodiment of the present invention further provides a computer storage medium, where the computer storage medium stores the aforementioned computer program executed by the page processing apparatus 1, and the computer program includes program instructions, and when the processor executes the program instructions, the description of the page processing method in the embodiment corresponding to fig. 4 to fig. 7 can be performed, so that details are not repeated here. In addition, the beneficial effects of the same method are not described in detail. For technical details not disclosed in the embodiments of the computer storage medium to which the present invention relates, reference is made to the description of the method embodiments of the present invention.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present invention, and it is therefore to be understood that the invention is not limited by the scope of the appended claims.

Claims (14)

1. A page processing method is characterized by comprising the following steps:
acquiring a target comment window image belonging to a first process; the target comment window image is stored in a process shared memory, and the target comment window image comprises: in the unrendered comment window images, the comment window images corresponding to the minimum generation time stamps or the comment window images corresponding to the maximum generation time stamps in the rendered comment window images;
acquiring the display attribute of the target comment window image, packaging the display attribute into a drawing command, and acquiring a target application page belonging to a second process; the second process belongs to a display resource exclusive process;
reading the target comment window image from the process shared memory according to the drawing command, and adding the target comment window image to the second process;
in the second process, the target comment window image and the target application page are overlapped to be a page to be displayed;
and displaying the page to be displayed.
2. The method of claim 1, wherein the target comment window image includes a window mode switch flag;
the method further comprises the following steps:
in the second process, responding to the trigger operation aiming at the window mode switching identifier to obtain a window switching message; the window switching message comprises a target display mode for a target comment window; the target comment window is a window corresponding to the target comment window image in the first process;
transmitting the window switch message from the second process back to the first process over a first process channel;
in the first process, the display mode of the target comment window is adjusted from the original display mode to the target display mode.
3. The method according to claim 2, wherein the obtaining, in the second process, a window switching message in response to a trigger operation for the window mode switching identifier comprises:
in the second process, responding to the trigger operation aiming at the page to be displayed, and acquiring at least one trigger message;
and extracting the trigger message corresponding to the window mode switching identifier from the at least one trigger message according to the position coordinate corresponding to each trigger message, wherein the trigger message is used as the window switching message.
4. The method of claim 2, further comprising:
acquiring the display attribute of the target comment window image, and packaging the display attribute into a drawing command;
serializing the drawing command to generate a command byte stream of the drawing command;
transmitting the command byte stream from the first process to the second process over a second process channel.
5. The method of claim 4, further comprising:
when the second process is detected to be operated, acquiring an interception dynamic link library, and sending the interception dynamic link library from the first process to a dynamic link library directory of the second process;
and operating the intercepting dynamic link library to establish the first process channel and the second process channel.
6. The method of claim 4, wherein the target comment window image is stored in a process shared memory;
the obtaining of the display attribute of the target comment window image includes:
acquiring a display size to be adjusted corresponding to the display mode of the target comment window, acquiring the resolution of a terminal screen, adjusting the display size to be adjusted according to the resolution of the terminal screen, and generating a display size;
acquiring the position offset and the memory occupation length of the target comment window image in the process shared memory;
and acquiring a window position parameter of the target comment window, and combining the window position parameter, the display size, the position offset and the memory occupation length into a display attribute of the target comment window image.
7. The method of claim 6, wherein adding the target comment window image to the second process comprises:
in the second process, performing deserialization processing on the command byte stream to generate the drawing command;
and reading the target comment window image from the process shared memory to the second process according to the position offset and the memory occupation length in the drawing command.
8. The method according to claim 4, wherein the overlaying the target comment window image and the target application page as a page to be displayed in the second process comprises:
in the second process, creating an image sprite object containing the target comment window image;
drawing a page sprite object according to the display size in the drawing command to generate a target window image drawing object;
acquiring a target application page drawing object corresponding to the target application page;
and according to the window position parameter in the drawing command, overlapping the target window image drawing object and the target application page drawing object into the page to be displayed.
9. The method of claim 1, further comprising:
in the first process, capturing a comment window image according to a first frequency;
storing the captured comment window image to a first cache in the first process; the obtaining of the target comment window image belonging to the first process includes:
reading the target comment window image from the first cache;
storing the target comment window image to a process shared memory;
the method further comprises the following steps:
acquiring an application page according to a second frequency, and storing the acquired application page to a second cache in the second process; the acquiring the target application page belonging to the second process includes: and reading the target application page from the second cache.
10. The method of claim 9, wherein the first frequency is less than the second frequency;
the reading the target comment window image from the first cache includes:
if the non-rendered comment window image exists in the first cache, reading the target comment window image from the non-rendered comment window image in the first cache;
if the non-rendered comment window image does not exist in the first cache, reading the target comment window image from the rendered comment window image in the first cache.
11. The method of claim 9, wherein reading the target application page from the second cache comprises:
reading the target application page from the non-rendered application page in the second cache; the target application page is an application page having a smallest generation timestamp among the application pages not rendered in the second cache.
12. A page processing apparatus, comprising:
the first acquisition module is used for acquiring a target comment window image belonging to a first process; the target comment window image is stored in a process shared memory, and the target comment window image comprises: in the unrendered comment window images, the comment window images corresponding to the minimum generation time stamps or the comment window images corresponding to the maximum generation time stamps in the rendered comment window images;
the second acquisition module is used for acquiring the display attribute of the target comment window image, packaging the display attribute into a drawing command and acquiring a target application page belonging to a second process; the second process belongs to a display resource exclusive process;
the adding module is used for reading the target comment window image from the process shared memory according to the drawing command and adding the target comment window image to the second process;
the superposition module is used for superposing the target comment window image and the target application page into a page to be displayed in the second process;
and the display module is used for displaying the page to be displayed.
13. A computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method according to any one of claims 1-11.
14. A computer storage medium, characterized in that the computer storage medium stores a computer program comprising program instructions which, when executed by a processor, perform the method according to any one of claims 1-11.
CN201911067271.8A 2019-11-04 2019-11-04 Page processing method and device, computer equipment and storage medium Active CN110795097B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911067271.8A CN110795097B (en) 2019-11-04 2019-11-04 Page processing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911067271.8A CN110795097B (en) 2019-11-04 2019-11-04 Page processing method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110795097A CN110795097A (en) 2020-02-14
CN110795097B true CN110795097B (en) 2021-12-14

Family

ID=69442577

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911067271.8A Active CN110795097B (en) 2019-11-04 2019-11-04 Page processing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110795097B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111625311B (en) * 2020-05-18 2023-05-26 Oppo(重庆)智能科技有限公司 Control method, control device, electronic equipment and storage medium
CN111767305B (en) * 2020-06-23 2023-04-07 电子科技大学 Self-adaptive database hybrid query method
CN112083994A (en) * 2020-09-02 2020-12-15 珠海格力电器股份有限公司 Notification message processing method and device
CN112911329B (en) * 2021-02-03 2023-08-25 广州虎牙科技有限公司 Window live broadcast method, device, electronic equipment and computer readable storage medium
CN113660504B (en) * 2021-08-18 2024-04-16 北京百度网讯科技有限公司 Message display method, device, electronic equipment and storage medium
CN113992962B (en) * 2021-10-27 2024-01-02 北京达佳互联信息技术有限公司 Barrage release method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104020849A (en) * 2014-05-30 2014-09-03 爱培科科技开发(深圳)有限公司 Multi-program simultaneous display method and system based on windows CE
CN107734286A (en) * 2016-08-12 2018-02-23 阿里巴巴集团控股有限公司 The methods of exhibiting and device of video window
CN110134481A (en) * 2019-05-20 2019-08-16 腾讯科技(深圳)有限公司 A kind of page processing method, device and relevant device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103034410B (en) * 2012-12-10 2016-01-13 北京奇虎科技有限公司 The method and apparatus of page display
US9756147B1 (en) * 2013-12-20 2017-09-05 Open Text Corporation Dynamic discovery and management of page fragments
CN108055569B (en) * 2017-12-19 2020-03-10 广州虎牙信息科技有限公司 Live broadcast room barrage sending method and device and corresponding terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104020849A (en) * 2014-05-30 2014-09-03 爱培科科技开发(深圳)有限公司 Multi-program simultaneous display method and system based on windows CE
CN107734286A (en) * 2016-08-12 2018-02-23 阿里巴巴集团控股有限公司 The methods of exhibiting and device of video window
CN110134481A (en) * 2019-05-20 2019-08-16 腾讯科技(深圳)有限公司 A kind of page processing method, device and relevant device

Also Published As

Publication number Publication date
CN110795097A (en) 2020-02-14

Similar Documents

Publication Publication Date Title
CN110795097B (en) Page processing method and device, computer equipment and storage medium
CN110393921B (en) Cloud game processing method and device, terminal, server and storage medium
CN103348695B (en) Low latency wireless display for graphics
EP3883256A1 (en) Live stream processing method in webrtc and stream pushing client
US20200260149A1 (en) Live streaming sharing method, and related device and system
US11450044B2 (en) Creating and displaying multi-layered augemented reality
CN112367543B (en) Display device, mobile terminal, screen projection method and screen projection system
CN111541930B (en) Live broadcast picture display method and device, terminal and storage medium
CN112905289A (en) Application picture display method, device, terminal, screen projection system and medium
CN113368492B (en) Rendering method and device
CN113032080B (en) Page implementation method, application program, electronic device and storage medium
CN115065684B (en) Data processing method, apparatus, device and medium
CN113891167B (en) Screen projection method and electronic equipment
CN114286152A (en) Display device, communication terminal and screen projection picture dynamic display method
CN111580988A (en) Method and device for realizing open platform, storage medium and computer equipment
US9729931B2 (en) System for managing detection of advertisements in an electronic device, for example in a digital TV decoder
CN111984167B (en) Quick naming method and display device
CN112055245B (en) Color subtitle realization method and display device
CN113038141A (en) Video frame processing method and electronic equipment
CN115665342B (en) Image processing method, image processing circuit, electronic device, and readable storage medium
CN112328553A (en) Thumbnail capturing method and display device
CN112419456A (en) Special effect picture generation method and device
CN111913711B (en) Video rendering method and device
CN107995524A (en) A kind of FTP client FTP and its design, data processing method for connecting network video server
CN109857568B (en) Data encapsulation and processing method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40022558

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant