A content display method, apparatus, computer equipment, and storage medium
By selecting the page rendering unit based on the device status, the problems of excessive device memory usage and slow rendering speed in online education are solved, achieving efficient rendering and a good user experience under different conditions.
Patent Information
- Application Number
- CN202210952299.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-09
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2042-08-09
AI Technical Summary
In online education, the use of multiple rendering units leads to excessive device memory usage, causing stuttering and slow rendering speed.
By flexibly selecting page rendering units based on the user's device status information, rendering is performed using idle rendering units when the device status is good, and rendering is performed using occupied rendering units when the status is poor, thus releasing overlapping data and establishing binding relationships.
When the device is in good condition, shorten content loading time to ensure user experience; when the device is in poor condition, increase rendering speed to improve rendering efficiency.
Smart Images

Figure CN115221450B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and more specifically, to a content display method, apparatus, computer device, and storage medium. Background Technology
[0002] Online education is a learning method where students learn through online platforms or terminal devices. Teachers can explain knowledge points or issue quizzes through online classrooms, and students can view the corresponding knowledge point explanation pages or complete the corresponding quizzes in the same online classroom. The knowledge point explanation pages or quiz pages can be rendered and displayed through rendering units.
[0003] In related technologies, multiple scene pages are typically rendered and displayed using multiple different rendering units. This may lead to excessive memory usage on the device, which can easily cause problems such as lag, courseware loading timeouts, and learning software crashes. On the other hand, if scene pages are rendered using a small number of rendering units, the rendered data needs to be released before re-rendering the page data to be displayed when reusing rendering units, resulting in slower rendering speed. Summary of the Invention
[0004] This disclosure provides at least one content display method, apparatus, computer device, and storage medium.
[0005] In a first aspect, embodiments of this disclosure provide a content display method, including:
[0006] Receive the display instructions for the target page from the target source;
[0007] Obtain the current device status information of the user terminal, and the first page rendering unit currently occupied by the user terminal for rendering the page of the target source; wherein, pages from different sources are rendered through different page rendering units;
[0008] Based on the device status information and the first page rendering unit, a target page rendering unit is determined for rendering the target page;
[0009] The target page is rendered based on the target page rendering unit.
[0010] In one possible implementation, determining the target page rendering unit for rendering the target page based on the device status information and the first page rendering unit includes:
[0011] If the device status information meets the preset conditions, the second page rendering unit (excluding the first page rendering unit) in the page rendering unit pool corresponding to the target source is selected as the target page rendering unit.
[0012] In one possible implementation, determining the target page rendering unit for rendering the target page based on the device status information and the first page rendering unit includes:
[0013] If the device status information does not meet the preset conditions, determine the first number of the page rendering unit corresponding to the target source that has been preset.
[0014] Determine the second number of the first page rendering unit;
[0015] The target page rendering unit is determined based on the first number and the second number corresponding to the target source.
[0016] In one possible implementation, determining the target page rendering unit based on the first number and the second number corresponding to the target source includes:
[0017] If the first number corresponding to the target page is greater than the second number, any idle page rendering unit in the multiple in-page rendering units corresponding to the target source in the page rendering unit pool shall be used as the target page rendering unit;
[0018] If the first number corresponding to the target page is not greater than the first number, the target page rendering unit is determined from the currently occupied first page rendering unit.
[0019] In one possible implementation, after determining the target page rendering unit from the currently occupied page rendering units, the method further includes:
[0020] Release the data in the target page rendering unit;
[0021] Establish the binding relationship between the target page rendering unit and the target page.
[0022] In one possible implementation, releasing the data in the target page rendering unit includes:
[0023] Identify the overlapping data in the data rendered by the target page rendering unit that is identical to the target page;
[0024] Release all data in the target page rendering unit except for the overlapping data.
[0025] In one possible implementation, before rendering the target page based on the target page rendering unit, the method further includes:
[0026] A data switching instruction is sent to the data storage unit corresponding to the target source. After receiving the data switching instruction, the data storage unit sends the page data of the target page to the target page rendering unit.
[0027] The rendering of the target page based on the target page rendering unit includes:
[0028] The target page is rendered and displayed based on the target page rendering unit.
[0029] Secondly, embodiments of this disclosure also provide a content display device, including:
[0030] The receiving module is used to receive display instructions for the target page from the target source;
[0031] The acquisition module is used to acquire the current device status information of the user terminal, and the first page rendering unit currently occupied by the user terminal for rendering the page of the target source; wherein, pages from different sources are rendered through different page rendering units;
[0032] The determining module is used to determine a target page rendering unit for rendering the target page based on the device status information and the first page rendering unit;
[0033] The rendering module is used to render the target page based on the target page rendering unit.
[0034] In one possible implementation, when determining the target page rendering unit for rendering the target page based on the device status information and the first page rendering unit, the determining module is configured to:
[0035] If the device status information meets the preset conditions, the second page rendering unit (excluding the first page rendering unit) in the page rendering unit pool corresponding to the target source is selected as the target page rendering unit.
[0036] In one possible implementation, when determining the target page rendering unit for rendering the target page based on the device status information and the first page rendering unit, the determining module is configured to:
[0037] If the device status information does not meet the preset conditions, determine the first number of the page rendering unit corresponding to the target source that has been preset.
[0038] Determine the second number of the first page rendering unit;
[0039] The target page rendering unit is determined based on the first number and the second number corresponding to the target source.
[0040] In one possible implementation, the determining module, when determining the target page rendering unit based on the first number and the second number corresponding to the target source, is used to:
[0041] If the first number corresponding to the target page is greater than the second number, any idle page rendering unit in the multiple in-page rendering units corresponding to the target source in the page rendering unit pool shall be used as the target page rendering unit;
[0042] If the first number corresponding to the target page is not greater than the first number, the target page rendering unit is determined from the currently occupied first page rendering unit.
[0043] In one possible implementation, after determining the target page rendering unit from the currently occupied page rendering units, the determining module is further configured to:
[0044] Release the data in the target page rendering unit;
[0045] Establish the binding relationship between the target page rendering unit and the target page.
[0046] In one possible implementation, the determining module, when releasing the data in the target page rendering unit, is used to:
[0047] Identify the overlapping data in the data rendered by the target page rendering unit that is identical to the target page;
[0048] Release all data in the target page rendering unit except for the overlapping data.
[0049] In one possible implementation, the rendering module, before rendering the target page based on the target page rendering unit, is used to:
[0050] A data switching instruction is sent to the data storage unit corresponding to the target source. After receiving the data switching instruction, the data storage unit sends the page data of the target page to the target page rendering unit.
[0051] The rendering module, when rendering the target page based on the target page rendering unit, is used for:
[0052] The target page is rendered and displayed based on the target page rendering unit.
[0053] Thirdly, embodiments of this disclosure also provide a computer device, including: a processor, a memory, and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor communicates with the memory via the bus, and when the machine-readable instructions are executed by the processor, the steps of the first aspect above, or any possible implementation of the first aspect, are performed.
[0054] Fourthly, embodiments of this disclosure also provide a computer-readable storage medium storing a computer program that, when executed by a processor, performs the steps of the first aspect or any possible implementation of the first aspect.
[0055] This disclosure provides a content display method, apparatus, computer device, and storage medium that can render pages from different sources using different page rendering units. After receiving a display instruction for a target page from a target source sent by a server, the system can flexibly select a page rendering unit for the target page based on the user's current device status and the currently occupied first page rendering unit used to render the target source page. Thus, when the device is in good condition, an idle page rendering unit can be used for content rendering, shortening content loading time and ensuring a better user experience. When the device is in poor condition, rendering is performed using the occupied first page rendering unit used to render the target source page. Since the page currently being rendered by the occupied first page rendering unit is also from the target source, rendering speed can be improved when rendering the target page.
[0056] To make the above-mentioned objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0057] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings used in the embodiments will be briefly described below. These drawings are incorporated in and constitute a part of this specification. They illustrate embodiments conforming to this disclosure and, together with the specification, serve to explain the technical solutions of this disclosure. It should be understood that the following drawings only show some embodiments of this disclosure and should not be considered as limiting the scope. Those skilled in the art can obtain other related drawings based on these drawings without creative effort.
[0058] Figure 1 A flowchart of a content display method provided by an embodiment of this disclosure is shown;
[0059] Figure 2The interactive courseware display interface on the teacher's end is shown in the content display method provided in this embodiment of the present disclosure.
[0060] Figure 3 A schematic diagram of a content display device provided in an embodiment of this disclosure is shown;
[0061] Figure 4 A schematic diagram of the structure of a computer device provided in an embodiment of this disclosure is shown. Detailed Implementation
[0062] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. The components of the embodiments of this disclosure described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this disclosure provided in the accompanying drawings is not intended to limit the scope of the claimed disclosure, but merely represents selected embodiments of this disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure.
[0063] Research has found that in existing technologies, multiple scene pages are typically rendered and displayed using multiple different rendering units. This can lead to excessive memory usage on the device, which can cause problems such as lag, courseware loading timeouts, and learning software crashes. On the other hand, if scene pages are rendered using a small number of rendering units, the already rendered data needs to be released before re-rendering the page data to be displayed, resulting in slower rendering speed.
[0064] Based on the above research, this disclosure provides a content display method, apparatus, computer device, and storage medium. It can render pages from different sources using different page rendering units. After receiving a display instruction for a target page from a target source sent by the server, it can flexibly select a page rendering unit for the target page based on the user's current device status and the currently occupied first page rendering unit used to render the target source page. Thus, when the device is in good condition, an idle page rendering unit can be used for content rendering, shortening content loading time and ensuring a better user experience. When the device is in poor condition, rendering is performed using the occupied first page rendering unit used to render the target source page. Since the page currently being rendered by the occupied first page rendering unit is also from the target source, rendering speed can be improved when rendering the target page.
[0065] The shortcomings of the above solutions are the result of the inventor's practical experience and careful research. Therefore, the discovery process of the above problems and the solutions proposed in this disclosure below should be considered as the inventor's contribution to this disclosure.
[0066] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0067] The term "and / or" in the text merely describes an association relationship, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Furthermore, the term "at least one" in this document means any combination of at least two of any one or more elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.
[0068] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.
[0069] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.
[0070] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0071] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.
[0072] To facilitate understanding of this embodiment, a content display method disclosed in this disclosure will first be described in detail. The execution subject of the content display method provided in this disclosure is generally a computer device with certain computing capabilities. The computer device may include, for example, a terminal device, such as a user equipment (UE), mobile device, user terminal, terminal, cellular phone, cordless phone, personal digital assistant (PDA), handheld device, computing device, vehicle device, wearable device, etc.
[0073] The following describes the content display method provided in the embodiments of this disclosure, taking the terminal device as the execution subject as an example.
[0074] See Figure 1 The diagram shows a flowchart of a content display method provided in an embodiment of this disclosure. The method includes steps 101 to 104, wherein:
[0075] Step 101: Receive the display instruction from the target page of the target source;
[0076] Step 102: Obtain the current device status information of the user terminal, and the first page rendering unit currently occupied by the user terminal for rendering the page of the target source;
[0077] Step 103: Based on the device status information and the first page rendering unit, determine the target page rendering unit for rendering the target page;
[0078] Step 104: Render the target page based on the target page rendering unit.
[0079] The following is a detailed explanation of the steps described above:
[0080] Regarding step 101,
[0081] The user on the user end can be a student taking an online course or a participant in a video conference. The display instruction for the target page from the target source can be generated by the server based on page switching information sent by other user ends (such as a teacher or conference host). The page switching information may carry the page identifier of the target page.
[0082] Specifically, the content displayed on other user terminals should be consistent with the content displayed on the user terminal. Therefore, when the content displayed on other user terminals changes, the content displayed on the user terminal should also change accordingly. Thus, other user terminals can send page switching information to control the content displayed on the user terminal.
[0083] A single source can have multiple pages. For example, source A can have pages explaining knowledge points and pages with practice questions, and source B can also have pages explaining knowledge points and pages with practice questions. Multiple pages from different sources can be different.
[0084] Taking the teacher's side as an example, in one possible implementation, when generating the page switching information, the teacher can respond to the trigger operation of the first target button and generate the page switching information based on the target page information of the target source selected by the user. Here, the target page information can refer to the page identifier of the target page.
[0085] For example, the interactive courseware display interface on the teacher's end can be as follows: Figure 2 As shown, 201 represents the knowledge point explanation page of Source 1 currently being displayed, 202 represents the interactive courseware switching button, 203 represents the target page information selection area, and 204 represents the target button. The teacher can first trigger the interactive courseware switching button to select the target page information; after completing the selection, clicking the target button allows the teacher's end to process the selected target page information (i.e.,...) Figure 2 The page switching information is generated from "Source 1 Exercise 1".
[0086] The following section will use an online classroom scenario as an example, with the user end being the student's end, to provide a detailed introduction to the content display method provided in this disclosure.
[0087] Regarding step 102,
[0088] Specifically, obtaining the current device status information of the user terminal can be achieved by reading the status information of the terminal device corresponding to the user terminal after receiving the display instruction. For example, the device status information may include at least one of the following: device model, operating system version, and current memory usage.
[0089] The device status information can be used to determine whether the user's current device status is good. If the user's device status is good, a new rendering unit can be used to render the target page; if the device status is bad, an already occupied rendering unit needs to be reused to render the target page. The specific process of selecting a rendering unit for the target page will be described below and will not be shown or described here.
[0090] Furthermore, to shorten the time users spend waiting for the page to display, the first page rendering unit currently occupied by the user's device for rendering the target source page can be obtained simultaneously with the current device status information of the user's device. This allows for the direct selection of a reusable page rendering unit from the already occupied first page rendering units, even when the device status is poor. For example, the page rendering unit could be a WebView.
[0091] Regarding step 103,
[0092] In one possible implementation, the determination of whether the user's device status is good can be based on the device status information. If the device status information meets a preset condition, then the user's device status is determined to be good. The preset condition can be a pre-set scoring threshold; for example, the scoring threshold can be set to 80.
[0093] For example, when determining whether the device status information meets preset conditions, the scores corresponding to each piece of information in the device status information (i.e., the device model, operating system version, and current memory usage) can be determined first; then, the scores of each piece of information can be accumulated to obtain a total device status score; finally, the total device status score can be compared with the score threshold. If the total device status score is greater than 80 (i.e., the score threshold), then the device status information is determined to meet the preset conditions; otherwise, the device status information is determined not to meet the preset conditions.
[0094] After determining the device status of the user terminal based on the device status information of the user terminal (i.e., determining whether the device status of the user terminal is good), the rendering unit selection strategy corresponding to the device status can be determined, and the target page rendering unit can be determined based on the selection strategy.
[0095] It's important to note that pages from different sources can be rendered using different page rendering units. For example, the page rendering unit pool includes page rendering units A, B, C, and D. Units A and C render the page content corresponding to source 1, while units B and D render the page content corresponding to source 2. Therefore, when the knowledge point explanation page and the exercise test page from source 1 need to be rendered and displayed simultaneously, the knowledge point explanation page can be rendered using unit A, and the exercise test page can be rendered using unit C, or vice versa. In other words, this disclosure does not limit which page rendering unit is used to render which page. However, the page content corresponding to source 2 can only be rendered using page rendering units B and D, and not using page rendering units A and C.
[0096] In one possible implementation, if the device status information meets preset conditions, the second page rendering unit (excluding the first page rendering unit) among the multiple page rendering units in the page rendering unit pool corresponding to the target source is selected as the target page rendering unit.
[0097] For example, the page rendering unit pool includes page rendering unit A and page rendering unit B for rendering page content from source 1, and page rendering unit C and page rendering unit D for rendering page content from source 2. If the target source is source 1 and page rendering unit A is already in use, then if the device status information meets preset conditions, page rendering unit B can be determined as the target page rendering unit.
[0098] In another possible implementation, if the device status information does not meet the preset conditions, the first number of page rendering units corresponding to the target source can be determined first; then the second number of the first page rendering units can be determined; finally, the target page rendering unit can be determined based on the first number and the second number corresponding to the target source.
[0099] The first number may refer to the number of page rendering units that can be occupied simultaneously for the target source in a pre-set manner; the second number may refer to the number of page rendering units that are currently being occupied among the multiple page rendering units corresponding to the target source.
[0100] In one possible implementation, if the first number corresponding to the target page is greater than the second number, it indicates that the page rendering units that can be occupied simultaneously corresponding to the target source are not currently occupied simultaneously. Therefore, any idle page rendering unit among the multiple page rendering units corresponding to the target source in the page rendering unit pool can be used as the target page rendering unit.
[0101] For example, the page rendering unit pool includes page rendering unit A and page rendering unit B for rendering page content corresponding to source 1, and page rendering unit C and page rendering unit D for rendering page content corresponding to source 2. The first number can be, for example, 1. If the target source is source 1, and page rendering unit A and page rendering unit B are not occupied, then the second number is 0. The first number is greater than the second number, so page rendering unit A or page rendering unit B can be determined as the target page rendering unit.
[0102] In another possible implementation, if the first number corresponding to the target page is not greater than the first number, it means that all the page rendering units that can be occupied simultaneously corresponding to the target source are currently occupied. Therefore, a page rendering unit can be selected from the currently occupied first page rendering units as the target page rendering unit.
[0103] For example, the page rendering unit pool includes page rendering units A and B for rendering page content corresponding to source 1, and page rendering units C and D for rendering page content corresponding to source 2, where the first number is 1. If the target source is source 1, and the currently occupied page rendering unit is page rendering unit A, and the second number is 1, then if the device status information does not meet the preset conditions, page rendering unit A can be determined as the target page rendering unit.
[0104] In one possible implementation, when determining the target page rendering unit from the currently occupied first page rendering units, any page rendering unit in the first page rendering units can be randomly determined as the target page rendering unit.
[0105] In another possible implementation, when determining the target page rendering unit from the currently occupied first page rendering unit, the start time of content rendering of each page rendering unit in the first page rendering unit can be obtained first; then, the target page rendering unit can be determined based on the start time of content rendering of each page rendering unit.
[0106] For example, if the start rendering time of page rendering unit A in the first page rendering unit is 9:00, the start rendering time of page rendering unit B is 9:05, and the start rendering time of page rendering unit C is 9:30, then page rendering unit A with the earliest rendering time can be determined as the target page rendering unit.
[0107] Another possible implementation is that when determining the target page rendering unit from the currently occupied first page rendering unit, the display time of each page rendering unit in the first page rendering unit can be obtained first; then the target page rendering unit can be determined based on the display time corresponding to each page rendering unit.
[0108] For example, if the display time of page rendering unit A in the first page rendering unit is 9:01, the display time of page rendering unit B is 9:05, and the display time of page rendering unit C is 9:32, then page rendering unit A can be determined as the target page rendering unit (that is, the page rendering unit that is displayed first in the first page rendering unit).
[0109] In summary, if the first number corresponding to the target page is not greater than the first number, the target page rendering unit is the page rendering unit that is displaying the content of other pages. This disclosure does not limit other methods for filtering target page rendering units.
[0110] After determining the target page rendering unit, the original data in the target page rendering unit can be released to facilitate the rendering of new page content data in the target page rendering unit.
[0111] In one possible implementation, after determining the target page rendering unit from the currently occupied page rendering units, the data in the target page rendering unit can be released first; then the binding relationship between the target page rendering unit and the target page can be established.
[0112] Specifically, since the target page and the page currently being rendered by the target page rendering unit are from the same source, there may be overlapping content. To improve rendering efficiency, when releasing data in the target page rendering unit, the overlapping data rendered by the target page rendering unit with the target page can be identified first, and other data in the target page rendering unit except for the overlapping data can be released. In this way, the overlapping data can be avoided from being rendered again, thus improving rendering efficiency.
[0113] For example, if the data rendered by the target page rendering unit is 1, 2, 3, 4, and the data of the target page is 1, 3, 5, 6; and the overlapping data is 1 and 3, then the data that needs to be released is 2 and 4.
[0114] It should be noted that when the initial page is rendered, it is necessary to first concatenate the Uniform Resource Locator (URL) corresponding to the target source, then obtain the corresponding page data based on the URL, and render the page data through the target page rendering unit.
[0115] Since the target page also originates from the target source, the URL of the target page is the same as the URL of the initial page. Furthermore, when rendering the target page, the corresponding page data can be obtained directly from the URL of the initial page and rendered through the target page rendering unit, avoiding the need to concatenate the URL again.
[0116] In one possible implementation, when establishing the binding relationship between the target page rendering unit and the target page, the target page rendering unit can first be unbound from the initial page (i.e., the page that the target page rendering unit has rendered before reuse), and then the target page rendering unit can be bound to the target page.
[0117] Regarding step 104,
[0118] After determining the target page rendering unit, the content of the target page can be rendered using the target page rendering unit, thereby enabling the display of the target page.
[0119] In one possible implementation, before rendering the target page based on the target page rendering unit, a data switching instruction can be sent to the data storage unit corresponding to the target source. After receiving the data switching instruction, the data storage unit sends the page data of the target page to the target page rendering unit.
[0120] The data switching instruction may include the target source corresponding to the page to be switched and the page identifier corresponding to the page to be switched, and the data storage unit may store the URL of the rendered page.
[0121] In one possible implementation, when sending a data switching instruction to the data storage unit corresponding to the target source, the data switching instruction can be sent to the data storage unit corresponding to the target source via JSBridge.
[0122] In one possible implementation, when the data storage unit corresponding to the target source sends the page data of the target page to the target page rendering unit, it can determine the URL corresponding to the target page from the stored URLs and obtain the page data of the target page based on the determined URL; then, after receiving the page data of the target page sent by the server corresponding to the target source, it sends the page data of the target page to the target page rendering unit.
[0123] In one possible implementation, after the target page is rendered based on the target page rendering unit, the rendered target page can also be displayed.
[0124] Specifically, when rendering the target page rendering unit based on the page data of the target page, the data to be rendered corresponding to the target page can be determined first based on the page data of the target page and the overlapping data; then the target page rendering unit can be rendered based on the data to be rendered.
[0125] For example, if the page data of the target page is 1, 2, 3, 4, and the overlapping data is 1, 3, then the data to be rendered is 2, 4.
[0126] In this way, the target page rendering unit can reuse the data it already holds and only load the missing additional data, which can improve rendering efficiency, greatly reduce page switching time, and further enhance the user experience.
[0127] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.
[0128] The following describes the method for demonstrating the above content using specific embodiments.
[0129] For example, taking an online classroom scenario as an example, the content displayed on the teacher's end comes from two sources: Source A has two pages, namely Test Page 1 and Courseware Display Page 1, and Source 2 also has two pages, namely Test Page 2 and Courseware Display Page 2. Pages from different sources are rendered using different page rendering units. When the teacher displays page content, it needs to be displayed synchronously on the student's end. For example, when the teacher displays Test Page 1, the student's end also needs to synchronously display Test Page 1.
[0130] Specifically, when the teacher displays the target page from the target source, the server can send a display instruction for the target page from the target source to the student's end. After receiving the display instruction, the student's end can determine the target page rendering unit to render the target page by combining the student's current device status information, and then render the target page.
[0131] Generally, the number of page rendering units on the user side (including student and teacher sides) is the same as the number of pages to be displayed. For example, if there are four pages as mentioned above: test page 1, courseware display page 1, test page 2, and courseware display page 2, then the user side can have four page rendering units.
[0132] For example, if the display instruction sent by the teacher is for the target page of test page 2, then if the current device status information of the student is good, test page 2 can be displayed directly by requesting a new page rendering unit.
[0133] If the student's current device status is poor, and the page from source 2 is displayed using one page rendering unit, we can first determine whether the courseware display page 2 from source 2 is currently being displayed, that is, whether the page rendering unit allocated to source 2 is occupied. If so, we can release the target page rendering unit occupied by the courseware display page 2 and render the test page 2 using the released target page rendering unit; if not, we can directly apply for a new target page test unit and render the test page 2 using the applied target page rendering unit.
[0134] Since both display page 2 and courseware display page 2 originate from source 2, their URLs are the same. Therefore, when rendering display page 2, the corresponding display data can be obtained directly through the URL of courseware display page 2, reducing the time spent re-constructing the URL and improving rendering efficiency.
[0135] In addition, when determining the target page rendering unit, the current device status information of the student's terminal is taken into account. Therefore, the target page rendering unit can be flexibly selected for the student's terminal, thereby maximizing the rendering speed.
[0136] Based on the same inventive concept, this disclosure also provides a content display device corresponding to the content display method. Since the principle of the device in this disclosure for solving the problem is similar to the content display method described above in this disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.
[0137] Reference Figure 3 The diagram shown is an architectural schematic of a content display device provided in an embodiment of this disclosure. The device includes: a receiving module 301, an acquiring module 302, a determining module 303, and a rendering module 304; wherein,
[0138] The receiving module 301 is used to receive the display instructions of the target page from the target source;
[0139] The acquisition module 302 is used to acquire the current device status information of the user terminal, and the first page rendering unit currently occupied by the user terminal for rendering the page of the target source; wherein, pages from different sources are rendered through different page rendering units.
[0140] The determining module 303 is used to determine a target page rendering unit for rendering the target page based on the device status information and the first page rendering unit;
[0141] The rendering module 304 is used to render the target page based on the target page rendering unit.
[0142] In one possible implementation, when determining the target page rendering unit for rendering the target page based on the device status information and the first page rendering unit, the determining module 303 is used to:
[0143] If the device status information meets the preset conditions, the second page rendering unit (excluding the first page rendering unit) in the page rendering unit pool corresponding to the target source is selected as the target page rendering unit.
[0144] In one possible implementation, when determining the target page rendering unit for rendering the target page based on the device status information and the first page rendering unit, the determining module 303 is used to:
[0145] If the device status information does not meet the preset conditions, determine the first number of the page rendering unit corresponding to the target source that has been preset.
[0146] Determine the second number of the first page rendering unit;
[0147] The target page rendering unit is determined based on the first number and the second number corresponding to the target source.
[0148] In one possible implementation, the determining module 303, when determining the target page rendering unit based on the first number and the second number corresponding to the target source, is used to:
[0149] If the first number corresponding to the target page is greater than the second number, any idle page rendering unit in the multiple in-page rendering units corresponding to the target source in the page rendering unit pool shall be used as the target page rendering unit;
[0150] If the first number corresponding to the target page is not greater than the first number, the target page rendering unit is determined from the currently occupied first page rendering unit.
[0151] In one possible implementation, after determining the target page rendering unit from the currently occupied page rendering units, the determining module 303 is further configured to:
[0152] Release the data in the target page rendering unit;
[0153] Establish the binding relationship between the target page rendering unit and the target page.
[0154] In one possible implementation, the determining module 303, when releasing the data in the target page rendering unit, is used to:
[0155] Identify the overlapping data in the data rendered by the target page rendering unit that is identical to the target page;
[0156] Release all data in the target page rendering unit except for the overlapping data.
[0157] In one possible implementation, the rendering module 304, before rendering the target page based on the target page rendering unit, is used to:
[0158] A data switching instruction is sent to the data storage unit corresponding to the target source. After receiving the data switching instruction, the data storage unit sends the page data of the target page to the target page rendering unit.
[0159] The rendering module 304, when rendering the target page based on the target page rendering unit, is used for:
[0160] The target page is rendered and displayed based on the target page rendering unit.
[0161] The processing flow of each module in the device and the interaction flow between each module can be referred to the relevant descriptions in the above method embodiments, and will not be detailed here.
[0162] Based on the same technical concept, this disclosure also provides a computer device. (See also...) Figure 4 The diagram shows the structure of a computer device 400 provided in this embodiment, including a processor 401, a memory 402, and a bus 403. The memory 402 stores execution instructions and includes main memory 4021 and external memory 4022. The main memory 4021, also called internal memory, is used to temporarily store computational data in the processor 401 and data exchanged with external memory 4022 such as a hard disk. The processor 401 exchanges data with the external memory 4022 through the main memory 4021. When the computer device 400 is running, the processor 401 and the memory 402 communicate through the bus 403, causing the processor 401 to execute the following instructions:
[0163] Receive the display instructions for the target page from the target source;
[0164] Obtain the current device status information of the user terminal, and the first page rendering unit currently occupied by the user terminal for rendering the page of the target source; wherein, pages from different sources are rendered through different page rendering units;
[0165] Based on the device status information and the first page rendering unit, a target page rendering unit is determined for rendering the target page;
[0166] The target page is rendered based on the target page rendering unit.
[0167] In one possible implementation, the instructions executed by processor 401, wherein determining the target page rendering unit for rendering the target page based on the device state information and the first page rendering unit, includes:
[0168] If the device status information meets the preset conditions, the second page rendering unit (excluding the first page rendering unit) in the page rendering unit pool corresponding to the target source is selected as the target page rendering unit.
[0169] In one possible implementation, the instructions executed by processor 401, wherein determining the target page rendering unit for rendering the target page based on the device state information and the first page rendering unit, includes:
[0170] If the device status information does not meet the preset conditions, determine the first number of the page rendering unit corresponding to the target source that has been preset.
[0171] Determine the second number of the first page rendering unit;
[0172] The target page rendering unit is determined based on the first number and the second number corresponding to the target source.
[0173] In one possible implementation, the instruction executed by processor 401, which determines the target page rendering unit based on the first number and the second number corresponding to the target source, includes:
[0174] If the first number corresponding to the target page is greater than the second number, any idle page rendering unit in the multiple in-page rendering units corresponding to the target source in the page rendering unit pool shall be used as the target page rendering unit;
[0175] If the first number corresponding to the target page is not greater than the first number, the target page rendering unit is determined from the currently occupied first page rendering unit.
[0176] In one possible implementation, after determining the target page rendering unit from the currently occupied page rendering units, the method further includes the following instructions executed by processor 401:
[0177] Release the data in the target page rendering unit;
[0178] Establish the binding relationship between the target page rendering unit and the target page.
[0179] In one possible implementation, the instruction executed by processor 401, which includes releasing the data in the target page rendering unit, includes:
[0180] Identify the overlapping data in the data rendered by the target page rendering unit that is identical to the target page;
[0181] Release all data in the target page rendering unit except for the overlapping data.
[0182] In one possible implementation, the method further includes, before rendering the target page based on the target page rendering unit, the instructions executed by processor 401:
[0183] A data switching instruction is sent to the data storage unit corresponding to the target source. After receiving the data switching instruction, the data storage unit sends the page data of the target page to the target page rendering unit.
[0184] The rendering of the target page based on the target page rendering unit includes:
[0185] The target page is rendered and displayed based on the target page rendering unit.
[0186] This disclosure also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the content display method described in the above method embodiments. The storage medium can be a volatile or non-volatile computer-readable storage medium.
[0187] This disclosure also provides a computer program product, which carries program code. The instructions included in the program code can be used to execute the steps of the content display method described in the above method embodiments. For details, please refer to the above method embodiments, which will not be repeated here.
[0188] The aforementioned computer program product can be implemented through hardware, software, or a combination thereof. In one optional embodiment, the computer program product is specifically embodied in a computer storage medium; in another optional embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.
[0189] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. In the several embodiments provided in this disclosure, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division; in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection may be through some communication interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.
[0190] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0191] In addition, the functional units in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0192] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0193] Finally, it should be noted that the above-described embodiments are merely specific implementations of this disclosure, used to illustrate the technical solutions of this disclosure, and not to limit it. The protection scope of this disclosure is not limited thereto. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this disclosure. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure, and should all be covered within the protection scope of this disclosure. Therefore, the protection scope of this disclosure should be determined by the protection scope of the claims.
Claims
1. A content display method, characterized in that, include: Receive the display instructions for the target page from the target source; Obtain the current device status information of the user terminal, and the first page rendering unit currently occupied by the user terminal for rendering the page of the target source; wherein, pages from different sources are rendered through different page rendering units; Based on the device status information and the first page rendering unit, a target page rendering unit is determined for rendering the target page; The target page is rendered based on the target page rendering unit. The step of determining the target page rendering unit for rendering the target page based on the device status information and the first page rendering unit includes: If the device status information meets preset conditions, the second page rendering unit (excluding the first page rendering unit) among the multiple page rendering units in the page rendering unit pool corresponding to the target source will be used as the target page rendering unit; or... If the device status information does not meet the preset conditions, determine the first number of the page rendering unit corresponding to the target source that has been preset. Determine the second number of the first page rendering unit; Based on the first number and the second number corresponding to the target source, the target page rendering unit is determined, wherein the first number is a pre-set number of page rendering units that can be occupied simultaneously for the target source, and the second number is the number of page rendering units currently being occupied among the multiple page rendering units corresponding to the target source. The step of determining the target page rendering unit based on the first number and the second number corresponding to the target source includes: If the first number corresponding to the target page is greater than the second number, any idle page rendering unit among the multiple in-page rendering units corresponding to the target source in the page rendering unit pool will be used as the target page rendering unit; or If the first number corresponding to the target page is not greater than the first number, the target page rendering unit is determined from the currently occupied first page rendering unit.
2. The method according to claim 1, characterized in that, After determining the target page rendering unit from the currently occupied page rendering units, the method further includes: Release the data in the target page rendering unit; Establish the binding relationship between the target page rendering unit and the target page.
3. The method according to claim 2, characterized in that, The process of releasing the data in the target page rendering unit includes: Identify the overlapping data in the data rendered by the target page rendering unit that is identical to the target page; Release all data in the target page rendering unit except for the overlapping data.
4. The method according to claim 2, characterized in that, Before rendering the target page based on the target page rendering unit, the method further includes: A data switching instruction is sent to the data storage unit corresponding to the target source. After receiving the data switching instruction, the data storage unit sends the page data of the target page to the target page rendering unit. The rendering of the target page based on the target page rendering unit includes: The target page is rendered and displayed based on the target page rendering unit.
5. A content display device, characterized in that, include: The receiving module is used to receive display instructions for the target page from the target source; The acquisition module is used to acquire the current device status information of the user terminal, and the first page rendering unit currently occupied by the user terminal for rendering the page of the target source; wherein, pages from different sources are rendered through different page rendering units; The determining module is used to determine a target page rendering unit for rendering the target page based on the device status information and the first page rendering unit; The rendering module is used to render the target page based on the target page rendering unit. The step of determining the target page rendering unit for rendering the target page based on the device status information and the first page rendering unit includes: If the device status information meets preset conditions, the second page rendering unit (excluding the first page rendering unit) among the multiple page rendering units in the page rendering unit pool corresponding to the target source will be used as the target page rendering unit; or... If the device status information does not meet the preset conditions, determine the first number of the page rendering unit corresponding to the target source that has been preset. Determine the second number of the first page rendering unit; Based on the first number and the second number corresponding to the target source, the target page rendering unit is determined, wherein the first number is a pre-set number of page rendering units that can be occupied simultaneously for the target source, and the second number is the number of page rendering units currently being occupied among the multiple page rendering units corresponding to the target source. The step of determining the target page rendering unit based on the first number and the second number corresponding to the target source includes: If the first number corresponding to the target page is greater than the second number, any idle page rendering unit among the multiple in-page rendering units corresponding to the target source in the page rendering unit pool will be used as the target page rendering unit; or If the first number corresponding to the target page is not greater than the first number, the target page rendering unit is determined from the currently occupied first page rendering unit.
6. A computer device, characterized in that, include: The computer device includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the computer device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, they perform the steps of the content display method as described in any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the content display method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Memory management method and device, terminal and storage medium
CN109669877A
Page generation method and device, electronic equipment and storage medium
CN113836463A